AWAGMI?

Search IconIcon to open search

Layer Zero Whitepaper

Last updated April 7, 2022

Author(s): Ryan Zarick, Bryan Pellegrino, Caleb Banister
Submitted on: 26-05-2021
Written on: 16-03-2022
URL: https://layerzero.network/pdf/LayerZero_Whitepaper_Release.pdf

This is a summary of the whitepaper in the URL above.

TLDR

LayerZero - a Trustless Omnichain interoperability protocol

Introduction

Core pillars of blockchain - Decentralization, Transparency, Immutability

Problem

Liquidity/developers/users are walled within an blockchain Bandaid measures:

  1. use of centralized services (such as Binance)
  2. use of Cross Chain Bridges such as AnySwap or THORChain
    • Relies on protocol specific intermediate tokens or intermediate consensus layers

Solution

LayerZero, a communication primitive, allows transactions between multiple blockchain using

  1. Ethereum - original Ethereum Virtual Machine chain, but low 15-45tps makes it hard to scale
    Polygon - Layer 2 Sidechain
  2. PolkaDot - Parachains are interlinked via a common relay chain. However there is additional cost when using this relay chain
  3. THORChain - Uses pairwise liquidity pools to bind 3rd party currency to $RUNE. While authors acknowledge it solves the scalability problem, it is cumbersome to use as a simple transaction can be quite complicated
  4. AnySwap - Decentralized Exchange which relies on intermediate token $ANY , similar to THORChain. Similar issues too
  5. Cosmos - Inter-Blockchain Communication built on Tendermint BFT which allows messaging between chains built on the hub
  6. Chainlink - Framework for building

How does LayerZero Work?

Communication protocol which provides trustless Valid Delivery

Components

Endpoints

Smart Contracts which implement 4 modules which basically share information with each other:

  1. Communicator
  2. Validator
  3. Network
  4. Libraries - each new chain is an added library 1 Endpoint for each chain.

Oracle

Can be any oracle to read a block from one chain and send to another
Expected to be Chainlink as industry leader

Relayer

Off-chain service that fetches proof for a specific transaction

Steps

Simplified Version with less jargon

  1. Person A on Chain A wants to send a message to Chain B using an application. Application tells the Communicator A relevant details about where the message wants to go
  2. Communicator A tells Validator A that there is a message to be validated
  3. (step 3 and 4 happen concurrently) Validator A tells Network A that the block header H needs to be sent to Chain B
  4. (step 3 and 4 happen concurrently) Validator A tells Relayer A that he needs the proof that the message on Chain A has been sent.
  5. Network A tells Oracle to send current block header H of Chain A to Chain B
  6. (step 6 and 7 happen asynchronously) Oracle gets current block header H from Chain A
  7. (step 6 and 7 happen asynchronously) Relayer gets the message transaction proof of the message from Chain A, and stores it off-chain
  8. Oracle confirms that the block referred to by block header H is finalized, then sends H to Chain B
  9. Network B receives the block header hash, and gives it to Validator B
  10. Validator B sends the hash to Relayer B
  11. Relayer B sends the message and message transaction proof to Validator B
  12. Validator B gets both the message and message transaction proof, and checks if the proof and the block header H it received in step 9 matches. If yes, send message to communicator.
  13. Communicator will send message to App B.

Application

  1. Cross Chain Bridge
  2. Multi-Chain Yield Aggregator
  3. Multi-Chain Lending

Example transactions

Refer to this tweet here.
The Ethereum message was sent at Mar-15-2022 05:46:00 PM +UTC

  1. Ethereum received message 5 min later at 05:55:16 PM +UTC
  2. Fantom received message 8 min later at 06:03:19 PM +UTC
  3. Polygon received message 2 hours later at 07:51:29 PM +UTC
  4. Optimistic received message 2.5 hours later at 08:27:13 PM +UTC
  5. Avalanche received message 2.5 hours later at 08:27:19 PM +UTC
  6. Arbitum received message 2.5 hours later at 08:26:25 PM +UTC
  7. BNB Chain received message 2.5 hours later at 08:27:19 PM +UTC

Seems like interchain communication still takes some time (up to 2.5 hours). Personally not sure if i would wait 2.5 hours to bridge when there are much faster alternatives. Let me know if i interpreted this wrongly


Interactive Graph