What are cross-chain bridges?
Blockchain is a distributed ledger technology (DLT), aka a shared ledger, that applies cryptography to offer assurance to data and trade. Any record of transactions made in crypto will be maintained across several computers linked in a P2P network on the blockchain. Networks on the blockchain spawn many DeFi services like Dapps, NFTs, immutable ledgers, etc. The last couple of years has seen a boom in both Layer 1 (Bitcoin, Ethereum, Solana) and Layer 2 (Optimism, Arbitrum, Polygon) blockchains, each providing its own unique scalability, security protocols, performances, and applications. With this dramatic increase in blockchain, there comes a big need for better interoperability between each chain in the ecosystem.
A blockchain bridge, otherwise known as a cross-chain bridge, resolves the differences between chains and the problem of interoperability. Bridges connect independent chains and enable quick, seamless transfer of assets or data across, allowing traders to access other protocols more easily. Today, there are numerous cross-chain bridges available, with each of them delivering unique trade-offs, strengths, and use cases. The choice of bridges normally depends on transaction fees, the number of supported asset types, higher bridging throughput, and so on.
Why are cross-chain bridges important?
To say a cross-chain bridge is important alone sounds unconvincing. But if we put it another way, it may strike a responsive chord with you. Before the expansion of the blockchain ecosystem, most people tended not to care about using other blockchains smaller in scale. According to DeFiLlama, there were 94% of TVL on Ethereum back in August 2020 compared to 58% TVL as of August 2022, the multichain future is inevitable as newer blockchains continue to prosper, each offering unique DeFi applications. Let us draw an analogy between blockchain giants ETH or BTC and the superpower – the U.S. If one can trade in USD wherever they go, why would they bother to exchange their strong currency for something less valuable? The same applies to the crypto space: traders used to use ETH to access Dapps or BTC for high-value transfers, and that’s all.
But the shortcomings (high gas, jammed traffic, etc.) of these popular major chains soon give rise to the development of more new networks. These new networks offer lower fees, higher tx efficiency, and entry to more on-chain yield-farming activities. Users who wish to access these services will have to use their native cryptos. Assuming they have ETH on the Ethereum network and would like to access the Avalanche network, they will need to trade with its token AVAX. Ether users can transfer their coins to AVAX and do with them what they otherwise could not on the Ethereum blockchain. This is where cross-chain bridges come into play, enabling users to move assets seamlessly from one platform to the other without relying on a DEX or a third party.
How do cross-chain bridges work?
Cross-chain bridges break the silos, promoting interoperability between two immensely different blockchains and facilitating transfers of smart contracts and digital assets. Now, let us first briefly skim over ONE KIND of bridging mechanism here and enlarge upon the subject later in the following sections.
Blockchain bridges perform cross-chain swaps by creating synthetic derivatives for source chain assets compatible with the target chain. To rephrase it, if you wish to swap ETH on the Ethereum network for BTC on the BNB Chain (BTC BEP2, or simply BTCB), some bridges will hold your ETH and create equivalents in BTCB for you to use. The whole process is actually quite complicated but these bridges basically help cope with them all: a wrapped token for ETH compatible with the BEP-20 format is created first, and then next it is swapped into BTCB and sent to your wallet.
In this case, none of the cryptos involved actually moves anywhere. Instead, the amount of ETH you want to convert gets locked in a smart contract while you gain access to an equal amount of BTCB. This type of bridge is so designed to handle transfers of non-native tokens to various blockchains. They do so by creating a wrapped version of tokens on the target chain that stands for the original token on the source chain.
Bridges by trust mechanism
One thing that users of most bridges care about is their degree of centralization or trust mechanism in place. Whether to give up your control over your tokens to a central entity or how much control you’re willing to give is the question. Often, if you wish to make a conversion, you’ll inevitably have to entrust your assets to someone else. But the way they go about the transfer can help you decide which best suits you. Typically, transactions can be validated in 3 ways.
- Natively
Transactions verified natively are validated directly on the target chain, where data from the source chain will be checked if they are true or exist. Prominent examples of natively verifiable bridges include NEAR’s Rainbow, Polkadot’s Snowfork, and Cosmos’s IBC. - Locally
Transactions verified locally are validated by the user and the bridge project. Data from the source chain only have to be confirmed by the two parties without the need for an intermediary for communication. Notable examples of locally verifiable bridges include Connext Network and Hop Protocol. - Externally
Transactions verified externally are validated off-chain. Data from the source chain will be checked if they are true or exist outside the chain. Famous examples of externally verifiable bridges include THORChain.
Let us associate the level of centralization with a spectrum, and this spectrum of trustlessness in bridges suggests that bridges executing verification natively are the most trustless, while the relatively less trustless are the bridges that execute verification externally. But for now, we will just focus on what trust-based and trustless bridges truly stand for.
Trust-based cross-chain: 3rd-party validation
Trust-based bridges are also known as custodial, federated, or centralized bridges. This name derives from the fact that they usually rely on a central entity or federation of mediators for their operations to run. If users want to swap their crypto into another crypto using these bridges, they’ll have to place their trust in a third party and give up their control over their assets to those mediators. In other words, trust-based bridge users rely on the mediators of the federation, or custodians, that the bridge pre-selected for them to verify the transactions. Custodians need to confirm users’ deposits, lock up tokens, and mint the equivalent amount of tokens on the target chain.
Normally, these bridges have a mechanism to monitor the source chain for deposits and create proofs (PoW or PoS) for validators, and these validators will be rewarded for keeping transactions running. Though trust-based bridges may be a cost-saving and efficient option when it comes to transferring huge sums of funds, venturing forth into some less renowned brands can be dicey too. After all, they will not focus on identifying fraud. Examples of marked trust-based bridges include Binance 2.0 and Multichain.
Trustless cross-chain: liberating liquidity
Trustless bridges are obviously more decentralized mainly because the technology behind is fundamentally non-custodial and non-intermediated. Usually, they don’t require users to put their trust in a centralized or federated group of mediators, which can solve the urgent issues around security for bridges and their users, thereby providing more flexibility and efficiency when moving tokens. From a security standpoint, trustless bridges perform better for they depend on distributed staking nodes (individual networks), machine algorithms, or smart contracts to validate transactions, removing the need for intermediaries (third parties) to connect two blockchains.
Bridges by way of transferring assets
Bridges can also be categorized by the way they move digital assets across blockchains. This section mostly explains how your funds are transferred between chains and why you can’t actually, for example, send BTC to an address on an Ethereum-compatible network.
Lock & Mint
Most blockchains adopt the lock-and-mint model for transferring tokens between chains. This sort of bridge locks up or “freezes” Token A using a smart contract held with a validator/custodian on the source chain and mints or creates equal units of Token B on the target chain. Note that Token A is not really relocated or sent anywhere. If the user wants Token A back, then Token B will be burnt on the target chain and the original Token A will be unlocked or “defrosted”. Examples of bridges using this mechanism include Polygon’s PoS Bridge, Avalanche Bridge (AB), and wrapped BTC (For more info about how to swap between ETH and AVAX, please check this). Below we’ll explain using Polygon’s PoS Bridge.
- Nicole wants to bridge her ETH from the Ethereum Network to Polygon with PoS Bridge. (she already has some ETH in her account)
- PoS Bridge locks ETH on the Ethereum mainnet.
- PoS Bridge mints an equal amount of wrapped ETH (wETH) on the Polygon network. (Note that ETH and wETH are two different tokens)
- Nicole wants to redeem her ETH, wETH on the Polygon Chain will first be brunt, and then an equivalent amount of ETH will be unlocked on Ethereum. (This process prevents ETH from being used in any way on both chains simultaneously)
Burn & Mint
Bridges that adopt the burn-and-mint equilibrium (BME) will burn the “value-seeking” tokens on the source chain first and mint “payment” tokens on the target chain shortly thereafter. Burning tokens on the source chain does not mean they just go up in smoke. Instead, the tokens are irrevocably removed (sent to an “eater address” that is inaccessible to anyone, for no one owns the private keys to this address). After the payment tokens are created, users can spend them in order to use the target network’s services. Burning tokens is good because it not only incentivizes all network participants working to the platform’s advantage, but it helps achieve consensus in a distributed network more effectively. Examples of bridges using this mechanism include Hop, Factom Protocol, and Helium.
Atomic Swap
Atomic swaps are more of a truly peer-to-peer method for trading tokens across blockchains. Transactions with this method will only begin with the caveat that two sides of trade fulfill all predefined conditions. This mechanism is more trustless and decentralized because it only requires self-executing smart contracts that enforce the conditions determining the success of this tx, with no trusted third parties needed. Bridges that adopt Atomic Swaps technology would either finalize or would not initiate the transactions at all. Examples of bridges using this mechanism include XY Finance, cBridge, and Connext. Typically, an atomic swap is more secure and efficient in 2 ways as follows.
- Hash function
Think of it as a contract that acts as a two-way digital safe, which ensures that a swap can only be finalized when both networks have fulfilled requirements on their sides of the transaction. - Time constraint
Think of it as a safety mechanism that gives deadlines to any swaps, ensuring that deposited tokens can be returned to users when the tx is not finished before the deadline goes past.
Bridges by function
Besides the classifications mentioned above, bridges can also be divided into groups according to their “purpose”. Here we introduce 3 types of most common bridges categorized by their functionality in the DeFi space.
Chain-to-Chain
Bridges of this sort are mostly designed for the movement of assets between two blockchains. Very often these bridges are also known as single-chain bridges because their purpose is to port assets from one single specific L1 blockchain to others or vice versa. Such bridges are usually “native bridges” to some networks and generally, they employ the lock-and-mint mechanism. Native bridges such as Avalanche Bridge (AB) we discussed earlier, PoS Bridge, BSC-Ethereum Bridge, etc.
Multi-Chain
Multi-chain bridges are blockchain communication protocols that enable the transfer of assets and information between various different chains. They are not specifically made for a single L1 major network, and thus can be deployed to any kind of L1 or L2 blockchains. Because of this convenience, they are widely used by lots of projects in the DeFi world. Examples of bridges of this kind are XY Finance, Connext, Celer cBridge, and so forth.
Wrapped Assets
While wrapped tokens mean a tokenized form of an asset that natively dwells on another blockchain, Wrapped-Asset Bridges refer to projects specifically designed to facilitate the transfer of non-native tokens to different blockchains. The mechanism behind these bridges is that they create wrapped tokens (e.g. wETH, wBNB, wMATIC, Interlay’s iBTC, or wMonero) on the target chain that represent the original tokens on the source chain. Let’s look at this example for the sake of clarity: Binance Bridge allows its users to wrap their tokens (BTC, ETH, XRP, USDT, BCH, DOT, etc.) for use on the BNB Chain in the form of BEP-20 tokens. Once you’ve brought your assets onto the chain, you can trade them or use them in various yield farming apps.
The role XY Finance plays
As a cross-chain interoperability protocol that aggregates DEXs & bridges all over, XY Finance is more of a decentralized bridge connecting multi-chains and validating transactions “externally”. In addition, XY Finance uses Atomic Swaps techniques, allowing assets from different contracts, which might run on the same or different chains, to be securely traded without the need for a trusted 3rd party like CEXs. Users are able to leverage the low-cost, high scalability, and high speed of mainstream chains and more new chains in the sector.
XY Finance embraces the techniques of Atomic Swaps. Take USDCs on various chains in our yBridge for instance. All of them are “essentially” the same as those on the Ethereum network; only that they’re living on different blockchains, which makes them and those on ETH Chain different tokens. Next, all you need to do is put a USDC on ETH into XY Finance’s liquidity pool, and you can exchange it for a USDC on BNB or any other supported tokens on any other supported chains. The entire process is highly decentralized, and once there are any errors occurring in the course of the tx, the security mechanism will be triggered and come in to ensure that both parties succeed or fail together in getting the offered tokens.
Closing thoughts
There’s no one-size-fits-all panacea for the problem of bridging assets across chains. You might find a signature feature of one type of bridge the weakness of another. That is why this article matters because you will need to know which type of cross-chain bridge you’re after to settle your requirements. Bridges allow for a significant outflow of value from ETH to other chains, L1 or L2 regardless, and empower DeFi’s interoperability movement so that developers from different networks can collaborate to build superior Dapps, and individuals and institutions can benefit from the services thereof. Bridging makes it possible to access Dapps that are inaccessible on the Ethereum main network or mainnet. So, single out what your specific need is, select whatever kind of bridge floats your boat, and savor your moment of adventure in the DeFi space.
Other interesting DeFi Know-How XY Blog:
- “What is XY Finance? A Brief Introduction”
- How to Bridge Assets Across 20+ Blockchains via Swap
- “How to Bridge Ethereum(ETH) to Avalanche(AVAX) in 6 Steps: A Simple How-To Guide”
- “More Than Binance Bridge! 3 Types of Bridges on BNB Chain Made Easy”
- “How to Bridge Assets to Astar With XY Finance, #1 Bridge on Astar”