Papers1 provider · 1 record
July 8, 2025· 2025 IEEE 49th Annual Computers, Software, and Applications Conference (COMPSAC)
conference-paper

Smart Contract Reentrancy Vulnerability Localization Using Explainable Graph Neural Networks

Abstract

While smart contracts, as automatic processing programs for decentralized applications deployed on the blockchain, have gained widespread attention, their vulnerabilities have also led to significant economic losses. To address this security issue, researchers have proposed various approaches for locating vulnerabilities in smart contracts. However, most of them are designed to identify vulnerable smart contracts within a blockchain-based application. Only a few approaches adopt deep learning techniques to locate the exact line containing the reentrancy vulnerability based on Ethereum smart contracts’ source code. In this paper, we focus on the bytecode of Ethereum smart contracts and propose DeepLocator, a deep learning-based two-phase locator designed to pinpoint code-line-level reentrancy vulnerabilities. In the detection phase, DeepLocator constructs an attributed control flow graph extracted from the smart contract’s opcodes, and applies graph neural networks (GNNs) to determine whether a contract contains reentrancy vulnerabilities. In the localization phase, DeepLocator employs a model explainer of GNNs to rank the opcodes of each vulnerable smart contract according to their impact on the detection phase’s results, and then maps them back to the source code with the output of ranked suspicious statements. Empirical experiments conducted on widely used datasets of reentrancy vulnerabilities validate the efficacy of our locator. DeepLocator outperforms baseline traditional and learning-based detection approaches by 28.7% and 3.5%, respectively. Moreover, it pinpoints 20.0%, 61.1%, and 74.5% vulnerabilities within the top 1, 5, and 10 ranked suspicious statements, respectively.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.