Click here to Skip to main content
15,881,803 members
Articles / Security / Blockchain
Article

Bridging Corda To The Permissionless World of Solana

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
20 Dec 2021CPOL6 min read 2.3K   1  
This blog discusses some of the possibilities of bridging private permissioned networks like Corda to public blockchain systems like Solana.

This article is a sponsored article. Articles such as these are intended to provide you with information on products and services that we consider useful and of value to developers

With SDX issuing its first-ever digital bond worth 150 million CHF($162 million) onto R3’s Corda blockchain, there has been an increased demand from our clients to understand the entire architecture which has enabled T+0 settlement of trades.

While discussing this digital bond first with our Corda community, we were asked a question - How do I settle my trades on Corda blockchain in a regulated way, but at the same time, once you own an asset on a Corda network, perhaps you then want to trade it or use it as collateral on some other network. How could you do that? This blog discusses some of the possibilities of bridging private permissioned networks like Corda to public blockchain systems like Solana.

Interoperability can mean many things depending on the needs of users. In this case, it defines the need to share data from two networks - this involves operations like querying some information from other networks, performing atomic swaps, and transferring assets from one network to the other (using a bridge), to name just a few use cases. This blog covers moving assets from Corda to Solana (and vice-versa) using wrapped assets and bridges.

Trusted Bridge Architecture

Before jumping into an explanation of our trusted bridge architecture, let's get to grips with wrapped assets.

Wrapped Asset

Image 1
Corda token wrapped and issued on Solana network

We will use tokenization to wrap an asset. Tokenizing an asset involves representing it on a blockchain platform that can be managed by a smart contract. A wrapped asset is a token issued on one blockchain platform representing an asset on the other platform. The issued wrapped asset has an equivalent value of its underlying asset. The real-world assets are locked up until its wrapped assets are not issued on the blockchain, thus preventing double-spending.

Bridge

Image 2
Bridging assets from Corda to Solana and vice-versa

Usually, an escrow is an entity to whom tokens are transferred before making a transaction. The escrow holds the deposited tokens until certain conditions are satisfied. Locking tokens on the Escrow side is automatically handled by a smart contract deployed at the Escrow’s node.

The bridge is also an entity in this proposed architecture. The bridge is both a technical component, as well as an actor (verifier) in the system. It is the entity that verifies that an asset was issued on the Solana network, or the asset was redeemed on the Solana network by providing its signature to the transaction. Technically, both the bridge and the escrow can be the same entity. This depends on whether the escrow is the same entity on both sides or if it is different.

For this proposed architecture we assume the bridge and escrow are different entities. Also, for simplicity, we have assumed the escrow and issuer will be represented by the same party on the Solana side but will be different entities on the Corda side. The escrow on the Solana side performs the usual escrow tasks as mentioned above, and so while transferring, the assets are the escrow’s liability.

With this proposed architecture, we have improved the bridge architecture when issuing assets from Corda to Solana. With Corda, we make use of a feature called encumbrance, which locks the assets on the holder’s side and these are not transferred to the escrow until a certain condition is met on the escrow side, thus reducing the holder’s risk of escrow becoming insolvent.

Let us look at the proposed asset transfers from Solana to Corda and Corda to Solana:

Corda to Solana Asset Transfer

Step 1: Transfer Initialization

Image 3
Transfer Initialisation

When Alice wants to move her tokens from Corda to Solana, she creates a lock state and submits a transfer request to escrow. She encumbers her tokens to transfer against this locked state. The contract of this locked state defines the criteria which need to be met to allow unlocking of the tokens, e.g. Equivalent Solana token issuance proof by the verifier(bridge). Since the tokens are locked up by using encumbrance, there is no risk of Alice spending these.

Step 2: Solana Token Issuance

Image 4
Token Issuance on Solana Network

Corda’s escrow node detects this request by looking at its vault, and the corresponding Solana escrow will issue an equivalent token to Alice on the Solana network.

Step 3: Proof Of Issuance

Image 5
Bridge signing the token issuance

Once the tokens are issued on Solana, the bridge generates a transaction issuance proof and signs it.

As we know, finality with permissionless blockchains is not instantaneous, and we have to wait for x confirmations to consider the transaction final. For our case, we will wait for 32 blocks before the bridge signs the finality.

Step 4: Transfer Finalisation

Image 6
Token Finalisation on Corda and Solana network

Finally, once the bridge confirms the token issuance on the Solana network, the Corda escrow can release the locked tokens, and these are exited from the ledger.

Solana To Corda Asset Transfer

Step 1: Transfer Initialization

Image 7
Transfer Initialisation Request

When Alice wants to move her asset from Solana to Corda, she creates a temporary account, moves the tokens which she wants to transfer to this temporary account, and assigns ownership of this account to an escrow program (using PDA).

She lets escrow know about her intentions using an instruction. This instruction contains details like whether the temporary account has been initialized, token quantity, temporary account public key, initializer public key, and destination public key on Corda.

Step 2: Token Exit

Image 8
Token Exit

When the escrow notices this instruction, the tokens are redeemed.

Step 3: Proof Of Exit

Image 9
Transfer tokens from Alice To escrow

Once tokens are redeemed on Solana, the verifier, (the bridge) creates proof of the exit transaction.

Step 4: Transfer Finalisation

Image 10
Proof of Exit on Solana

After the bridge verifies the asset redemption on Solana, it conveys this information with additional asset provenance information to the Corda escrow node. The escrow now issues equivalent wrapped Corda tokens containing provenance information resembling transaction backchain/history.

Asset provenance information contains information like Alice’s public key from the Solana network, the public key of the bridge, which verified the exit of the asset on Solana, Solana token exit transaction proof.

Conclusion

Interoperability can be used to eliminate the obstacles faced by both the private and public blockchains (scalability, cost, finality, anonymity) by allowing them to interact and exchange value across platforms.

For any queries join our #cordaledger Slack channel
Join our developer program here by visiting our Developer Portal.
To know more about Corda visit our Docs and our community forum.


Note: The bridge architecture is being built as a research prototype by the OCTO (Office of CTO) team at R3. Interested readers can reach out to me for the bridge code. You can take a look at this video at CordaCon, where Agnieszka and Sotiria demo this bridge prototype.


Thanks to Aga, Richard, Sotiria for their help on this blog.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
Sneha Damle is a Developer Evangelist at R3, an enterprise blockchain software firm working with a global ecosystem of more than 350 participants across multiple industries from both the private and public sectors to develop on Corda, its open-source blockchain platform, Corda Enterprise, a commercial version of Corda for enterprise usage, and Conclave, a confidential computing platform.

Comments and Discussions

 
-- There are no messages in this forum --