Applications of R3's Corda
Welcome to Whiz Blockchain! Today we are going to discuss one of the underrated blockchain technologies in the market that isn’t getting the much recognition- we are talking about R3’s Corda. When we think about blockchain infrastructure platforms, names like Ethereum or IBM Hyperledger Fabric come to mind. Corda is a name that, as many people say, should be on that list. It is created by a consortium of some of the top banks in the world.
Many experts would argue that Corda should not even be considered a blockchain platform. The R3 consortium prefers the term distributed ledger platform to label Corda. To avoid confusions, we can use the term ‘blockchain-inspired distributed ledger platform’. From the infrastructure standpoint, Corda can be seen as a network of nodes running. However, different from other blockchains, Corda’s networks are completely permissioned which means that every node in the network has a known identity. In order to enable that capability, Corda uses the concept of a Doorman which are nodes responsible for enforcing the identity management protocols that allow nodes to join the network.
We can build a few types of distributed applications on top of Corda. See what a CorDapp really is:
What is a CorDapp?
CorDapps (Corda Distributed Applications) are distributed applications that run on the Corda platform. The goal of a CorDapp is to allow nodes to reach agreement on updates to the ledger. They achieve this goal by defining flows that Corda node owners can invoke through RPC calls.
CorDapps are made up of the following key components:
- States, defining the facts over which agreement is reached (see Key Concepts - States)
- Contracts, defining what constitutes a valid ledger update (see Key Concepts - Contracts)
- Services, providing long-lived utilities within the node
- Serialisation whitelists, restricting what types your node will receive off the wire
Types of CorDapps we can create:
- Yo! – A simple CorDapp that allows you to send Yo’s! to other Corda nodes
- IOU – Models IOUs (I Owe yoUs) between Corda nodes (also in Java)
- Obligations – A more complex version of the IOU CorDapp
o Handles the transfer and settlement of obligations
o Retains participant anonymity using confidential identities (i.e. anonymous public keys)
- Negotiation – shows how multi-party negotiation is handled on the Corda ledger, in the absence of an API for user interaction
- Crowdfunding – Use the observers feature to allow non-participants to track a crowdfunding campaign
- FTP – Use attachments to drag-and-drop files between Corda nodes
- Blacklist – Use an attachment to blacklist specific nodes from signing agreement
- Whistle Blower – Use confidential identities (i.e. anonymous public keys) to whistle-blow on other nodes anonymousl
- Prime Numbers Oracle – Use an oracle to attest to the prime-ness of integers in the transaction
- Options – Use an oracle to calculate the premium on call and put options
- Heartbeat – Use scheduled states to cause your node to emit a heartbeat every second
Accessing external data
- Flow HTTP – Make an HTTP request in a flow to retrieve data from GitHub
- Flow DB Access – Access the node’s database inflows to store and read cryptocurrency values
- Contract Upgrades – A client for upgrading contracts
Alternate node web-servers
- Spring Webserver – A node web-server that:
o Provides generic REST endpoints for interacting with a node via RPC
o Can be extended to work with specific CorDapps
- Yo! CorDapp Spring Webserver – A node web-server that:
o Provides REST endpoints for interacting with the Yo! CorDapp via RPC
o Streams vault updates to the front-end using a web-socket
- NodeInfo – A client for retrieving information from a running node
o Useful for checking that a node is running and is accessible from another host via RPC
- Ping-Pong – A client for pinging other nodes on the network to check connectivity
So, these are some of the types of CorDapps we can create. You can also get a basic source code for them by following the Github links provided for a good head-start. Happy coding!