{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,8,15]],"date-time":"2026-08-15T17:46:14Z","timestamp":1786815974560,"version":"3.56.0"},"reference-count":42,"publisher":"MDPI AG","issue":"19","license":[{"start":{"date-parts":[[2022,9,21]],"date-time":"2022-09-21T00:00:00Z","timestamp":1663718400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Norwegian University of Science and Technology"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>In this paper, we address the problems of fraud and anomalies in the Bitcoin network. These are common problems in e-banking and online transactions. However, as the financial sector evolves, so do the methods for fraud and anomalies. Moreover, blockchain technology is being introduced as the most secure method integrated into finance. However, along with these advanced technologies, many frauds are also increasing every year. Therefore, we propose a secure fraud detection model based on machine learning and blockchain. There are two machine learning algorithms\u2014XGboost and random forest (RF)\u2014used for transaction classification. The machine learning techniques train the dataset based on the fraudulent and integrated transaction patterns and predict the new incoming transactions. The blockchain technology is integrated with machine learning algorithms to detect fraudulent transactions in the Bitcoin network. In the proposed model, XGboost and random forest (RF) algorithms are used to classify transactions and predict transaction patterns. We also calculate the precision and AUC of the models to measure the accuracy. A security analysis of the proposed smart contract is also performed to show the robustness of our system. In addition, an attacker model is also proposed to protect the proposed system from attacks and vulnerabilities.<\/jats:p>","DOI":"10.3390\/s22197162","type":"journal-article","created":{"date-parts":[[2022,9,22]],"date-time":"2022-09-22T23:07:55Z","timestamp":1663888075000},"page":"7162","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":188,"title":["A Machine Learning and Blockchain Based Efficient Fraud Detection Mechanism"],"prefix":"10.3390","volume":"22","author":[{"given":"Tehreem","family":"Ashfaq","sequence":"first","affiliation":[{"name":"Department of Computer Science, COMSATS University Islamabad, Islamabad 44000, Pakistan"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Rabiya","family":"Khalid","sequence":"additional","affiliation":[{"name":"Department of Computer Science, COMSATS University Islamabad, Islamabad 44000, Pakistan"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Adamu Sani","family":"Yahaya","sequence":"additional","affiliation":[{"name":"Department of Computer Science, COMSATS University Islamabad, Islamabad 44000, Pakistan"},{"name":"Department of Information Technology, Bayero University Kano, Kano 700006, Nigeria"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4305-0908","authenticated-orcid":false,"given":"Sheraz","family":"Aslam","sequence":"additional","affiliation":[{"name":"Department of Electrical Engineering, Computer Engineering and Informatics, Cyprus University of Technology, Limassol 3036, Cyprus"},{"name":"Automated Systems & Soft Computing Lab (ASSCL), Prince Sultan University, Riyadh 12435, Saudi Arabia"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7869-6373","authenticated-orcid":false,"given":"Ahmad Taher","family":"Azar","sequence":"additional","affiliation":[{"name":"Automated Systems & Soft Computing Lab (ASSCL), Prince Sultan University, Riyadh 12435, Saudi Arabia"},{"name":"College of Computer and Information Sciences, Prince Sultan University, Riyadh 11586, Saudi Arabia"},{"name":"Faculty of Computers and Artificial Intelligence, Benha University, Benha 13518, Egypt"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Safa","family":"Alsafari","sequence":"additional","affiliation":[{"name":"Department of Computer Science and Artificial Intelligence, College of Computer Science and Engineering, University of Jeddah, Jeddah 23890, Saudi Arabia"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1252-260X","authenticated-orcid":false,"given":"Ibrahim A.","family":"Hameed","sequence":"additional","affiliation":[{"name":"Department of ICT and Natural Sciences, Norwegian University of Science and Technology, 7034 Trondheim, Norway"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2022,9,21]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Staudemeyer, R.C., Voyiatzis, A.G., Moldovan, G., Suppan, S.R., Lioumpas, A., and Calvo, D. (2018). Smart cities under attack. Human-Computer Interaction and Cybersecurity Handbook, CRC Press.","DOI":"10.1201\/b22142-11"},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Podgorelec, B., Turkanovi\u0107, M., and Karakati\u010d, S. (2020). A machine learning-based method for automated blockchain transaction signing including personalized anomaly detection. Sensors, 20.","DOI":"10.3390\/s20010147"},{"key":"ref_3","unstructured":"Nakamoto, S. (2020, March 21). Bitcoin: A Peer-to-Peer Electronic Cash System. Available online: https:\/\/bitcoin.org\/bitcoin.pdf."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"113318","DOI":"10.1016\/j.eswa.2020.113318","article-title":"Detection of illicit accounts over the Ethereum blockchain","volume":"150","author":"Farrugia","year":"2020","journal-title":"Expert Syst. Appl."},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Ostapowicz, M., and \u017bbikowski, K. (2020, January 19\u201322). Detecting fraudulent accounts on blockchain: A supervised approach. Proceedings of the International Conference on Web Information Systems Engineering, Hong Kong, China.","DOI":"10.1007\/978-3-030-34223-4_2"},{"key":"ref_6","unstructured":"Aziz, A.S.A., Hassanien, A.E., Azar, A.T., and Hanafy, S.E. (2013, January 8\u201311). Genetic Algorithm with Different Feature Selection Techniques for Anomaly Detectors Generation. Proceedings of the 2013 Federated Conference on Computer Science and Information Systems (FedCSIS), Krak\u00f3w, Poland."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Hassanien, A.E., Tolba, M., and Azar, A.T. (2014). Advanced Machine Learning Technologies and Applications: Second International Conference, AMLTA 2014, Cairo, Egypt, 28\u201330 November 2014. Communications in Computer and Information Science, Springer.","DOI":"10.1007\/978-3-319-13461-1"},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Khan, H., Asghar, M.U., Asghar, M.Z., Srivastava, G., Maddikunta, P.K.R., and Gadekallu, T.R. (2021, January 10\u201315). Fake review classification using supervised machine learning. Proceedings of the International Conference on Pattern Recognition, Virtual Event.","DOI":"10.1007\/978-3-030-68799-1_19"},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Shahbazi, Z., Hazra, D.P., Park, S., and Byun, Y.C. (2020). Toward Improving the Prediction Accuracy of Product Recommendation System Using Extreme Gradient Boosting and Encoding Approaches. Symmetry, 12.","DOI":"10.3390\/sym12091566"},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Pesantez-Narvaez, J., Guillen, M., and Alca\u00f1iz, M. (2019). Predicting motor insurance claims using telematics data\u2014XGBoost versus logistic regression. Risks, 7.","DOI":"10.20944\/preprints201905.0122.v1"},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Li, J., Gu, C., Wei, F., and Chen, X. (2019, January 7\u20138). A Survey on Blockchain Anomaly Detection Using Data Mining Techniques. Proceedings of the International Conference on Blockchain and Trustworthy Systems, Guangzhou, China.","DOI":"10.1007\/978-981-15-2777-7_40"},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"Reid, F., and Harrigan, M. (2013). An analysis of anonymity in the bitcoin system. Security and Privacy in Social Networks, Springer.","DOI":"10.1007\/978-1-4614-4139-7_10"},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"559","DOI":"10.1016\/j.dss.2010.08.006","article-title":"The application of data mining techniques in financial fraud detection: A classification framework and an academic review of literature","volume":"50","author":"Ngai","year":"2011","journal-title":"Decis. Support Syst."},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Saia, R., and Carta, S. (2017, January 26\u201328). Evaluating Credit Card Transactions in the Frequency Domain for a Proactive Fraud Detection Approach. Proceedings of the 14th International Conference on Security and Cryptography (SECRYPT 2017), Madrid, Spain.","DOI":"10.5220\/0006425803350342"},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"3630","DOI":"10.1016\/j.eswa.2008.02.001","article-title":"Association rules applied to credit card fraud detection","volume":"36","author":"Vila","year":"2009","journal-title":"Expert Syst. Appl."},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Gyamfi, N.K., and Abdulai, J.D. (2018, January 1\u20133). Bank fraud detection using support vector machine. Proceedings of the 2018 IEEE 9th Annual Information Technology, Electronics and Mobile Communication Conference (IEMCON), Vancouver, BC, Canada.","DOI":"10.1109\/IEMCON.2018.8614994"},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"354","DOI":"10.1016\/j.inffus.2008.04.001","article-title":"Credit card fraud detection: A fusion approach using Dempster\u2013Shafer theory and Bayesian learning","volume":"10","author":"Panigrahi","year":"2009","journal-title":"Inf. Fusion"},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Shi, F.B., Sun, X.Q., Gao, J.H., Xu, L., Shen, H.W., and Cheng, X.Q. (2019). Anomaly detection in Bitcoin market via price return analysis. PLoS ONE, 14.","DOI":"10.1371\/journal.pone.0218341"},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"101954","DOI":"10.1016\/j.sysarc.2020.101954","article-title":"TP2SF: A Trustworthy Privacy-Preserving Secured Framework for sustainable smart cities by leveraging blockchain and machine learning","volume":"115","author":"Kumar","year":"2021","journal-title":"J. Syst. Archit."},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"132","DOI":"10.1016\/j.ins.2019.10.019","article-title":"Privacy-preserving clustering for big data in cyber-physical-social systems: Survey and perspectives","volume":"515","author":"Zhao","year":"2020","journal-title":"Inf. Sci."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"9463","DOI":"10.1109\/JIOT.2020.2996590","article-title":"A deep blockchain framework-enabled collaborative intrusion detection for protecting IoT and cloud networks","volume":"8","author":"Alkadi","year":"2020","journal-title":"IEEE Internet Things J."},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"114607","DOI":"10.1109\/ACCESS.2019.2935142","article-title":"Mixture localization-based outliers models for securing data migration in cloud centers","volume":"7","author":"AlKadi","year":"2019","journal-title":"IEEE Access"},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"66","DOI":"10.1109\/TSUSC.2019.2906657","article-title":"An integrated framework for privacy-preserving based anomaly detection for cyber-physical systems","volume":"6","author":"Keshk","year":"2019","journal-title":"IEEE Trans. Sustain. Comput."},{"key":"ref_24","unstructured":"Kurakin, A., Goodfellow, I., and Bengio, S. (2016). Adversarial machine learning at scale. arXiv."},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"317","DOI":"10.1016\/j.patcog.2018.07.023","article-title":"Wild patterns: Ten years after the rise of adversarial machine learning","volume":"84","author":"Biggio","year":"2018","journal-title":"Pattern Recognit."},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Xuan, S., Liu, G., Li, Z., Zheng, L., Wang, S., and Jiang, C. (2018, January 27\u201329). Random forest for credit card fraud detection. Proceedings of the 2018 IEEE 15th International Conference on Networking, Sensing and Control (ICNSC), Zhuhai, China.","DOI":"10.1109\/ICNSC.2018.8361343"},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"178","DOI":"10.5539\/ijef.v7n7p178","article-title":"Financial fraud detection model: Based on random forest","volume":"7","author":"Liu","year":"2015","journal-title":"Int. J. Econ. Financ."},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"427","DOI":"10.1109\/TETCI.2019.2961157","article-title":"Hardening random forest cyber detectors against adversarial attacks","volume":"4","author":"Apruzzese","year":"2020","journal-title":"IEEE Trans. Emerg. Top. Comput. Intell."},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Primartha, R., and Tama, B.A. (2017, January 1\u20132). Anomaly detection using random forest: A performance revisited. Proceedings of the 2017 International Conference on Data and Software Engineering (ICoDSE), Palembang, Indonesia.","DOI":"10.1109\/ICODSE.2017.8285847"},{"key":"ref_30","unstructured":"Laskov, P. (2014, January 18\u201321). Practical evasion of a learning-based classifier: A case study. Proceedings of the 2014 IEEE Symposium on Security and Privacy, San Jose, CA, USA."},{"key":"ref_31","unstructured":"Pham, T., and Lee, S. (2016). Anomaly detection in bitcoin network using unsupervised learning methods. arXiv."},{"key":"ref_32","doi-asserted-by":"crossref","first-page":"e192","DOI":"10.1002\/spy2.192","article-title":"Anomaly detection in blockchain using network representation and machine learning","volume":"5","author":"Martin","year":"2022","journal-title":"Secur. Priv."},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"79","DOI":"10.1016\/j.entcs.2016.12.006","article-title":"Double-spend attack models with time advantange for bitcoin","volume":"329","author":"Rocha","year":"2016","journal-title":"Electron. Notes Theor. Comput. Sci."},{"key":"ref_34","unstructured":"(2022, September 12). Bitcoin Network Transactional Metadata. Available online: https:\/\/www.kaggle.com\/datasets\/omershafiq\/bitcoin-network-transactional-metadata."},{"key":"ref_35","unstructured":"Shafiq, O. (2019). Anomaly Detection in Blockchain. [Master\u2019s Thesis, Tampere University]."},{"key":"ref_36","doi-asserted-by":"crossref","first-page":"321","DOI":"10.1613\/jair.953","article-title":"SMOTE: Synthetic minority over-sampling technique","volume":"16","author":"Chawla","year":"2002","journal-title":"J. Artif. Intell. Res."},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"167059","DOI":"10.1109\/ACCESS.2020.3022855","article-title":"Intrusion detection based on autoencoder and isolation Forest in fog computing","volume":"8","author":"Sadaf","year":"2020","journal-title":"IEEE Access"},{"key":"ref_38","doi-asserted-by":"crossref","unstructured":"Eyal, I., and Sirer, E.G. (2014, January 3\u20137). Majority is not enough: Bitcoin Mining is vulnerable. Proceedings of the International Conference on Financial Cryptography and Data Security, Christ Church, Barbados.","DOI":"10.1007\/978-3-662-45472-5_28"},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"Landa, R., Griffin, D., Clegg, R.G., Mykoniati, E., and Rio, M. (2009, January 24). A Sybilproof indirect reciprocity mechanism for peer-to-peer networks. Proceedings of the IEEE INFOCOM 2009, Rio De Janeiro, Brazil.","DOI":"10.1109\/INFCOM.2009.5061938"},{"key":"ref_40","doi-asserted-by":"crossref","unstructured":"Luu, L., Chu, D.-H., Olickel, H., Saxena, P., and Hobor, A. (2016, January 24\u201328). Making smart contracts smarter. Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria.","DOI":"10.1145\/2976749.2978309"},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"3849","DOI":"10.1007\/s13369-018-03715-4","article-title":"Blockchain-based framework for protecting author royalty of digital assets","volume":"44","author":"Nizamuddin","year":"2019","journal-title":"Arab. J. Sci. Eng."},{"key":"ref_42","unstructured":"Halo Block, Medium (2020, April 13). How To Use Oyente, a Smart Contract Security Analyzer\u2014Solidity Tutorial. Available online: https:\/\/medium.com\/haloblock\/how-to-use-oyente-a-smart-contract-security-analyzer-solidity-tutorial-86671be93c4b."}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/22\/19\/7162\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T00:36:34Z","timestamp":1760142994000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/22\/19\/7162"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,9,21]]},"references-count":42,"journal-issue":{"issue":"19","published-online":{"date-parts":[[2022,10]]}},"alternative-id":["s22197162"],"URL":"https:\/\/doi.org\/10.3390\/s22197162","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,9,21]]}}}