Papers1 provider · 1 record
April 20, 2026· Frontiers in Blockchain
article
Open access

Blockchain-integrated machine learning framework for transparent smart contract vulnerability detection

Abstract

Introduction The proliferation of dApps is increasing the attack surface for exploitable vulnerabilities in smart contracts, and thus there is a need for verifiable detection methodologies. Methods In this work, we propose a machine learning framework with blockchain integration for explainable and note that “explainable” implies “verifiable” smart contract vulnerability detection. The SmartBugs-curated data was systematically pre-processed with metadata filtering, feature correlation analysis and encoding for model evaluation. Four ensemble learning methods, Random Forest, XGBoost, LightGBM and CatBoost were tested under identical experimental settings for comparison. Results The Random Forest classifier initially achieved the best balance in terms of stability and performance with an accuracy of 87.67%, successfully detecting important vulnerability classes such as re-entrancy, unchecked low-level calls, etc. To enhance the applicability of our blockchain-based machine learning framework for vulnerable smart contract analysis we extend it from the initial 143-contract dataset SmartBugs-Curated to evaluate it on on large-scale set, namely, SmartBugs-Wild which contains 47,398 real-world Ethereum contracts. Based on 29 static contract-level features, unsupervised clustering (k = 4, silhouette score = 0.3735) identifies discrete structural archetypes present in the dataset. Ensemble classifiers (such as XGBoost, CatBoost, Random Forest and LightGBM) can get excellent discriminative performance on these cluster labels: LightGBM achieves 99% accuracy and 0.98918 macro-F1. Discussion The additional results show that the approach scales, is robust and leads to stable models, even if interpretable. After injecting SHAP-based explainability, the interpretability and predictive power of CatBoost became similar to those of Random Forest. In order to guarantee end-to-end trust and traceability of our optimised classifier, this was linked to a blockchain oracle that independently store the outcomes as well as confidence scores for predictions directly onto an Ethereum-compatible ledger through a Vulnerability Registry smart contract. This integration provides the data is immutable, auditable and transparent in reporting.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.