What about ChainBridge?

upResearch
3 min readJul 2, 2022

--

In the last post, we presented the Polymer from Polymer Labs — a solution for cross-chain communication for blockchains that do not natively support the IBC protocol. But what about other solutions in this space unrelated to the Cosmos Ecosystem and IBC-sphere in general?

Hence this post is where we are to introduce ChainBridge, a unique bridging solution from the good people of ChainSafe.

What is ChainBridge?

ChainBridge is a modular multi-directional blockchain bridge allowing data and value transfer between blockchains. It currently supports bridging between EVM and Substrate based chains.

Essentially, it is a set of contracts that run on bridged blockchains alongside a set of processes responsible for physically relaying messages. These form a channel through which all messages are transferred between blockchains.

What blockchains ChainBridge supports?

All EVM-compatible blockchains are supported, and all blockchains that are built on Substrate are also supported, which means that you can bridge between Substrate and EVM blockchains with a single solution — ChainBridge.

Is ChainBridge secure?

It is battle-tested software, so if properly deployed and used, it should have a good level of security. Nevertheless, we can extend this question, is ChainBridge trusted? The answer to that question is “yes.” Meaning that the ChainBridge operates under a trusted federation model, where a set of the relayers is limited only to the trusted ones. Therefore, it is not a trustless solution, but ChainSafe is currently working on reducing the trust assumptions and moving toward a full trustless bridge.

How does the ChainBridge work?

  1. A user initiates a transfer through a bridge using Source Bridge Contract.
  2. The Source Bridge Contract invokes the Source Handler Contract, where an application-specific logic is executed.
  3. The Source Handler Contract emits an event that is propagated on Blockchain A.
  4. Listener registers the event generated by the Source Handler Contract on Blockchain A.
  5. The Listener processes the event and generates a general bridge message which then is transferred to the Router.
  6. The Router decides to which Writer the message should be sent and relays it there.
  7. The Writer receives the message, converts it into a valid transaction, and submits it to the destination Blockchain B.
  8. The state machine registers the transaction, and a Destination Handler Contract is invoked.
  9. The Destination Handler Contract parses the transaction and relays it to the Destination Bridge Contract.
  10. The Destination Bridge Contract executes its logic which finalizes the transfer.

Please note that in practice, a transfer to be finalized might require a certain level of approval from more than one relayer. This means that 3 out of 4 relayers must vote on a particular message before it’s going to be processed further.

We hope you have enjoyed familiarising yourself with the basic concepts of the ChainBridge bridging solution. We are going to follow up with other noteworthy solutions in the space. Cheers and till the next one!

--

--