I tiakina i:
Ngā taipitopito rārangi puna kōrero
Kaituhi matua: Mogili, Poojitha
Hōputu: Recurso digital
Reo:
I whakaputaina: Zenodo 2025
Ngā marau:
Urunga tuihono:https://doi.org/10.5281/zenodo.15179713
Ngā Tūtohu: Tāpirihia he Tūtohu
Kāore He Tūtohu, Me noho koe te mea tuatahi ki te tūtohu i tēnei pūkete!
Rārangi ihirangi:
  • <h1><strong>Blockchain Fault Transaction Detection Using ML & Solidity</strong></h1> <h3><strong>Mr. G. Rajesh</strong></h3> <p>Assistant Professor, PBR VITS, Kavali, Nellore – 524201</p> <h3><strong>MVN Poojitha</strong>, <strong>CVSL Bhavana</strong>, <strong>P Prathyusha</strong>, <strong>G Manospandana</strong></h3> <p>UG Students, Department of CSE, PBR VITS, Kavali, Nellore – 524201</p> <h2><strong><br>Abstract</strong></h2> <p>This paper proposes an intelligent and secure solution for detecting fraudulent transactions in blockchain networks by combining machine learning (ML) algorithms with blockchain technology. The system integrates <strong>XGBoost</strong> and <strong>Random Forest</strong> models to classify Bitcoin transactions as fraudulent or legitimate. A <strong>Solidity-based smart contract</strong> logs transactions on-chain and acts as a gatekeeper for high-risk activities. The application features a user-friendly interface using Streamlit, supports real-time analysis, and performs advanced security assessments to prevent known blockchain threats like re-entrancy and DoS attacks. Experimental results indicate high precision and robust security, offering a scalable approach for fraud prevention in decentralized environments.</p> <h2><strong>Keywords</strong></h2> <p>Bitcoin, Blockchain, Machine Learning, Fraud Detection, XGBoost, Random Forest, Solidity, Smart Contracts, Re-entrancy Attack, DoS Attack, Anomaly Detection</p> <h2><strong>1. Introduction</strong></h2> <p>The growing use of cryptocurrencies and decentralized finance (DeFi) platforms has made blockchain networks a prime target for fraudulent transactions and cyberattacks. Traditional fraud detection systems rely on static rules or manual auditing, which lack adaptability to evolving patterns. This paper presents a <strong>novel hybrid system</strong> that integrates <strong>intelligent ML-based detection models</strong> with <strong>blockchain-based smart contract enforcement</strong> to deliver real-time fraud classification and secure transaction logging.</p> <h2><strong>2. Literature Review</strong></h2> <p>Several studies have analyzed fraud detection using machine learning models. While XGBoost and Random Forest are frequently used in financial anomaly detection, their integration with blockchain systems remains limited. Works such as [3] explored detection in Ethereum, but did not employ on-chain smart contract enforcement. This research bridges that gap by embedding AI decisions into blockchain mechanisms using Solidity.</p> <h2><strong>3. Problem Statement</strong></h2> <p>Current fraud detection methods suffer from:</p> <ul> <li> <p>Poor adaptability to new fraud strategies</p> </li> <li> <p>Lack of real-time classification</p> </li> <li> <p>Absence of blockchain-AI integration</p> </li> <li> <p>Vulnerability to smart contract attacks (e.g., re-entrancy)</p> </li> </ul> <h2><strong>4. Objectives</strong></h2> <ul> <li> <p>Develop accurate ML models (XGBoost & RF) for fraud detection</p> </li> <li> <p>Build a tamper-proof smart contract for transaction verification</p> </li> <li> <p>Provide real-time fraud alerts and transparency</p> </li> <li> <p>Simulate attacker models and conduct security audits</p> </li> </ul> <h2><strong>5. Proposed System Architecture</strong></h2> <h3>5.1 Machine Learning Models</h3> <p>Historical transaction data is preprocessed using <strong>Pandas</strong> and <strong>NumPy</strong>, extracting features like sender, receiver, timestamp, gas fee, and amount. Models are trained and tested to distinguish fraud with high precision.</p> <h3>5.2 Blockchain & Smart Contracts</h3> <p>Smart contracts written in <strong>Solidity</strong> interact with the ML component to block or allow transactions. Fraudulent activities are logged on-chain for auditability.</p> <h3>5.3 Frontend Integration</h3> <p>A <strong>Streamlit-based frontend</strong> allows users to input transaction details, view fraud scores, and visualize prediction confidence with interactive charts.</p> <h2><strong>6. Implementation</strong></h2> <h3>6.1 Tools & Technologies</h3> <ul> <li> <p><strong>Language</strong>: Python, Solidity</p> </li> <li> <p><strong>ML Libraries</strong>: Scikit-learn, XGBoost</p> </li> <li> <p><strong>Frontend</strong>: Streamlit</p> </li> <li> <p><strong>Visualization</strong>: Matplotlib, Seaborn</p> </li> <li> <p><strong>API Integration</strong>: Etherscan, Web3.py</p> </li> <li> <p><strong>Security Testing</strong>: Attack simulations on Remix IDE</p> </li> </ul> <h3>6.2 Smart Contract Design</h3> <p>Contracts were designed to:</p> <ul> <li> <p>Log fraud detection outcomes</p> </li> <li> <p>Prevent double-spending or unauthorized fund transfer</p> </li> <li> <p>Detect re-entrancy or high-gas attack attempts</p> </li> </ul> <h2><strong>7. Results & Performance Evaluation</strong></h2> <div> <div> <table> <thead> <tr> <th>Metric</th> <th>XGBoost</th> <th>Random Forest</th> </tr> </thead> <tbody> <tr> <td>Accuracy</td> <td>94.5%</td> <td>91.2%</td> </tr> <tr> <td>Precision</td> <td>96.1%</td> <td>93.4%</td> </tr> <tr> <td>AUC Score</td> <td>0.97</td> <td>0.92</td> </tr> </tbody> </table> </div> </div> <p>The system effectively identified suspicious patterns and blocked high-risk transactions. Smart contracts successfully prevented common vulnerabilities during simulation.</p> <h2><strong>8. Security Analysis</strong></h2> <div> <div> <table> <thead> <tr> <th>Threat Type</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td>Reentrancy Attack</td> <td>Mitigated</td> </tr> <tr> <td>DoS Attack</td> <td>Prevented</td> </tr> <tr> <td>Front-running</td> <td>Detected</td> </tr> </tbody> </table> </div> </div> <p>Attackers models were simulated using Remix and custom scripts. No bypasses were recorded in hardened smart contract versions.</p> <h2><strong>9. Future Work</strong></h2> <ul> <li> <p>Integration of <strong>Graph Neural Networks</strong> and <strong>Autoencoders</strong></p> </li> <li> <p>Cross-chain fraud detection (Ethereum, BSC, Polygon)</p> </li> <li> <p>Compliance tools for KYC/AML integration</p> </li> <li> <p>Deployment on testnets (Goerli, Sepolia) for public auditing</p> </li> </ul> <h2><strong>10. Conclusion</strong></h2> <p>This paper presents a secure and intelligent blockchain fraud detection system using a synergy of <strong>ML and smart contracts</strong>. Real-time classification, on-chain auditing, and threat simulations demonstrate a robust defense against blockchain fraud. The architecture is scalable and adaptable, ensuring relevance in rapidly evolving decentralized environments.</p> <h2><strong>11. References</strong></h2> <ol> <li> <p>Allen, F., Gu, X., & Jagtiani, J. (2022). Fintech, Cryptocurrencies, and CBDC...</p> </li> <li> <p>Raja Santhi, A., & Muthuswamy, P. (2022). Influence of Blockchain in Logistics...</p> </li> <li> <p>Farrugia, S., Ellul, J., & Azzopardi, G. (2020). Detection of illicit accounts...</p> </li> <li> <p>Bains, P. (2022). Blockchain Consensus Mechanisms...</p> </li> <li> <p>Hassan, M. U., Rehmani, M. H., & Chen, J. (2023). Anomaly Detection in Blockchain Networks...</p> </li> <li> <p>Huang, Y., & Mayer, M. (2022). Digital currencies and U.S.–China power competition...</p> </li> <li> <p>Volety, T., et al. (2019). Cracking Bitcoin wallets...</p> </li> </ol>