Multichain | A Standard For Blockchain APIs

Loong
Ren Protocol
4 min readJul 30, 2020

--

TL;DR

We have open-sourced the multichain project: a set of common interfaces and modules that can be used to implement access to any kind of blockchain. This is the API standard used by RenVM; any asset/chain added to the multichain can be considered for support by RenVM.

Check it out at https://github.com/renproject/multichain and open a pull request for your asset/chain! The Ren team will help implement it, review it, and merge it. Once this has happened, it can be considered for support in RenVM.

The Multiverse of Blockchains

Every blockchain is its own universe. Every blockchain defines its own rules, its own currencies, and its own logic. Every blockchain has its own way of thinking about networking, transactions, smart contracts, and consensus. This is no accident. The reason someone might think to create their own blockchain is precisely because they want to do something differently to how everyone else is doing it.

In a way, every blockchain speaks its own language, and this presents a unique challenge for interoperability: how does a protocol like RenVM learn about all these languages? In order to support interoperability between all chains, RenVM needs to be able to speak all of these languages. It must be able to understand all of the different ways in which networking is done, transactions are built, smart contracts are written, and consensus is reached. It must not only do so for chains that exist today, but also for chains that are yet to be built.

The solution to this problem: the multichain.

The Multichain

The multichain is a collection of functions, types, interfaces, and runtimes that can be implemented for any blockchain. Some chains have things in common, and the multichain is designed to accommodate for that. But, most chains have their unique differences, and the multichain is designed to accommodate for that too.

For example, Zcash is a fork of the Bitcoin codebase, and shares many things in common with it (e.g. the structure of UTXOs). But, Zcash is obviously very different from Bitcoin: addresses are encoded differently, transactions are serialized differently, and Zcash supports powerful privacy features. In the multichain, the implementation of Zcash shares the same interface and runtime as Bitcoin, and it even uses many of the same functions and types. But, the Zcash implementation overrides these commonalities where necessary, to support the aspects that make it unique. The same is true for Bitcoin Cash, DigiByte, Dogecoin 🐶, Zcoin, etc.

By adding a chain to the multichain, RenVM (and any other project that uses the multichain) will be able to understand how to interact with that chain. The multichain is usable by any project that wants to interact with multiple exchanges: cross-chain dapps, exchanges, other interoperability protocols, etc. and it is not specific to RenVM. An important consequence of this is: support in the multichain does not imply support in RenVM, it just creates the possibility for support in RenVM.

Existing Chains

Today, the multichain supports Bitcoin, Bitcoin Cash, DigiByte, Dogecoin, Ethereum, Substrate, and Zcash, with others already on the way. All of these implementations are open-source and available under the GNU GPL v3 license. They’re free to use for every project because we believe there is lots of value to be gained by everyone from the multichain.

How to Add New Chains to RenVM

There are many chains out there, and many more to come in the future. Everyone is encouraged to get involved in the multichain, and add support for their favorite chain (and the assets on it).

  1. The multichain comes with an example of how to add support for Dogecoin. Follow this example, and add support for your asset/chain with your best effort.
  2. Open a pull request to the multichain repo. The Ren team will review the implementation to make sure it works and is secure, and we will also help you finish the implementation if necessary.
  3. The implementation will go through a testing phase to make sure there are no surprises and that the changes are stable.
  4. Once tested, the pull request will be merged. At this stage, it becomes possible for any project using the multichain to support the newly added chain. Specifically, RenVM will then be able to consider supporting the chain for interoperability.

Just the Beginning

We hope to receive as much feedback as possible on the design of the multichain, so that we can improve it. Our focus is to make supporting new chains as simple as possible, and as secure as possible.

Now that the multichain is open-sourced, Our next steps will be to open-source the transaction execution engines, so that everyone can see precisely how RenVM builds and submits transactions between chains. For a high-level overview, check out our Wiki. For the low-level nitty-gritty, stay tuned for the upcoming release.

Fluid interoperability for all blockchains is around the corner. It is no longer a fantasy of the far future. RenVM is at the precipice of enabling sustained growth for DeFi, so the next few months will be even more exciting as RenVM continues to take steps towards greater adoption and support of more chains.

— Loong Wang, CTO, Ren

About Ren

Ren is an open protocol that enables the permissionless and private transfer of value between any blockchain.

Website | Docs | Telegram | Announcements | Twitter | Reddit | Github

--

--

Loong
Ren Protocol

Building an open protocol that facilitates the permissionless and private transfer of value between any blockchain | CTO at Ren