Kyle Samani is co-founder and Managing Partner at Multicoin Capital, a thesis-driven crypto fund that invests exclusively in crypto assets.
Today, blockchain interoperability is virtually non-existent.
If you want to move value across chains, you must do so by moving tokens into a centralized exchange, trade on the exchange’s in-house ledger and then withdraw the new asset on a new chain. This process is slow, expensive and involves substantial counterparty risk.
Fundamentally, there are two types of chain interoperability:
- Relaying messages about the state of one chain to another. This includes synthetic tokens (AKA one-to-one pegs, two-way pegs, or sidechains).
- Cross-chain atomic swaps. The exchange of tokens between users across chains, without trusting a third-party.
A number of high-profile projects such as Polkadot and Cosmos are vying to be the meta “blockchain of blockchains.” Each of these systems has a native staking token that validators must stake in order to perform work for their respective networks.
Another chain of chains, Block Collider, proposes a radically different technical mechanism to achieve many of the same functions.
Building on insights drawn from Vitalik Buterin’s excellent paper on chain interoperability, I’ll walk through both of the functions above and highlight that the largest opportunity for these systems is message relaying. Cross-chain atomic swaps can be accomplished trustlessly without dedicated chain of chain systems.
Cross-chain messaging is fundamentally a question of trust: How does one design a system to trustlessly relay messages between chains?
This is especially difficult given what I’ll refer to as orphan chain risk: if a service relays the state of Chain A to Chain B, but it turns out that the relayer was on a fork of Chain A that is ultimately orphaned (either benignly or maliciously), then the relayed message to Chain B is invalid.
If one is relaying messages to issue synthetic tokens across chains, this would result in cross-chain double spends, which is unacceptable. Accommodating the perpetual “what if the relayer is on an orphaned fork” risk is by far the greatest challenge in message-relaying systems.
Cosmos and Polkadot address the orphaned-chain problem through two mechanisms. First, using the inter-blockchain communication (IBC) protocol, they store Merkle-ized block headers for each cross-chain transaction. Building on a history of Merkle-ized block headers, Cosmos/Polkadot maintain global invariant balances of the total supply of each token. Together these mechanisms prevent cross-chain double spends.
It would be nice if systems such as Oraclize could relay messages between chains. But these kinds of systems don’t account for the orphaned chain problem.
If we look out into the future, it’s possible to envision a time in which the orphaned chain problem is solved by the sending chain itself. How? By leveraging finality in proof-of-stake (PoS) based systems. This is the explicit purpose of Casper FFG, which is in alpha now. However, it’s unclear how fast finality can be given tradeoffs in parametrizing such a PoS system.
Even with a finality guarantee, there are still other challenges.
We’re currently witnessing a Cambrian explosion of blockchain innovation. This is likely to continue for the next few years at a minimum. Given the number of new chains that are emerging, each chain will be required to store and validate Merkle-ized block headers of every other chain with which it communicates.
Each blockchain could become bloated with blockheaders of every other chain. Using a bridge chain reduces the bloat per chain from a function of n! to to a function of n.
While I’d like to see a future in which blockchains communicate directly with one another without an intermediary chain, this seems highly unlikely. This problem is compounded by the fact that systems such as bitcoin may never move off of proof-of-work (PoW) consensus and towards PoS consensus with guaranteed finality.
If you project out far enough, it seems possible that intermediary chains will become superfluous, but that future is still unclear. For the foreseeable future – at least a few years – Cosmos/Polkadot have a real opportunity to become the backbone powering cross-chain messaging.
Cross-chain atomic swaps
The first cross-chain atomic swap recently occurred between Litecoin and Decred.
These are both chains that don’t support Turing-complete programming languages. Cross-chain atomic swaps will be technically easier to implement between general-purpose smart contract platforms. It will take another one or two years for these libraries to mature and become widely adopted, but they will. There aren’t many technical questions remaining.
The other major challenge with cross-chain atomic swaps is price discovery and order matching. That’s where decentralized exchanges (DEX) such as 0x and OmiseGo come into play. OmiseGo is fully decentralized, meaning that the order book lives on chain.
In 0x, orders are hosted by relayers (centralized entities), who then submit matched orders to the chain for settlement.
If the market ultimately demands DEXs to be fully decentralized – including on-chain order books – then systems like OmiseGo will be necessary for cross-chain atomic swaps to function. However, given the intrinsic limitations of on-chain order books (settlement time, miner front-running, miner griefing, etc), I believe that the 0x model will prevail for the foreseeable future.
Although 0x only works within the ethereum ecosystem today, the 0x roadmap includes cross-chain* support (it will likely leverage much of the tech built in the Litecoin-Decred proof of concept for Scrypt based chains). 0x relayers will host order books for price discovery, and will relay messages between chains to trigger the release of funds from the escrow on each chain. This should offer many of the best elements of decentralization (no counterparty risk) and centralization (speed, order matching), with minimal trust guarantees (only that the relayer actually relays the messages to both chains).
On-chain DEXs are theoretically possible.
However, given the limitations they face, the intrinsic network effects of liquidity in order books, time-to-market and go-to-market advantages, and minimal trust guarantees of a 0x relayer, I contend that the 0x model will prevail, leaving little opportunity** for Cosmos/Polkadot/Block Collider-based DEXs.
With the Cosmos launch approaching in the next month or two, we’re about to witness a huge hype cycle about the opportunity for an internet of blockchains. Systems like Cosmos solve fundamental cross-chain communication problems, but aren’t necessarily the answer to all cross-chain communication challenges.
It’s paramount to recognize that not everything these systems can do actually needs to be done by a chain of chains. As the crypto ecosystem evolves, expect more diversity in trust models, relayers, and solutions broadly.
* Note: Cross-chain atomic swaps are only possible if both chains offer a native escrow function. This requires bitcoin-esque script functions at a minimum. Some chains, such as IOTA and sia, for example, don’t support on-chain trustless escrows at all, and as such cannot implement trustless cross-chain atomic swaps.
** One of the greatest limitations of cross-chain atomic swaps is settlement time. By definition, these transactions can only settle as fast as the block time of the slower of the two chains. Block Collider’s system allows for settlements that are theoretically even faster than the block times of either chain. Enabling cross-chain swaps to settle more quickly than the block times of either chain is a pretty wild idea. Given how slow bitcoin blocks are, Block Collider could carve out an interesting niche.
Special thanks to the Sunny Aggarwal, Matt Luongo, James Prestwich, and Sina Habibian for their input on this essay.
Chain connection image via Shutterstock