Understanding cross-chain bridges. What are blockchain bridges and why do we need them?

Crypto education

Bridges are extremely important for the blockchain industry, because they allow blockchains to exchange assets and information. However, you may be surprised to learn how bridges really work. Read our detailed beginner guide and find out about the 10 most popular crypto bridges.

What are blockchain bridges and why do we need them?

A blockchain bridge is a system that allows users to transfer assets and data between different blockchain networks – for example, Ethereum and Polkadot or Polygon and Avalanche.

By default, independent blockchains can’t directly ‘talk’ to one another. They are like people who speak mutually unintelligible languages. Different networks use different consensus algorithms, smart contract architecture, address formats, and so forth.

So, for example, you can’t just take TRX and send it to an Ethereum address beginning with 0x. In the best case scenario, the wallet won’t let you make the transaction, and in the worst case, you’ll lose the funds.

To use a more technical term, a regular blockchain is a silo – a repository of data and assets that are available only to one group of users. Traditional corporate databases are also an example of data silos, and there’s been a lot of talk of how blockchain technology can eliminate the problem and enable a free flow of data – but now decentralized networks have become silos themselves.

From an end user’s point of view

Lack of interoperability isn’t a big problem as long as you interact with just one blockchain – and in the past, most people just used Bitcoin and/or Ethereum, plus perhaps Tron. But in 2021, we’ve seen an explosion of alternative chains - Solana, BSC, Avalanche, Fantom, Cosmos, Polygon, and so on – and the issue of transferring assets between chains has come to the forefront.

These L1 (level 1) chains aren’t just faster and cheaper than Ethereum. They also offer great DeFi earning opportunities, efficient decentralized exchanges (such as Avalanche’s Trader Joe) and exciting Play2Earn games, such as Harmony One’s DeFi Kingdoms.

Once you decide to interact with these dApps, you run into a problem: the crypto assets you have don’t work on the other chain. If you have ETH, for example, but you want to interact with a dApp built on Solana, you’ll have to convert ETH to SOL on a centralized exchange like Coinbase or Binance and send the resulting tokens to your Solana wallet address.

Seasoned crypto holders are so used to this incompatibility between chains that they often don’t think of how inconvenient it is. Imagine that you live in the US and use the dollar, but some businesses – say, Uber Eats or Walmart – accept only Swiss francs. Nobody would tolerate such a mess, right? And yet, in the crypto space, we simply accept that one chain doesn’t support the assets issued on another – unless, of course, there is a bridge linking the two.

From a dApp project’s point of view

As a blockchain project creator, you want to attract as many users as possible and maximize the TVL (total value locked) in case of a DeFi dApp, the number of players (for a game), and other metrics. However, alternative blockchains have fewer users and lower liquidity than Ethereum. For example, the TVL of Terra (the second-largest chain by value as of January 2021) was 9 times lower than Ethereum’s at the time of writing, while Solana’s was 15 times lower.

Credit: DeFi Llama

Cross-chain bridges make it easier for users to switch to a new chain while carrying their assets with them. A bridge is like a pipe connecting two vessels so that liquidity can flow from the full one to the empty one – filling the buckets of individual dApps. So it’s in the best interest of crypto app creators to integrate blockchain bridges.

How does a cross-chain bridge work? The end user’s perspective

An average blockchain bridge operates as follows:

1) The user sends Asset A to a deposit address on the origin chain (e.g. Ethereum) and pays a bridging fee;

2) Asset A is locked up by a randomly selected validator in a smart contract (for trustless bridges) or with a trusted custodian (which can be controlled by the bridge admins or not);

3) An equivalent amount of Asset A1 is issued on the target chain (e.g. Avalanche);

4) Asset A1 is sent to the user’s address on the target chain (an Avalanche wallet).

If the user decides to get their original Asset A back, they need to send Asset A1 to a designated address (where the tokens are burned), and the smart contract or custodian will release the original Asset A back to the user’s wallet.

The token lockup part is a crucial and often misunderstood element of bridging. You can’t actually transfer AAVE, COMP, UNI, etc. to another blockchain like you’d carry a potted plant from one house to another. Instead, the original asset is deposited in a safe (hopefully) place, and a replica of it is created on the other chain. The total number of tokens in existence increases, but the number of tokens in circulation remains the same.

If you’ve seen Christopher Nolan’s 2006 movie The Prestige, you’ll realize that Hugh Jackman did something very similar to cross-chain bridging for his famous stage trick… only in a magical way. If you haven’t, we won’t spoil it for you – watch the movie, it’s really good.

Types of cross-chain bridges

Most blockchain bridges fall into one of the following categories.

1. One asset, two or more chains. With these bridges, you can send only one cryptocurrency from one blockchain to another. For example, WBTC and tBTC are designed to transfer BTC from the Bitcoin network to Ethereum, while Kintsugi and Interlay can transfer BTC from the Bitcoin network to  Kusama and Polkadot, respectively.

2. Many assets, two chains. These bridges allow you to transfer different cryptos between two blockchains. For example, Rainbow Bridge can send ETH and hundreds of ERC-20 tokens from Ethereum to the NEAR network, while Gravity does the same for Ethereum and Cosmos, ZeroSwap for Ethereum and BSC etc. We also shouldn’t forget the bridges linking Ethereum to the popular L2 scaling solutions like Arbitrum and Optimism.

3. Many assets, one chain connected to several others: in this case, you can transfer many different tokens. Examples include  Avalanche Bridge, PolkaBridge, Wormhole on Solana.

4. Several or many assets, several chains. Such bridges can be integrated into various dApps to bring in additional liquidity from multiple networks. A good example is RenBridge by Ren Protocol, which allows bridging BTC, BCH, DOGE etc. to 7 chains, including Solana and Avalanche.

5. Many assets, several chains, but a single application. These bridges can be plugged into just about any blockchain as modules, or adapter. However, they are designed to be used for just one type of apps, such as exchanges, lending services, etc. A good example is Multichain (previously AnySwap).

Link

Trusted vs. trustless

Blockchain bridges can be divided into centralized (federated) and trustless. The differences lie in how bridge transactions are confirmed and how the locked-up assets are stored.

In a federated system, a network of pre-selected validators tracks token deposits on the source chain, locks them up, and mints tokens on the target chain; an example is Binance Bridge or wrapped BTC (WBTC).

In a trustless system, anyone can become a validator. For every bridging transaction, a number of validators are selected randomly from the pool to minimize the risks of manipulation.

Such a trustless system will normally include some sort of a relay mechanism that listens to bridge-related events on the source chain, creates cryptographic proofs of these events, and transmits them to the bridge smart contract on the target chain. This way the bridge ‘knows’ that tokens were indeed submitted on the source chain and that it’s safe to mint tokens on the target network.  

In both types of architecture, the nodes responsible for asset deposits sometimes have to submit collateral as a guarantee that they won’t behave dishonestly. For example, the tBTC protocol, powered by Keep Network, has a 150% collateralization ratio in ETH, meaning that signers (custodians) have to submit an equivalent of 1.5 BTC in ETH for every bitcoin deposited with them.

Another interesting example is Wanchain, which operates bridges between Ethereum, XRP, Litecoin, Bitcoin, BSC, EOS, and Wanchain itself. The project regularly selects new groups of Storemen (nodes that lock and mint tokens); to become a Storeman, you need to be among the 25 largest WAN stakers. The minimum stake is 10,000 WAN (around $5,500 in January 2021).

In theory, you could also have a bridge with a trustless pool of randomly chosen validators but with a selected set of trusted custodians. Bridge architecture is a complex topic, with many competing models that have their tradeoffs in terms of efficiency, security, and speed. If you’d like to learn more, we suggest this excellent article.  

Now that you know that your assets are locked up on the source chain, you might ask the logical question: are they safe? Can you be sure that you’ll be able to reclaim them? This brings us to the important topic of bridge security.

How safe are blockchain bridges?

Bridging is associated with several types of risks:

1) Validators/custodians stealing deposited funds. The general solution is to make them submit collateral and slash it in case of misbehavior. However, if the collateral is deposited in the bridge protocol’s own tokens, there is an additional risk that their price will collapse (for example, in a market-wide crash), in which case appropriating the more valuable ETH or BTC deposits may seem like an attractive idea.

2) Validator unresponsiveness. If many validator nodes go offline, the bridge will slow down or simply stop working. To motivate validators, some bridges pay rewards in their native tokens, but this can have the same effect as yield farming: as users cash out their rewards, the token’s price falls, and so does the general trust in the bridge project itself.

3) Exploits. Hackers can target vulnerabilities in any of a bridge’s parts: relay, asset deposits, or the contract on the target chain. Unfortunately, not all bridges are properly audited before launch, so the risk of theft is very real.

Hackers and conmen follow trends, and in 2021 bridging became a trend. There’s even a meme character of a ‘bridgoor’, who constantly sends assets back and forth simply because it’s cool:

Unsurprisingly, many recent blockchain hacks concerned bridges – most notoriously Poly Network, which lost $600 million in tokens on Ethereum, BSC, and Polygon. In this single biggest hacker in DeFi history, the attacker exploited Poly Network’s centralized architecture, where the gatekeeper contract on the target chain fully trusted the small set of ‘keepers’ on the source chain. In an unexpected twist, the hacker later returned the money!

Other 2021 cross-chain hacks included AnySwap ($7.87 million, July) and ChainSwap ($8 million, July). Meanwhile, Synapse bridge recently prevented a hack that could have resulted in a loss of $8 million, while Polygon managed to fix a critical bug in its PoS Ethereum bridge just in time to avoid a potential $850 million exploit.

Wrapped BTC as an early bridged asset

Bridges became such a hot topic in 2021 that you might think it’s a brand-new technology. In fact, the bridging era began in 2018 with Wanchain, followed by Wrapped Bitcoin, or WBTC. It’s an ERC20 version of Bitcoin that runs on Ethereum, first minted in January 2019. The technology is the same: you deposit Bitcoins with a custodian, WBTC is issued to you – and then burned if you claim your BTC back.

As of January 2022, WBTC was the world’s 18th-largest cryptocurrency. Its $11.1 billion market cap put it ahead of ATOM, TRX, DAI, and other arguably better-known assets.  A total of 266,600 WBTC were in circulation, meaning that 266,000 actual Bitcoins were deposited with the custodians.

Link

Interestingly, the second-largest wrapped asset, WETH (Wrapped Ethereum) doesn’t need a bridge protocol, since it simply makes ETH available to Ethereum-based DeFi apps as an ERC20 token.

Multichain networks vs. bridges

Multichain networks like Polkadot, Kusama, and Cosmos include dozens and even hundreds of independent blockchains that are natively interoperable. They don’t need specially constructed bridges to exchange assets, because they ‘speak the same language’ by design (learn more from our article on multichain ecosystems).

This is the reason why we chose Substrate (the base for Polkadot and Kusama) for our own network, Pontem. We offer an incentivized testnet for building dApps compatible with Diem, an upcoming blockchain previously backed by Meta (formerly Facebook). Pontem allows development teams to test out their dApps and gain traction and liquidity long before Diem actually launches.

Since Pontem is part of the broader Polkadot and Kusama ecosystem, the teams building for Diem will be able to attract liquidity from across these multichain networks. You can already pre-register for the Pontem NOX token generation event here.

Important note: native interoperability doesn’t mean that you can just send any token from one chain to another. For example, the Kusama parachain Karura currently offers only transfers to and from Kusama in the Cross-Chain section of its dApp.

Another example is Terra, which is part of the Cosmos ecosystem. The proposal to activate IBC (Inter-Blockchain Communication protocol) on Terra was passed in October 2021, making it possible to send tokens to and from Terra and the other 17 IBC-enabled chains powered by Cosmos SDK.

Note that multichain networks still need bridges to connect them to external blockchains, such as Ethereum, BSC, Polygon and so on.

A note on NFT bridges

Interest in NFT bridges is fueled by the fact that minting fees on Ethereum are very high and transactions often fail. This causes users to turn to faster and cheaper chains, such as Solana, Polygon, and Avalanche, all of which already have NFT marketplaces and hundreds of collections.

However, finding a buyer for an NFT on these chains can be more difficult because of lower liquidity; a bridge makes it possible to mint on a cheap blockchain, then send the collectible to Ethereum or another network to list it on a marketplace with a higher trading volume, such as OpenSea.

Bridging NFTs has its complexities, especially when it comes to storage: as a single NFT can be worth dozens of thousands of dollars, so you need to be sure that the lock-up or custody part of the bridge is secure.

Among the currently operational NFT bridges:

Multichain (previously AnySwap): Ethereum, Fantom, Avalanche

Polygon: Ethereum, Polygon Matic

Quigon: Ethereum, BSC, Polygon, Avalanche, Algorand, Elrond, Fantom, Tron, xDAI, Fuse)

Harmony: Ethereum and Harmony

Wormhole: Solana, Ethereum, BSC, Polygon, Avalanche, Oasis

Credit: Wormhole

10 most popular cross-chain bridges compared

Most bridges’ TVL (total value locked) took a serious hit during the market correction in December 2021 and January 2022. Still, the numbers remain impressive, with over $20 billion in assets locked in the top 10 bridges. You’ll find a brief comparison of these tools (TVL data is taken from the excellent Bridge Away section on Dune Analytics).

Notes

Bridging will likely remain one of the hottest topics in blockchain in 2022 as more alternatives to Ethereum emerge. As always, Pontem Network will bring you the latest analysis – follow us on Twitter and Telegram for more updates!