In my recent talk at UNSW I gave a high level overview and comparison of the two major enterprise solutions in the blockchain space. These two technologies were Corda of R3 and Quorum which is based of ethereum and originally created by JP Morgan. In this article I will attempt to do the same and give a basic overview and comparison of the two.
issues with public blockchain solutions
While public blockchain solutions like Ethereum and Bitcoin are very promising and have great potential, they are not a very good fit for enterprise in their current form.
Firstly, they can control write access but they cannot control read access (and in the case of the DAO it couldn't even do that), this is an obvious privacy problem for individuals and enterprises.
Secondly, these public blockchain technologies are based on a trust-less environment whereby no node can be trusted; this means validation and scaling are super expensive and often complete overkill for many enterprises.
Thirdly, the attack surface in an ethereum smart contract is massive and a lot of money can be lost when a bug is exploited.
Lastly, while there are public chains out there that implement obfuscation techniques for privacy (think zk-snarks or ring signatures) these require even more expensive validation and their public nature may not be needed in the first place.
Corda takes the approach that only participants to a transaction should have any data related to that transaction, nobody else should even if it's encrypted.
Corda has special nodes called notaries and issuers, notaries validate transactions and prevent double spending and issuers issue states into existence (like a central bank would issue cash for example). When a notary agrees on the validity of a transaction it adds it's cryptographic signature and the other nodes can validate it to ensure the notary approves.
Corda is initially targeting problems in the banking industry like trade finance.
Corda is not a blockchain solution at all as there is no need to form transactions into blocks and validate them. This is because states are issued into existence via trusted parties and notaries prevent double spending.
Quorum is based of ethereum and has many similarities like the same programming language and similar architecture. Quorum smart contracts are identical to that of public Ethereum.
Quorum is a broad solution and doesn't targeting any one industry or problem.
Both technologies plan to implement pluggable consensus algorithms but the default consensus algorithm in quorum is QuorumChain Consensus. This is a solidity smart contract which allocates special roles to nodes, there are voter nodes which vote on the validity of a block, maker nodes which form them into blocks and observer nodes which have no role.
Neither Quorum or Corda have a concept of native tokens or mining.
Quorum is based off ethereum meaning that it uses similar interfaces and the same programming language for its contracts, this is great news for ethereum developers as they will feel at home with Quorum.
The default consensus algorithm for Quorum is called QuorumChain Consensus, this is a smart contract which allocates roles to nodes. In this contract there are voter nodes which vote on the validity of the block, maker nodes which form them into blocks and observer nodes which have no role at all.
Public and private partitioning: when you spawn a quorum network there is a public network and private channels within that same network. On the public network all transactions are visible to all participants and you can form a private channel by specifying a privateFor param which sets the people who you want to be part of the private contract. In private contract channels each transaction payload is encrypted and a transaction containing only the encrypted transaction hash is broadcast to the public ledger, this ensures that the order of transactions in the private channel is established and agreed upon.
This channel based approach to privacy has some major issues for privacy and scalability. Let's say I want to form a private contract channel with ten banks and then want to trade with each one individually, all ten banks must update their private states to account for this change even though only two were involved, not only that but the public ledger needs a copy of the hash too.
Conversely, what happens when I want to trade an asset from one private contract channel to another? To do this I would have to create an intermediary contract which updates the state of both contracts. This is overly complex and highly inefficient.
Corda by contrast has avoided the channel based approach entirely and instead handles transactions on a case by case basis.
Corda implements the same UTXO model as Bitcoin except that states are referenced in inputs and then transacted to the relevant parties, only the parties involved will have any data related to the transaction.
In Corda, contract states are merely data referenced in a transaction input, this is vastly different to Quorum and Ethereum as contracts in these technologies have their own addresses and can transact with other users and contracts independently.
The notary will either see the full transaction or just the hash (to prevent double spending) meaning that it is easy to transact with new nodes as you can trace back the origin of the transaction from the issuer and use the notary to prove it hasn't been spent elsewhere. This design is much more efficient and better for privacy as it removes the need to form channels and avoids the scalability problems of transacting with other channels.
Corda and Quorum both plan to have pluggable consensus algorithms, however this is only needed in Corda if you have multiple clusters of notaries and participants that need stay in sync. Simple transactions containing two parties and one notary will not need this as states are issued by trusted parties and validated against notaries.
Corda is profoundly different to other solutions in the space and has a high learning curve even for developers who have a background in other technologies like ethereum. This is an obvious drawback for Corda.
Some handy resources
If you would like to take a deeper plunge into Corda, I suggest you check out this link as it takes you through writing a smart contract from scratch: https://drive.google.com/drive/folders/0Bzc6UTVEhEfsMk5ad1FZSEdPLVU?usp=sharing
If you would like to be more familiar with Quorum then I suggest you check out the example demos from their github: https://github.com/jpmorganchase/quorum-examples
Which technology do you think holds more promise? Leave your comments below