Year: 2026
Type: article
Abstract: Smart contract vulnerabilities have led to billions of dollars in economic losses. Among these, improperAccess Control, which allows unauthorized users to execute restricted functions, is particularly prevalent and has caused significant financial damage. Smart contract repositories contain source code, documentation, configuration files, and other artifacts necessary for building and deploying smart contracts. GitHub hosts numerous open-source repositories of this kind, which serve as intermediate artifacts in development and require compilation and packaging to produce deployable contracts. Third-party developers often reference, reuse, or fork code from these repositories during custom development. However, if the referenced code contains vulnerabilities, it can introduce significant security risks. Existing tools for detecting smart contract vulnerabilities are limited in their ability to handle such complex repositories, as they typically require the target contract to be compilable to generate an abstract representation of the program for further analysis. This paper presentsTrace, a tool designed to secure non-compilable smartcontractrepositories againstaccesscontrol vulnerabilities. Traceemploys LLMs to locate sensitive functions involving critical operations (e.g.,transfer) within the contract and subsequently completes function snippets into a fully compilable contract. Traceconstructs a function call graph from the abstract syntax tree (AST) of the completed contract. It uses the control flow graph (CFG) of each function as node information. The nodes of the sensitive functions are then analyzed to detectAccess Controlvulnerabilities. Experimental results demonstrate thatTraceoutperforms state-of-the-art tools on an open-sourced CVE dataset, detecting 14 out of 15 CVEs. In addition, it achieves 89.2% precision on 5,000 recent on-chain contracts, far exceeding the best existing tool at 76.9%. On 83 real-world repositories,Traceachieves 87.0% precision, significantly surpassingDeepSeek-R1’s 14.3%.
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7128312958
