Vulnerable Smart Contracts Detection on the Ethereum Blockchain Using an Effective Risk Estimation Metric

Document Type : Computer Article

Author

Computer Engineering

Abstract

Identifying vulnerable smart contracts has a direct impact on blockchain security because it helps users avoid using these contracts. Calculating the risk level is preferable to accurately identifying these types of contracts using classification models because these models have classification errors. In addition, the data required to achieve high accuracy may not be available. Therefore, with the help of a vulnerability risk estimation criterion for smart contracts, users can be helped in decision-making. In this research, the issue of vulnerability risk in smart contracts is introduced. In addition, an effective criterion for its estimation is devised. In this criterion, linear discriminant analysis of smart contracts and distances to their nearest neighbors is exploited to estimate the risk of an unknown smart contract. Although deep learning is not used in the proposed criterion and it requires little training data, it provides a realistic risk estimate. Experiments conducted on a real dataset of Ethereum blockchain smart contracts, including vulnerable and secure contracts, demonstrate the effectiveness of the proposed criterion. Furthermore, the performance of the proposed measure in term of detection rate, accuracy, recall and F1-score is superior to existing risk estimation metrics in other areas, such as apps and URLs.

Keywords

Main Subjects



Articles in Press, Accepted Manuscript
Available Online from 17 May 2026
  • Receive Date: 17 January 2025
  • Revise Date: 27 November 2025
  • Accept Date: 29 December 2025