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

TL;DR
This paper introduces TONScanner, a static analysis framework for detecting smart contract defects on the TON blockchain, utilizing IR and CFG analysis to identify issues with high precision.
Contribution
We propose a novel static analysis framework, TONScanner, tailored for TON smart contracts, integrating multiple analysis techniques to detect eight specific defect types.
Findings
TONScanner identified 14,995 defects in 1,640 contracts.
Achieved 97.49% overall precision in defect detection.
Current TON contracts contain numerous developer-prone defects.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
