IBC Explained - By Le Thang

Le Thang explains IBC in an easy to understand way.

IBC Explained - By Le Thang

Disclaimer - This is part of our outside perspective series. Curious Cosmonaut Research is not the author we are simply highlighting some good threads and perspectives on the Cosmos ecosystem with their permission. We also, therefore, do not guarantee their accuracy.

Author: Le Thang

Source: Substack

Date: December 17, 2022

What is Cosmos IBC? A simplified explanation

Dec 17, 2022

Here is a simplified explanation of the Inter-Blockchain Communication Protocol (IBC), one of the most important things that contributed to the success of the Cosmos ecosystem, and how it works. Enjoy!

1. What is IBC?

Normally, a bridge is required to send tokens from one L1 blockchain to another. However, these bridges are constructed ad-hoc, vulnerable, and unreliable. Earlier this year, Wormhole bridge, a cross-chain bridge between Ethereum and Solana, was hacked for almost $320 million [source].

Instead of using ad-hoc bridging solutions between arbitrary chains, IBC provides a communication standard for blockchains to communicate and transfer data with each other in a trustless manner.

2. What is Light Client?

Light client can be understood as a compact version of a blockchain. For example:

  • Full node: 1st block connect to the 2nd block and so on.
  • Light client: 1st block connect to the 21st block (skip 20 blocks - depending on the design) and then the 41st block and so on.

This allows us to keep and verify the history of the blockchain without needing all the space required to track the blockchain with a full node.

3. How IBC works?

On a high level, to transfer assets from one chain to another, e.g. Atom tokens from Cosmos Hub to Osmosis, Atom tokens will need to be locked on the Cosmos Hub and minted on Osmosis. However, Osmosis needs to verify whether the Cosmos Hub has actually locked up those Atom tokens before creating them on its blockchain. This can be done by leveraging the IBC light client. How? Let me explain!

To communicate with another chain using IBC, a blockchain needs:

  • IBC transport layer to provide the infrastructure to secure connection and authenticate data transfered between chains.
  • A light client implementation on your chain to track the opposite chain.
  • A light client implementation of your chain consensus on the opposite chain.

Each chain needs to have its IBC light client which allows them to verify whether the incoming transactions were recorded on the counterparty chain. Unlike trusted bridging solutions, IBC provides a permissionless way for crosschain communication and reduces required security to the security of participating chains.

Before passing the data to another blockchain, the data are locked in an escrow account and packed into containers. These data can be fungible tokens (ex: $Atom, $Osmo), NFTs, or interchain accounts. These containers are sent via relayers from one chain to another by smart contracts. Relayer’s role is to examine the state of each chain and deliver the containers to another chain. Light clients are used on both sides of the relay to quickly verify whether the data in the incoming container are correct. After verifying the transactions are valid, the tokens are minted on the counterparty chain for the receivers. If the transactions fail, the escrowed data will be refunded to the senders.

Core principles of IBC security:

  • Instead of trusting the bridge (aka relayers), you trust the consesnsus of the chain you connect with. Precisely, you trust the proof verification provided by the light client.
  • Fault isolation mechanisms are implemented to limit damage if there are malicious behaviour. Proof of misbehavior can be submited by the relayers to freeze the light client. It can be unfreezed by governance proposal after the problems have been resolved.

For more information, watch this great explanation by @jackzampolin and @charleenfei:

Or read these articles:

Thanks for reading Le Thang’s Newsletter!

If you enjoyed this piece, please go subscribe to Le Thang’s Newsletter