LayerZero's Multi chain Ambition: Technical Analysis and Ecological Projects at a Glance

It is not only Tokens but also the functions and services of various protocols that need and can be cross linked.

Original title: LayerZero's Multi chain Ambition

By Tiga

Brief Analysis of LayerZero Technology

LayerZero is a cross chain communication protocol that can transfer "information" from one chain to another. Layerzero completed the financing of 6.3M and $135M in April 21 (seed round financing of 2M, followed by September 21 and March 22, respectively). The participating institutions include Binance Labs, Multicoin, Delphi, A16Z, Uniswap, Polygon, Coinbase and other institutions. The investment portfolio can be said to be top.

LayerZero implements decentralized information cross chain services by deploying a series of smart contracts on the chain. An ultra light node is running on the Endpoint. The "ultra light" two fonts now only provide the block header of the specified block. During the transmission, Oracle and Relay ensure the validity and security of information transmission.

Endpoint is a contract deployed on the chain, which is responsible for sending and receiving messages. The functions and responsibilities of Relayer and Oracle are the same. They both play the role of oracle, but the transmission content is different. The two run independently of each other. The endpoint of the receiving chain verifies and matches the information sent by Relayer and Oracle to improve the security redundancy of LayerZero.

Specifically, LayerZero divides Endpoint into three parts: Communicator, Validator, and Network:

  • Communicator: Dapp oriented interface,

  • Validator: The receiver is responsible for verifying the information,

  • Network: It is the interface for other networks to receive or send information.

The specific steps are as follows:

  • Step 1: The Dapp on the A-chain interacts with the Endpoint on the A-chain to generate a transaction TTT, which will generate four parameters, which will be sent to the Communicator through LayerZero. The four parameters are:

  • t: The only transaction proof of transaction T

  • Dst: Identifier of the target chain endpoint

  • Payload: Data to be sent from Dapp of A-chain to B-chain

  • relayer_ Args: The layer parameter that A wants to use

  • Step 2: Communicator packages these parameters into Packet (dst, payload), and combines them with t and relay_ The args are sent to the Validator together.

  • Step 3: The Validator transfers t and dst to the Network.

  • Step 4: The Validator will convert Packet (dst, payload), t and relay_ The args are sent to Layer together. Step 4 and step 3 happen at the same time

  • Step 5: The network sends dstdstdstdst and the ID (cur_blk_id) containing the current transaction block to Oracle.

  • Step 6: Oracle gets the block header from the A-chain

  • Step 7: Relay obtains the transaction proof t of transaction T from the A-chain and stores it under the chain.

  • Step 8: After Oracle confirms that the transaction T has been submitted on the A-chain, it sends the block header to the network of the B-chain.

  • Step 9: The network of B-chain will receive the block hash (recorded as blk_hdr_hash) and send it to the validator of B-chain

  • Step 10: Validator will blk_ hdr_ Hash to Relayer

  • Step 11: The layer receives the blk sent by the B-chain_ hdr_ After hash, it will be connected with blk_ hdr_ The hash matched data is returned to the Validator of the B-chain.

  • Step 12: The blk obtained by the Validator of the B chain from Oracle_ The hdr matches the transaction certificate t obtained from the Relay. If the matching passes, the Packet (dst, payload) will be sent to the Communicator. If the matching fails, the transaction will be ignored directly.

  • Step 13: Communicator sends Packet (dst, payload) data to the Dapp of the B-chain to complete information cross chain

To put it simply, Dapp of A-chain told LayerZero to deploy at the endpoint of A-chain: "I want to send a XXX message to B-chain." Sending the message can also be regarded as a transaction. After the transaction is linked on the A-chain, Oracle will directly go to the A-chain to check whether it is really linked, and Relay will also go to the A-chain to obtain the proof of the transaction. Oracle and Relay will send the content they get to the Endpoint of the B-chain. If the content matches, the information of the A-chain will be sent to the B-chain. On the contrary, if the content obtained by Oracle and Relay does not match, the transaction will be ignored directly.

On the security level, LayerZero distributes security defense to four points, namely Endpoint, Oracle, Relay, and the chain itself. They are coupled with each other. This decentralized structure can make LayerZero safer. When a certain part is attacked maliciously, other parts will block the process of LayerZero and isolate the maliciously supplied part. Among the four parts, the weakest links are Oracle and Realer. Because 51% of attacks in the mainstream chain are very difficult and costly, and 51% of attacks are not considered and defended by LayerZero. Endpoint is a smart contract in essence, and security risk points can be minimized through security audit. If Oracle and Relay are not attacked at the same time, LayerZero can ensure their security.

In the worst case, when Oracle and Relay are hijacked at the same time and collude with each other, Oracle provides a malicious block header, and Relay provides a malicious transaction proof, and the contents provided by both are matched. This situation is very small in probability, because Oracle and Relay are independent components, and the oracle service used by LayerZero is provided by Chainlink, so the security is still guaranteed. Secondly, it is impossible to verify the transaction proof against a block header without knowing the specific block header. On the contrary, block headers cannot be pushed back based on a transaction certificate. This is the basis to ensure the security of Oracle and Layer, and also the guarantee to ensure the security of LayerZero.

Layerzero ecology at a glance


Stargate is the first project based on Layerzero, which is committed to building a fully composable native asset cross chain bridge protocol. At present, Stargate supports Ethereum, BSC, AVAX, Matic, Arbitrum, Optimism and Fantom chains. It only supports four tokens: USDC, USDT, ETH and STG.

Stargate's cross chain mode is different from that of other cross chain bridges. It adopts a similar OTC mode for cross chain. Liquidity pools are set up in each chain. Users "pledge" assets in the A chain liquidity pool and "redeem" assets in the B chain liquidity pool. No intermediate assets are required. Message exchange between A and B chains is realized through LayerZero.

As the "son" of LayerZero, Stargate is far more than a cross chain bridge. From Stargate's documents, we can see that Stargate's goal is to be a cross chain technology provider for assets, so that more projects can easily use Stargate to achieve cross chain functions. Therefore, Stargate's business needs are divided into two parts: 2B and 2C. The 2B business model is also far more imaginative than the 2C model. Based on Stargate, more complex Dapps can be built up.


Hashflow is a cross chain DEX that focuses on zero slip points and is protected by MEV. It uses LayerZero to realize cross chain message transmission. Hashflow currently supports Ethereum, BSC, AVAX, Polygon, Arbitrum and Optimism chains.

As a DEX, Hashflow does not use the AMM model. Hashflow uses the request for quote (RFQ) method for token exchange, which is very similar to the order book method. The specific mechanism is as follows: the trader quotes to exchange one ETH of A-chain for 1000USDC of B-chain, the market maker sends one ETH of the trader in A-chain to the liquidity pool on A-chain, and then triggers the contract of B-chain to remit 1000USDC into the trader's B-chain wallet.


Radiant is a multi chain lending project deployed on Arbitrum based on LayerZero/Stargate. Currently, it only supports five types of Tokens: USDC, USDT, DAI, BTC and ETH. Users can choose to mortgage the above five assets on Arbitrum to lend other assets. At present, Radiant only supports cross chain lending of USDT and USDC, that is, users can mortgage assets in one chain and lend USDT or USDC in another chain.


SushiXSwap is the cross chain DEX launched by SushiSwap and the first cross chain AMM in the world. Based on the Stargate protocol of LayerZero, it only supports ETH main network, Arbitrum, AVAX, Polygon, Fantom, BSC and Optimism network. The transaction process of SushiX is shown in the figure below. Through the cross chain function of Stargate, it will achieve cross chain DEX with Sushiswap's multi chain liquidity.

Other LayerZero ecological projects (some have not been launched yet)

  • @OmniBTC: Built on the three in one dex of DEX+Lend+Bridge of Sui and Aptos

  • @rage_ trade: Decentralized contract on Arbitrum

  • @MugenFinance: RealYield based on Layerzero

  • @InterSwap: LayerZero based Swap

  • @CashmereLabs: Full chain DEX

  • @holographxyz: Mint and Bridge protocols of full chain NFT

  • @OmniX_ NFT: Full chain native NFT platform and trading market

  • Moonbean: Integrated LayerZero

  • Clearpool: will be integrated with LayerZero

  • Angle Protoco: integration with LayerZero

The items listed here are incomplete, and the rest are listed for readers to explore.

LayerZero Outlook

It is not only Tokens but also the functions and services of various protocols that need and can be cross linked. With the development of crypto, the current blockchain world has already had a bunch of commendable truly innovative projects/protocols. Their mechanisms are mature and stable, and they can be used by other protocols as an underlying "part". These protocols are programmable, composable and interactive, and web3 is far more open and inclusive than web2. Smart contracts naturally leak out APIs. If we can break the gap between chains, let mobility and users freely and conveniently shuttle between protocols. Developers can create more and more imaginative "things" between chains. DeFi can also evolve again, and constantly broaden the boundaries of crypto/web3.

What will the future blockchain world be like? What changes will LayerZero make to the blockchain and what impact will it have? I don't know, but it is certain that the development of blockchain in the future will be in the direction of interconnection, which is convenient for users and developers. When talking about design principles, Tim Berners Lee, the inventor of the World Wide Web, said, "Simplicity and modularity are the cornerstones of software engineering; distribution and fault tolerance are the life of the Internet." The modularized serial and parallel use of mature protocols on each chain will surely lead to a killer app of web3 in the future. Genius needs a stage as well as a hammer and nail. LayerZero can be used as a hammer and nail for web3 geniuses.

It is reasonable and conservative to predict that in the future, the gas fee of the blockchain will decrease by several orders of magnitude, and the DeFi users will also increase by several orders of magnitude. The huge market demand has spawned the "ocean freighter" between chains, and the cross chain fee will be infinitely close to zero due to the marginal effect. The reduction of cost is a necessary condition for expanding the scale, just as the price of power battery has dropped 10 times in ten years, and electric vehicles have gone to millions of households.

  • 202209: LayerZero Update V2 Version:

  • Will support non EVM chains

  • Introducing LayerZero Scan

  • Reduce gas fee by 20%

  • Security Patch

Reference:SushiXSwap - A Crosschain DEX to rule All the PoolsLayerZero:Trustless Omnichain Interoperability ProtocolLI. FI: The Cross-Chain Money Lego