HGAT: smart contract vulnerability detection method based on hierarchical graph attention network
Authors:
Open Access
- 22 June 2023
- journal article
- research article
- Published by Springer Nature in Journal of Cloud Computing
- Vol. 12 (1) , 1-13
Abstract
With the widespread use of blockchain, more and more smart contracts are being deployed, and their internal logic is getting more and more sophisticated. Due to the large false positive rate and low detection accuracy of most current detection methods, which heavily rely on already established detection criteria, certain smart contracts additionally call for human secondary detection, resulting in low detection efficiency. In this study, we propose HGAT, a hierarchical graph attention network-based detection model, in order to address the aforementioned issues as well as the shortcomings of current smart contract vulnerability detection approaches. First, using Abstract Syntax Tree (AST) and Control Flow Graph, the functions in the smart contract are abstracted into code graphs (CFG). Then abstract each node in the code subgraph, extract the node features, utilize the graph attention mechanism GAT, splice the obtained vectors to form the features of each line of statements and use these features to detect smart contracts. To create test data and assess HGAT, we leverage the open-source smart contract vulnerability sample dataset. The findings of the experiment indicate that this method can identify smart contract vulnerabilities more quickly and precisely than other detection techniques.Keywords
Funding Information
- National Natural Science Foundation of China (No. 62272120, 62106030, No. 62272120, 62106030)
- Technology Innovation and Application Development Projects of Chongqing (No. cstc2021jscx-gksbX0032, cstc2021jscx-gksbX0029, No. cstc2021jscx-gksbX0032, cstc2021jscx-gksbX0029)
- Research Program of Basic Research and Frontier Technology of Chongqing (No. cstc2021jcyj-msxmX0530)
- Key R & D Plan of Hainan Province (No. ZDYF2021GXJS006)
This publication has 31 references indexed in Scilit:
- Blockchain-Supported Smart City Platform for Social Value Co-Creation and ExchangeIEEE Internet Computing, 2018
- Securify2018
- Foundations and Tools for the Static Analysis of Ethereum Smart Contracts2018
- SmartCheck2018
- Towards verifying ethereum smart contract bytecode in Isabelle/HOL2018
- Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection2017
- Making Smart Contracts Smarter2016
- Formal Verification of Smart Contracts2016
- A Survey of Automated Techniques for Formal Software VerificationIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2008
- A new model for learning in graph domains2006