Guardians of the Ledger: Protecting Decentralized Exchanges from State Derailment Defects
Zongwei Li, Wenkai Li, Xiaoqi Li, Yuqing Zhang

TL;DR
This paper systematically studies state derailment defects in decentralized exchange smart contracts and introduces StateGuard, a deep learning framework using GCNs, to detect these defects with high accuracy, improving over existing methods.
Contribution
It defines five categories of state derailment defects, proposes a novel deep learning-based detection framework, and demonstrates its effectiveness on real-world DEX smart contracts.
Findings
StateGuard achieves 94.25% F1-score in defect detection.
It outperforms state-of-the-art methods by 6.29% F1-score.
Successfully identified multiple novel CVEs in real contracts.
Abstract
The decentralized exchange (DEX) leverages smart contracts to trade digital assets for users on the blockchain. Developers usually develop several smart contracts into one project, implementing complex logic functions and multiple transaction operations. However, the interaction among these contracts poses challenges for developers analyzing the state logic. Due to the complex state logic in DEX projects, many critical state derailment defects have emerged in recent years. In this paper, we conduct the first systematic study of state derailment defects in DEX. We define five categories of state derailment defects and provide detailed analyses of them. Furthermore, we propose a novel deep learning-based framework StateGuard for detecting state derailment defects in DEX smart contracts. It leverages a smart contract deconstructor to deconstruct the contract into an Abstract Syntax Tree…
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.
Taxonomy
TopicsLegal and Constitutional Studies · State Capitalism and Financial Governance · Law, Economics, and Judicial Systems
