GVD-net: Graph embedding-based Machine Learning Model for Smart Contract Vulnerability Detection
Abstract
Ethereum smart contract and the agreements contained therein exist across a distributed, decentralized blockchain network, which controls the execution of Dapps, and transactions are trackable and irreversible. Since the amount of smart contracts on Ethereum has a rapid growth, which also lead to a large number of security vulnerabilities. However, the traditional method such as static symbolic analysis requires manual analysis in advance with high false detection rate. In this paper, we propose a GVD-net model for smart contract vulnerability detection. GVD-net consists of preprocessing section,backbone-net and detection section.We prepossess the source code and gain a weight matrix in the first section. In backbone-net, we generate a CFG graph according to the variables and function calling relationships of the solidity code, and use the CFG graph to build the corresponding relationship of nodes and generate a non-Euclidean graph. Then we use the adjacent search algorithm to generate a non-complete random walk sequence, and use the graph embedding algorithm Node2Vec to generate a 256-dimensional vector and gain another weight matrix. We input the test code into GVD-net to generate the threshold ϑ in the final section and will classify the smart contract as danger code if the ϑ is bigger than 0.75. Moreover, GVD-net will confirm the type of vulnerability according to weight matrix. We conduct comprehensive experiments on GVD-net with the SBcurated data-set, and the experiment results show that (1) GVD-net can classify a smart contract as safe or danger code, with the accuracy of 90.2% (2) GVD-net can detect three types of vulnerability (arithmetic issues, access control and asset frozen) and attain good performance within 1s.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.