An Efficient Code-Embedding-Based Vulnerability Detection Model for Ethereum Smart Contracts | IGI Global Scientific Publishing
An Efficient Code-Embedding-Based Vulnerability Detection Model for Ethereum Smart Contracts

An Efficient Code-Embedding-Based Vulnerability Detection Model for Ethereum Smart Contracts

Zhigang Xu, Xingxing Chen, Xinhua Dong, Hongmu Han, Zhongzhen Yan, Kangze Ye, Chaojun Li, Zhiqiang Zheng, Haitao Wang, Jiaxi Zhang
Copyright: © 2023 |Volume: 19 |Issue: 2 |Pages: 23
ISSN: 1548-3924|EISSN: 1548-3932|EISBN13: 9781668488157|DOI: 10.4018/IJDWM.320473
Cite Article Cite Article

MLA

Xu, Zhigang, et al. "An Efficient Code-Embedding-Based Vulnerability Detection Model for Ethereum Smart Contracts." IJDWM vol.19, no.2 2023: pp.1-23. https://doi.org/10.4018/IJDWM.320473

APA

Xu, Z., Chen, X., Dong, X., Han, H., Yan, Z., Ye, K., Li, C., Zheng, Z., Wang, H., & Zhang, J. (2023). An Efficient Code-Embedding-Based Vulnerability Detection Model for Ethereum Smart Contracts. International Journal of Data Warehousing and Mining (IJDWM), 19(2), 1-23. https://doi.org/10.4018/IJDWM.320473

Chicago

Xu, Zhigang, et al. "An Efficient Code-Embedding-Based Vulnerability Detection Model for Ethereum Smart Contracts," International Journal of Data Warehousing and Mining (IJDWM) 19, no.2: 1-23. https://doi.org/10.4018/IJDWM.320473

Export Reference

Mendeley
Favorite Full-Issue Download

Abstract

Efficient and convenient vulnerability detection for smart contracts is a key issue in the field of smart contracts. The earlier vulnerability detection for smart contracts mainly relies on static symbol analysis, which has high accuracy but low efficiency and is prone to path explosion. In this paper, the authors propose a static method for vulnerability detection based on deep learning. It first disassembles Ethereum smart contracts into opcode sequences and then converts the vulnerability detection problem into a natural language text classification problem. The word vector method is employed to map each opcode to a uniform vector space, and the opcode sequence matrix is trained by the TextCNN method to detect vulnerabilities. Furthermore, a code obfuscation method is given to enhance and balance the dataset, while three different opcode sequence generation methods are proposed to construct features. The experimental results verify that the average prediction accuracy of each smart contract exceeds 96%, and the average detection time is less than 0.1 s.