CrossMiner: Smart Contract Vulnerability Detection in Interactive Scenarios
Abstract
Vulnerability attacks targeting smart contracts have caused significant losses of digital assets. Many approaches based on static analysis, fuzzing, and deep learning have been proposed for detecting contract vulnerabilities. However, most existing methods only support vulnerability detection within individual contracts. When contracts interact with each other through external calls, these methods fail to perform effective cross-contract security analysis, leading to false negatives and false positives. To address these limitations, we propose CrossMiner, a deep learning-based approach for vulnerability detection in contract interaction scenarios. CrossMiner enables comprehensive risk assessment for cross-contract security through trace analysis of function call chains. Specifically, CrossMiner first constructs a cross-contract dependency graph based on function call chains to effectively model inter-contract dependencies and network dynamics, and collect semantic information about contract interactions. Then, it employs a heterogeneous graph neural network with a two-level attention mechanism to finely extract and integrate complex features from the dependency graph, ultimately achieving precise risk assessment and vulnerability detection. We evaluate the effectiveness of CrossMiner on three types of smart contract vulnerabilities: reentrancy, timestamp dependency, and transaction state dependency. Experimental results demonstrate that CrossMiner achieves the best performance among all baseline methods, improving detection accuracy by 5.52%, 4.94%, and 5.60% for these vulnerabilities, and the F1 scores are improved by 5.44%, 5.02%, and 5.40%, respectively.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.