Vulnerable Smart Contract Function Locating Based on Multi-Relational Nested Graph Convolutional Network

06/07/2023
by   Haiyang Liu, et al.
0

The immutable and trustable characteristics of blockchain enable smart contracts to be applied in various fields. Unfortunately, smart contracts are subject to various vulnerabilities, which are frequently exploited by attackers, causing financial damage to users.In this paper, we study the problem of vulnerable smart contract function locating. We construct a novel Multi-Relational Nested contract Graph (MRNG) to better characterize the rich syntactic and semantic information in the smart contract code, including the relationships between data and instructions. An MRNG represents a smart contract, where each node represents a function in the smart contract and each edge describes the calling relationship between the functions. In addition, we create a Multi-Relational Function Graph (MRFG) for each function, which characterizes the corresponding function code. That is, each function is characterized as an MRFG, which corresponds to a node in the MRNG. Each MRFG uses different types of edges to represent the different control and data relationships between nodes within a function. We also propose a Multi-Relational Nested Graph Convolutional Network (MRN-GCN) to process the MRNG. MRN-GCN first extracts and aggregates features from each MRFG, using the edge-enhanced graph convolution network and self-attention mechanism. The extracted feature vector is then assigned to the corresponding node in the MRNG to obtain a new Featured Contract Graph (FCG) for the smart contract. Graph convolution is used to further extract features from the FCG. Finally, a feed forward network with a Sigmoid function is used to locate the vulnerable functions. Experimental results on the real-world smart contract datasets show that model MRN-GCN can effectively improve the accuracy, precision, recall and F1-score performance of vulnerable smart contract function locating.

READ FULL TEXT

page 6

page 7

page 8

page 9

page 10

research
05/31/2021

A Bytecode-based Approach for Smart Contract Classification

With the development of blockchain technologies, the number of smart con...
research
08/28/2022

MANDO: Multi-Level Heterogeneous Graph Embeddings for Fine-Grained Detection of Smart Contract Vulnerabilities

Learning heterogeneous graphs consisting of different types of nodes and...
research
04/25/2023

HyMo: Vulnerability Detection in Smart Contracts using a Novel Multi-Modal Hybrid Model

With blockchain technology rapidly progress, the smart contracts have be...
research
03/08/2023

Graph Neural Networks Enhanced Smart Contract Vulnerability Detection of Educational Blockchain

With the development of blockchain technology, more and more attention h...
research
01/22/2021

Probabilistic Framework For Loss Distribution Of Smart Contract Risk

Smart contract risk can be defined as a financial risk of loss due to cy...
research
07/24/2021

Combining Graph Neural Networks with Expert Knowledge for Smart Contract Vulnerability Detection

Smart contract vulnerability detection draws extensive attention in rece...
research
11/28/2021

Semantic Code Search for Smart Contracts

Semantic code search technology allows searching for existing code snipp...

Please sign up or login with your details

Forgot password? Click here to reset