Enhancing the Open Network: Definition and Automated Detection of Smart Contract Defects
Hao Song, Teng Li, Jiachi Chen, Ting Chen, Beibei Li, Zhangyan Lin, Yi Lu, Pan Li, Xihan Zhou
摘要
The Open Network (TON), designed to support Telegram's extensive user base of hundreds of millions, has garnered considerable attention since its launch in 2022. FunC is the most popular programming language for writing smart contracts on TON. It is distinguished by a unique syntax compared to other smart contract languages. Despite growing interest, research on the practical defects of TON smart contracts is still in its early stages. In this paper, we summarize eight smart contract defects identified from TON's official blogs and audit reports, each with detailed definitions and code examples. Furthermore, we propose a static analysis framework called TONScanner to facilitate the detection of these defects. Specifically, TONScanner reuses FunC compiler's frontend code to transform the FunC source code into FunC intermediate representation (IR) in the form of a directed acyclic graph (DAG). Based on this IR, TONScanner constructs a control flow graph (CFG), then transforms it into a static single assignment (SSA) form to simplify further analysis. TONScanner also integrates Data Dependency, Call Graph, Taint Analysis, and Cell Construct, which are specifically tailored for TON blockchain's unique data structures. These components finally facilitate the identification of the eight defects. We evaluate the effectiveness of TONScanner by applying it to 1,640 smart contracts and find a total of 14,995 defects. Through random sampling and manual labeling, we find that TONScanner achieves an overall precision of 97.49%. The results reveal that current TON contracts contain numerous defects, indicating that developers are prone to making errors. TONScanner has proven its ability to accurately identify these defects, thereby aiding in their correction.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on Ethereum 引用了 Making Smart Contracts Smarter
- Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on Ethereum 引用了 sFuzz: an efficient adaptive fuzzer for solidity smart contracts
- Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on Ethereum 引用了 Securify: Practical Security Analysis of Smart Contracts
- Definition and Detection of Defects in NFT Smart Contracts 引用了 Making Smart Contracts Smarter
- Definition and Detection of Defects in NFT Smart Contracts 引用了 Securify: Practical Security Analysis of Smart Contracts
- EventSpec: Defining and Detecting Event-Semantic Issues in Blockchain Ecosystems 引用了 Making Smart Contracts Smarter
- EventSpec: Defining and Detecting Event-Semantic Issues in Blockchain Ecosystems 引用了 Securify: Practical Security Analysis of Smart Contracts
- sFuzz: an efficient adaptive fuzzer for solidity smart contracts 引用了 Making Smart Contracts Smarter
- Securify: Practical Security Analysis of Smart Contracts 引用了 Making Smart Contracts Smarter
引用它的顶会 Paper1
它引用的 Paper6
- Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena 等CCS 2016 · 2,306 次引用
- Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais 等CCS 2018 · 1,108 次引用
- sFuzz: an efficient adaptive fuzzer for solidity smart contractsTai D. Nguyen, Long H. Pham, Jun Sun, Yun Lin 等ICSE 2020 · 260 次引用
- Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on EthereumZibin Zheng, Neng Zhang, Jianzhong Su, Zhijie Zhong 等ICSE 2023 · 52 次引用
- Definition and Detection of Defects in NFT Smart ContractsShuo Yang, Jiachi Chen, Zibin ZhengISSTA 2023 · 35 次引用
相关 Paper
- Empirical Study of Move Smart Contract Security: Introducing MoveScan for Enhanced AnalysisShuwei Song, Jiachi Chen, Ting Chen, Xiapu Luo 等ISSTA 2024 · 4 次引用
- An Attack on TON's ADNL Secure Channel ProtocolAviv Frenkel, Dmitry KoganS&P 2025
- GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program AnalysisYuqiang Sun, Daoyuan Wu, Yue Xue, Han Liu 等ICSE 2024 · 131 次引用
- BugSweeper: Function-Level Detection of Smart Contract Vulnerabilities Using Graph Neural NetworksUisang Lee, Changhoon Chung, Junmo Lee, Soo-Mook MoonAAAI 2026
- COBRA: Interaction-Aware Bytecode-Level Vulnerability Detector for Smart ContractsWenkai Li, Xiaoqi Li, Zongwei Li, Yuqing ZhangASE 2024 · 4 次引用
