Comparison: Ethereum vs Hyperledger Fabric vs R3 Corda
Is there a way for your business to deal with the increasing use of distributed ledger technologies? Why sure, your business can adopt new technologies!
Modern distributed ledgers are powerful enough to change the payments landscape, improve the efficiency of large, midsize and small businesses, and open them to potential entrants.
In this paper, we give you a brief overview of the well-known distributed ledger technologies (DLT) — Ethereum, Hyperledger Fabric, R3 Corda and Ethereum. The point is to give you a hand with choosing a platform that can meet the essential needs of your company. So let's get started with every technology nuts and bolts.
According to white papers of Ethereum, Hyperledger Fabric and R3 Corda, their developers have quite different views on frameworks' practical use. Now, let's see...
- R3 Corda. An open-source virtual ledger created to meet requirements applying to financial industry. It's capable to deal with the most complex transactions and restricts access to vital financial data. As a result, Corda attracts interest from various finance-related industries such as healthcare, insurance, banking and governments. It's worth noting that R3 Corda uses the advantage of many blockchain features. However, it can be hardly considered a true blockchain. The main goal of Corda is to ensure network owners their services are compatible between all network participants.
- Ethereum. Perhaps, the most important thing about ETH is that it's not just a cryptocurrency. In a broad sense, it's a virtual platform with many features using blockchain technology. Ethereum features smart contracts, the Ethereum Virtual Machine (EVM) and has its very own currency: ETH.
ETH relies on blockchain for contract negotiation and facilitation. Such an approach provides a decentralized way to verify and enforce contracts. As a result, both fraud and censorship are hardly possible. Ethereum’s smart contracts are designed to provide pretty high-security level in comparison with traditional ones.
It looks like it's time to compare the aforementioned blockchain-based solutions. As for Fabric and Corda, they were developed for concrete use. Corda is cut out for the financial services industry.
Hyperledger Fabric platform provides a modular architecture in blockchain to a wide range of various industries that care seriously about their supply chains (banking, healthcare, etc.).
Solutions offered by Ethereum can be applied in many spheres, as well. Still, in contrast to Fabric, it is not modularity that stands out but the provision of a generic platform for all kinds of transactions and applications.
When it comes to a traditional (centralized) network or data storage, there's only one entity that keeps a copy of the database. Usually it's known as a database keeper/owner. As a result, the owner controls what data is contributed and what other users are permitted to contribute.
DLT change the picture completely in favor of a distributed data storage where multiple entities hold lots of database copies and have permissions to contribute. All users participating in the distributed data storage build a network of nodes/peers.
On the other hand, there's and issue: as far as the data storage is distributed, an urge need arises to ensure that all peers agree upon a common truth, e.g. the correctness of a ledger, as changes made by one node have to be propagated to all other peer nodes in the network. The result of arriving at a common truth is called consensus among nodes/peers.
Regarding to the consensus, there are two operation modes: permissioned and permissionless. If consensus participation is permissionless, any user can become a part of the network. This model is true for Ethereum as a public blockchain.
In turn, if participation is permissioned, peers are selected in advance and no one else can access the network. Permissioned model is true for both Hyperledger Fabric and R3 Corda.
With Ethereum, all peers need to reach consensus over the order of all transactions that have taken place, irrespectively of whether a user has taken part in a particular transaction. That system is vital for the ledger existence. If there's no chance to establish a transaction, there is a chance that double-spends might have occurred. In other words, there's an opportunity of making coins out of thin air!
- Luckily, the current implementation of Ethereum has a fraud protection mechanism established by mining based on the proof-of-work (PoW) scheme. All nods have to agree upon a common ledger and all nodes have access to all entries ever recorded. It's worth noting that such an approach is problematic for apps that require a higher degree of privacy.
Unlike Ethereum, consensus interpretations of Hyperledger Fabric or Corda are more refined. As far as both frameworks deal with permissioned participation model, they provide a more fine-grained access control to records and thus better privacy.
- Fabric’s understanding of consensus covers the whole transaction flow, starting from proposing a transaction to network community. And not only that! Peers assume different roles and tasks in the process of reaching consensus. This contrasts to Ethereum where all nodes need to perform the identical tasks.
With Fabric, peers actions depend on the roles they play: clients, peers or orderers. A client acts on behalf of an end-user and creates and thereby invokes transactions. They interact with both peers and orderers.
Peers maintain the ledger and receive ordered update messages from orderers for committing fresh transactions.
Orderers, in turn, provide a communication channel to both clients and peers making it possible to send messages containing transactions. The only issue here is that there might occur faults in the delivery of messages when many mutually untrusting orderers are employed.
Without going further into detail, Fabric provides fine-grained control over consensus and restricted access to transactions which results in improved performance scalability and privacy.
- Consensus-building pattern of R3 Corda resembles of one used by Hyperledger Fabric. With Corda, transaction validity and transaction uniqueness make subject to consensus. The validity is ensured by running a smart contract code related to a specific transaction, by checking for all required signatures and by assuring that any transactions that are referred to are also valid.
Transaction uniqueness means that every single transaction refers to a unique consumer. In other words, there are no more transactions of that kind. The reason is to get rid of double-spends. Consensus over uniqueness is reached among peers called notary nodes.
Perhaps, it's worth recalling that in terms of DLT a smart contract is a piece of software written in a specific programming language. Generally, it's developed to act as a software agent or represent the party using the smart contract to fulfill certain obligations, exercise rights and control a range of assets within a distributed ledger. All the aforementioned DLTs use the advantage of smart contracts. Ethereum's contract code is written in Solidity; Hyperledger Fabric uses Java; R3 Corda prefers Java or Kotlin. Moreover, in Fabric, the term “Chaincode” can be used as a synonym for a smart contract.
Unlike Fabric and Corda, Ethereum features its very own cryptocurrency widely known as Ether (ETH). Its main purpose is to pay rewards to peers that contribute to reach consensus by mining blocks as well as to pay transaction fees within the network. With this in mind, you can rely on Ethereum to create decentralized apps (DApps) that allow monetary transactions. In addition, you can develop a digital token for custom use cases by deploying a smart contract that conforms to a specific standard.
As for Hyperledger Fabric and R3 Corda, they don't actually need a build-in cryptocurrency as they use consensus-building mechanisms that don't require mining. On the other hand, Fabric makes it possible to develop a unique currency or a token using Chaincode.
Well, here comes the hard part: it's time, to sum up. Solutions like Ethereum and Hyperledger Fabric are pretty flexible and offer great prospects for DApp development. Quite powerful smart contracts featured by Ethereum make the framework a perfect platform for building a really wide range of applications. Still, permissionless model used by ETH can't boast of high-performance scalability and privacy. This platform is a bit limited, but it easily allows you to write a small application for the interaction of simple conditions. Well suited for solving local problems.
Hyperledger Fabric provides a modular architecture and privacy by featuring the permission model of operation. Moreover, the modular architecture allows Fabric to be customized to a multitude of applications. Compared to other frameworks, the Hyperledger is very flexible due to the distributed architecture of the components. It gives the opportunity to implement any functions based on the blockchain. The high level of confidentiality allows it to be used for storing personal data, for example, in real estate or healthcare.
As for R3 Corda, it stands alone as it's focused on the financial services industry. That feature makes Corda's architectural design more simple in comparison to Fabric's one. As a result, the framework offers a better out-of-the-box experience to developers.
According to the most recent news, there's a chance Corda can be integrated into the Hyperledger project. If so, it would be wise of you to consider R3 Corda a complement to Fabric.
Taking into account our experience, we understand that each framework is well suited for specific goals and tasks of the company. Although in general, we prefer Hyperledger Fabric based on Java. It has good flexibility and high performance. Feel free if you have any questions.