Anthony Akentiev: A first look at R3 Corda

    0
    3560
    default

    R3 is a Blockchain technology company that leads a consortium of more than 70 banks/financial institutions. It took them more than one year to build and release a prototype of Corda. Let’s dive in and see what Corda is and how we can use it.

    What is Corda?

    Corda is a permissioned distributed ledger platform that features JVM smart contracts. It is open-sourced and built only for financial applications (as opposed to Ethereum). Please notice, it is a distributed ledger and also a decentralized database.

    Key features

    Corda has no Blockchain. It uses special notary nodes to solve transaction races (i.e. reach consensus) and different consensus algorithms can be used on the same network. It should be noted that Corda does not utilise Proof of Work or have a concept of mining.

    Please take a look at BigchainDB, because the concept is somewhat similar. BigchainDB is not a Blockchain as we know it either.

    No mining + Privacy = Scalability

    The word permissioned in this case means that transactions are not broadcasted to all by default. This is not a sharding. Let’s call that feature privacy:

    Records managed by this system are accessible only to those actors with a legitimate interest in the assets and agreements they manage

    Such privacy means that Corda features special identity services:

    It assumes an identity infrastructure between the participants in the network but makes no assumption as to its sophistication or mode of operation

    No mining and permissions results in a good scalability:

    Nodes only encounter transactions if they are involved in some way, or if the transactions are dependencies of transactions that involve them in some way. This loosely connected design means that it is entirely possible for most nodes to never see most of the transaction graph, and thus they do not need to process it.

    Because there is no single Blockchain, it becomes possible to merge two independent networks together by simply establishing two-way connectivity between their nodes and then configuring each side to trust each other’s notaries and certificate authorities

    Technology

    What is Notary?

    A notary is a (very likely) decentralised service which fulfils the role that miners play in other Blockchain systems: notaries ensure only one transaction can consume any given output. Bitcoin has a global distributed notary service; that’s the famous Blockchain. Notary is also used for timestamping.

    Corda is the only Distributed Ledger platform to support multiple consensus providers employing different consensus algorithms on the same network, enabling compliance with local regulations.

    How is Corda the same as Ethereum?

    • Turing-complete smart contracts
    • It has Oracles (built-in)

    How is Corda different from Ethereum?

    • It should be noted that Corda does not utilise Proof of Work or have a concept of mining.
    • Contracts in Corda are more declarative (pure functions) than in Ethereum.
    • CorDapp is a short for Corda Distributed Application.
    • Consensus is needed only for notaries (Byzantine Fault Tolerant or Raft algorithms currently).
    • Consensus over transaction validity is performed only by parties to the transaction in question. Therefore, data is only shared with those parties which are required to see it. Other platforms generally reach consensus at the ledger level. Ethereum is going to try sharding in order to scale.

    Smart contracts

    • JVM as a base. The contracts are written in Java/Kotlin. Corda uses a new type of JVM sandbox. It utilises a bytecode static analysis and rewriting pass, along with a small JVM patch that allows the sandbox to control the behaviour of hashcode generation.
    • Any zip file can be attached to a transaction (with legal info or even some pics) and can be used from contract code.
    • Contracts can have a machine-readable Contract Code and a human-readable Legal Prose.
    • Smart contracts has no mutable storage (same as in Bitcoin), and smart contracts has no “message” concept.
    • Arbitrary-precise time-bonds instead of block times (timestamp-windows and timestamp service).
    • Messages are delivered like e-mails — saved to disk and then transmitted to the next hop. Some nodes may be switched off, for example. Even cooler… the administrator can delete some ‘hung’ messages if they threw exceptions. That is very interesting.
    • Has a built-in composite keys (2-of-3, etc).

    An example of a smart contract written in Java can be found here.

    Conclusion

    R3 Corda is not a pure “Blockchain” technology, and it is very questionable what benefits it gives us compared to solutions that banks use today.

    However, the smart contracts that Corda features are something new in the world of finance and are 100% good for the Blockchain industry and community.

    What we want is to get feedback from you! Please write comments to us below. Do you think it is useful for the non-banking client? Can you write us about any uses for this software we are missing? Why do we need to use such a “not-a-Blockchain” technology? Is it only for “private ledgers”?