LayerZero, the multichain protocol

LayerZero is a communication protocol that allows direct transactions between blockchains. The LayerZero protocol is designed to allow communication between different blockchains without the need for an intermediary chain or expensive light nodes on the chain. Currently, LayerZero connects more than 30 mainnet blockchains. Let's see what LayerZero is, how it works and what advantages and disadvantages we can attribute to it. 

What is LayerZero

LayerZero is a communication protocol that allows direct transactions between blockchains. It provides a new way to interact between chains without requiring third-party intermediation. Therefore, this protocol preserves the main reason why blockchains were invented: trust. LayerZero comes with an on-chain thin client called LayerZero Endpoint, which each chain can support. This creates a fully connected network, where each node has a direct connection to every other node. In this way, cross-chain transactions can be carried out directly with any other chain on the network. Currently, LayerZero connects more than 30 mainnet blockchains. Additionally, the protocol is used by decentralized exchanges such as PancakeSwap, SushiSwap, Trader Joe, and Uniswap, processing over $6.000 billion in transactional volume and securing over $7.000 billion in total value locked.

diagram

Differences between a centralized exchange, a decentralized exchange and a bridge using LayerZero. Source: Whitepaper LayerZero.

How LayerZero works

The LayerZero protocol is designed to allow communication between different blockchains without the need for an intermediary chain or expensive light nodes on the chain. Instead, it uses what it calls an “ultralight node” (ULN) and decentralized oracles to securely transfer messages between chains. LayerZero allows users to send transactions across different blockchain networks using an easy-to-use interface called LayerZero Endpoint. Each blockchain in the LayerZero network has its own endpoint. Each Endpoint is made up of four modules:

  • Communicator
  • Validator
  • Red
  • Libraries

The Communicator, Validator and Network modules work together to ensure that the message is delivered correctly. The Libraries module, for its part, expands the LayerZero network and includes new blockchains for interoperability purposes. To facilitate the exchange of messages between blockchains, LayerZero uses two external services: an Oracle and a Relayer.

diagram

The communication flow in a single LayerZero cross-chain transaction. Source: Whitepaper LayerZero.

Key Features of LayerZero

LayerZero comes with different features from other similar solutions, providing interoperability between blockchains in several ways. These include:

Trustless cross-chain communication

LayerZero provides cross-trust chain communication without the need for a centralized party or intermediate chain of trust. To achieve this, it uses a service independent of Oracle and Relayer that guarantees the validity of transactions without the need to trust another party. This differs from other solutions, such as Cosmos, which rely on centralized or semi-centralized intermediaries to facilitate cross-chain transactions. These intermediaries can introduce potential security risks and undermine the trustworthy nature of blockchain technology.

Modular and expandable

LayerZero is modular and extensible, allowing new chains and functionality to be added without the need to modify the core protocol. This makes it a more flexible and scalable solution compared to other approaches that may require significant protocol changes when it comes to supporting new chains or functionality. LayerZero does not require the creation of new chains or complex smart contracts to achieve interoperability.

Simple user experience

LayerZero provides a simple and intuitive user experience for cross-chain transactions. Its architecture allows minimal and seamless exchanges of a single transaction without the need for intermediary tokens or additional transactions, which can reduce costs and improve efficiency for users.

Pros and cons of LayerZero

Below we list the series of advantages and disadvantages that we can see from the LayerZero protocol:

Absence of trust
Unlike other interoperability solutions that rely on trusted intermediaries, LayerZero does not require users to trust third parties.

Limited adoption
As a relatively new technology, LayerZero does not yet have widespread adoption or support from the broader blockchain community.

Efficiency
LayerZero minimizes the costs and processing times associated with cross-chain transactions.

risk of errors
As with any blockchain technology, there is always a risk of errors or vulnerabilities that could compromise the security of the system.

Flexibility
LayerZero works with multiple blockchains by having participants install an Endpoint. This makes it easier for developers to create multi-chain applications.

Law
Other interoperability solutions came to market earlier, such as Polkadot, which offers similar interoperability features to LayerZero. This could make the implementation of this technology difficult.

End-to-end design
LayerZero follows the end-to-end principle, meaning that smart contracts on the source and destination blockchains handle all protocol logic.