StateGuard:检测去中心化交易所智能合约中的状态脱轨缺陷
StateGuard: Detecting State Derailment Defects in Decentralized Exchange Smart Contract
AI总结:
针对去中心化交易所多合约交互下的状态脱轨缺陷检测难题,提出基于深度学习的StateGuard框架,通过构建合约AST提取特征生成图表示、结合GCN检测缺陷,在46个项目5671个合约上精确率达92.24%,还在真实审计中发现多个新CVE。
摘要:
去中心化交易所(Decentralized Exchanges,DEXs)依托区块链技术与智能合约,已在去中心化金融领域兴起。然而,存在多合约交互的DEX项目伴随复杂的状态逻辑,使得状态缺陷的解决颇具挑战性。本文首次针对DEX的状态脱轨缺陷展开系统性研究,这类缺陷会导致合约执行过程中系统状态出现错误、不完整或未授权的变更,可能引发安全威胁。我们提出StateGuard,这是一款基于深度学习的框架,用于检测DEX智能合约中的状态脱轨缺陷。StateGuard会构建智能合约的抽象语法树(Abstract Syntax Tree,AST),提取关键特征以生成图表示,随后利用图卷积网络(Graph Convolutional Network,GCN)发现缺陷。我们在包含5671个智能合约的46个DEX项目上对StateGuard进行评估,结果验证了其有效性,精确率达92.24%。为进一步验证其实用性,我们使用StateGuard审计真实场景下的智能合约,成功确认了多个全新的CVE漏洞。
英文摘要:
Decentralized Exchanges (DEXs), leveraging blockchain technology and smart contracts, have emerged in decentralized finance. However, the DEX project with multi-contract interaction is accompanied by complex state logic, which makes it challenging to solve state defects. In this paper, we conduct the first systematic study on state derailment defects of DEXs. These defects could lead to incorrect, incomplete, or unauthorized changes to the system state during contract execution, potentially causing security threats. We propose StateGuard, a deep learning-based framework to detect state derailment defects in DEX smart contracts. StateGuard constructs an Abstract Syntax Tree (AST) of the smart contract, extracting key features to generate a graph representation. Then, it leverages a Graph Convolutional Network (GCN) to discover defects. Evaluating StateGuard on 46 DEX projects with 5,671 smart contracts reveals its effectiveness, with a precision of 92.24%. To further verify its practicality, we used StateGuard to audit real-world smart contracts and successfully authenticated multiple novel CVEs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。