This article is a basic introduction, mainly to understand Stargate, but before that, we need to understand the knowledge of Layer Zero. This article is a study note and serves as a memo.

The following is the table of contents for this article:

  • What is LayerZero

  • What problem does it solve?

  • What is its technical principle?

  • What are its prospects and risks?

What is Layer Zero

  • Official website: https://layerzero.network/

  • Twitter: https://mobile.twitter.com/layerzero_labs

LayerZero is a full-chain interoperability protocol capable of sending messages to any smart contract on any supported chain, which is a message transport layer for smart contract communication between blockchains.

LayerZero is the first system to allow trustless transactions directly across all blockchains. Free transactions between blockchains not only allow users to reorganize their split liquidity, but also allow greater use of applications on different chains. LayerZero provides the underlying network for a fully connected multi-chain ecosystem in the future.

The core of LayerZero is a full-chain interoperability protocol. Think of it as the critical infrastructure layer that connects any specific contract on each specific chain. It is the basis for critical information transfer, bringing a new dimension of cross-chain composability and functionality.

What problem does LayerZero solve?

The problems it solves are the commonly used cross-chains. Let’s first list the problems or pain points of cross-chains.

  • Currently, the cross-chain method for most people is to operate through a centralized exchange (CEX). For example, after converting the GST I earned from running Stepn into SOL or USDC, I cannot directly transfer to the BNB chain. Most people only operate on the BNB chain. You can recharge to Xianan first, and then transfer from Xianan to BNB chain. This seems very convenient, but it is also very risky. First of all, centralized exchanges cannot protect privacy and anonymity.

  • Other cross-chain bridges require a very cumbersome process and are very inefficient.

LayerZero has built a new "ultra-light node" model, hoping to provide a safe and reliable infrastructure for cross-chain technology.

LayerZero’s technical principles

The best interpretation is of course its white paper: https://layerzero.network/pdf/LayerZero_Whitepaper_Release.pdf

The LayerZero protocol has three core components: Endpoint, Oracle and Relayer.

  • Endpoint: Each chain needs to have a LayerZero endpoint for information transmission. Endpoints are divided into four modules: Communicator, Validator, Network, and Library.

  • Oracle: An oracle is a third-party service that reads block headers from one chain and sends them to another chain. The oracle used by LayerZero in practice is Chainlink.

  • Relayer: The relay is an off-chain service that functions like an oracle, but it does not obtain the block header, but obtains the "proof" of the specified transaction.

In order to verify a block on the chain, we need two pieces of information:

  • Block header, which contains Receipts Root;

  • Transaction proof, namely Merkel-Patricia proof on EVM.

LayerZero separates these two parts in the following way.

  • The oracle forwards the block header - any chosen oracle (i.e. Chainlink, Pyth).

  • Relayer forwards transaction proof

Both Oracle and Relayer are 100% open and permissionless, anyone can fulfill both roles. Given that the two entities are independent and that the combination of the block header and its corresponding transaction proof are verified on the destination chain, the forwarded message is guaranteed to be valid and committed on the source chain.

After realizing cross-chain messaging, LayerZero can do more than just cross-chain assets, and can also achieve cross-chain status sharing, lending, governance, etc. Therefore, the previously conceived idea of ​​using assets on chain A as collateral and borrowing them for mining on chain B can be realized through LayerZero, eliminating the need for cross-chain, transaction, and cross-chain assets back to chain A.

LayerZero is the first trustless interoperability layer for any chain, supporting direct information transfer between first- and second-layer blockchains.

There are many technical details here, but it is recommended to read the English white paper, although it looks tiring. Although I still don’t understand a lot, I also learned a lot from this process.

Prospects and Risks

prospect:

  • Isolated risk infrastructure: In LayerZero’s design, the permissionless use of Oracles and Relayers gives the protocol the ability to independently select Oracles and Relayers. The benefit of this is to isolate the risks borne by the protocol and users.

  • LayerZero Efficiency: LayerZero attempts to add as little additional complexity as possible while maintaining the security of trust-minimized communications.

  • True cross-chain composability (not just asset transfer):

risk

  • Competition risk, because after all there are many competitors in the market, how to attract more users is an aspect that needs to be considered

  • safety. To be investigated