Back

NTU MOOC Study Notes - Session 10 Decoupling Blockchain Interoperability Layers & How to Scale the Interchain

By
HackQuest
Aug 6, 2024
4 min read

Date: 9-10:30 AM SGT, August 6th 2024 / 9-10:30 PM EST, August 5th

Session Title: Decoupling Blockchain Interoperability Layers & How to Scale the Interchain


NTU I&E x HackQuest MOOC is free and open to all individuals interested in Web3. The MOOC is led by top voices in crypto including Yat Siu (Co-founder, Animoca), Ed Felten (Co-founder, Offchain Labs), Sergey Gorbunov (Co-founder, Axelar), Scott Moore (Co-founder, Gitcoin), Haider Rafique (CMO, OKX), Austin Griffith (Developer Onboarding, Ethereum Foundation), Anna Yuan (Stablecoins Lead, Solana Foundation), and many more. For those who prefer having a text summary and review material, this study note provides a recap of what’s covered during the MOOC. Happy learning!


Overview

Main Topic: Decoupling Blockchain Interoperability Layers & How to Scale the Interchain

Objectives:

1.Understand the challenges and solutions in building interoperable decentralized applications (dApps) across multiple blockchain networks.
2.Explore the principles and architecture of interoperability protocols.
3.Analyze the Squid Protocol as a case study for interchain-native dApps.


Section 1: Introduction to Blockchain Interoperability

1.1 Why Connectivity is Crucial

Blockchains as Cities:
Blockchains can be likened to digital cities—independent, robust networks that are open and permissionless. Each blockchain functions autonomously, much like a city with its infrastructure, culture, and governance. However, just as cities require roads, bridges, and other forms of connectivity to thrive and enable commerce, blockchains require interoperability to facilitate seamless transactions and interactions across different networks.
Without connectivity, decentralized applications (dApps) are confined to a single blockchain, limiting their reach and utility. Interoperability allows these dApps to operate across multiple blockchains, ensuring they can serve users regardless of the blockchain they are on.
image
Preview

1.2 Challenges

TRUST Option:
Historically, many blockchain applications have relied on centralized solutions, such as bridges, exchanges, and borrowing platforms, to enable cross-chain activities. These centralized intermediaries are tasked with facilitating the movement of assets and data between blockchains. However, this reliance introduces significant risks, as these central points of control are vulnerable to attacks, failures, and other forms of compromise. The centralized nature of these solutions undermines the fundamental principles of blockchain technology, such as decentralization and trustlessness.
SUFFER Option:
Another approach that developers have taken is to deploy their applications on multiple blockchains separately. While this method allows the application to reach users on different blockchains, it fragments the application’s user base and liquidity. Users are often left to navigate the complexities of moving assets between chains on their own, using third-party bridges, managing multiple wallets, and paying gas fees on each chain. This fragmented experience is cumbersome and deters broader adoption of blockchain technology.

1.3 Solution: Robust Interoperability

Unification of Developer Experiences:
Robust interoperability seeks to unify the development process across multiple blockchains. Instead of building and maintaining separate versions of an application for each blockchain, developers can build their application once and have it function seamlessly across all supported blockchains. This approach reduces development complexity, allowing developers to focus on creating the best possible user experience without worrying about the intricacies of each blockchain.
Simplification of User Experiences:
For users, interoperability simplifies the experience of interacting with applications across different blockchains. Ideally, users should be able to access and use an application on any blockchain with minimal friction—no need to manage multiple wallets, swap assets manually, or deal with multiple sets of gas fees. The goal is to create a user experience that is as smooth and straightforward as using a traditional web application, where users can access services regardless of the underlying infrastructure.

Section 2: Squidrouter: An Interchain-Native dApp

2.1 Squid Protocol Overview

1-Click Cross-Chain Swaps:
The Squid Protocol represents a significant advancement in blockchain interoperability by enabling 1-click cross-chain swaps. This functionality allows users to swap tokens from one blockchain to another with a single click, without the need for intermediary steps such as wrapping tokens or manually bridging assets. By integrating with over 30 blockchains, Squid ensures that users can transact across multiple ecosystems while maintaining the security of native assets.
One of the key innovations of the Squid Protocol is its ability to compose existing decentralized exchanges (DEXs) across chains. By using tokens and contract calls, Squid leverages liquidity pools on both the source and destination chains, using a stablecoin (e.g., USDC) as a routing asset. This process is abstracted from the user, who experiences the transaction as a seamless, single-step operation.
Key Features:
Minimal Liquidity Creation: Squid relies on a single liquidity pool (axlUSDC) to support swaps across chains. This approach minimizes the need for extensive liquidity, reducing the risks associated with bridging and ensuring efficient swaps.
Seamless User Experience: Users can perform cross-chain swaps without needing to manage multiple wallets or pay gas fees on each blockchain. The protocol handles all the complex operations behind the scenes, delivering a user experience similar to that of a centralized exchange, but with the benefits of decentralization and self-custody.
image
Preview

2.2 Design Principles of Interoperability Protocols

1.No Changes Required to Integrate:
A key principle in designing interoperability protocols is ensuring that blockchains can connect without requiring any changes to their internal structures. This means that a blockchain’s consensus mechanism, smart contract language, and block finalization processes remain untouched. This principle is crucial for scalability, as it allows for the seamless integration of diverse blockchains without imposing significant development overhead or limitations.
2.Best-Effort Communication:
Interoperability protocols must ensure reliable communication between blockchains, even in the face of potential network failures or delays. If a message or transaction fails to reach its destination, the protocol should be able to retry the operation from the source blockchain, ensuring that the transaction is eventually completed.
3.Gateway-Based Connectivity:
Connectivity between blockchains is often managed through gateways—specialized smart contracts that facilitate the transfer of messages and assets between networks. These gateways act as intermediaries, ensuring that blockchains can communicate without needing direct point-to-point connections.
4.Decentralized Control:
To maintain the security and integrity of interoperability protocols, control must be decentralized. No single entity should have the ability to control or manipulate the protocol, ensuring that it remains robust and secure against potential attacks or failures.
5.Cross-Chain Safety:
Cross-chain safety is paramount in ensuring that transactions are only executed on the destination blockchain if they have been successfully finalized on the source blockchain. This prevents issues such as double-spending or the execution of invalid transactions across chains.
6.Eventual Liveness:
Even if there are delays or failures in the network, interoperability protocols must guarantee that transactions will eventually be delivered and executed on the destination blockchain. This ensures that users can rely on the protocol for consistent and reliable cross-chain operations.

2.3 Axelar Cross-Chain Gateway Protocol

Cross-Chain Messaging Semantics:
The Axelar Cross-Chain Gateway Protocol (CGP) defines the standard for how messages are structured and transmitted between blockchains. This standardization ensures that different blockchains can communicate effectively, regardless of their underlying architectures. By supporting a variety of validation and transport layers, CGP offers flexibility in how these communications are implemented.
Validation:
Validation is a critical component of cross-chain safety, ensuring that transactions are only executed on the destination blockchain if they have been properly validated on the source blockchain. This can be achieved through native verification methods, where blockchains directly verify each other’s transactions, or through external verification, where a third-party system validates transactions.
Transport:
The transport layer manages the physical delivery of messages between blockchains, ensuring that they are transmitted securely and efficiently. This includes handling the relay of messages, discovering available blockchains, and managing the gas fees associated with cross-chain transactions.
image
Preview

Section 3: Interoperability Layers and Challenges

3.1 Three Layers of Interoperability

1.Message Semantics:
At the top layer of interoperability, message semantics define the communication API that allows blockchains to send and receive messages. This layer abstracts the complexities of cross-chain communication, providing developers with a simple and consistent interface for building interoperable applications.
2.Validation:
The validation layer is responsible for ensuring the safety and integrity of cross-chain transactions. This layer verifies that transactions on the source blockchain have been properly finalized and are safe to execute on the destination blockchain. It can use either native validation, where blockchains verify each other directly, or external validation, where a third party handles the verification.
3.Transport:
The transport layer is concerned with the actual transmission of messages between blockchains. This includes managing the communication model (e.g., point-to-point or hub-and-spoke) and ensuring that messages are delivered reliably, even in the face of network failures or delays.
image
Preview

3.2 Challenges in Building Interoperability

Quadratic Connection Management:
Managing direct connections between all possible pairs of blockchains quickly becomes unmanageable as the number of blockchains increases. This quadratic growth in connection management is both complex and costly, making it difficult to scale interoperability solutions.
Trusting Intermediaries:
While decentralized networks are preferred, there are scenarios where intermediary networks are necessary. However, these intermediaries must be decentralized to avoid introducing single points of failure and to maintain the trustlessness of the system.
High Development Costs:
Building and maintaining interoperable connections between blockchains can be expensive, particularly when each connection requires significant development effort. Efficient designs and modular architectures are essential to reducing these costs and ensuring the economic viability of interoperability solutions.

Section 4: Interchain dApp Architecture Patterns

4.1 Peer-to-Peer (P2P) Model

Symmetric Contracts:
In the P2P model, smart contracts are deployed symmetrically across multiple blockchains. These contracts are designed to communicate with each other directly, allowing for the execution of transactions in a peer-to-peer fashion. This model is ideal for applications where the same functionality needs to be replicated across multiple blockchains, with each instance of the contract capable of interacting with others as equals.

4.2 Hub-and-Spoke Model

Core Logic on Single Chain:
The hub-and-spoke model centralizes the core logic of an application on a single blockchain (the hub), while deploying lighter, satellite contracts

on other blockchains (the spokes). These satellite contracts communicate with the core contract on the hub chain for transaction authorization and other critical functions. This model is particularly useful for applications that require a single source of truth or centralized processing, while still being accessible from multiple blockchains.

4.3 Constant Addresses Across Chains

Use of Nonce for Consistency:
To ensure consistency and ease of discovery, contracts deployed across multiple blockchains can be assigned the same address by using a consistent nonce. This approach simplifies authentication and allows users to easily identify and interact with the correct contract, regardless of the blockchain they are using.
image
Preview

Section 5: Open Problems and Future Outlook

5.1 Open Problems in Interoperability

Lack of Standards:
One of the biggest challenges in blockchain interoperability is the lack of uniform standards. Each blockchain has its own protocols, consensus mechanisms, and transaction formats, making it difficult to establish a common framework for cross-chain communication. This lack of standardization not only complicates the development of interoperability solutions but also hinders the ability to scale these solutions across different blockchains.
Monolithic Designs:
Some interoperability protocols, such as IBC, have been designed as monolithic systems that tightly couple various layers of the protocol stack. While this approach can offer strong security guarantees, it also makes the protocol difficult to adapt or extend to new use cases or blockchains. The monolithic nature of these designs limits their flexibility and can slow down the adoption of interoperability solutions.
Innovation vs. Standardization:
Balancing the need for innovation with the need for standardization is a key challenge in the development of interoperability protocols. While innovation drives the advancement of blockchain technology, excessive divergence in how different blockchains operate can create barriers to interoperability. Standardization efforts must strike a balance that allows for continued innovation while providing a common foundation for cross-chain communication.

5.2 Future Needs

Hubs for Scalability:
As the number of blockchains continues to grow, hubs will become increasingly important for managing cross-chain communication efficiently. Hubs allow for a more scalable approach to interoperability by reducing the number of direct connections that need to be managed and enabling more efficient routing of messages and transactions between blockchains.
Modular and Future-Proof Designs:
To ensure that interoperability solutions can keep pace with the rapid evolution of blockchain technology, they must be designed with modularity and future-proofing in mind. Modular architectures allow different layers of the protocol stack to be updated or replaced independently, facilitating the adoption of new technologies and standards without requiring a complete overhaul of the interoperability system. Future-proof designs will be critical for maintaining the long-term viability and scalability of cross-chain solutions.
image
Preview

Key Takeaways:

Blockchain interoperability is essential for creating seamless, scalable decentralized applications (dApps) across multiple chains. The Squid Protocol exemplifies the power of interchain-native dApps, offering 1-click cross-chain swaps and integrating over 30 chains while minimizing security risks. Interoperability protocols must adhere to key principles like decentralized control, cross-chain safety, and best-effort communication. The Axelar Cross-Chain Gateway Protocol further enhances interoperability by defining cross-chain messaging semantics and ensuring reliable validation and transport across networks. Despite significant progress, challenges remain, such as high development costs and the need for standardized solutions. Moving forward, a focus on modular, future-proof designs and scalable hub-and-spoke models will be critical for the continued growth and adoption of interoperable blockchain ecosystems.


Q&A

1.Question: What are some of the interesting new interchain protocols that you have seen, and what makes them unique or special in terms of architecture and design?

Answer: One interesting trend we're seeing in interchain protocols is the use of intents. Intents allow users to post a transaction and have it executed in the most efficient way without directly executing it themselves. For example, in cross-chain swaps, instead of waiting for full finality of the source chain, a third-party actor can see the intent and execute the transaction on the destination chain immediately, absorbing the risk temporarily. This approach can significantly speed up cross-chain execution and reduce user risks.

2.What are some of the upcoming initiatives by Axelar?

Answer: One of the big initiatives we're rolling out is the launch of a product called Interchain Amplifier. This framework allows protocol developers and blockchain developers to easily connect to Axelar. Historically, connecting to Axelar has been somewhat challenging, but we're simplifying this process to make it much easier for developers to scale and gain access to other chains quickly. The framework is already live on the testnet and will be live on the mainnet soon.

3.What makes Axelar a blockchain?

Answer: Axelar is a blockchain because it runs a full consensus protocol and supports smart contracts. Although we don't necessarily intend to use these smart contracts for building DeFi directly on Axelar, they are useful for certain logic that benefits from being on the Axelar network. For example, a cross-chain naming service could store its mappings on Axelar, allowing rapid propagation across multiple chains.

4.What are the biggest technical challenges you foresee in the future of cross-chain communication?

Answer: One of the biggest technical challenges in cross-chain communication is scaling while maintaining security and keeping costs low. As more chains are connected, we need to ensure that if one chain is compromised, it doesn't negatively impact other connected chains. This requires isolating faults and risks while still allowing seamless interoperability.

5.How does Axelar make money, and what are its biggest revenue centers right now?

Answer: Axelar makes money by charging gas fees for cross-chain transactions. Users don't see these fees directly, but under the hood, Axelar takes the gas at the source token, converts it to pay gas on Axelar, and then converts it to pay gas on the destination blockchain. This process is similar to how other blockchains handle gas fees, but Axelar facilitates this across multiple chains.

6.What was the incentive behind launching the Interchain Token service?

The primary incentive behind launching the Interchain Token service was to simplify the process of launching tokens across multiple chains. Many developers need their tokens to be available on various blockchains, but the process of launching and managing these tokens across different chains has been cumbersome. The Interchain Token service allows developers to launch a token across 60 chains in under five minutes, with the same address on all chains, and with unified liquidity.

7.If you were participating in a hackathon with a six to eight-month timeframe, what would you build?

Answer: I would focus on building something at the intersection of Web2 and Web3 stacks, such as a project combining AI and crypto or payments and crypto. It's essential to think beyond the typical blockchain-native user and consider how blockchain can solve real-world problems for users outside the current ecosystem. This approach could lead to greater distribution and novelty.

8.What's your view on the trend of a multi-chain future?

Answer: The multi-chain future is not just a trend; it's a fact. Developers want to build across multiple chains, and every new blockchain being launched today considers interoperability from day one. This wasn't the case three years ago, but now it's a fundamental aspect of blockchain development.

Stay connected with us

More Blog about ’Study Notes‘

View All
loading...