1. Blockchain dApp project initiation process | 1.1 Identify objectives and key performance indicators | Clearly articulate the overarching objectives of the blockchain dApp development project. Define the key performance indicators (KPIs) that will be used to measure the success and effectiveness of the blockchain dApp. NOTE: The metrics may include transaction throughput, response time, system uptime, number of active users, gas fees, or any other relevant performance indicators specific to the dApp. |
1. Blockchain dApp project initiation process | 1.2. Evaluate blockchain suitability | Determine if blockchain fits the specified domain and whether it is capable of solving the specified problem. NOTE: We recommend leveraging the findings of supportive studies when assessing suitability [1][41]. Which type of blockchain might be appropriate is also identified in one of these supportive studies [41]. |
1. Blockchain dApp project initiation process | 1.3 Evaluate the feasibility of the blockchain dApp project | Evaluate the feasibility of achieving the project goals with available resources and constraints [Class A, B, C]. NOTE: Perform a thorough financial analysis to assess the project's financial feasibility. This includes estimating costs, projecting revenues, and profitability. Cost estimations differ between creating a blockchain system from scratch and using existing platforms. Some of the platforms have transaction fees and execution fees, and some of them have procurement fees. Proof of Concept (POC) could be used to validate the idea and showcase its feasibility. A proof of concept is a theoretical demonstration of an idea's possible production and use. It enables testing a DApp with minimal resources before committing a large amount of time and money to the development process. It should be ensured that the solution offers complete security on the blockchain for the health domain in POC development [42]. |
2. Blockchain dApp planning | 2.4 Decide on the blockchain development life cycle model | Identify a development life cycle [Class A, B, C]. NOTE: Agile or iterative incremental practices could be used, as blockchain dApp development usually deals with the rapid implementation of systems whose requirements are not fully understood at the beginning and tend to change over time [23]. Agile adoption in the health domain is possible to enable continuous safety assessment, continuous traceability establishment, continuous compliance, and better change management. |
2. Blockchain dApp planning | 2.5 Decide on the safety class according to IEC 62304 | Classify the safety class (A, B, or C) of blockchain dApp based on the rules outlined in IEC 62304 standard [26]. |
2. Blockchain dApp planning | 2.6 Decide on the need for using digital asset | Decide whether a digital token in blockchain dApp is needed. NOTE: If the users should have to purchase cryptotokens to use the blockchain dApp, then plan for a utility token. If there is a plan to introduce a cryptotoken with a promise of future profits for end users, then plan for a security token. A security token represents a stake, so investors purchase and hold them with an expectation of future profit. |
4. Blockchain dApp requirements elicitation | 4.2 Elicit stakeholder requirements | Gather stakeholder needs. Transform the needs into requirements. Maintain traceability of stakeholder needs and requirements. Define requirements considering the safety class [Class A, B, C]. NOTE: Many blockchain software projects are open source. They are developed with community participation, and “Community discussion” is the most preferred method for collecting requirements [20]. |
5. Blockchain dApp requirements analysis | 5.1 Specify blockchain dApp system requirements | Define system requirements [Class A, B, C]. Consider the problems that are planned to be solved, consensus mechanism, cost, scalability, developer requirements, and expected timeline. Define blockchain dApp development platform requirements or define the requirements of creating a new blockchain framework. Maintain traceability between the system and software requirements and the stakeholder requirements. |
5. Blockchain dApp requirements analysis | 5.2 Identify the consensus mechanism | Determine the consensus mechanism. NOTE: The most popular consensus mechanisms are Proof of Work (PoW), Proof of Stake (POS), Delegated Proof of Stake (DPOS), Practical Byzantine Fault Tolerance (PBFT), Proof of Elapsed-Time (PoET), Proof of Authority (PoA). The consensus algorithms choice affects both computing performance and scalability. For instance, the Performance Byzantine Fault Tolerance (PBFT) consensus algorithm outperforms the Proof of Work (PoW) consensus method in speed despite being less scalable [43][44]. The Delegated Proof of Stake (DPOS) algorithm, which does not involve competition over discovering the blocks and is, therefore, more efficient, could be used in the medical blockchain instead of the Proof of Work (PoW) algorithm to reduce high energy costs [45]. Proof of Authority (PoA) algorithm is more energy efficient than the Proof of Work (PoW) algorithm due to the minimal usage of computational power [46]. If green computing is the focus, energy efficient algorithms should be preferred. If a dApp platform is chosen, the chosen platform has an impact on the consensus mechanism. |
5. Blockchain dApp requirements analysis | 5.3 Include tokenomics in blockchain dApps including digital tokens. | Plan to investigate tokenomics in blockchain dApps if digital tokens are planned to be included in Practice 2.7. Tokens provide a way to reward and incentivize network participants, customers, and stakeholders. Tokenomics encompasses the concept of the study and implementation of an economic system with tokens [47]. |
5. Blockchain dApp requirements analysis | 5.4 Specify blockchain dApp software requirements | Define software requirements [Class A, B, C]. Define actors and user stories considering those that directly interact with the Smart Contracts/Chaincodes. Identify access rights, permission policies, and obligations. It is necessary to define access rights carefully in the domains where data confidentiality is crucial. NOTE: Smart Contracts/Chaincodes could be specified to regulate data access rights, and permission policies, in health applications [48]. |
5. Blockchain dApp requirements analysis | 5.5. Specify blockchain dApp security requirements | Define security requirements including actions related to the compromise of sensitive information, authorization, authentication, audit trail, system security/malware protection, communication integrity, and anonymity [Class A, B, C]. NOTE: Consider five principles of information security, which are confidentiality, integrity, non-repudiation, accountability, and authenticity [49], while defining requirements. |
5. Blockchain dApp requirements analysis | 5.6 Specify blockchain dApp privacy requirements | Define privacy requirements considering the sensitivity of the information, privacy laws, policies, and regulations [Class A, B, C]. |
6. Blockchain dApp risk management | 6.1 Identify software that could contribute to a hazardous situation and potential causes | Identify software items that could lead to a hazardous situation identified in ISO 14971 and the potential causes of this contribution. NOTE from 62304: The hazardous situation could be caused directly by a software failure or indirectly by the failure of a risk control measure used in the health dApp product. Document the potential causes [Class B, C]. |
6. Blockchain dApp risk management | 6.2 Define risks to the blockchain dApp product | Define and record risk control measures in compliance with ISO 14971 [Class B, C]. NOTE: We recommend considering the following blockchain-specific risk items: • There are currently no established standards for blockchain and distributed ledger technology due to the field’s continuing rapid technological development. The absence of international standards carries risks related to the lack of interoperability, user lock-in, privacy, and security [50]. • Energy requirements could be high while building consensus for adding a new block if the PoW algorithm is used [50]. • The lack of a centralized authority in blockchain implementation places more responsibility on the user. In the case of loss or stolen private key, there is no organization to contact [51][50]. • The legal and regulatory framework surrounding blockchain is still in its infancy and therefore entails significant risks [50]. • The system is vulnerable to risks from malicious users in pseudonymous systems, or those where disclosing identity is not required, in the absence of third-party identification [50]. Identification of an end user will remain hidden from the system, which poses security risks, particularly regarding Know Your Customer (KYC) standards [50]. • Smart contracts could be subject to poor management and security flaws. To install new or modify existing smart contracts, participant entities or the network administrator will need a robust governance and change control procedure. To recognize and address issues with the operations of smart contracts, they will also require a strong incident management procedure [51]. • Oracles are non-blockchain entities that provide data to the network potentially causing the execution of smart contracts on the network. These oracles may pose the biggest threat to a blockchain framework because they are vulnerable to malicious attacks that aim to tamper with the data given to the blockchain [51]. • If a group has more than 50% of the network's hashing power—the processing power used to solve the cryptographic puzzle—is said to be performing a 51% attack on the blockchain. Then, at a very specific point in the blockchain, this group introduces an altered blockchain to the network, which, in theory, is accepted by the network because the attackers would hold the majority of it [52]. This is a risk, however it is usually not realized due to the expense of obtaining sufficient hashing power. |
6. Blockchain dApp risk management | 6.4 Analyze the project and product risks | Analyze risks and apply risk measures to determine the priority of where to allocate resources to monitor risks [Class B, C]. NOTE from 62304: Assess the risk control measure to determine whether it might generate a new hazardous situation. |
6. Blockchain dApp risk management | 6.6 Manage the project and product risks that may arise from changes | Examine the risks that may be raised of changes. NOTE from 62304: Analyze changes to see if any new potential causes are being introduced that could lead to a hazardous situation and whether any additional risk control measures are necessary. [Class A, B, C] |
7. Blockchain dApp architectural design | 7.1 Define and describe the blockchain dApp architecture | Establish the top-level architecture that identifies elements of hardware, software, and manual operations [Class A, B, C]. Maintain traceability among the architecture, and the requirements. NOTE: Describe the architecture considering the requirements presented below: • Scalability is affected by block size and the target time span between blocks • Fault tolerance and security is affected by consensus protocol • Cost efficiency is affected by the type of blockchain • Performance is affected by the data structure, block size, consensus protocol • Privacy is affected by the type of blockchain One way to improve performance and efficiency on a blockchain is to standardize the data that will be stored and exchanged. Ledgers could define the type, size, and format of data and align it. Access controls on the blockchain network also contribute to data standardization [53]. Blockchain records every action that occurs in the network. There is no chance of data loss in the blockchain; nonetheless, there is a chance of redundant data creation [54]. A distributed, peer-to-peer storage network that inherently supports deduplication is InterPlanetary Filesystem (IPFS) [6]. IPFS and blockchain could be combined to take advantage of IPFS's deduplication capability [55]. We recommend benefiting from reference architectures. For example, Ellervee et al. presented a blockchain reference model from the perspectives of players, services, processes, and data models [56]. There exist reference architecture studies for a variety of blockchain-based applications, such as crowdsourcing [57], government services [58], and healthcare [59]. |
7. Blockchain dApp architectural design | 7.2 Decide on blockchain network type | Depending on the properties of use case actors, decide whether to use public, consortium, or hybrid blockchain types and the permission status. NOTE: Permissioned blockchain networks with trusted nodes may be preferred if high performance is expected from an application. They have much higher execution and processing efficiency (35000 transactions per second) and higher computing power than public blockchain solutions [53]. |
7. Blockchain dApp architectural design | 7.3 Decide platform use or network creation | Decide whether to use a dApp development platform or to create a new blockchain framework. NOTE: There are various platforms for blockchain dApp development. Example platforms are Ethereum [60], Hyperledger Fabric [61], Hyperledger Sawtooth [62], R3 Corda [63], Quorum [64], and RippleNet [65]. Blockchain frameworks need to be developed to comply with existing regulatory frameworks in the health domain. Hyperledger Fabric can be given as an example which was designed to be compliant with HIPAA and GDPR, it has been actively employed in the implementations of blockchain-based systems for healthcare data management. |
7. Blockchain dApp architectural design | 7.4 Decide on storage method | Decide storage method depending on the data size: on-chain storage, off-chain storage, or hybrid. On-chain storage means that the data is stored on the blockchain network. Off-chain storage, on the other hand, stores data in external storage and its hash in the blockchain [66]. NOTE: When the size of the health data is huge, on-chain storage may result in performance and scalability problems. However, when the data is kept off-chain, there is a risk of deletion. When data hash is stored on-chain, such alterations will be recognized but not prevented. An alternative solution is the roll-up technology. Rollups relocate the computation off-chain while retaining certain information for each transaction. The amount of information published on the chain is the minimum required to locally validate the rollups transaction which also solves the storage issue [67]. |
7. Blockchain dApp architectural design | 7.5 Decide where to deploy the modules of the system | Evaluate the deployment of the dApp blockchain on a cloud or IPFS provided by a third party or the use of a blockchain-as-a-service model directly. |
7. Blockchain dApp architectural design | 7.6 Decide on block size and the target time span between blocks | Identify block size and the target time span between blocks. NOTE: For permissioned networks, selecting non-default values for the block size and time could contribute to overcoming scalability problems and increasing performance. Throughput and latency are impacted by how these blockchain characteristics are chosen [68]. |
7. Blockchain dApp architectural design | 7.7 Decide on incentives if there is a need for digital assets | Decide incentives such as rewards for generating new blocks and fees associated with transactions to encourage participants to cooperate and create value that will drive the success of the blockchain dApp. Apply this practice if decided as there is a need for digital assets in 2.3 practice. |
7. Blockchain dApp architectural design | 7.8 Ensure security of the system | Ensure the security of the system. Conduct a thorough threat modeling exercise to identify potential security threats and vulnerabilities. Use secure communication protocols to establish secure connections between blockchain nodes, wallets, or other network participants to protect data integrity and confidentiality. Consider secure coding practices and secure coding standards to mitigate common vulnerabilities. Use zero trust policies in blockchain applications when enhancing overall security is crucial. These policies include data encryption to improve access management and user authentication. NOTE: It is necessary to consider security in applications to be developed in the health domain. The Food and Drug Administration (FDA) [31] and the Medical Device Directives [69] regulate the healthcare applications marketed in the USA and the European Union, |
7. Blockchain dApp architectural design | 7.9 Apply anonymity mechanism if needed | Decide and apply if there is a need for an anonymity mechanism. NOTE: Different techniques could be used to preserve anonymity on a blockchain. These mechanisms could be preferred due to the sensitivity of health data. A zero knowledge proof construction or mixing services techniques could be used to preserve anonymity on a blockchain. • Using a cryptographic technique called zero-knowledge proof, no information is disclosed during a transaction other than the exchange of a value known by both the prover and the verifiers (the two ends of the process). Zero-knowledge proof is a way for a user to demonstrate to another user that they are aware of an absolute value without disclosing any additional or further information [70]. • By sending payments from a set of input bitcoin addresses to another set of output bitcoin addresses, a bitcoin mixing service offers anonymity. This mechanism makes it difficult to determine which input address paid which output address [71]. |
7 Blockchain dApp architectural design | 7.10 Verify the architecture. | Ensure that the architecture meets all requirements [Class A, B, C]. NOTE from 62304: Traceability analysis of architecture to software requirements could be used in this phase. |
8. Blockchain dApp detailed design | 8.2 Design the backend | Design the following elements [Class A, B, C]. • Design the Smart Contracts/Chaincodes. • Design the inheritance structure, the usage of interfaces, the connections, the flow of messages, the data structure, the external interface, the events, the internal functions, and the modifiers [21] [23] • Design the cryptographic algorithms (ring signature, group signature, multi-signature). • Design the blockchain oracles which are third-party services that connect blockchains to the outside world and provide smart contracts access to external data. NOTE: Patient mobility necessitates cross-border data transmission, which makes it challenging to adhere to many nations' privacy and data protection standards. It is critical to consider various data privacy, security, and sharing policies considering patient mobility fact [72]. Design a structure that enables each country participating in the network to implement specific policies for the protection and control of health-related data. |
8. Blockchain dApp detailed design | 8.3 Design the frontend | Design the following elements of the frontend that interact with the blockchain system [Class A, B, C]. • Design the detailed interfaces of the various modules, the module decomposition, the flow of messages, the connections and data flow between participants, and the structure and storage of data [21] [23] • Design the response to the events raised by Smart Contracts/Chaincodes [21] [23] • Design the User Interface Establish traceability between the detailed design elements, the architecture, and the requirements. |
9. Blockchain dApp implementation | 9.2 Build APIs | Build the APIs that are required for diverse purposes, such as generating key pairs and addresses, smart contracts, data authentication through hashes and digital signatures, storage, and retrieval of data, audit functions, and smart asset lifecycle management [73]. [Class A, B, C]. |
9. Blockchain dApp implementation | 9.3 Develop the backend | Develop the blockchain system. Create a new blockchain network or select one of the existing blockchain platforms [Class A, B, C]. Write the smart contracts/chaincodes using a programming language suitable for the blockchain platform. Implement the required logic, functions, and data structures within the smart contracts. Perform unit testing to ensure it functions as intended. NOTE: Smart contracts need to be tested in a production environment as part of the development process. Testing in the production environment includes an execution fee. This fee varies depending on the operations performed by the smart contract [74]. Smart contract testing is free in test networks. Before deploying smart contracts to the production environment, testing practices need to be applied in the test network to reduce the cost. Optimize the smart contracts for execution and/or transaction fees. |
9. Blockchain dApp implementation | 9.4 Develop the frontend, user interface | Develop and document the frontend which interacts with the blockchain system [Class A, B, C]. Build a client-side application that will interact with smart contracts. Maintain traceability among the implemented elements, the architecture, the design, and the requirements. |
10. Blockchain dApp integration | 10.1 Integrate the backend and frontend units | Integrate the blockchain system and frontend units of the blockchain dApp [Class A, B, C]. Maintain traceability among the integrated system elements, the architecture, the design, and the requirements. NOTE: An internal audit could be conducted to review if all requirements and specifications are met. During the audit, tests are also conducted to check how the various parts of the blockchain dApp work together. API testing needs to consider the interaction of applications in and out of the blockchain system. |
10. Blockchain dApp integration | 10.2 Verify and test the integration | Verify if the software units have been integrated into the software system in line with the integration plan, test the integrated software items and keep records of the results of the verification and testing. Record the test outcome (pass/fail status and a list of anomalies), keep enough records to allow the test to be repeated, and record the tester [Class B, C]. NOTE from IEC 62304: Examples of testing content to be considered are: - specified functioning of internal and external interfaces - testing under abnormal conditions including foreseeable misuse. - implemented risk control measures defined in 6.2. |
11. Blockchain dApp verification | 11.2 Verify the blockchain dApp product | Create tests for requirements and run a series of tests to show that each requirement is met [Class A, B, C]. Verify that test results fulfill the necessary pass/fail criteria and keep track of the traceability between requirements and tests or other types of verification [Class A, B, C]. NOTE: Example testing types on blockchain applications are listed below [75][76][75][76][77]. • Functional testing: Basic testing of components, systems, and their functionality, such as the addition of a block in the blockchain, block size, chain size, and data transmission [Class A, B, C] • Smart Contract Testing: Testing smart contracts involves thoroughly functionally verifying business logic and procedures. This testing ensures that the smart contracts work as intended. • Security Testing: Test the blockchain application for potential security vulnerabilities. This testing can include penetration testing, vulnerability scanning, and code review [Class B, C]. Ensure that test procedures cover all the security requirements. • Performance Testing: Test the performance of the blockchain application under different load conditions. This testing helps to identify potential bottlenecks and scalability issues. • Node Testing: Consensus across all nodes regarding the sequence in which transactions are added to the network is necessary to sustain a blockchain’s strength. Test the system and check each node to make sure that transactions are recorded in the proper order. • Regression testing: When a change is introduced and when software components are integrated, perform regression testing to demonstrate that defects have not yet been introduced into previously integrated software. [Class B, C] NOTE: Specialized testing methods, procedures, and tools could be beneficial due to the inherent nature of blockchain technology, which comprises distributed systems and anonymous nodes that collaborate in a peer-to-peer setting [13]. Some notable blockchain testing tools are Ethereum Tester (an open-source testing library) [78], Ganache (a widely used library for testing Ethereum contracts locally) [79], Hyperledger Composer (an open-source tool that helps to perform interactive testing, automated unit, and system testing) [80]. |
12. Blockchain dApp validation | 12.2 Validate the blockchain dApp product. | Perform validation in accordance with the validation strategy and capture the obtained results [Class A, B, C]. Validation of blockchain dApps introduces certain unique considerations compared to traditional software validation: • Validating smart contracts involves a thorough review and analysis of their code logic, ensuring that they function as intended and adhere to security best practices. • The validation phase may involve testing and evaluating the chosen consensus mechanism. It may be necessary to assess the resilience, security, and performance characteristics of the consensus mechanism, as it directly impacts the integrity and trustworthiness of the blockchain dApp. • Depending on the nature of the blockchain dApp and the domain it operates in, validation may also encompass ensuring compliance with relevant regulations and standards. This could involve verifying adherence to data privacy regulations, or specific health domain standards. |
13. Blockchain dApp quality assurance | 13.1 Specify blockchain dApp product quality requirements | ISO/IEC25030,Software Engineering - Software product quality requirements and evaluation (SQuaRE) - Quality requirements [81] can be consulted in specifying software product quality requirements [Class A, B, C] which are usability, reliability, performance efficiency, maintainability, and portability. NOTE: While many of the quality characteristics in ISO/IEC 25030 are applicable to blockchain dApps, the decentralized nature of blockchain technology introduces some unique quality characteristics. Some possible additional quality characteristics specific to blockchain dApps are: • Scalability: Blockchain networks can face scalability challenges as more users and transactions are added to the network. Scalability is a critical quality characteristic for blockchain dApps, and several approaches have been suggested to address this challenge. For example, sharding, sidechains, and layer-two scaling solutions can all be used to increase the scalability of blockchain networks [82]. • Interoperability: Blockchain networks can be siloed, making it difficult for different networks to communicate with each other. Interoperability is an important quality characteristic of blockchain dApps. It enables cross-chain transactions and can create a more connected, decentralized ecosystem. Several approaches have been suggested to enable interoperability, including atomic swaps, cross-chain bridges, and blockchain interoperability protocols [83][84]. • Energy efficiency: Proof of work consensus mechanisms, which are used by many blockchain networks, can consume significant amounts of energy. Energy efficiency is a critical quality characteristic for blockchain dApps, as it can reduce the environmental impact of blockchain networks and increase the sustainability of the technology. Several approaches have been suggested to improve the energy efficiency of blockchain networks, including proof of stake consensus mechanisms, energy-efficient mining algorithms, and off-chain transactions [46]. |
14. Blockchain dApp transition | 14.3 Deploy the blockchain dApp on the test network | Deploy the blockchain dApp product on a test network before launch to ensure that all of its features and capabilities are operating as intended [85]. The aim is to ensure software verification is performed and the results are evaluated before the software is released. |
14. Blockchain dApp transition | 14.4 Deploy the blockchain dApp on the main network | Deploy the blockchain dApp on the main network and install the Smart Contracts to the blockchain network. Document the deployment procedure [Class A, B, C]. |
14. Blockchain dApp transition | 14.5 Make the blockchain dApp product available to the users | Make the blockchain dApp accessible to the users according to the transition strategy. Document the upgrades of dApp aligned with deployment. The application, configuration items and the documentation should be archived [Class A, B, C]. |
15. Blockchain dApp maintenance. | 15.3 Implement, test, and deploy modifications | After delivery, modify the application to fix bugs, enhance performance or other features, or adapt to a new environment. Implement, evaluate, and record the selected alteration [Class A, B, C]. Analyze the impact of maintenance changes. Examine how maintenance modifications affect data structures, data, software functions, user documentation, and interfaces. NOTE: Blockchain dApps can be more difficult to modify than conventional systems. We have summarized the modification challenges as follows: • Every peer in the network must update their node software when the system needs to be updated. [86]. • As the blockchain platform software is distributed across numerous independently operating nodes, updating that software might be challenging to coordinate both physically and administratively, especially in a system with no single owner [87]. • From the data perspective, as the blockchain ledger is designed to be immutable, it cannot be updated when the system is modified [87]. A fork leads to a split of the blockchain, and two different versions of the network are run separately. Forks can be used to fix serious issues in a blockchain, (e.g. the case with the Bitcoin fork in 2010 [88]), or to undo the consequences of hacking. |