Blockchain-based Management for Organ Donation and Transplantation

Today’s organ donation and transplantation systems pose different requirements and challenges in terms of registration, donor-recipient matching, organ removal, organ delivery, and transplantation with legal, clinical, ethical, and technical constraints. Therefore, an end-to-end organ donation and transplantation system is required to guarantee a fair and efficient process to enhance patient experience and trust. In this paper, we propose a private Ethereum blockchain-based solution to enable organ donation and transplantation management in a manner that is fully decentralized, secure, traceable, auditable, private, and trustworthy. We develop smart contracts and present six algorithms along with their implementation, testing, and validation details. We evaluate the performance of the proposed solution by performing privacy, security, and confidentiality analyses as well as comparing our solution with the existing solutions. We make the smart contract code publicly available on Github.


I. INTRODUCTION
Organ failure or damage occurs due to an injury or a disease.It affects the quality of life and, in some cases, leads to death.Donating an organ is one of humanity's most honorable actions to save the lives of patients through organ transplantation.For a successful transplant, the organ must be in acceptable working conditions with donor-recipient matching, and its removal should not pose a life-threatening risk to the donor [1].The first successful organ donation occurred with a kidney transplant between twin brothers in 1954 [2].Since then, the annual number of transplants has steadily increased.However, the demand for organ donations still exceeds the number of donors [3].In fact, while waiting for an organ transplant, twenty people die every day, and a new patient is added to the waiting list in every ten minutes [4].More importantly, accessing the organ donation waiting list is a basic requirement for organ allocation.Referral for transplantation can be affected by both geographical and socioeconomic factors.Therefore, the allocation process on the waiting list should not discriminate against certain groups of patients [4].
Organ donation is conducted in two different ways, including deceased donation and living donation.Figure 1 illustrates the typical flow chart for donating an organ and transplanting it to a patient.First, the donor is examined by the hospital transplant team, and if the donor is deceased, a brain death test is performed.Meanwhile, if the donor is still alive, doctors examine the donor and ensure that the donor is fit for live donation.Then, all medical records are reported to the procurement organizer.The procurement organizer is responsible for evaluating the donor's condition to decide if he is a fit donor and ensuring that the donor is properly registered in the medical system.Next, if the evaluation shows that the donor is eligible for donation, the procurement organizer sends all the data to the organ transplantation organizer.This step can be performed only if the donor gives consent to donate to an anonymous person.After that, the matching process between the available donors and patients on the waiting list is performed by the organ transplantation organizer.As a result, a ranked list is generated as an output and provided to the transplantation surgeons.Next, the transplant surgeon decides whether the organ is appropriate for the patient based on various considerations, such as the donor's medical records and the current health of the prospective recipient.Later, when a transplant surgeon accepts the donated organ, the donor's surgeon is notified to remove the donated organ.Finally, the donated organ is transported to the patient's hospital and received by the transplant surgeon.However, suppose the situation is for a live donor and it has been planned to donate to a known person by name.In that case, the data will go directly to the transplant surgeon to start the surgery of removing and transplanting the donated organ [6] [7].
In the past, when a patient died or was near death, the organ procurement organization and hospital worked together to do an initial medical test to decide if the patient could be an organ donor.This call takes around 15 minutes, and only 6% of these calls result in possible organ donors' being identi-fied.Over the years, this phone call has been replaced by an instant message generated by central computer systems that store all the data required for this process [8].However, the core issue with this strategy is that the security and validity of such data are entirely dependent on the transplantation centers' ability to keep their systems secure and identify potential harm to donors and recipients.The accuracy of the wait-list data is largely dependent on people's faith and trust in these centers' ability to keep it secure from hackers and fraudulent employees [9].Moreover, transparency is another challenge affecting the success of the organ donation process.According to World Health Organization (WHO) reports, up to 10% of transplanted organs may have been obtained unethically via organ trafficking, but the exact numbers are unknown [10].The lack of transparency in the current system among participants leads to illegal organ trade and purchases and medical professionals engaging in unethical practices [11].Moreover, there are hospitals that take advantage of the patient's need for the organ and offer the opportunity to transfer the organ to those who pay a higher amount to the hospital while ignoring the patient with the highest priority on the waiting list [12], [13].In addition, current transplant systems are also frequently slow, which is unacceptable in such a critical and life-threatening scenario.Such systems are hardly up to date with the minimum security standards.So far, there has recently been a surge in security breaches affecting user privacy and system integrity.In general, modern systems manage data through the use of standard databases; however, most hospitals, health ministries, and other medical facilities lack a standardized data communication system [1].
In recent years, blockchain technology has attracted much attention in different sectors because it offers a distributed and secure database without the need for a third party or a central authority.Blockchain is most known for its use in cryptocurrencies.A significant portion of its development is focused on information architecture, or how the database will be formed, distributed, and accessed with various degrees of permissions [14].Nakamoto creates the first blockchain, which serves as the public ledger for bitcoin transactions.Later, the Ethereum blockchain architecture inserts computer programs into blocks to represent financial instruments, which are known today as smart contrats [15].However, the purpose of blockchain is to enable the recording and distribution of digital data without the ability to modify it.In this sense, a blockchain serves as the foundation for immutable ledgers that cannot be changed or destroyed.By using blockchain, medical information may be stored securely, and patient data could be updated in real-time and across various entities [16].
Managing organ donation and transplantation has become challenging due to the lack of data accountability, immutability, audit, transparency, traceability, and trust features in the existing systems.The following are the paper's main contributions: • We propose a private Ethereum blockchain-based solution that ensures organ donation and transplantation management in a manner that is decentralized, secure, reliable, traceable, auditable, and trustworthy.• We develop smart contracts that register actors and ensure data provenance through producing events for all the necessary actions that occur during the organ donation and transplantation stages.The smart contracts code is made publicly available on Github1 .• We develop an auto-matching process between the donor and recipient through a smart contract based on certain criteria.• We present six algorithms along with their full implementation, testing, and validation details. • We conduct security analysis to determine that the proposed solution is secure against common security attacks and vulnerabilities.We compare our solution with the existing solutions to show its novelty.Our proposed solution is general and may be easily adjusted to meet the needs of a variety of related applications.
The remaining part of the paper is organized in the following manner.The related work is presented in Section II.The proposed blockchain-based solution for donated organ transplantation is explained in Section III.Then, it is followed by the implementation details of the proposed blockchainbased solution in Section IV and the details of testing and evaluation in Section V.The discussion and analysis of the proposed solution are given in Section VI.Finally, section VII concludes the paper by summarizing our contributions and outlining future research opportunities.

II. RELATED WORKS
We discuss the existing blockchain and non-blockchainbased solutions that have been proposed to address the issues in the organ donation system.

A. NON-BLOCKCHAIN-BASED SOLUTIONS FOR ORGAN DONATION MANAGEMENT
In non-blockchain-based processes, various approaches and tools are utilized to come up with solutions that enhance organ donation, transplantation management, and the matching process.The authors in [17] developed a multi-agent software platform to represent the information workflow model among donor hospitals, regulators, and recipient hospitals.This platform optimizes the pre-transplantation tasks, which can improve the process efficiency.In addition, it allows storing potential donor information and improves direct communication among all participants in the organ transplantation process.An information workflow was simulated using the developed platform, and it was estimated that the saved time might be between three to five hours.
The TransNet in [18] is a system using scanning technology for barcodes at the point of organ recovery to assist in labeling, packaging, and tracking organs and other biological materials for transplantation.It involves supplementing the labeling system with an application developed and a portable barcode printer corresponding with DonorNet.During organ recovery, procurement coordinators will use the operating room's system to print labels and scan all organs to be transported.Similarly, many supply chain management solutions have relied on barcodes, RFID tags, and Electronic Product Codes (EPC) for identifying and sharing product information to facilitate the tracking of items through various phases [19].
Finally, the authors in [20] proposed a manageable mechanism, MIN, for the online matching of deceased organs to donors to improve efficiency and fairness in selecting patients within the current system in Australia.The MIN mechanism simply designates an arriving organ to a patient that minimizes |KDPI-EPTS|, tie-breaking by time on the waiting list and later randomly.The Kidney Donor Patient Inde (KDPI) estimates the quality of the organ.On the other hand, the Expected Post-Transplant Survival Score (EPTS) measures the life quality of the recipient after the transplant.After testing, the results showed that the MIN mechanism outperforms the current mechanism under consideration by the Organ and Tissue Authority in Australia.

B. BLOCKCHAIN-BASED SOLUTIONS FOR ORGAN DONATION MANAGEMENT
In [21] and [22], a blockchain-based kidney donation system named "Kidner" has been proposed.It offers a kidney-pair donation module instead of the traditional kidney waiting list, which is already in use.For example, when someone wishes to donate his/her kidney to a family member but their kidney is incompatible with the person they want to donate to, the system matches the donor's kidney to another patient who also has an inconsistent donor's kidney.
The authors in [23] proposed an organ donation decentralized app using blockchain technology.Patients use a web application to register their information, including their medical ID, organ type, blood type, and state.The system would operate on a first-in, first-out (FIFO) approach, with the exception of a patient being in a critical state.It offered better security, added transparency, and a much faster system.However, it should be modified when used in different regions according to their regulations and needs.Similarly, the authors in [24], developed a web-based application using FIFO to choose an organ donor for each actual patient seeking a transplant, and in the case of an emergency, that patient is given priority.Furthermore, an organ donation and transplantation application utilizing blockchain has been proposed in [12], where the registered hospital accepts the registered donors and registers the recipients to match them with a suitable donor based on the request.
Moreover, in [25], a use case for blockchain in organ donation has been developed.Simply, the process begins with the donor signing a smart contract for organ donation and the patient filing a transplant request.Both papers are verified and hashed by a registered doctor or nurse, who then creates a verified mismatching pair and announces it over the network.The network finds a match and sends it to a doctor for approval.If a match is found, the doctor approves, and the next step is for the doctor to generate a hash.If the doctor generates a hash, the verified matched pair becomes part of the blockchain.Finally, doctors and healthcare professionals are given all the information they need to prepare for the logistics of the surgery.
The aforementioned contributions have shown how blockchain technology can improve existing organ donation and transplantation management solutions.However, some of these contributions do not demonstrate full implementation, while others do not consider all types of organs or include all necessary criteria through the matching process.

III. PROPOSED BLOCKCHAIN-BASED SOLUTION FOR ORGAN DONATION
In this section, we present details of our blockchain-based organ donation and transplantation solution.Figure 2 presents an overview of the system architecture of our proposed solution.It shows that our solution uses two smart contracts (SCs); namely, organ donation and organ transplantation.The participants can access the functions and events of these smart contracts through a front-end decentralized application (DApp), which is connected by an application program interface (API).
Every smart contract has unique functions that can be executed only by pre-authorized participants, who will have the ability to access data stored on the chain to review transactions, logs, and events.The participants include doctors, hospital transplant team members, procurement organizers, organ matching organizers, a transporter and a transplant surgeon.The Organ Donation Smart Contract is responsible for creating a waiting list, accepting donors after medical test approval, and auto-matching between the donor and recipient.The Organ Transplantation Smart Contract is mostly in charge of the transplant process.It has three parts: removing an organ from a donor, getting the organ to the recipient, and putting the organ into the recipient.All the previous phases are logged and stored on the ledger for revision and verification purposes.Additionally, authorization, secrecy, and privacy are ensured by utilizing a private permissioned Ethereum blockchain.

A. PRIVATE PERMISSIONED ETHEREUM NETWORK
Private blockchains provide enhanced security and privacy where the transactions and data are not accessible to the public and only viewed by authorized entities.Enterprises can use the Ethereum blockchain to develop their own privatepermissioned blockchain to improve privacy, security, and confidentiality.In general, details of donated organ transplantation are strictly confidential.These details include the patients' health records and family histories; therefore, a private permissioned Ethereurm blockchain is ideal for such an implementation.

B. BLOCKCHAIN INTEGRATION
The blockchain network is the backbone of our proposed solution.It serves as the basis for recording transactions and events permanently to ensure accountability and data provenance.The developed smart contracts must be deployed on the blockchain to ensure they are accessible at all times.However, it would not be ideal to deploy them on the main network during the testing phase.Therefore, a local blockchain environment, a virtual machine such as the JavaScript-based Virtual Machine, or a test network should be used to test the Ethereum-based smart contracts.The smart contracts in our proposed solution are developed using the REMIX IDE, and they are deployed on the JavaScript-based Virtual Machine which runs an isolated Ethereum node in the browser itself, which is very useful for testing purposes.Once the developed smart contracts are tested and verified, they can be deployed on Ethereum's mainnet to test their performance in a real blockchain environment.However, the outcome of the functions of the smart contracts will always be the same because they are deterministic, which means that regardless of the node that is performing the operation, the outcome will always be the same.

C. PARTICIPANTS INTERACTIONS
Figure 3 shows the interaction among different participants within the matching smart contract, which can be divided into three phases.Phase 1 begins with creating a waiting list, in which an authorized doctor will add a new patient to the waiting list.The doctor will record the patient's ID, age, BMI, and blood type.Phase 2 is fulfilled by receiving donors who have given their consent to donate their organs.Only an authorized transplant team member will run the test approval function, and an event will be sent immediately.After that, the procurement organizer is ready to evaluate and register the donor.To make the announcement that a new donor has been registered, an event will be triggered.In Phase 3, the auto-matching between the donor and recipient is handled by the organ transplantation organizer.The auto-matching process is done based on the age range, blood type, and BMI range obtained from the donor.Finally, a matched patient ranked list is announced.
Meanwhile, figure 4 represents the interaction among different participants within the transplantation smart contract.This smart contract includes removing the organ, the delivery process, and transplanting the organ.In Phase 1, the donated organ will be removed from the donor's body.Once the event is emitted for the donated organ's readiness for delivery, the transporter will execute the start delivery function.Starting and ending delivery functions in Phase 2 are called by an authorized transporter responsible for the transportation of the donated organ to the matched patient hospital and received by the transplant surgeon.In Phase 3, the donated organ is transplanted, and an event will be triggered to announce the end of the transplantation process.In this section, we present the implementation details of our proposed blockchain-based organ donation and transplantation solution along with the algorithms.The proposed system is built on a private Ethereum blockchain, to which validation nodes and only authorized participants are added.The smart contracts are written in Solidity and tested with the Remix IDE, which is an open source web that enables developing and administering smart contracts.The implementation of our proposed solution is mainly twofold: organ donation and organ transplantation.The details of each one are described below.

1) Organ Donation
Four entities participate in the organ donation smart contract; namely, the patient's doctor, hospital transplant team member, procurement organizer, and matching organizer.Each entity has an Ethereum address and can participate by calling functions within the smart contract.This smart contract contains different types of variables.One of the variables is the Ethereum address, which is used to associate certain entities with a unique address, such as the procurement organizer and the matching organizer.The second type is mapping, which in our solution links the Ethereum address of an entity to a Boolean to reflect that the address needs certain conditions.
The procurement organizer will deploy the organ donation smart contract.The procurement organizer deploys the smart contract and therefore becomes the owner, which permits this participant to assign the Ethereum address of the matching organizer.Then, the authorized doctor adds a new patient to the waiting list, which is then announced to all participants.Following this, the authorized medical team member performs the test and announces the test approval.Next, by the procurement organizer, the donor registration action is done and announced, including the type of donated organ.After that, the auto-matching process is conducted, and the information of matched patients with potential donors is stored.Finally, this process depends on the main criteria such as age, blood type, BMI, and waiting time.In the organ transplantation smart contract, the donor's surgeon, transporter, and transplant surgeon are the main participants.Each participant can participate by calling functions within the smart contract.It includes various types of variables.For example, public Ethereum addresses hold the address of the donor and transplant surgeons.Moreover, it has a mapping for the authorized transporters, which is allowed to transport the removed donated organ from the donor hospital to the recipient hospital.Furthermore, the "OrganStatus" is an enumerated variable and contains all of the various states that the donated organ will go through.
The Transplant surgeon will deploy the smart contract.The Ethereum address of the donor's surgeon and the initial state of the removed organ will be defined.The transplantation tracing process occurs once the smart contract is deployed and the authorized transporters are assigned.First, the donated organ is removed by the surgeon and transported by the authorized transporter from where the location of the donor to the recipient hospital.Then, The start and end of the delivery procedure will be notified.After that, the transplant surgeon announces the reception of the donated organ and start transplanting it.Finally, the transplantation details will be announced, including the patient ID, time, and date of the process.
Figure 5 displays the entity-relationship diagram that shows the main attributes and functions in each smart contract.In our solution, only one procurement organizer and one matching organizer can exist; thus, they are declared as Ethereum addresses.Meanwhile, the patient's doctor, transplant team member, and patient validity are declared as mappings because many of them are in the system.Lastly, blood type and organ type are declared as enumerates as there are different types for each.Finally, AddingNewPatient, TestApproval, RegisteringNewDonor, and MatchingProcess are the main functions of the organ donation smart contract.
The Organ Transplantation smart contract has a set of attributes used to describe the details of the transplantation process.There is only one surgeon to take the responsibility from the donor side and only one surgeon to do the transplantation for the recipient; therefore, they are declared as Ethererum addresses.Furthermore, more than one transporter can exist in the system; thus, it is declared as mapping.In addition, the smart contract has five primary functions; namely, RemovingDonatedOrgan, StartDelivery, EndDelivery, Re-ceiveDonatedOrgan, and Organ_Transplantation.Finally, the organ donation smart contract will have a 1:n relationship with the transplantation smart contract since only one organ donation smart contract can include all patients, whereas several transplantation smart contracts can exist for the various possible donation processes.
We present six algorithms to explain the details of the various functions involved in our smart contracts.
The donor donation smart contract phases are displayed in algorithms 1, 2 and 3, respectively.On the other hand, the rest  added.This algorithm represents the AssigningPatientDoctors and AddingNewPatient functions.The doctors need to add the patient's information such as ID, age, BMI, blood type, and needed organ type as all the information will be stored in an array and used later in the matching phase.
Moreover, the second phase, which is related to donor  acceptance and registration, is illustrated in algorithm 2. The procurement organizer will assign the transplant team members who are responsible for performing medical tests and checkups.Additionally, the donor ID and the type of the donated organ need to be added by the procurement organizer in the RegisteringNewDonor function.Furthermore, algorithm 3 shows the matching process.This process is represented in the MatchingProcess function.In addition, to start this process, the organ matching organizer should add the following: minimum age, maximum age, donor blood type, minimum BMI, maximum BMI, and donated organ type.Each patient must meet the defined conditions in the algorithms to decide if that patient is fit to receive a donated organ.
Algorithm 4 represents the first phase of the Organ Transplantation smart contract, which is removing the donated organ.This algorithm shows that the donor surgeon needs to add some information such as the donor ID, removing date and time, and the donated organ type to start the removing process.Then, immediately, the delivery process will be started by an authorized transporter.This process is represented in algorithm 5.The first function is to assign a Algorithm 4: Removing the Donated Organ Input: Donor_ID, Removing_date, Removing_time, _DonatedOrganType 1 Donor_ID is the ID of the organ donor.transporter, which is run by the donor surgeon.After that, the delivery process will be started by the transporter and ended when the transplant surgeon receives it.Moreover, the receiving and transplanting processes are represented in algorithm 6 in which the transplant surgeon will confirm the reception of the donated organ.Then, the transplanting process will be started.Finally, this process is portrayed in the Organ_Transplantation function, where the transplant surgeon needs to add the patient ID and surgery date and time.

V. TESTING AND VALIDATION
In this section, we test and validate the primary functions of the developed organ donation and organ transplantation smart contracts.The assessment stage is implemented using the Remix IDE.The participants and their Ethereum addresses used throughout the testing and validation process are listed   1.Additionally, for the functions, the used inputs do not reflect real data; they are simply assumptions for testing needs.The logs and transactions of the major smart contract functions are further explained in the following subsections.The "logs" field presents the information that is stored as an event on the Ethereum network."12345" is the patient ID, "24" is the age , "23" is the BMI, "3" is the O blood type, as it was mentioned before, and "2" is the of organ needed.In addition, figure 7 shows a successful call of the new patient ID which has been stored in the PatientID array.Similarly, other functions, such as TestApproval and RegisteringNewDonor were executed successfully.

A. ORGAN DONATION SMART CONTRACT
In the MatchingProcess function, it was tested if the organ matching organizer is able to add the details of a new registered donor, such as minimum age, maximum age, donor blood type, minimum BMI, maximum BMI, and donated organ type.A successful execution of the function and its corresponding logs and events are displayed in figure 8.This function is critical in this smart contract because it notifies the matched patient with the available donor.Moreover, figure 9 displays a successful call of the matched patient that has been stored in the Matched array where the available donor had been matched with the patient that had the "12345" ID.

B. ORGAN TRANSPLANTATION SMART CONTRACT
Figure 10 shows the details of announcing the removal of the donated organ by the donor surgeon where an execution of the RemovingDonatedOrgan function was performed successfully.Similarly, successful executions were done for all functions involved in the delivery and transplantation phases.In this section, we evaluate the privacy, confidentiality, and security level of our solution.Typically, Ethereum-based solutions present the costs involved in implementing and executing smart contracts.However, in our solution, the private Ethereum blockchain is utilized such that the gas price is set to zero.Thus, there are no involved costs.Additionally, a comparison between our solution and existing solutions is also accomplished.Finally, we discuss how our solution can be generalized to other applications/systems.

A. SECURITY ANALYSIS
• Integrity: The proposed solution for organ donation management uses an event-based strategy where each transaction is recorded and stored on an immutable ledger, allowing users to trace the donation and transplantation processes action by action.For example, any ranked list of the matched recipients with the available donor that has taken place is recorded in the form of an event to confirm that the donated organ is given to the recipient with the highest priority.
• Authorization and Accountability: The Ethereum smart contracts are written in Solidity language in the proposed solution, where the "Modifier" feature is used.This feature permits specific participants to run particular functions.Therefore, all participants are accountable for their actions, and any illegal action taken is stored as an event in an immutable ledger.Therefore, mistakes and illegal actions can be traced to identify their sources.For instance, only the organ matching organizer can run the matching function where the matched list is stored and can be fetched later by the DApp.Moreover, only a transplant surgeon can run the organ transplantation function.Therefore, these participants are accountable for their actions, and they will be held responsible for any manipulation or mistakes in these two processes.• Availability: The decentralization of the Ethereum blockchain means there are multiple distributed nodes that are responsible for recording and logging all the transactions that occur in the network, which ensures the availability and synchronization of the network even if a node fails.• MITM Attacks: The private key signature of the sender is required for each transaction in the ledger.This guarantees that attackers cannot tamper with the blockchain, making man-in-the-middle (MITM) attacks very unlikely to occur.This feature is critical for enhancing the management of blockchain-based organ donation and transplantation, where only trusted entities can receive information and perform actions.

B. ANALYSIS OF SMART CONTRACT SECURITY
A specialized tool called Oyente was utilized to test and validate the organ donation and organ transplantation smart contracts against vulnerabilities.Oyente is capable of detecting some of the latest security flaws in the Ethereum blockchain, such as the parity multisig bug, integer overflow, integer underflow, transaction-ordering dependence (TOD), callstack depth attack, timestamp dependency, and re-entrancy.Figure 11 displays the output of the Oyente tool execution.It demonstrates that the designed smart contracts have no existing vulnerabilities, showing that they are robust and highly secured against common vulnerabilities.In addition, the EVM code coverage was 80.9% for the organ donation smart contract and 99.1% for the organ transplantation smart contract.

C. COMPARISON WITH THE EXISTING SOLUTIONS
In table 2, a comparative analysis between our solution and the existing blockchain-based solutions is presented.The comparison is performed using some important parameters, such as the used blockchain platform, mode of operation, smart contract development, tracing capability, realtime monitoring, implementation, and DApps development.Our solution and [17] used the Ethereum network in a private mode of operation.In contrast, other solutions did not mention the type of blockchain platform that was used.A smart contract based approach is proposed in [21] and our solution only.Finally, for [21] and our solution, the front-end decentralized application for users to utilize the solution has not been developed, whereas [19] and [17] developed it for their solutions.

D. GENERALIZATION
Our proposed blockchain-based solution shows how blockchain technology can assist in managing and tracing the donated organ transplantation process during the registration, match, removal, transportation, and transplantation phases.
The designed smart contracts that represent the different phases of the donated organ transplantation management system can be customized to fit other systems that involve highly sensitive items and require tracking, tracing, and accountability.For example, delivery functions can be used in many applications in healthcare and other industries and domains.Likewise, the principle of comparing and automatching between the donor and the registered patients can be used in blood donation operations, medical device donation, or even industry products.Figure 2 can further define what modifications are required in order to adapt the proposed solution to other systems or applications.The participants and their interactions will be different, and off-chain storage is needed if the application involves large-sized content.Additionally, the developed algorithms for smart contracts can be modified to match the needs of any new system.Overall, other applications can have a similar structure to our solution, but some designations should be taken care of based on the targeted use case.

VII. CONCLUSION
In this paper, we have proposed a private Ethereum blockchain-based solution that manages organ donation and transplantation in a decentralized, accountable, auditable, traceable, secure, and trustworthy manner.We developed smart contracts that ensure the data provenance by recording events automatically.We present six algorithms with their implementation, testing, and validation details.We analyze the security of the proposed solution to guarantee that smart contracts are protected against common attacks and vulnerabilities.We compare our solution to other blockchain-based solutions that are currently available.We discuss how our solution can be customized with minimal effort to meet the needs of other systems experiencing similar problems.In the future, our solution can be improved by developing an end-to-end DApp.Furthermore, the smart contracts can be deployed and tested on a real private Ethereum network.Finally, the Quorum platform can provide better confidentiality because transactions among entities can only be viewed by specific participants and nobody else, which is not the case in our solution, where transactions between two participants are viewed by other actors authorized in the private blockchain.

FIGURE 1 :
FIGURE 1: Organ donation and transplantation flow chart

FIGURE 2 :
FIGURE 2: A high-level system architecture of the proposed blockchain-based solution for organ donation and transplantation

FIGURE 3 :
FIGURE 3: Sequence diagram showing interactions among the participants and organ donation smart contract

FIGURE 4 :
FIGURE 4: Sequence diagram showing interactions among the participants and organ transplantation smart contract

Figure 6 1 2 3 4 6 Organstate = OrganReceived 7 Emit an event announcing that the donated organ has been received 8 else 9 FIGURE 7 :
Figure6shows a successful execution of the AddingNew-Patient function that adds new patients to the waiting list.This function essentially allows the authorized doctors, who are the only participants allowed to execute it, to store the

FIGURE 8 :FIGURE 9 :
FIGURE 8: Successful execution of the MatchingProcess function

FIGURE 10 :
FIGURE 10: Successful execution of the RemovingDonate-dOrgan function

FIGURE 11 :
FIGURE 11: Smart contracts vulnerability analysis Min_Age is the minimum acceptable age that can be matched with the donor's age 2 Max_Age is the maximum acceptable age that can be matched with the donor's age 3 Donor_BloodType is the blood type of the donor 4 Donor_MinBMI is the minimum acceptable body mass index that can be matched with the donor's BMI 5 Donor_MaxBMI is the maximum acceptable body mass index that can be matched with the donor's BMI 6 _OrganType_ is a particularized enumerate variable that represents various types of the needed organ.

2
Removing_date is the date of removing the donated organ.Removing_time is the time of removing the donated organ.4 _DonatedOrganType is a particularized enumerate variable that represents various types of the donated organ.5 Organstate is a particularized enumerate variable that represents the states of the removed donated organ.

1
Organstate is a particularized enumerate variable that represents various states of the removed donated organ. 2 assigned transporters list: is a mapping that indicates which transporters are assigned for transportation 3 if caller == DonorSurgeon then 14 if (caller==∈ assigned_transporters_list)∧ (bloodunitstate == on Track) then 15 Organstate = End Delivery process 16 Emit an event announcing that the donated organ has been delivered 17 else 18 Revert.19 end FIGURE 6: Successful execution of the AddingNewPatient function in table

TABLE 2 :
A comparison of the proposed solution with the current available solutions