journal article·2024Open access

Smart Contract Vulnerability Detection Method Based on Feature Graph and Multiple Attention Mechanisms

Zhenxiang He, Zhenyu Zhao, Ke Chen, Yanlin Liu

Computers, Materials & Continua· Volume 79· Issue 2

Abstract

The fast-paced development of blockchain technology is evident. Yet, the security concerns of smart contracts represent a significant challenge to the stability and dependability of the entire blockchain ecosystem. Conventional smart contract vulnerability detection primarily relies on static analysis tools, which are less efficient and accurate. Although deep learning methods have improved detection efficiency, they are unable to fully utilize the static relationships within contracts. Therefore, we have adopted the advantages of the above two methods, combining feature extraction mode of tools with deep learning techniques. Firstly, we have constructed corresponding feature extraction mode for different vulnerabilities, which are used to extract feature graphs from the source code of smart contracts. Then, the node features in feature graphs are fed into a graph convolutional neural network for training, and the edge features are processed using a method that combines attention mechanism with gated units. Ultimately, the revised node features and edge features are concatenated through a multi-head attention mechanism. The result of the splicing is a global representation of the entire feature graph. Our method was tested on three types of data: Timestamp vulnerabilities, reentrancy vulnerabilities, and access control vulnerabilities, where the F1 score of our method reaches 84.63%, 92.55%, and 61.36%. The results indicate that our method surpasses most others in detecting smart contract vulnerabilities.
Source: openalex_inverted_index · Quality: baseline

Research context

OpenAlex topics: Blockchain Technology Applications and Security · Cybercrime and Law Enforcement Studies · Advanced Malware Detection Techniques

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

References (33)

Show source-provided references
1. Feedback trading in the cryptocurrency market
2. T. H. D. Huang, “Hunting the Ethereum smart contract: Color-inspired inspection of potential attacks,” 2018. Accessed: Mar. 21, 2024. [Online]. Available: https://arxiv.org/abs/1807.01868
3. Machine learning model for smart contracts security analysis
4. Smart contract vulnerability detection using graph neural network
5. Combining graph neural networks with expert knowledge for smart contract vulnerability detection
6. Making smart contracts smarter
7. Securify: Practical security analysis of smart contracts
8. B. Mueller, “Mythril—Reversing and bug hunting framework for the ethereum blockchain,” 2017. Accessed: Mar. 21, 2024. [Online]. Available: https://github.com/Consensys/mythril
9. Slither: A static analysis framework for smart contracts
10. Manticore: A user-friendly symbolic execution framework for binaries and smart contracts
11. SmartCheck: Static analysis of Ethereum smart contracts
12. CorrAUC: A malicious bot-IoT traffic detection method in IoT network using machine-learning techniques10.1109/JIOT.2020.3002255 ↗
13. IoT malicious traffic identification using wrapper-based feature selection mechanisms10.1016/j.cose.2020.101863 ↗
14. CBGRU: A detection method of smart contract vulnerability based on a hybrid model10.3390/s22093577 ↗
15. SmartEmbed: A tool for clone and bug detection in smart contracts through structural code embedding
16. Eth2Vec: Learning contract-wide code representations for vulnerability detection on Ethereum smart contracts
17. N-gram-based text categorization
18. On the use of deep neural networks for security vulnerabilities detection in smart contracts
19. M. Allamanis, M. Brockschmidt, and M. Khademi, “Learning to represent programs with graphs,” 2017. Accessed: Mar. 21, 2024. [Online]. Available: https://arxiv.org/pdf/1711.00740.pdf
20. CCGraph: A PDG-based code clone detector with approximate graph matching
21. Learning features from enhanced function call graphs for Android malware detection10.1016/j.neucom.2020.10.054 ↗
22. Cao · Inf. Softw. Tech. · Aug. 2021 · 136 · 10657610.1016/j.infsof.2021.106576 ↗
23. Empirical review of automated analysis tools on 47,587 Ethereum smart contracts
24. An optimized transaction verification method for trustworthy blockchain-enabled IIoT10.1016/j.adhoc.2021.102526 ↗
25. T. N. Kipf and M. Welling, “Semi-supervised classification with graph convolutional networks,” 2016. Accessed: Mar. 21, 2024. [Online]. Available: https://arxiv.org/abs/1609.02907
26. K. Cho et al., “Learning phrase representations using RNN encoder-decoder for statistical machine translation,” 2014. Accessed: Mar. 21, 2024. [Online]. Available: https://arxiv.org/abs/1406.107810.3115/v1/D14-1179 ↗
27. A review on the attention mechanism of deep learning10.1016/j.neucom.2021.03.091 ↗
28. ContractFuzzer: Fuzzing smart contracts for vulnerability detection
29. S. Kalra, S. Goel, M. Dhawan, and S. Sharma, “ZEUS: Analyzing safety of smart contracts,” 2018. Accessed: Mar. 21, 2024. [Online]. Available: https://sukritkalra.github.io/data/papers/zeus.pdf10.14722/ndss.2018.23082 ↗
30. A smart contract vulnerability detection mechanism based on deep learning and expert rules10.1109/ACCESS.2023.3298048 ↗
31. Z. Liu, P. Qian, X. Wang, L. Zhu, Q. He and S. Ji, “Smart contract vulnerability detection: From pure neural network to interpretable graph feature and expert pattern fusion,” 2021. Accessed: Mar. 21, 2024. [Online]. Available: https://arxiv.org/abs/2106.0928210.24963/ijcai.2021/379 ↗
32. Smart contract vulnerability detection based on hybrid attention mechanism model10.3390/app13020770 ↗
33. Towards automated reentrancy detection for smart contracts based on sequential models10.1109/ACCESS.2020.2969429 ↗