IDEAS home Printed from https://ideas.repec.org/a/gam/jftint/v16y2024i9p321-d1471404.html
   My bibliography  Save this article

Vulnerability Detection and Classification of Ethereum Smart Contracts Using Deep Learning

Author

Listed:
  • Raed M. Bani-Hani

    (Department of Network Engineering and Security, Jordan University of Science and Technology, Irbid 22110, Jordan
    These authors contributed equally to this work.)

  • Ahmed S. Shatnawi

    (Department of Software Engineering, Jordan University of Science and Technology, Irbid 22110, Jordan
    These authors contributed equally to this work.)

  • Lana Al-Yahya

    (Department of Network Engineering and Security, Jordan University of Science and Technology, Irbid 22110, Jordan
    These authors contributed equally to this work.)

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.

Suggested Citation

  • Raed M. Bani-Hani & Ahmed S. Shatnawi & Lana Al-Yahya, 2024. "Vulnerability Detection and Classification of Ethereum Smart Contracts Using Deep Learning," Future Internet, MDPI, vol. 16(9), pages 1-35, September.
  • Handle: RePEc:gam:jftint:v:16:y:2024:i:9:p:321-:d:1471404
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1999-5903/16/9/321/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1999-5903/16/9/321/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Syed Yawar Abbas Zaidi & Munam Ali Shah & Hasan Ali Khattak & Carsten Maple & Hafiz Tayyab Rauf & Ahmed M. El-Sherbeeny & Mohammed A. El-Meligy, 2021. "An Attribute-Based Access Control for IoT Using Blockchain and Smart Contracts," Sustainability, MDPI, vol. 13(19), pages 1-26, September.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Evin Özkan & Neda Azizi & Omid Haass, 2021. "Leveraging Smart Contract in Project Procurement through DLT to Gain Sustainable Competitive Advantages," Sustainability, MDPI, vol. 13(23), pages 1-25, December.
    2. Mohsen Rouached & Aymen Akremi & Mouna Macherki & Naoufel Kraiem, 2024. "Policy-Based Smart Contracts Management for IoT Privacy Preservation," Future Internet, MDPI, vol. 16(12), pages 1-24, December.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jftint:v:16:y:2024:i:9:p:321-:d:1471404. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.