Cover image for #29 | Interchain Unveiled

#29 | Interchain Unveiled

· 5 min read

A Guide to Blockchain Bridges.

Connecting an ever-growing world of blockchains

There are now 200 live and DefiLlama-tracked blockchain networks through Total Value Locked (TVL). Moving liquidity from one network to another, each with their unique architectural designs, presented its own set of bridging and communication problems. The ability to operate between blockchains is referred to as “interoperability.”

0-tvl

Source: DeFiLlama as of Nov 2023

No single blockchain is expected to dominate due to individual networks' transaction capacities and congestion limits. Instead, networks will likely continue to diverge, catering to distinct sectors and applications based on specific needs for privacy, market approaches, and custom requirements.

The diverse array of Layer 1 blockchains, like Ethereum / Avalanche / Solana / Flow, is intentional, with many tailored to niche markets—from capital markets and stablecoins to esports. These networks bring value to their designated spaces, yet a primary challenge in the Web3 infrastructure emerges from this diversity: the limited ability of different structures built on these Layer 1 networks to communicate with one another.

1-networks-table

A comparison of blockchain networks including Nibiru.

These networks and their applications vary greatly in size and function. While the growth and variety of networks are impressive, the persistent issue is the complexity, risk, and cost associated with transferring assets and data beyond their native platforms.

Numerous initiatives are currently underway to expand the scope of possibilities within the blockchain ecosystem. One notable example is the Cosmos network and its toolkit. Cosmos is unique in that it isn't a singular blockchain; rather, it comprises a network of interconnected blockchains designed to be compatible with each other. One of its significant contributions is the development of the Inter-Blockchain Communication (IBC) protocol, which facilitates the transfer of various data, known as "packets," between independent and diverse blockchain networks. The primary purpose of IBC is to enable the seamless exchange of tokens and information across different blockchains, empowering users to engage in cross-chain transactions.

Although Cosmos's technology supports interoperability among IBC-enabled blockchains, there remain numerous other blockchains outside of the Cosmos network that are not yet interconnected. Ultimate goal of many is to achieve universal interoperability, aligning with the broader vision of a global Web3 ecosystem.

2-map-of-zones

Cosmos Map of Zones (as of Nov 2023) detailing its 60 L1 zones.

While its technology allows for interoperability between blockchains that are IBC-enabled, there are additional blockchains outside of the Cosmos network that are not interconnected. An eventual ideal would be to have universal interoperability, part of a global Web3 vision.

One promising solution that brings us closer to achieving universal interoperability is the concept of a blockchain bridge. These bridges act as connectors between different blockchains, enabling them to communicate and facilitating the exchange of assets and information that would otherwise be incompatible.

Bridges provide interoperability between networks

Bridges are tools facilitating token and NFT transfers between blockchains. They operate using smart contracts and Web2 scripts, often locking tokens on one side and minting corresponding "wrapped" tokens on the other. By doing so, these bridges play a key role in alleviating congestion on higher volume blockchains like Ethereum, redirecting traffic to more scalable alternatives such as Nibiru.

Two bridge types exist: centralized bridges (e.g. wrapped BTC bridge linking Bitcoin and Ethereum), operated by exclusive organizations to enhance security, and decentralized bridges (e.g. Rainbow Bridge), which rely on smart contracts and Web2 server scripts, employing advanced cryptography for sender and receiver validation.

In the Web3 ecosystem, blockchain bridges are pivotal for achieving universal interoperability, representing a crucial step toward this goal. However, it's worth noting that while these bridges are an exciting solution with the potential to greatly improve blockchain scalability, they are not without flaws in their current state.

3-highways

Source: Li.Fi | A simple analogy to explain the L1 bridges can be national highways, whereas L2 bridges can be thought of state highways

Navigating the perils of cross-chain hazards

As bridges have become an increasingly prominent in DeFi, they have accrued substantial amounts of funds, making them attractive targets for theft. In recent years, there have been several high-profile bridge hacks, culminating in over $2B stolen in 2022 alone.

A few notable examples include:

  1. Qubit ($80M): In January 2022, an error in the protocol bridge's deposit logic allowed attackers to deposit $0 in ETH, along with malicious code that enabled them to subsequently withdraw $80M in BNB. This exploit involved smart contract code.
  2. Wormhole Bridge ($325M): In February 2022, an attacker discovered a vulnerability in Wormhole's code, enabling them to mint fake tokens and exchange them for legitimate ones. This was also a smart contract code exploit resulting in a loss of $325M.
  3. Ronin Bridge (>$600M): In March 2022, an attacker gained access to the private keys of four nodes and the private key of a DAO, surpassing the 5 of 9 multi-sig threshold and stealing over $600M.
  4. Harmony Bridge ($100M): In June 2022, $100M was stolen when a PDF containing a virus compromised 2 of the 5 private keys stored on the infected computer, which was sufficient to steal the funds. This was a phishing attack exploiting a custodian.
4-exploits

Source: Anais Rachel, crypto researcher at Fidelity Investments

The above examples illustrate two phishing attacks and two smart contract code exploits, both of which are common attack vectors for bridges. Out of the seven high-profile exploits in 2022, five involved bridge custodians having their keys compromised, highlighting how custodians are often an area of vulnerability in bridge architecture.

Solutions to these points of failure vary widely depending on the bridge's architecture, the networks involved in transferring information and assets, and the mechanisms employed for these transfers.

Comparing diverse blockchain bridge designs

5-bridge-designs

Source: 1KX (as of Sep 2021) | Mapping the blockchain bridge ecosystem

The question of middlemen: Centralized vs. Decentralized

Numerous bridge architectures exist, with the primary distinction being between centralized and decentralized bridges.

Centralized bridges often have extensive backend liquidity networks forged through partnerships with various market participants, including institutional liquidity providers, market makers, and exchanges. Consequently, they can offer a wide array of assets with minimal slippage. However, a drawback is their reliance on trust in the bridge operator during the period when funds are under their control. While this trust is generally acceptable for executing a transfer, prolonged storage of funds on a centralized exchange may expose users to counterparty risks arising from potential mismanagement of assets, as demonstrated by the collapse of FTX.

In contrast, decentralized bridges, also known as non-custodial or trustless bridges, rely on smart contracts to facilitate the transfer of assets between networks. This approach empowers users to maintain control over their assets without needing to trust a third party. Nonetheless, non-custodial bridges are frequently targeted by attackers, resulting in losses exceeding $2 billion in the first half of 2022 alone. While essential for realizing a fully decentralized future, these bridges are still in their early stages, and ongoing improvements are necessary.

6-bridges-centralized-decentralized

Source: Bit Degree | An illustration of centralized vs decentralized bridges

Lock, Burn, Swap: Differing bridge mechanisms

When considering bridges, it's important to categorize them based on their transfer mechanisms, beyond the centralized or decentralized perspective. There are three primary mechanisms:

  1. Lock-and-Mint: In this method, tokens are locked on Chain A and minted on Chain B.
  2. Burn-and-Mint: Here, tokens are burned on Chain A and minted on Chain B.
  3. Atomic Swaps: This mechanism involves the direct transfer of tokens from Chain A to Chain B.

Some projects utilize a combination of these mechanisms. For instance, Synapse employs both lock-and-mint and burn-and-mint approaches.

Certain projects make use of multiple mechanisms. For example, Synapse relies upon both lock-and-mint and burn-and-mint.

7-synapse

Source: Synapse Docs | Synapse Bridge Design

Beyond these categories, novel architectures are also being introduced to the ecosystem. The final section of this article will explain several of these new models, including LayerZero, Axelar Network, and the Inter-Blockchain Communication (IBC) protocol.

Lock-and-Mint 🔒

8-lock-mint

Source: Li.Fi | A process mirroring the “lock-and-mint” type of blockchain bridge: “Drop off your vehicle at a storage facility in City A, and you'll receive an exact replica to use in City B. Upon your return to City A, simply exchange the borrowed car to retrieve your original vehicle.”

Users lock up the original asset on the source blockchain using a smart contract, effectively making them unusable. Simultaneously, a corresponding smart contract on the destination blockchain will mint the equivalent amount of new tokens. When users decide to revert their assets back to the source blockchain, the newly minted tokens are destroyed, and the initial locked tokens are made available again.

This mechanism is the foundation for creating wrapped tokens and is widely adopted in the industry. For example, BitGo operates as a centralized bridge, securing BTC on the Bitcoin blockchain and then creating an equivalent amount of wrapped BTC (WBTC) on the Ethereum network. These WBTC tokens can later be exchanged for the original BTC when desired.

Burn-and-Mint 🔥

9-burn-mint

Source: Li.Fi | A process mirroring the “burn-and-mint” type of blockchain bridge: “Leave your car to be decommissioned in City A, and you'll be provided with a matching car in City B. Upon your return to City A, the vehicle you used in City B will be decommissioned, and you'll receive a matching car in City A, completing the cycle.”

The burn-and-mint method is similar to the lock-and-mint process, with the distinct difference that the original tokens on the source blockchain are destroyed, rather than being temporarily locked in a smart contract.

Hop Protocol is one such example, where market makers (known as Bonders) lend out credit in the form of intermediary tokens known as hTokens. These hTokens facilitate the token exchange process across different blockchains: they are traded on the source chain for hTokens on the destination chain and can then be exchanged for the desired asset. After the exchange, the hTokens on the origin chain are burnt. This approach of Bonders offering liquidity through the minting and burning of hTokens streamlines the process and reduces the typical delays found in cross-chain bridging.

Atomic Swaps

10-atomic-swaps

Source: Li.Fi | A process mirroring the “atomic swaps” type of blockchain bridge: “Upon departure, your car in City A will be decommissioned, and in exchange, you'll receive an identical one in City B. When you come back to City A, this process is repeated: the car you used in City B will be decommissioned, and you'll be provided with an identical one in City A.”

Atomic swaps are a relatively new entrant to the bridging landscape. These are purely peer-to-peer transactions between users across different blockchains, and make use of self-executing smart contracts to complete asset swaps.

Atomic swaps ensure that both parties involved in a trade either successfully exchange assets as per the agreement or have their original assets returned if the transaction is not completed within a predetermined timeframe. They are considered more trustless since they utilize cryptographic proofs to validate the exchanges, thereby eliminating the need for an intermediary.

Typically, atomic swaps employ Hashed Timelock Contracts (HTLCs), which demand that both the sender and the receiver of the funds agree on the trade's terms and submit cryptographic proofs within a specified period.

The Lightning Network, for instance, leverages HTLCs and atomic swaps to enable the transfer of tokens between compatible networks, such as Bitcoin and Litecoin, through its proprietary bridging protocol.

Continued bridge building limitations

Despite the pace of innovation, interoperability in blockchain is still in its early stages. Most current bridges reflect the predominant use cases and designs. To push the boundaries of bridge functionality and advance towards comprehensive interoperability, several challenges need addressing:

11-broken-bridge

Source: Leonardo.AI | A broken bridge

Despite innovation to date, interoperability technology is closer to a state of infancy than maturity. The above examples represent the vast majority of the available bridge use cases and architectures. To push the boundaries of bridge functionality and advance towards comprehensive interoperability, several challenges need addressing:

  • Security Risks:

    While enhanced security protocols and thorough audits have mitigated some risks following the notable breaches in 2022, bridges remain attractive targets for hackers, particularly those that utilize wrapped tokens with lock-and-mint processes, which expose assets on both the source and destination chains.

  • Scalability Issues:

    Bridges that are built on existing blockchain networks will encounter bottlenecks as usage increases, leading to network congestion. This could drive up transaction costs since bridge transfers often incur network fees on both sides. For example, current Ethereum bridge fees can surpass $20, a significant expense for users.

  • **Complex User Interface:**The complexity of using bridges can deter newcomers, hampering the expansion of cross-chain activities. Identifying the optimal bridge for specific assets and chains can be especially daunting for less common assets.

  • Interoperability Barriers:

    While some networks, like those in the Cosmos ecosystem, integrate smoothly, others face compatibility hurdles. Developing more adaptable solutions is crucial to enhance interoperability across diverse blockchain architectures.

The next generation of architecture

Future solutions to existing challenges are expected to emerge from advanced bridge architectures and innovative protocols that break away from traditional bridge models.. Several have shown early promise.

LayerZero

LayerZero is an interoperability protocol that allows for direct, low-level communication between blockchains. The central concept is that a message can be confirmed as valid and finalized if two separate parties concur on the transaction details.

In simple terms, the LayerZero process works like this: Oracles validate the header of a blockchain block, and off-chain "Relayers" verify the authenticity of a transaction's proof. A transaction is deemed valid if its proof is legitimate and matches the block's header.

12-layer-zero

Source: CoinMonks (Medium)

LayerZero functions at a foundational level, similar to the IBC protocol, which is why their name is LayerZero. Although not a bridge in the traditional sense, it facilitates the transfer of native assets across different blockchain networks.An example is the Aptos Bridge, which utilizes LayerZero's technology to connect the Aptos network with others, including Ethereum and Avalanche.

Axelar Network

Axelar consists of a decentralized suite of protocols, tools, and APIs that facilitate cross-chain communication, including the exchange of data, tokens, and information. It is supported by a network of validators which allows for the routing and transfer of assets across different chains.

The two primary protocols of Axelar are:

  1. Cross-Chain Gateway Protocol (CGP):

    It integrates multiple blockchain ecosystems, enabling the movement of assets among them.

  2. Cross-Chain Transfer Protocol (CTP):

    This protocol at the application layer allows developers to link their apps to CGP for cross-chain interactions.

While Axelar is not a bridge by the strictest definition, it provides the infrastructure necessary for network bridging, similar to LayerZero. Within the Cosmos ecosystem, it's notably used to bridge currencies like USDC (axlUSDC).

Inter-Blockchain Communication (IBC) Protocol

The Inter-Blockchain Communication (IBC) protocol, which originated in the Cosmos network, enables PoS blockchains within the Cosmos ecosystem to interact with each other. It has evolved into a standardized protocol capable of connecting any blockchain that has a definitive finality in its blocks, excluding PoW blockchains. However, effectively implementing IBC can be challenging due to the specific characteristics of each network.

Each blockchain with IBC runs a light client—a lightweight version of a blockchain node that confirms and interacts with the blockchain without needing the full blockchain history. These light clients download and authenticate only the block headers, which include cryptographic evidence. They use this evidence to monitor and validate the state of the other blockchain involved, ensuring the legitimacy of the data being transferred between chains.

13-ibc

Source: Cosmos Network | IBC visualized

Relayers function as couriers for data packets between light clients, continuously watching for updates across specified data routes. The foundation of IBC is formed by three protocols: Transfer, Authentication, and Ordering (TAO). These protocols coordinate with Application (APP) protocols, which reside at a higher layer, to manage the transmission of data packets across chains. The APP layer builds upon the TAO layer, dictating the way data packets are processed by both the sender and receiver networks.

Relayers are used to send these data packets between light clients, and continuously monitor for updates along predefined data paths. Transfer, Authentication, and Ordering (TAO) protocols underpin IBC and work in tandem with Application (APP) protocols to send data packets between chains. The APP layer sits on top of the TAO layer and manages details such as how data packets should be interpreted by the sending and receiving networks.

Spanning the Horizon: Building the bridges to tomorrow

The growing Web3 landscape demands better interoperability between blockchains. Blockchain bridges are key to this, enabling the movement of assets and information between different networks. New interoperability protocols are also emerging as promising solutions. Despite their potential, these technologies are still in the developmental phase and have a lot of room to grow

With ongoing efforts from developers and the wider Web3 community, the complexities of blockchain interoperability will gradually become more manageable, aiming for a more interconnected and functional financial system.

Until then, join Nibiru in continuing on this journey, building towards the gateways of tomorrow.

14-nibiru-gateway

To stay in the loop on upcoming events, sign up for our newsletter or join the community and subscribe to the Nibiru community channels!

👾 Discord | 🐦 Twitter | 🎥 YouTube | 🔥 Web App | 💻 GitHub

Previous Articles