Unlocking New Opportunities with Accounts on Corda

Peter Li
Corda
Published in
5 min readNov 18, 2019

With the release of Accounts on Corda we’ve greatly expanded the number of use cases for which Corda is a best-in-class solution.

Whether you’re building an CordApp that represents a large number of customers, have a business network that includes many smaller entities or powers a consumer-focused mobile experience; Accounts on Corda allows you to run a single node that can represent all of the identities as accounts on that node. Here’s when you need accounts:

  1. Cost of hosting is a barrier to entry

Say you are running a blockchain solution company, and you have already developed your CordApp and built a network using Corda Enterprise Network Manager. On pitching the application to the network participants, it became clear that the cost of running a node for each participant was a barrier to entry.

Or, say you’re building a solution for a road side repair service that interfaces with thousands of garages, or represents a large chain of physical stores, or want to use Corda to power the back-end transactions in your mobile app. Using Accounts on Corda provides a scalable solution without the cost of running a node for each identity.

2. Data get badly stored when multiple internal teams use the same company node for external transactions

Perhaps you realized that all of the teams in your company are operating on behalf of the same node identity when making external interactions. All the transactions are tagged with this node (company) identity. And internal teams are able to query another team’s database. Using Accounts on Corda allow your application to achieve data isolation from the application level. Each account user will then have limited visibilities of the entire node database.

In each of these cases running a node is sub-optimal for client onboarding and internal compliance. With the Accounts feature, a new library available in Corda 4.3, these issues become a thing of the past. And more exciting than that, the ability to represent multiple identities on a single node opens up a whole new world of possibilities with Corda.

Corda Accounts are suitable for a range of purposes — think customer accounts, balance accounts, employee accounts — and much more.The new Accounts library in Corda 4.3 can be used for:

  • Enable Business Network Operators to aggregate client or organization entities distributed identities and host them on a single node as separate accounts, while preserving privacy and security.
  • Allow individual node operators the ability to partition and manage the node database on an account basis to reduce operational complexity.

What are Corda Accounts?

The accounts library allows a Corda node operator to split the vault into multiple “logical” sub-vaults.

Rather than setting up multiple vaults/databases at extra cost and have data in multiple places, the Accounts feature enables you to store a variety of partitioned data inside a single secured vault in a manageable manner.

Think back to the two scenarios:

  • By using Accounts, Business Network Operators can now reduce the cost of hosting multiple entities or nodes on behalf of multiple participants.
  • And organizations can assign each team or entity a dedicated account, enabling different teams to make independent and private transactions with their own account and do so in a highly efficient way.

The Accounts library takes the form of a JAR which can be dropped into the CorDapps folder. Its use is optional. We intentionally designed it this way so you can decide which nodes will support accounts. Not all nodes will need to support accounts. This optionality means a flatter learning curve for new CorDapp developers.

Account Hierarchy

Accounts are created by host nodes (which are just regular Corda nodes). They make no claims or assumptions about identity at the network level. As such, accounts do not come with a network level identity or an identity rooted in the network trust root. However, Corda Accounts are discoverable by and able to transact with any regular nodes and other accounts after you share the specific accounts with your counterparties. As a result, Corda Accounts are used in the same way, as a Corda node to interact with counterparties.

In the above chart, we see that the account library gives you have the ability to make account-to-account transactions (cross-node or in-node), and account-to-node transactions.

Where Can Accounts Be Used?

Let’s jump into an example:

In the above graphic, we see that the buyer and seller nodes both have three accounts and we can see a shipping company that currently does not have sub-accounts as part of its node..

If we continue to the business flows, we see that there are five types of flows that can now take place between these counterparties’ accounts .

  • Invoice Flow: Acct <> Acct transaction (Cross node)
  • Internal Message Flow: Acct <> Acct transaction (In node)
  • Payment Flow: Acct <> Acct transaction (Cross node)
  • Shipping Request Flow: Acct <> Node transaction
  • Cargo Flow: Node <> Acct transaction

With the accounts library enabled, flows become more flexible than they are in today’s node-to-node transaction model (not to mention Corda also has the most flexible flow framework when compared with other blockchain platforms 🕺). We can now sync up and replicate the complex organization business flows that form transactions in real day-to-day business.

Points to Note:

1. Accounts is a feature we developed to maximize the use of nodes by partitioning the vault into different sub-vaults, and to open up new ways to manage business flows and data. It will change the design of the flow logic by offering more flexibility and options that were not previously possible with Corda’s flow logic.

2. Accounts is optional. Even on the same network, a company can choose to use the accounts library or not, depending on their organizational and operational needs.

3. Versions: Currently, Accounts is only supported from Corda 4.3.

Links

Full Code is available here

Accounts Briefing by Roger Wills is available here

Thanks to Roger Wills and The Corda Team

Thanks for reading — Peter Li, Developer Evangelist (R3)

--

--