Papers2 providers Ā· 2 records
January 1, 2022Ā· Journal of Systems and Software
article

Smart contract vulnerability detection based on semantic graph and residual graph convolutional networks with edge attention

Abstract

It is imperative to assure the security of smart contracts via intelligent vulnerability detection tools before deploying smart contracts on blockchains. The existing deep learning-based approaches fail to effectively capture the rich syntax and semantic information embedded in smart contracts. In this paper, we detect smart contract vulnerabilities at the function level by constructing a novel semantic graph (SG) for each function and learning the SGs using a new graph convolutional network EA-RGCN. Our proposed method consists of three stages. In the first stage, we create the SG which characterizes rich data-data, instruction-instruction and instruction-data relationships in the function code. In the second stage, we propose EA-RGCN which contains three parts: node and edge representation via word2vec, content feature extraction with a residual GCN (RGCN) module, and semantic feature extraction using an edge attention (EA) module. Finally, we concatenate the code content features and the semantic features to obtain the global code feature and use a Multilayer Perceptron (MLP) to identify whether the function is vulnerable. We conduct experiments on the dataset constructed from real-world smart contracts. Experimental results demonstrate that the proposed semantic graph and the EA-RGCN model can achieve superior performance.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.