Blockchain technology has rapidly evolved beyond cryptocurrencies, underpinning diverse applications such as supply chains, healthcare, and finances, yet its security vulnerabilities remain a critical barrier to safe adoption. However, attackers increasingly exploit weaknesses in consensus protocols, smart contracts, and network layers with threats such as Denial-of-Chain (DoC) and Black Bird attacks posing serious challenges to blockchain ecosystems. We conducted anomaly detection using two independent datasets (A and B) generated from simulation attack scenarios including Hash rate, Sybil, Eclipse, Finney, and Denial-of-Chain (DoC) attacks. Key blockchain metrics such as hash rate, transaction authorization status, and recorded attack consequences were collected for analysis. We compared both class-balanced and imbalanced datasets, applying SMOTE (Synthetic Minority Oversampling Technique) to improve representation of minority-class samples and enhance performance metrics. Supervised Models such as Random Forest, Gradient Boosting, Logistic Regression, and KNN consistently outperformed unsupervised models, achieving high F1-scores (0.90), while balancing the training data had only a modest effect. Based on identified gaps, we recommend the exploration and development of multifaceted defense approaches that combine prevention, detection, and response to strengthen blockchain resilience. By strengthening proactive blockchain resilience, this study benefits developers, security practitioners, and organizations seeking scalable and practical defense against evolving blockchain threats.
Omonayajo et al. (Mon,) studied this question.