Transferring information
How can a blockchain verify the state of another blockchain? There are two solutions: oracles and light clients.
Oracles
Oracles are trusted entities that push information onto a blockchain so that it can be easily consumed by on-chain contracts. Although oracles are often used to move real-world data onto the blockchain, they can also be used to move information from one chain onto another. In this context, oracles are trusted entities that validate transactions on the source chain and push updates to the destination chain. In most situations, multiple oracles are used to reduce the dependence on a single trust point. The information provided by multiple oracles can be aggregated on-chain (via multisignature contracts) or off-chain via threshold signature schemes.
When the oracles control assets of value, they are often called custodians rather than oracles, but their role is the same.
Most bridging solutions rely on oracles, e.g., WBTC relies on a set of “custodians” to push information about BTC balances on the Bitcoin blockchain to other chains like Ethereum. The Wormhole bridge relies on oracles known as “guardians” to hold assets in escrow and mint synthetic assets on other chains.
Light Clients
Passing information through oracles requires some degree of trust in the oracles.
Although blockchains cannot communicate directly with each other, in some situations the “custodian” can be replaced by an untrusted relayer, whose sole job is to pass messages between the chains. The core idea of non-custodial token wrapping is that each chain runs the other’s “light client” directly on-chain.
In other words, if it is possible to generate succinct “state proofs” that encode the current state of the source chain, and an efficient verifier (that can run inside a contract on the destination chain), then an untrusted relayer can “prove” that an action happened on the source chain. A contract on the destination chain can verify this action. Most bridging solutions rely on oracles, e.g., WBTC relies on a set of “custodians” to push information about BTC balances on the Bitcoin blockchain to other chains like Ethereum. The Wormhole bridge relies on oracles known as “guardians” to hold assets in escrow and mint synthetic assets on other chains.
If an on-chain contract can validate transactions for the other, then an untrusted relayer can simply forward the state of the source chain to the verifier contract on the destination chain, where it can be verified.
The inter-blockchain communication (IBC) protocol allows Cosmos-based blockchains to interact in this way. Almost all blockchains built using the Cosmos SDK can wrap tokens; this includes several large-market-cap chains, including Terra, the Cosmos Hub, crypto.org, Thorchain, Axelar, Secret network, Binance Chain, and many others.
In addition to the IBC-enabled chains, several other layer-1 blockchains have been built with the goal of enabling efficient light clients, e.g., Mina and Algorand.
It is possible to build light clients for existing blockchains (e.g., Bitcoin), but this is an extremely challenging task, and it typically requires complete redesign for each supported blockchain.
The job of a light client on the destination chain is to verify that a given transaction occurred on the source chain. If the light client had access to block headers from the source chain, then this task would be easy. Users could issue simple Merkle Proofs that a given state balance was consistent with the (known) block header. LayerZero uses this technique to provide cross-chain interoperability. Trusted Chainlink oracles push block headers onto the chain. Once these block headers are stored on the destination chain (untrusted) users can easily prove that deposits occurred on the source chain.
This solution is efficient but crucially relies on the honesty of the oracles providing the block headers. Malicious oracles could provide invalid block headers which would allow them to certify non-existent deposits and consequently make real withdrawals.
Last updated