Bridge Over the River Gwei: What Are Crypto Bridges and How Do They Work?
Blockchains, due to their differing coding languages and consensus mechanisms, do not talk to each other easily. This means that, in general, assets recorded on one layer 1 blockchain cannot exist or be used on another chain, and can’t be utilised cross-platform; the same way you can’t use Euros in a Japanese vending machine, or Chinese Renminbi in a British pub.
For crypto to mature as an asset class, this fragmented liquidity and lack of communication is a major obstacle to be overcome. To let assets move freely in Web3, you need bridges. Bridges allow assets to migrate from one chain to another, and allows for a future where all tokens can be traded and utilised on-chain in a non-custodial fashion.
The Basics of Bridges
Imagine blockchains as villages on either side of a large, flowing river. Traversing it is impossible — the water runs too fast — but the villages want to trade. How can they do it?
One way is for a farmer (Adam) in village A can go to a merchant who has a kiosk in both villages. He gives that merchant an apple, and asks him to make that apple available on the other side of the river.
The merchant takes the apple, stores it in village A, then sends a smoke signal to his partner in village B to let an apple be withdrawn on the other side of the river.
Depending on the type of merchant, he may keep the apple safely — and issue an apple voucher in village B. Alternatively, he may keep the apple for himself, but grow another in village B and let that be collected by the intended recipient.
This is the basic system of bridges — which varies in execution; we’ll discuss variations later. There are, of course, longstanding attempts to build actual physical bridges so Adam can carry the apple across himself, yet due to the monolithic architecture of layer 1 blockchains, such interfacing technology doesn’t yet exist.
The Problem: Why Fragmentation Stalls Web 3.0
The reason that blockchains don’t talk easily is because each is backed by a separate consensus mechanism. If the goal of blockchain is the decentralised, trustless, and secure transaction of data-value, then introducing ex-network data-value which doesn’t obey ‘the rules’ is a one-way route to destroying the original network entirely and rendering itself meaningless.
The issue is as blockchain technology advances and new chains appear, this then leads to balkanisation of Web 3.0 as the different chains occupy different, non-interoperable spaces. Although decentralised within themselves, the different territories they map create a newly-permissioned 3.0 that looks suspiciously like the Web 2.0 we have now.
Moreover, it massively hamstrings economic growth in this new sector as liquidity, data-value, and capital can’t interact with each other and the flywheel of free trade and exponential growth can’t spin. Decentralised finance, just like traditional, is fuelled by access to liquidity. Furthermore, different blockchains have different utility. Capital moving freely between them lets it take advantage of countless opportunities.
The Solution: Lock it and Swap It
There are three main objectives that bridge builders are trying to achieve. They want to unify liquidity, so that pools of assets can be utilised cross-chain, they want native assets, as synthetic assets must be further swapped and an excess of synthetic assets leads to inefficiency and fragmentation, and they want instant finality, with funds guaranteed on the target chain when a transaction is successfully committed on the source chain.
Bridges, then, are essential. The basic function of a bridge is to receive an asset from Chain A, burn, lock, or store it, then release it on Chain B, either through minting a correlative native asset or issuing a synthetic asset. It is also possible to build a pool or DEX directly onto a bridge, so that liquidity can be shared cross-chain.
Although synthetic assets do ultimately work, they are not universally accepted, and the goal is to exchange native assets cross-chain.
Yet building a bridge is not easy, and there are several different ways to do it. Here is how projects are building bridges and some examples of their methods.
To Trust or Not To Trust? That’s Always the Question
There are two main categories of bridges, trusted and trustless.
A Trusted Bridge is one that relies on a centralised entity to act as facilitator for the cross-chain migration. The operator would take your asset, lock it away, and give you a representative asset that is usable on the target chain. Later, when you return the representative asset, that operator will (hopefully) give you back your original tokens.
This way, you can use your assets on another chain. A famous example of this type of bridge is wBTC, which ports Bitcoin onto the Ethereum network by holding Bitcoin in escrow and issuing wBTC.
A Trustless Bridge is altogether more complex, and comes in many forms. This requires decentralised validation and migration of assets through smart contracts. The consensus of these bridges can be dependent on the underlying blockchains they connect, or can have their own consensus.
Within these categories, there are three main types.
- Natively Verified: A natively verified bridge is when the underlying verifiers (i.e, the layer 1 chains that are the ports of departure and arrival for the asset) are responsible for the bridging transaction. It allows for holistic, generalised asset transfer between chains, but the problem is that each of this type of bridge must be custom-built.
- Externally Verified: An externally verified bridge is where, as you might imagine, a third group of verifiers are responsible for the transfer of data. Usually, this operates as a MPC, threshold multisig, or other crypto-secured system to reduce the possibility of malfeasance. However, anyone using the bridge has to trust the external validating group, who could act in concert to steal funds.
- Locally Verified: Local verification means that the only party who needs to countersign transactions is the person or smart contract you are directly engaged with, as in the case of an atomic swap. However, this does not allow for general information to pass between chains.
Examples of Blockchain Bridges
Having an effective cross-chain bridge that is truly trustless is a lofty and difficult goal. Here’s how some protocols are approaching it:
Stargate works by running an on-chain client through a smart contract that communicates directly with other LayerZero clients running on other chains. It sends transactions between them to confirm the movement of assets cross-chain.
ELI5: In our village example, this is as though there are kiosks in every village manned by the villagers themselves. They telegraph to one another through their own communication system which updates periodically. It’s incumbent on these village kiosks to track the movement of assets, and confirm that everything is where it should be, letting the rest of the village know the state of assets.
Synapse is a cross-chain bridge that uses a set of external verifiers orchestrated through an multi-party computation (MPC) and using a set of threshold signatures to ensure the validity of the transaction. It is an externally validated bridge.
ELI5: In our village example, the apples are given to a group of trusted merchants. These merchants check that no individual merchant is cheating or keeping the apples for themselves.
Cosmos and the IBC
Cosmos has natively validated bridges. Via the Inter-Blockchain Communication Protocol (IBC), any blockchain using Tendermint consensus will be easily able to transfer assets to other blockchains in the ecosystem and have them natively verified by the Cosmos Hub.
The Gravity Bridge to Ethereum will work via a ‘peg-zone’. This will have a ‘threshold finality’, whereby after a designated number of blocks, the transactions are assumed to be final.
ELI5: In our village example, the villages have pre-agreed to a superfast system. Rather than making a custom smoke signal each time, every village already knows and has adopted the apple-trading mechanism. Rather than relying on a merchant, or villager-manned kiosk, everyone just looks at the flags flying above the village hall at any given time and knows where the apples are.
The Solana Wormhole works by borrowing authority from the main Solana validator set to approve minting and burning between Solana and the blockchains it is making connections to. These ‘guardians’ are responsible for overseeing all transfers of data-value between the chains.
ELI5: In our village example, the merchants doing the transfer are trusted by the entire village to do the appropriate thing without being checked, as they are upstanding members of the village already. The merchants keep the assets for themselves, but they are wealthy enough and have enough assets in other villages to give them away as appropriate.
Thorchain uses an intermediary asset, RUNE, to facilitate cross-chain swaps. When swapping assets cross-chain on Thorchain, the assets do not swap directly. Rather, all assets are swapped via liquidity pools containing RUNE, using RUNE as the counterparty asset. This requires pools to exist, with sufficient liquidity to achieve swaps, which limits the scope of assets that can be swapped.
ELI5: In our village example, there is an orange-merchant funded by villagers in every village. The merchant won’t transfer your apple, but they will let you swap it for oranges. Those oranges can then be swapped for apples in another village.
Onomy is built with a Cosmos SDK, which allows it to enable the Inter Blockchain Communication Protocol linked earlier. In addition, Onomy will have custom-built, bi-directional bridges to every other major blockchain. The Onomy Exchange is built directly on top of these bridges, enabling native cross-chain orders directly via the exchange. In addition, the Onomy DEX is also taking a multi-chain approach, catering to the loyal liquidity of partner chains.
ELI5: In our village example, Onomy apple kiosks exist in every village in the country, connected by their own tunnel network. An asset given to one Onomy exchange can be sent to any other via these tunnels. Once they arrive at the destination village, they can be collected there and eaten as normal, as each kiosk automatically obeys the rules of the village they are located in. Onomy’s home village also understands the flag-system flying above the town hall.
Cross-Chain vs Multi-Chain: The Debate
Everyone in the crypto community was headstrong about the necessity for cross-chain bridges. Otherwise, how could liquidity expand and how could users enjoy the free flowing of liquidity. Yet Vitalik Buterin famously came out against cross-chain solutions, citing security concerns — and since then the arguments have not been so unanimous, such is the tremendous sway his opinion holds.
His reasoning is that no bridge can ever be truly secure. A bridge, by definition, is NOT part of the village — no matter how much you may integrate it into the consensus mechanisms of the blockchain’s bridged, it will always exist as an appendage to the blockchain, not the blockchain itself. It means the attack vectors on these bridges will always exist even if the network security of the blockchain’s they connect is solid.
However, cross-chain consensus — as with Cosmos IBC for example — is continually improving. Cross-chain is still an essential goal so that liquidity can access protocols without being hampered. A new exciting project that deserves liquidity may not get it as people who want to invest have it locked on other chains.
Yet a multi-chain approach is also possible. At Onomy, instances of our Hybrid DEX is deployed on all our partner chains, so that people who are loyal to one chain don’t have to switch to use our products.
Onomy Protocol is a layer-1 Cosmos chain powering a multi-chain & intuitive DEX that combines AMM liquidity pools with an order book UI facilitating market, limit, and stop orders, alongside FX markets via its stablecoin minting system, and cross-chain asset storage through Onomy’s non-custodial DeFi access wallet.