Abstract
With the rise of decentralized finance (DeFi), smart contracts have become essential tools for automating financial transactions on blockchain networks. However, these contracts are vulnerable to security flaws, which, once deployed, are difficult to correct and can lead to substantial financial losses. Traditional methods for detecting vulnerabilities in smart contracts often rely on fixed rules, making it hard to catch more complex or emerging threats. In this project, we present a novel approach that combines Abstract Syntax Trees (ASTs) and transformer-based AI models to improve the detection of vulnerabilities in Solidity smart contracts. By analyzing the contract’s structure in detail, our model can identify potential security risks before they reach the blockchain. This innovative solution aims to enhance DeFi security, reduce risk, and build greater trust in blockchain technology.