BLOG — Developer Tutorials

18 days ago

Gelato's Guide to Avalanche L1s and Native Interoperability

TL;DR

Introduction

  • What is Avalanche's tri-chain architecture?
  • Beyond the Primary Network: sovereign Layer 1 blockchains

From Subnets to Avalanche L1s

  • What were Avalanche Subnets?
  • What limitations did Subnets face?
  • How do L1s improve on the Subnet model?

Security and Consensus on Avalanche

  • How do Avalanche L1s validate transactions?
  • What's the difference between Snowman and Avalanche Consensus?
  • What types of nodes support the network?

Native Interoperability on Avalanche

  • How does cross-chain communication work in Avalanche?
  • What is Avalanche Warp Messaging (AWM)?
  • What is Teleporter?

Conclusion

  • Key impacts of Avalanche L1s and native interoperability
  • Launch Avalanche L1s on Gelato BaaS

Introduction to Avalanche

Avalanche's foundation rests on a tri-chain architecture: the Contract Chain (C-Chain) for smart contracts and dApps, the Platform Chain (P-Chain) for network coordination and validator management, and the Exchange Chain (X-Chain) for digital asset creation and trading. Together, these three chains form the Primary Network, providing the backbone of Avalanche's Mainnet ecosystem.

Avalanche's Primary Network provides robust infrastructure for asset management, network security, and smart contract execution. Building upon this foundation, Avalanche has introduced Layer 1s (L1s), which are essentially sovereign networks that were previously referred to as Subnets. These L1s represent a significant advancement in blockchain customization within the Avalanche ecosystem, offering developers the ability to create highly specialized and independent blockchains while maintaining interoperability with the broader network.

Avalanche L1s enable developers to create application-specific blockchains with high levels of control. From establishing unique governance structures and native tokens to implementing custom virtual machines, L1s offer the flexibility needed for specialized use cases. This sovereignty makes Avalanche particularly attractive for diverse applications spanning gaming, DeFi, institutional finance, and beyond.

By advancing from Subnets to L1s, Avalanche has addressed key limitations while enhancing scalability, customization options, and blockchain independence, all while maintaining seamless interoperability with the broader ecosystem.

From Subnets to Avalanche L1s

Avalanche L1s, previously known as Avalanche Subnets, are both terms to describe dynamic validator groups that reach consensus on one or more blockchains, functioning as separate networks within Avalanche's structure. However, the rebranding to L1s emphasizes their true nature as completely independent blockchains that make their own rules rather than merely being “subnetworks” of the main chain.

What were Avalanche Subnets?

Avalanche Subnets offered a flexible and scalable foundation for blockchain applications. They enabled developers to build customized networks with specific governance structures, security measures, and token economics. These Subnets could interact with each other, allowing smooth communication and asset movement between different Subnets through built-in cross-chain protocols. The architecture supported various virtual machines, enabling different execution environments.

Where Avalanche Subnets fell short

Avalanche Subnets evolved into Avalanche L1s to address several key limitations. The economic barrier required validators to stake substantial AVAX for both Primary Network and Subnet validation (a minimum stake of 2,000 AVAX), which made launching Subnets especially expensive for smaller projects. Subnets lacked independence, as validators were mandated to also validate the Primary Network. Initial interoperability challenges between Subnets existed until Avalanche Warp Messaging (AWM) was introduced. Additionally, validators faced burdensome requirements to sync Primary Network chains and meet specific staking thresholds.

The L1 transition resolved these issues by providing greater autonomy and lower economic barriers exemplified by ACP-77, which removed requirements for L1 validators to sync the Primary Network or meet previous staking thresholds. Instead, now paying a dynamic fee to the P-Chain, which is more cost-effective.

What are Avalanche L1s?

Avalanche L1s allow developers to define their execution logic, set fees, manage state, handle networking, and ensure security independently, thereby enhancing the overall scalability and performance of the Avalanche network. With the Avalanche9000 upgrade, deploying an L1 has become significantly more economical, enabling a wide range of projects to launch their own L1s.

Avalanche L1s each operates independently, with its own:

  • Validators: A unique set of nodes that secure the network.

  • Ruleset: Custom token economics, fee structures, and governance models.

  • Virtual Machine (VM): The execution environment, which can be the EVM for Ethereum compatibility or a custom VM for specialized use cases.

This design allows developers to build blockchains optimized for specific purposes like high transaction throughput for gaming or enhanced privacy for financial applications without affecting the main Avalanche network (Primary Network).

Security/Consensus on Avalanche L1s

Avalanche L1s validate transactions using a Proof-of-Stake (PoS) consensus mechanism, specifically the Avalanche Consensus Protocol, which ensures quick and efficient agreement on the network's state. Additionally, Avalanche's consensus mechanism also includes the Snowman Consensus Protocol, which is used on certain chains like the P-Chain and C-Chain. This protocol enhances scalability and security through a sub-sampled voting process, ensuring efficient and reliable transaction validation.

Differences Between Snowman and Avalanche Consensus

Snowman Consensus is a linear, ordered implementation of the Avalanche Consensus Protocol, designed for sequential transaction validation, whereas Avalanche Consensus is more flexible and can operate in a Directed Acyclic Graph (DAG) architecture, facilitating asset exchange and orderless transactions. Both protocols enhance scalability and security through efficient transaction validation processes.

Avalanche supports different types of nodes, including Full Nodes, Validator Nodes, and RPC Nodes. Each type serves a distinct purpose in the network:

  • Full Nodes: Store the entire blockchain and help propagate transactions.

  • Validator Nodes: Participate in the consensus process by validating transactions and producing blocks. They require staking AVAX tokens.

  • RPC Nodes: Act as interfaces for external applications to interact with the blockchain.

Each L1 operates independently with its own set of validators, responsible for securing its transactions. While these L1s do not traditionally share security from a common validator network, AWM facilitates interoperability and cross-L1 communication.

Avalanche does support the use of Proof-of-Authority (PoA) in L1s or custom networks. In a PoA setup, validators are chosen based on their identity and reputation rather than the amount of cryptocurrency they hold. Validators are pre-approved by authorities and must adhere to certain rules to maintain trust within the network.

Native Interoperability on Avalanche

How Native Interoperability Works On Avalanche

Native interoperability is the ability of different blockchain networks to communicate and exchange data or assets without relying on external bridges or intermediaries. Native interoperability in Avalanche, now facilitated through Avalanche L1s, utilizes Avalanche Warp Messaging (AWM). This protocol enables seamless communication between different L1s, allowing for the implementation of arbitrary communication protocols between them. This means that assets and data can be transferred efficiently across L1s without relying on external bridges, maintaining the security and consistency of transactions across the ecosystem. This is further enhanced with the Teleporter interface.

What is Avalanche Warp Messaging (AWM)

Avalanche Warp Messaging (AWM) is the core technology in Avalanche that enables communication between L1s. It uses BLS multi-signatures with public-key aggregation so validators can efficiently sign and verify cross-network messages. Validators register their public keys with their NodeIDs on the P-Chain, which tracks validator sets for each L1. This system verifies if a message has enough validator signatures to ensure authentic cross-chain communications.

When sending a message through AWM, validators on the origin L1 first sign it using BLS. These signatures combine into one compact multi-signature that destination subnets can efficiently verify. This approach reduces complexity compared to traditional methods, working better with large validator groups. After signing and aggregation, the message goes to the destination L1, which verifies the signature before processing. This ensures only messages with sufficient validator support are accepted, improving security.

AWM provides direct, trustless communication without requiring third-party bridges that could introduce security risks. While AWM enables strong subnet interoperability, it has limitations. For example, messages can't be sent directly from the C-Chain to a subnet, affecting some DeFi applications. Despite this, AWM remains essential to Avalanche's structure, supporting custom blockchain development and creating a more connected ecosystem.

What is Avalanche Teleporter

Fragmentation between appchains is a critical problem. Networks of appchains are disconnected and difficult for average users to navigate. Teleporter serves as an easy-to-use tool for developers that's constructed upon Avalanche's built-in communication system, the AWM. It functions by creating smooth, effortless interactions between the various blockchains operating within Avalanche's ecosystem.

It abstracts away the complexities of AWM's signing and verification processes, providing a straightforward interface for sending and receiving messages across different chains. This means developers only need to focus on defining the message they want to send and ensuring that the destination chain can receive it, while Teleporter handles the underlying mechanics.

Essentially, it creates a framework that lets developers call contracts on other EVM chains within the Avalanche ecosystem, including the Avalanche C-chain, making cross-chain communication feel as smooth as working with a single chain.

Conclusion

Avalanche L1s represent a major evolution from traditional Subnets, offering fully sovereign blockchains with greater autonomy and lower economic barriers. These L1s improve scalability and execution efficiency, making them ideal for specialized use cases such as gaming, DeFi, and institutional finance.

Key to Avalanche's ecosystem is its native interoperability, powered by Avalanche Warp Messaging (AWM) and Teleporter, which enable seamless and trustless cross-chain communication without reliance on third-party bridges. This interconnected framework strengthens Avalanche’s position as a leading modular blockchain network, paving the way for more scalable and interoperable decentralized applications.

Launch Avalanche L1s on Gelato BaaS

Take the first step in testing and launching Avalanche L1s on Gelato. As we integrate Avalanche L1s into our Blockchain-as-a-Service (BaaS) platform, you'll gain access to streamlined deployment and management tools. Join our early adopters and start testing your Avalanche L1 today, leveraging Gelato's expertise in automation and interoperability. Get started now and explore the potential of our pioneering BaaS/RaaS solution: raas.gelato.network.


For developers looking to integrate their applications with Gelato Web3 Services, check out Web3 Functions, Relay, and VRF! Visit our Discord server for developer support and engagement, and stay updated with the latest developments by following us on X.