Smart Contract Vulnerability Detection with Machine Learning
摘要
Smart contracts are the central part of decentralized blockchain-based applications. The market for such applications is growing at a tremendous pace every year, as is the number of smart contracts. Smart contracts have a number of known vulnerabilities, the use of which can lead to huge financial and reputational losses. This article is devoted to detecting the most known vulnerabilities in the Solidity smart contracts of the Ethereum blockchain. The process of preparing a dataset for machine learning based on the crypto_ethereum dataset is considered. It is noted that the problem of class imbalance arises in process of training the model. The following describes the process of training a machine learning model, which consists of three bidirectional recurrent BiGRU layers and three convolutional CNN layers. The results of the approach are compared with well-known vulnerability detection methods – static and dynamic analyzers. It is concluded that machine learning-based approaches show the best results and require less time to detect vulnerabilities directly.