Lune

ICSE2025Top-tier venue

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

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 (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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on Ethereum cites Making Smart Contracts Smarter
  • Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on Ethereum cites sFuzz: an efficient adaptive fuzzer for solidity smart contracts
  • Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on Ethereum cites Securify: Practical Security Analysis of Smart Contracts
  • Definition and Detection of Defects in NFT Smart Contracts cites Making Smart Contracts Smarter
  • Definition and Detection of Defects in NFT Smart Contracts cites Securify: Practical Security Analysis of Smart Contracts
  • EventSpec: Defining and Detecting Event-Semantic Issues in Blockchain Ecosystems cites Making Smart Contracts Smarter
  • EventSpec: Defining and Detecting Event-Semantic Issues in Blockchain Ecosystems cites Securify: Practical Security Analysis of Smart Contracts
  • sFuzz: an efficient adaptive fuzzer for solidity smart contracts cites Making Smart Contracts Smarter
  • Securify: Practical Security Analysis of Smart Contracts cites Making Smart Contracts Smarter
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. EventSpec: Defining and Detecting Event-Semantic Issues in Blockchain EcosystemsYixuan Liu, Yuxin Dong, Ye Liu, Yin Wu et al.ISSTA 2026

Builds on6

  1. Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena et al.CCS 2016 · 2,306 citations
  2. Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais et al.CCS 2018 · 1,108 citations
  3. sFuzz: an efficient adaptive fuzzer for solidity smart contractsTai D. Nguyen, Long H. Pham, Jun Sun, Yun Lin et al.ICSE 2020 · 260 citations
  4. Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on EthereumZibin Zheng, Neng Zhang, Jianzhong Su, Zhijie Zhong et al.ICSE 2023 · 52 citations
  5. Definition and Detection of Defects in NFT Smart ContractsShuo Yang, Jiachi Chen, Zibin ZhengISSTA 2023 · 35 citations

Related papers

  1. Empirical Study of Move Smart Contract Security: Introducing MoveScan for Enhanced AnalysisShuwei Song, Jiachi Chen, Ting Chen, Xiapu Luo et al.ISSTA 2024 · 4 citations
  2. An Attack on TON's ADNL Secure Channel ProtocolAviv Frenkel, Dmitry KoganS&P 2025
  3. GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program AnalysisYuqiang Sun, Daoyuan Wu, Yue Xue, Han Liu et al.ICSE 2024 · 131 citations
  4. BugSweeper: Function-Level Detection of Smart Contract Vulnerabilities Using Graph Neural NetworksUisang Lee, Changhoon Chung, Junmo Lee, Soo-Mook MoonAAAI 2026
  5. COBRA: Interaction-Aware Bytecode-Level Vulnerability Detector for Smart ContractsWenkai Li, Xiaoqi Li, Zongwei Li, Yuqing ZhangASE 2024 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines