Enhancing Smart Contract Security Analysis with Execution Property Graphs
Kaihua Qin, Zhe Ye, Zhun Wang, Weilin Li, Liyi Zhou, Chao Zhang, Dawn Song, Arthur Gervais
TL;DR
This work presents Clue, a dynamic analysis framework for the Ethereum Virtual Machine that uses the Execution Property Graph (EPG) to unify runtime information from contract executions. By merging a Call Trace Graph, a Dynamic Control-Flow Graph, and a Dynamic Dependence Graph, Clue enables efficient graph-traversal based detection of security incidents such as reentrancy and price manipulation, achieving high true positive rates with low false positives and real-time performance. The paper demonstrates strong results across reentrancy and price manipulation datasets, including discovery of previously unreported vulnerabilities (e.g., imBTC reentrancy) and a read-only reentrancy case study, and shows favorable comparisons to state-of-the-art tools. It also provides an ablation study confirming the necessity of the full EPG structure and discusses generalizability to new attack types via traversal refinements. Overall, Clue offers a scalable, extensible framework for forensic analysis and real-time intrusion detection in DeFi ecosystems, with potential to adapt to evolving threats with minimal graph-structural changes.
Abstract
Smart contract vulnerabilities have led to significant financial losses, with their increasing complexity rendering outright prevention of hacks increasingly challenging. This trend highlights the crucial need for advanced forensic analysis and real-time intrusion detection, where dynamic analysis plays a key role in dissecting smart contract executions. Therefore, there is a pressing need for a unified and generic representation of smart contract executions, complemented by an efficient methodology that enables the modeling and identification of a broad spectrum of emerging attacks. We introduce Clue, a dynamic analysis framework specifically designed for the Ethereum virtual machine. Central to Clue is its ability to capture critical runtime information during contract executions, employing a novel graph-based representation, the Execution Property Graph. A key feature of Clue is its innovative graph traversal technique, which is adept at detecting complex attacks, including (read-only) reentrancy and price manipulation. Evaluation results reveal Clue's superior performance with high true positive rates and low false positive rates, outperforming state-of-the-art tools. Furthermore, Clue's efficiency positions it as a valuable tool for both forensic analysis and real-time intrusion detection.
