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 post is a little technical because it is a summary of the LayerZero whitepaper, not a podcast/space
You can view the web version here for a more complex sort and filtering Zettelkasten system with a bonus graph view. My notes were originally written for the Zettelkasten, and then copied over here, so there might be formatting issues below.
This is a summary of the whitepaper in the URL above.
TLDR
Layer Zero - a Trustless Omnichain interoperability protocol
Allows 2 separate blockchains to communicate using 2 independent components
Basically, you get these two independent components to make sure the transactions are valid from the sender before the receiver gets to do anything
general communication layer, NOT a blockchain
Touts benefits of being less complex, less overheads, and being able to extend to any blockchain without being hindered by its native SDK.
Introduction
Core pillars of blockchain - Decentralization, Transparency, Immutability
Problem
Liquidity/developers/users are walled within an blockchain
Bandaid measures:
use of centralized services (such as Binance)
Does not align with Trustlessness of blockchain
use of Cross Chain Bridges such as AnySwap or THORChain
Relies on protocol specific intermediate tokens or intermediate consensus layers
Solution
Layer Zero, a communication primitive, allows transactions between multiple blockchain using
allows transactions between multiple Layer 1 or Layer 2 chains.
Intuition: if two independent entities can corroborate the validity of a transaction, then Chain B can be sure the transaction from Chain A is valid
Related Work
Ethereum - original Ethereum Virtual Machine chain, but low 15-45tps makes it hard to scale
Polygon - Layer 2 Sidechain
PolkaDot - Parachains are interlinked via a common relay chain. However there is additional cost when using this relay chain
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
AnySwap - Decentralized Exchange which relies on intermediate token $ANY , similar to THORChain. Similar issues too
Cosmos - Inter-Blockchain Communication built on Tendermint BFT which allows messaging between chains built on the hub
Inter-Blockchain Communication requires a full on chain Light node of each chain
Only provides direct communication between fast finality chains
Gravity Bridge - AnySwap and Cosmos equivalent
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:
Communicator
Validator
Network
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
similar to oracle but for proof of transaction)
Steps
Simplified Version with less jargon
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 themessage
wants to goCommunicator A tells Validator A that there is a
message
to be validated(step 3 and 4 happen concurrently) Validator A tells Network A that the block header H needs to be sent to Chain B
(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.Network A tells Oracle to send current block header H of Chain A to Chain B
(step 6 and 7 happen asynchronously) Oracle gets current block header H from Chain A
(step 6 and 7 happen asynchronously) Relayer gets the message transaction proof of the
message
from Chain A, and stores it off-chainOracle confirms that the block referred to by block header H is finalized, then sends H to Chain B
Network B receives the block header hash, and gives it to Validator B
Validator B sends the hash to Relayer B
Relayer B sends the
message
and message transaction proof to Validator BValidator 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, sendmessage
to communicator.Communicator will send
message
to App B.
Application
Cross Chain Bridge (https://stargate.finance/)
Multi-Chain Yield Aggregator
Multi-Chain Lending
Example transactions
Refer to this tweet here.
The Ethereum message was sent at Mar-15-2022 05:46:00 PM +UTC
Ethereum received message 5 min later at 05:55:16 PM +UTC
Fantom received message 8 min later at 06:03:19 PM +UTC
Polygon received message 2 hours later at 07:51:29 PM +UTC
Optimistic received message 2.5 hours later at 08:27:13 PM +UTC
Avalanche received message 2.5 hours later at 08:27:19 PM +UTC
Arbitum received message 2.5 hours later at 08:26:25 PM +UTC
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.
Update: Stargate finance used Layer Zero as to create a cross chain bridge. Seems like there is some time required to get from one token to another. Since it depends on transaction finality, I wonder if it would be faster to go from avax to other chains, since avax has almost instant finality. Let me know!