Published on Jul 17, 2022

The Ultimate Guide to Cross-Chain Bridges

Sayli
#Learn
icon-alt7 Min
The Ultimate Guide to Cross-Chain Bridges

Web3 space has come a long way since the inception of the first-ever blockchain. Most blockchains have seen considerable growth in different aspects, like Ethereum during the Defi Summer. Most of these blockchains work in an isolated environment without any communication medium. If you own some assets or have an on-chain reputation that is only recognizable on one chain as it is impossible to transfer.

Hence the interoperability between the chains remains the biggest Question. And soon, this problem was identified by the web3 community members, and they are trying to overcome it by introducing the Bridge concept.

The blockchain bridge works similarly to how bridges work in the real world. It connects two or many blockchains and allows developers, investors, traders, and other participants to send data or any monetary value from one chain to another. In recent years after the Defi Summer, many bridges have come up to offer interoperability between chains. As per the statistics by Defi lama, The TVL or the total value locked in the top3 bridges is more than 9 Billion USD. And it shows how essential Bridges are in 2022.

Image: Top 10 Bridges according to the TVL Source DeFi Llama

Before we deep dive into the technicalities of how bridges work, let's discuss a bit about what bridges are exactly.

What are the Bridges?

In the web3 world, the bridges or cross-chain bridges are the architecture that follows a certain mechanism to transfer cryptocurrencies from one blockchain to another blockchain. In most scenarios, bridges often work as liquidity providers to different or the same blockchain. Some of the common bridges are WBTC, Multichain, Wormhole, and many more. All such bridges make use of advanced scripts and smart contracts deploy different chains to transfer assets or data.

The bridges can be further classified into various categories depending upon the architecture. Some of the common types of bridges are Trustless, Trust-based bridges, Centralized and Decentralized Bridges, Sidechain Bridges Etc.

How do Bridges work?

Image: How do Blockchain Bridges work?

The way bridges work is relatively straightforward,  but it has some minor technicalities that one needs to know. To understand this in a better way, let's take an example. If you want to use some Defi Applications on Polygon, but have all your funds on Ethereum, then you need to use a Bridge service to get your assets from Ethereum to Polygon.

And it is challenging to establish trust because for a destination chain, it would be just data from the outside world. Hence to overcome the problem, there is a need to have some third party who acts as a point of contact between any two chains. This third party would be a bridge that takes information from the source chain and logs it on the destination chain.

The Bridge acts as a verifier and can be implemented using various mechanisms based on which it can be further categorized, as mentioned in the previous section. Most of the bridges use trust-based verifying mechanisms, whereas some of them use trustless verifier mechanisms.

Moreover, the reason for having different mechanisms is because of the Interoperability trilemma.

Image: Blockchain Interoperability Trilemma
Image: Blockchain Interoperability Trilemma

The interoperability trilemma states that only two of them are achievable out of three properties, Trustlessness, Extensibility, and Generalizability.

In the next section, we will discuss the fundamental categorization of Bridges based on Three Important Parameters – Their working, the type of chains they connect, and the mechanism they follow to.

Types of Bridges based on their working


As we discussed earlier, different bridges use different mechanisms classified into the following categories.

Types of bridges
Types of Bridges

Trustless Bridges: In trustless bridges, there is no central authority the user needs to trust to conduct any cross-chain activity. And in case of the cryptocurrency transfers, the custody of the tokens is with the user only. Some of the common examples of trustless bridges are Hop, Connext, and various other bridges utilizing the atomic swap mechanism.

Trust-Based Bridges: Unlike Trustless Bridges, a centralized authority takes control over the user funds while conducting a cross-chain transfer. Some of the common centralized bridges are Binance-Ethereum Bridge and Multichain Bridge.

To understand this in a better way, let us consider an example. Suppose you want to send money to your friend. Now there are two different ways by which you can do this. One is you can contact the bank, do net banking or anything and make a transfer. In this case, the bank would act like a third party you will trust. Whereas you can directly give money as cash. Here you are not trusting any third party and the custody of the funds is with you.

Types of Bridges based on chains they connect


L1 <> L1 bridge: such bridges connect the L1 chains like Ethereum, Solana, Avalanche, Algorand, and many more. One of the most common examples is Wormhole Bridge which connects Ethereum and Solana chains.

L1/L2 <> L2 Bridge: The most common example of this bridge is Arbitrum Bridge. Arbitrum is an L2 Solution built on Ethereum that has created its Native bridge, responsible for transferring assets from Arbitrum to Ethereum and Vice Versa.

This is quite analogous to how bridges work in the real world, where there are highways that connect two different states and some bridges which connect other towns and cities in the same state.

Types of Bridges based on the movement of Assets


Most bridges have different algorithms implemented for moving assets from one chain to another.

Arbitrum Bridge follows the Lock and Mint Approach, locking tokens or cryptocurrency in a smart contract when requesting to send them to the Ethereum chain. Once the tokens are locked, the same number of tokens mints on the Destination Chain. For vice, the same amount of tokens unlocks while transferring back to Arbitrum.

Another common approach is burn and mint—bridges like multichain use this approach. Instead of locking the tokens on the source chain, it burns them and mints the same amount on the destination chain.

Three main Advantages of the Blockchain Bridges

  • Blockchain bridges open up a new opportunity for the users to transfer arbitrary data or assets to different protocols.
  • Allows the user to access various protocols on Different chains.
  • Various dapps trying to be interoperable among other chains can take advantage of Bridges.

Are the Bridges the best solutions for interoperability? And what could be the challenges that bridge products face?

Blockchain bridges are a vital solution for solving the interoperability and scalability problem in the web3 space. But developing a Bridge is not an easy task as a lot of different challenges are there. Still many bridges are in the early stage and one of the main challenges that all bridges face is related to security. Most of the bridges that exist today have been the center of attraction for hackers and have led to various security breaches leading to the loss of various assets that cost billions.

As we studied before, most blockchain bridge mechanisms are carried out either through smart contracts or any other technology. Most smart contracts are vulnerable due to bugs in the code. Such a bug can be a great opportunity for a malicious actor to attack a network. Although this could happen in trustless bridges, trusted bridges are also vulnerable to different types of attack. One common attack that trust-based bridges can have is that the centralized authorities stop transferring the assets or steam the users’ funds.

Some of the most popular attacks happened in the Web3 space.

Here is a piece of brief information about the various attacks that happened on Bridges.

Wormhole Bridge Attack


Recently in February, around 120K WEth worth of more than 300 million USD were stolen from the Wormhole bridge that allows cross-chain asset transfers from Solana to various other chains. As per the multiple analyses done by the security firms and experts, it was found that there were some errors or bugs in the signature scheme algorithm in the smart contracts that allowed the hackers to steal such a big amount. The hackers were able to bypass the signature verification step that led the authority to deposit 120K WETH to the wormHole Bridge.

To learn more about it you can click here.

Meter.io Bridge Attack


Another major attack that happened on the bridge was the Meter.io Bridge Exploit. Here the attackers evade the bridge by generating a fake proof that led to a mint of new tokens. The hackers tried to achieve this by creating a fake deposit event, which was transmitted to the destination chain. As per the CertiK Security Firm, the attacker did this by injecting the malicious code into the Deposit Function of the bridge to take advantage of the bug. The total amount of funds lost in this attack was worth around $4.5 Million.

Poly Network Bridge Attack

Poly Network was the biggest Bridge exploit that happened in 2021. As per the different post-mortem reports by top security firms like Blocksec, this happened because of the private key leak. The private key was used to sign the message on Polynetwork bridge to steal the $600 million worth of funds including meme coins like Shiba Inu, USDC, WEth, and many more. Here is one of the technical articles that discusses the technicalities of this attack.

All these attacks show that there is space in the room to improve the cross-chain security to protect users’ funds.

Summary

A lot of Blockchains have come up that offer some unique features, but since those blockchains stay in an isolated environment and do not interconnect with each other, A lot of users are not able to experience a better user experience. Interoperability is one such factor that affects the user experience in a negative way.

With the Help of Bridges, Interoperability could be achieved and can help to improvise the user experience for transferring assets from one chain to another. Although there are many options available now, there is a good scope of improvement in the security of the bridges.

Join the Communitynorth_east
pattern-left
pattern-right

Subscribe to receive Alpha!

Join 4.3k subscribers from renowned companies worldwide and get a weekly update in your inbox. Stay updated on the latest and finest projects and product updates.