EconPapers    
Economics at your fingertips  
 

Vulnerability Detection and Classification of Ethereum Smart Contracts Using Deep Learning

Raed M. Bani-Hani (), Ahmed S. Shatnawi and Lana Al-Yahya
Additional contact information
Raed M. Bani-Hani: Department of Network Engineering and Security, Jordan University of Science and Technology, Irbid 22110, Jordan
Ahmed S. Shatnawi: Department of Software Engineering, Jordan University of Science and Technology, Irbid 22110, Jordan
Lana Al-Yahya: Department of Network Engineering and Security, Jordan University of Science and Technology, Irbid 22110, Jordan

Future Internet, 2024, vol. 16, issue 9, 1-35

Abstract: Smart contracts are programs that reside and execute on a blockchain, like any transaction. They are automatically executed when preprogrammed terms and conditions are met. Although the smart contract (SC) must be presented in the blockchain for the integrity of data and transactions stored within it, it is highly exposed to several vulnerabilities attackers exploit to access the data. In this paper, classification and detection of vulnerabilities targeting smart contracts are performed using deep learning algorithms over two datasets containing 12,253 smart contracts. These contracts are converted into RGB and Grayscale images and then inserted into Residual Network (ResNet50), Visual Geometry Group-19 (VGG19), Dense Convolutional Network (DenseNet201), k-nearest Neighbors (KNN), and Random Forest (RF) algorithms for binary and multi-label classification. A comprehensive analysis is conducted to detect and classify vulnerabilities using different performance metrics. The performance of these algorithms was outstanding, accurately classifying vulnerabilities with high F1 scores and accuracy rates. For binary classification, RF emerged in RGB images as the best algorithm based on the highest F1 score of 86.66% and accuracy of 86.66%. Moving on to multi-label classification, VGG19 stood out in RGB images as the standout algorithm, achieving an impressive accuracy of 89.14% and an F1 score of 85.87%. To the best of our knowledge, and according to the available literature, this study is the first to investigate binary classification of vulnerabilities targeting Ethereum smart contracts, and the experimental results of the proposed methodology for multi-label vulnerability classification outperform existing literature.

Keywords: smart contract; vulnerability; deep learning; KNN; RF; ResNet50; VGG19; DenseNet201; performance metrics (search for similar items in EconPapers)
JEL-codes: O3 (search for similar items in EconPapers)
Date: 2024
References: View references in EconPapers View complete reference list from CitEc
Citations:

Downloads: (external link)
https://www.mdpi.com/1999-5903/16/9/321/pdf (application/pdf)
https://www.mdpi.com/1999-5903/16/9/321/ (text/html)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:gam:jftint:v:16:y:2024:i:9:p:321-:d:1471404

Access Statistics for this article

Future Internet is currently edited by Ms. Grace You

More articles in Future Internet from MDPI
Bibliographic data for series maintained by MDPI Indexing Manager ().

 
Page updated 2025-03-19
Handle: RePEc:gam:jftint:v:16:y:2024:i:9:p:321-:d:1471404