Eth2Vec: Learning Contract-Wide Code Representations for Vulnerability Detection on Ethereum Smart Contracts
Authors:
Top Cited Papers
Open Access
- 24 May 2021
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 47-59
Abstract
Ethereum smart contracts are programs that run on the Ethereum blockchain, and many smart contract vulnerabilities have been discovered in the past decade. Many security analysis tools have been created to detect such vulnerabilities, but their performance decreases drastically when codes to be analyzed are being rewritten. In this paper, we propose Eth2Vec, a machine-learning-based static analysis tool for vulnerability detection in smart contracts. It is also robust against code rewrites, i.e., it can detect vulnerabilities even in rewritten codes. Existing machine-learning-based static analysis tools for vulnerability detection need features, which analysts create manually, as inputs. In contrast, Eth2Vec automatically learns features of vulnerable Ethereum Virtual Machine (EVM) bytecodes with tacit knowledge through a neural network for natural language processing. Therefore, Eth2Vec can detect vulnerabilities in smart contracts by comparing the code similarity between target EVM bytecodes and the EVM bytecodes it already learned. We conducted experiments with existing open databases, such as Etherscan, and our results show that Eth2Vec outperforms a recent model based on support vector machine in terms of well-known metrics, i.e., precision, recall, and F1-score.Keywords
All Related Versions
Funding Information
- JSPS KAKENHI (18K18049)
- Innovation Platform for Society 5.0 at MEXT
This publication has 36 references indexed in Scilit:
- A Semantic Framework for the Security Analysis of Ethereum Smart Contracts2018
- ZEUS: Analyzing Safety of Smart Contracts2018
- walk2friends2017
- A Survey of Attacks on Ethereum Smart Contracts (SoK)2017
- Under-optimized smart contracts devour your money2017
- Making Smart Contracts Smarter2016
- Formal Verification of Smart Contracts2016
- Kam1n02016
- Learning Distributed Representations of Sentences from Unlabelled Data2016
- Random ForestsMachine Learning, 2001