Trace: Securing Smart Contract Repository Against Access Control Vulnerability

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Chen, Chong, Chen, Jiachi, Bao, Lingfeng, Lo, David, Wang, Yanlin, Shan, Zhenyu, Chen, Ting, Yin, Guangqiang, Yu, Jianxing, Zheng, Zibin
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912663877976064
author Chen, Chong
Chen, Jiachi
Bao, Lingfeng
Lo, David
Wang, Yanlin
Shan, Zhenyu
Chen, Ting
Yin, Guangqiang
Yu, Jianxing
Zheng, Zibin
author_facet Chen, Chong
Chen, Jiachi
Bao, Lingfeng
Lo, David
Wang, Yanlin
Shan, Zhenyu
Chen, Ting
Yin, Guangqiang
Yu, Jianxing
Zheng, Zibin
contents Smart contract vulnerabilities, particularly improper Access Control that allows unauthorized execution of restricted functions, have caused billions of dollars in losses. GitHub hosts numerous smart contract repositories containing source code, documentation, and configuration files-these serve as intermediate development artifacts that must be compiled and packaged before deployment. 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 complex repositories, as they typically require the target contract to be compilable to generate an abstract representation for further analysis. This paper presents TRACE, a tool designed to secure non-compilable smart contract repositories against access control vulnerabilities. TRACE employs LLMs to locate sensitive functions involving critical operations (e.g., transfer) within the contract and subsequently completes function snippets into a fully compilable contract. TRACE constructs 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 detect Access Control vulnerabilities. Experimental results demonstrate that TRACE outperforms 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, TRACE achieves 87.0% precision, significantly surpassing DeepSeek-R1's 14.3%.
format Preprint
id arxiv_https___arxiv_org_abs_2510_19254
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Trace: Securing Smart Contract Repository Against Access Control Vulnerability
Chen, Chong
Chen, Jiachi
Bao, Lingfeng
Lo, David
Wang, Yanlin
Shan, Zhenyu
Chen, Ting
Yin, Guangqiang
Yu, Jianxing
Zheng, Zibin
Software Engineering
Smart contract vulnerabilities, particularly improper Access Control that allows unauthorized execution of restricted functions, have caused billions of dollars in losses. GitHub hosts numerous smart contract repositories containing source code, documentation, and configuration files-these serve as intermediate development artifacts that must be compiled and packaged before deployment. 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 complex repositories, as they typically require the target contract to be compilable to generate an abstract representation for further analysis. This paper presents TRACE, a tool designed to secure non-compilable smart contract repositories against access control vulnerabilities. TRACE employs LLMs to locate sensitive functions involving critical operations (e.g., transfer) within the contract and subsequently completes function snippets into a fully compilable contract. TRACE constructs 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 detect Access Control vulnerabilities. Experimental results demonstrate that TRACE outperforms 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, TRACE achieves 87.0% precision, significantly surpassing DeepSeek-R1's 14.3%.
title Trace: Securing Smart Contract Repository Against Access Control Vulnerability
topic Software Engineering
url https://arxiv.org/abs/2510.19254