# A Novel Approach for Fraud Detection in Blockchain-Based Healthcare Networks Using Machine Learning
###### Abstract
In addition, the financial losses were $115 million.  
Blockchain technology has been deployed in the healthcare environment to address security and privacy challenges. Blockchain is a distributed, decentralized, efficient, and secure technology. It is an ordered chain of blocks, meaning each block is connected to the one before it. In smart healthcare systems, blockchain ensures immutability, transparency, and control of personal medical records for all participants. It also guarantees the anonymity of patient medical data. Therefore, it can motivate patients to share their data for various ongoing clinical studies [6].  
Certainly, applying blockchain in the healthcare field provides a solution for the security and privacy of personal records; however, blockchain and healthcare integration still face several challenges. The challenges include storing patient data, high energy consumption, and attacks on blockchain networks. Blockchain suffers from several attacks that target the network of nodes, the consensus algorithm, the SCs, and the wallets [7]. Different types of attacks have been detected, such as DDoS attacks, $1% vulnerability attacks, and Sybil attacks. The presence of attacks and vulnerabilities in blockchain applications causes financial losses and exploitation of sensitive data, and may lead to a break of the medical service of these applications. SC, one of the main components of a BC network, is a program that handles and transfers assets of significant value. Once SC is deployed to the blockchain, it cannot be modified or updated. Security patches cannot be a viable solution for traditional programs. This motivated scholar to propose robust security strategies before deployment. Despite the presence of these strategies, adversaries can still tamper with their execution. Therefore, their functioning after deployment needs to be controlled. Many solutions are proposed in the literature to detect SC attacks. They are based either on SC auditing tools or on AI technology. SC auditing tools, such as Mythril, Security, and Slither, perform static and dynamic analyses of SC codes to identify vulnerabilities [8]. Nevertheless, these strategies are quite weak at finding vulnerabilities in SC code. There are many reasons for these weaknesses, including the fact that no single auditing tool can find all the vulnerabilities in an SC. Additionally, the complexity of SCs makes it difficult for auditing tools to fully understand the code and identify all potential vulnerabilities. They can only identify vulnerabilities that are already known. Moreover, producing incorrect results, finding different problems in the same set of SCs, or identifying a vulnerability that is not actually present in the code means wasting time and resources [9]. As the number of SCs grows and the complexity of these contracts increases, using these SC auditing tools will become increasingly impractical. AI and ML offer a promising solution to this challenge. ML models can be used to protect the blockchain from malicious activities and attacks. These models can be trained on large datasets of known vulnerabilities and then used to identify patterns and anomaliesin SC code. In this context, ML can leverage vast volumes of data to create more robust and accurate models for vulnerability detection. This is because machine learning models can learn from the data, and adapt their predictions as new data becomes available. Moreover, machine learning can also be used to protect against attacks, as the ML model could be used to monitor the behavior of SCs in real-time. If the model detects any suspicious activity, it could trigger an alarm or take other steps to protect the contract from attack [10]. ML algorithms are categorized into three types:  
1. Supervised Learning: adds tags to various data types by sorting them into key groups/categories;
2. Unsupervised Learning: Clustered data sets do not have a particular label. It also uses previously gained knowledge to recognize the data patterns;
3.