Explainable Machine Learning for Smart Contract Vulnerability Detection in Ethereum Blockchain

Main Article Content

👤 SR Vasantakumaren
🏢 Faculty of Data Science and Information Technology (FDSIT), INTI International University, Nilai, Malaysia

Smart contracts play an important role in Ethereum blockchain systems by enabling decentralized and automated transactions without intermediaries. However, vulnerabilities in Solidity smart contracts remain a major security issue because attackers can exploit coding weaknesses such as reentrancy attacks, unsafe external calls, and insecure access control mechanisms. Traditional vulnerability detection methods, including manual auditing and static analysis, often require high expertise and lack interpretability. Therefore, this study proposes an Explainable Machine Learning framework for smart contract vulnerability detection using Solidity source code analysis. The proposed framework integrates TF-IDF feature extraction, XGBoost classification, and SHAP (SHapley Additive Explanations) to provide high detection performance and transparent model interpretability. A dataset consisting of 691 Ethereum smart contracts, including 346 safe contracts and 345 vulnerable contracts, was used in this study. The experimental results show that the proposed model achieved an accuracy of 97.84%, with precision, recall, and F1-score values above 97%. The ROC analysis produced an AUC score of 0.9946, indicating excellent classification capability between vulnerable and safe smart contracts. The SHAP analysis revealed that features such as success, staticcall, gas, and origin significantly influenced vulnerability prediction, while security mitigation features such as nonreentrant and reentrancyguard were also identified as important indicators. The results demonstrate that the proposed framework provides accurate, interpretable, and transparent vulnerability detection for Ethereum smart contracts and can assist blockchain developers and security auditors in improving blockchain security analysis.

Vasantakumaren, S. (2026). Explainable Machine Learning for Smart Contract Vulnerability Detection in Ethereum Blockchain. Journal of Current Research in Blockchain, 3(3), 216–232. https://doi.org/10.47738/jcrb.v3i3.81

Article Details

Section
Articles

Similar Articles

<< < 1 2 3 4 5 > >> 

You may also start an advanced similarity search for this article.