Difference between revisions of "LayerZero (ZRO)"

From CryptoWiki

 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
From their docs (2-2022):
LayerZero is an interoperability protocol that allows secure communication between over 60 networks. From their docs (2-2022):


''"LayerZero is an Omnichain Interoperability Protocol designed for lightweight message passing across chains. LayerZero provides authentic and guaranteed message delivery with configurable [[Trustless|trustlessness]]. The protocol is implemented as a set of [[gas]]-efficient, non-upgradable [[Smart Contract (SC)|smart contracts]]."''
''"LayerZero is an Omnichain Interoperability Protocol designed for lightweight message passing across chains. LayerZero provides authentic and guaranteed message delivery with configurable [[Trustless|trustlessness]]. The protocol is implemented as a set of [[gas]]-efficient, non-upgradable [[Smart Contract (SC)|smart contracts]]."''
Line 20: Line 20:


===Bugs/Exploits===
===Bugs/Exploits===
* Had a major bug [https://x.com/IAm0x52/status/1807566045432946784 revealed] (1-7-2024):
''"The impact of this is devastating on the effected protocol as all messaging would be halted permanently. This would have caused tens or even hundreds of millions of dollars in damage to the effected protocols."''
==Governance==
==Governance==
===Admin Keys===
===Admin Keys===
* From this [https://twitter.com/bkiepuszewski/status/1620718572023730177 thread] (2-2-2023):
''"Once Oracle confirmed hash of the message, the Relayer sends it to a contract called "Proof Library (PL)". This contract will "unpack and decode" the message. The problem is, while doing it the PL may change the message. PL (Proof Library) is a critical piece of software. It is not expected to change messages, however if it is malicious, it can. The crucial question then is - who decides what PL should be used ? You, as DApp developer, can decide. This is good. But if you don't decide anything (ie accept the defaults), L0 team will decide for you. Moreover they can change (upgrade) that PL anytime, even for in-flight messages (ie. ones that have been sent but not delivered yet). TL/DR - even if [[Oracle]] / [[Relays|Relayer]] attest that the message sent was "send to Bob", PL can change the message to "send to Alice". Whoever controls PL controls what the message looks like."''
===DAO===
===DAO===
===Treasury===
===Treasury===
==Token==
==Token==
===Launch===
===Launch===
* From [https://twitter.com/LayerZero_Labs/status/1732862812710449466 X] (8-12-2023):
''"We’ll state now in no uncertain terms that there will be a LayerZero token. Its distribution is something we’re committed to getting right and expect it to happen within the first half of 2024."''
===Token Allocation===
===Token Allocation===
===Utility===
===Utility===
Line 39: Line 54:


*From their [https://medium.com/layerzero-official/the-omnichain-future-is-here-74389f6d70c3 announcement] (15-3-2022):
*From their [https://medium.com/layerzero-official/the-omnichain-future-is-here-74389f6d70c3 announcement] (15-3-2022):
''"We’re live on [[Ethereum (ETH)|Ethereum]], [[Avalanche (AVAX)|Avalanche]], [[Polygon (MATIC)|Polygon]], [[BNB Chain]], [[Fantom (FTM)|Fantom]], [[Arbitrum]] and [[Optimism]]. In 6–8 weeks consider [[Solana (SOL)|Solana]], [[Terra (LUNA)|Terra]], [[Cosmos (ATOM)|Cosmos Hub]] and [[Osmosis (OSMO)|Osmosis]] slam dunks and LayerZero to be everywhere in 4–6 months."''
''"We’re live on [[Ethereum (ETH)|Ethereum]], [[Avalanche (AVAX)|Avalanche]], [[Polygon (MATIC)|Polygon]], [[BNB Chain]], [[Fantom (FTM)|Fantom]], [[Arbitrum]] and [[Optimism]]. In 6–8 weeks consider [[Solana (SOL)|Solana]], [[Terra (LUNA)|Terra]], [[Cosmos (ATOM)|Cosmos Hub]] and [[Osmosis (OSMO)|Osmosis]] slam dunks and LayerZero to be everywhere in 4–6 months."'' LayerZero [https://twitter.com/LayerZero_Labs/status/1628808955261771776 announced] it would connect with [[Base (Coinbase L2 chain)|Base]] at launch (24-2-2023).
*Programming language used:
 
* Programming language used:


====Transaction Details====
====Transaction Details====
Line 49: Line 65:
===How it works===
===How it works===


* [https://blog.li.fi/navigating-arbitrary-messaging-bridges-a-comparison-framework-8720f302e2aa From] [[Li.Finance|Li.Fi]] (19-9-2022):
* From a commissioned [https://messari.io/report/state-of-layerzero-q1-2024 report] by Messari (30-4-2024):
 
''"LayerZero has over 45,000 contracts using its omnichain communication protocol and is live on over 60 different networks, including Ethereum, Optimism, Arbitrum, Polygon, zkSync, BNB Chain, and Base. These contracts use LayerZero messaging for various use cases, supporting almost 300 user-facing applications.''
 
''Transferring assets between distinct networks (bridging) is one of the most common use cases for LayerZero. Other use cases include gaming, cross-chain governance, and identity solutions. Messages sent are a key indicator of LayerZero's total usage since they are user-initiated and used in all use cases, such as bridging (e.g., Stargate and Merkly), governance (e.g., Angle), gaming (e.g., Sidus Heroes), cross-chain identity (e.g., Clusters ), and fee/rewards distribution (e.g., Pendle).''
 
''Using bridges built on LayerZero, assets can be transferred by swapping native assets on source chains for native assets on destination chains (e.g., Stargate) or via LayerZero’s token standards — called Omnichain Fungible Tokens (OFTs) and Omnichain Non-Fungible Tokens (ONFTs). These omnichain tokens are sent by either locking on their native chain when they exist on one chain, or burned when they exist on multiple chains or if sent between non-native chains. Tokens are received by the destination chain issuing new tokens, 1:1 for each token locked or burned."''
* [https://thedefiant.io/l2beat-layerzero-security From] [[The Defiant]] (7-1-2023):
''"Urbański [from L2beat] disagrees with LayerZero’s whitepaper, which indicates that the protocol’s design ensures that the [[Relayer]] cannot collude with the [[Oracle]].''
 
''“[The paper’s authors] even directly state that in order for their mechanics to work, it’s required that Oracle and Relayer are independent and do not collude,” Urbański told The Defiant. “But it’s up to app developers to choose who is serving as Oracle and Relayer, so they are free to set it up in a way that they are actually dependent and that they do collude.” The report raised eyebrows because LayerZero calls itself a “[[trustless]]” protocol in its [[whitepaper]].''
 
''Ryan Zarick, co-founder and CTO at LayerZero Labs, told The Defiant. “You can build good and bad things on top of it. “As cross-chain applications become more complex, L2Beat is required to write customized and complicated monitoring tools to properly monitor the security of these applications,” Zarick continued. “It is far easier to mark all LayerZero-enabled applications as insecure and discredit them than spend the time to do the actual work in evaluating each app.”''
*[https://blog.li.fi/navigating-arbitrary-messaging-bridges-a-comparison-framework-8720f302e2aa From] [[Li.Finance|Li.Fi]] (19-9-2022):


''"A LayerZero transaction/message only requires source gas in a single call. A transaction begins with a User Application (UA) starting a transaction (aka doing something on-chain). This transaction is then broken up into multiple parts (proof and block header) via the Oracle and Relayer in a flow that is facilitated by a LayerZero Endpoint. Once the Oracle and Relayer send their respective information from the source chain and the LayerZero Endpoint validates that the information is correct, the message is translated and executed on the destination chain.''
''"A LayerZero transaction/message only requires source gas in a single call. A transaction begins with a User Application (UA) starting a transaction (aka doing something on-chain). This transaction is then broken up into multiple parts (proof and block header) via the Oracle and Relayer in a flow that is facilitated by a LayerZero Endpoint. Once the Oracle and Relayer send their respective information from the source chain and the LayerZero Endpoint validates that the information is correct, the message is translated and executed on the destination chain.''
Line 80: Line 109:


===Fees===
===Fees===
* From a commissioned [https://messari.io/report/state-of-layerzero-q1-2024 report] by Messari (30-4-2024):
''"LayerZero protocol collects fees at the source chain. These fees are collected in the native token of the source chain and are used in two ways:''
# ''To distribute to DVNs and Executors''
# ''To pay for gas on the destination chain"''
===Upgrades===
===Upgrades===
V2 went [https://twitter.com/LayerZero_Labs/status/1751961057151840754 live] on 29-1-2024.
===Staking===
===Staking===
====Validator Stats====
====Validator Stats====
Line 105: Line 144:


''"[[Stargate Finance (STG)|Stargate]], the first [[bridge]] to solve the Bridging Trilemma, launches on top of LayerZero (and all 7 chains) in two days. Learn about how to participate in [[liquidity]] generation event that starts in two days [https://medium.com/stargate-official/stargate-a-farewell-to-bridges-28831d0f9439 here]."''
''"[[Stargate Finance (STG)|Stargate]], the first [[bridge]] to solve the Bridging Trilemma, launches on top of LayerZero (and all 7 chains) in two days. Learn about how to participate in [[liquidity]] generation event that starts in two days [https://medium.com/stargate-official/stargate-a-farewell-to-bridges-28831d0f9439 here]."''
==Revenue==
[https://messari.io/report/state-of-layerzero-q1-2024 While fees went down] from $1.8 to 0.48c, revenue went from $2.3M in Q1 2023 towards $11.5M in Q1 2024.


==Roadmap==
==Roadmap==
Line 142: Line 184:
===Cons===
===Cons===


* LayerZero Labs had [https://docs.google.com/spreadsheets/d/1xoYqw-5EjQIiunX75UzozzMPOspm0KwFzgA-SKBcvyo/edit#gid=0 investment] of ~$70M from bankrupt [[FTX (FTT)|Alameda Research]] and also from [[Sequoia Capital|Sequoia]]. This could mean fall-out risk since this equity will likely be sold due to bankruptcy.
* Made [[Goerli]] ETH tradable, could be seen as a cash grab.
*LayerZero Labs had [https://docs.google.com/spreadsheets/d/1xoYqw-5EjQIiunX75UzozzMPOspm0KwFzgA-SKBcvyo/edit#gid=0 investment] of ~$70M from bankrupt [[FTX (FTT)|Alameda Research]] and also from [[Sequoia Capital|Sequoia]]. This could mean fall-out risk since this equity will likely be sold due to bankruptcy. There is also around [https://www.mollywhite.net/etc/ftx-contagion $11.5M locked] in FTX (10-12-2022).


==Team, Funding and Partners==
==Team, Funding and Partners==
Line 150: Line 193:
*LayerZero is the child of [https://twitter.com/PrimordialAA Primo] and [[Ryan Zarick]] with input from well known ex-[[SushiSwap (SUSHI)|Sushi]] developer (and [[Tokemak (TOKE)|Tokemak]] advisor) 0xMaki.  
*LayerZero is the child of [https://twitter.com/PrimordialAA Primo] and [[Ryan Zarick]] with input from well known ex-[[SushiSwap (SUSHI)|Sushi]] developer (and [[Tokemak (TOKE)|Tokemak]] advisor) 0xMaki.  
*[[0xMaki]]; full time bizdev
*[[0xMaki]]; full time bizdev
*[[Bryan Pellegrino]]; LayerZero Labs CEO ([https://www.theblock.co/post/220486/arbitrums-long-awaited-airdrop-to-go-live-next-week-with-self-executing-dao 16-3-2023])


===Funding===
===Funding===


* LayerZero Labs raised $135 million at a $1 billion valuation in a round co-led by [[Andreessen Horowitz]] ([[A16z crypto|a16z]]), the venture capital arm of crypto exchange giant [[FTX (FTT)|FTX]] and [[Sequoia Capital]], the company announced (31-3-2022). Other backers in the Series A extension round included [[Coinbase (COIN)|Coinbase (COIN) Ventures]], [[Paypal|PayPal]] (PYPL) Ventures, [[Tiger Global]] and [[Uniswap (UNI)|Uniswap]] Labs. LayerZero announced a $6 million Series A round co-led by [[Multicoin Capital]] and [[Binance|Binance Labs]] last September as the company came out of stealth.
* Closed a $120 million [https://techcrunch.com/2023/04/04/blockchain-messaging-protocol-layerzero-raises-120m-hitting-3b-valuation/ Series B round], raising its valuation to $3 billion from $1 billion (4-4-2023).  The Series B round saw 33 investors participating, including a16z crypto, [[Circle|Circle Ventures]], Sequoia Capital, [[OpenSea]], [[Samsung]] Next, Christie’s and BOND.
*LayerZero Labs raised $135 million at a $1 billion valuation in a round co-led by [[Andreessen Horowitz]] ([[A16z crypto|a16z]]), the venture capital arm of crypto exchange giant [[FTX (FTT)|FTX]] and [[Sequoia Capital]], the company announced (31-3-2022). Other backers in the Series A extension round included [[Coinbase (COIN)|Coinbase (COIN) Ventures]], [[Paypal|PayPal]] (PYPL) Ventures, [[Tiger Global]] and [[Uniswap (UNI)|Uniswap]] Labs. LayerZero announced a $6 million Series A round co-led by [[Multicoin Capital]] and [[Binance|Binance Labs]] last September as the company came out of stealth.


===Partners===
===Partners===

Latest revision as of 02:58, 1 July 2024

LayerZero is an interoperability protocol that allows secure communication between over 60 networks. From their docs (2-2022):

"LayerZero is an Omnichain Interoperability Protocol designed for lightweight message passing across chains. LayerZero provides authentic and guaranteed message delivery with configurable trustlessness. The protocol is implemented as a set of gas-efficient, non-upgradable smart contracts."

Basics

"LayerZero bills itself as “an omnichain interoperability protocol” that aims to connect all chains in a seamless way."

History

Audits & Exploits

Bugs/Exploits

"The impact of this is devastating on the effected protocol as all messaging would be halted permanently. This would have caused tens or even hundreds of millions of dollars in damage to the effected protocols."

Governance

Admin Keys

"Once Oracle confirmed hash of the message, the Relayer sends it to a contract called "Proof Library (PL)". This contract will "unpack and decode" the message. The problem is, while doing it the PL may change the message. PL (Proof Library) is a critical piece of software. It is not expected to change messages, however if it is malicious, it can. The crucial question then is - who decides what PL should be used ? You, as DApp developer, can decide. This is good. But if you don't decide anything (ie accept the defaults), L0 team will decide for you. Moreover they can change (upgrade) that PL anytime, even for in-flight messages (ie. ones that have been sent but not delivered yet). TL/DR - even if Oracle / Relayer attest that the message sent was "send to Bob", PL can change the message to "send to Alice". Whoever controls PL controls what the message looks like."

DAO

Treasury

Token

Launch

  • From X (8-12-2023):

"We’ll state now in no uncertain terms that there will be a LayerZero token. Its distribution is something we’re committed to getting right and expect it to happen within the first half of 2024."

Token Allocation

Utility

Other Details

Stablecoin

Coin Distribution

Technology

Implementations

"We’re live on Ethereum, Avalanche, Polygon, BNB Chain, Fantom, Arbitrum and Optimism. In 6–8 weeks consider Solana, Terra, Cosmos Hub and Osmosis slam dunks and LayerZero to be everywhere in 4–6 months." LayerZero announced it would connect with Base at launch (24-2-2023).

  • Programming language used:

Transaction Details

How it works

  • From a commissioned report by Messari (30-4-2024):

"LayerZero has over 45,000 contracts using its omnichain communication protocol and is live on over 60 different networks, including Ethereum, Optimism, Arbitrum, Polygon, zkSync, BNB Chain, and Base. These contracts use LayerZero messaging for various use cases, supporting almost 300 user-facing applications.

Transferring assets between distinct networks (bridging) is one of the most common use cases for LayerZero. Other use cases include gaming, cross-chain governance, and identity solutions. Messages sent are a key indicator of LayerZero's total usage since they are user-initiated and used in all use cases, such as bridging (e.g., Stargate and Merkly), governance (e.g., Angle), gaming (e.g., Sidus Heroes), cross-chain identity (e.g., Clusters ), and fee/rewards distribution (e.g., Pendle).

Using bridges built on LayerZero, assets can be transferred by swapping native assets on source chains for native assets on destination chains (e.g., Stargate) or via LayerZero’s token standards — called Omnichain Fungible Tokens (OFTs) and Omnichain Non-Fungible Tokens (ONFTs). These omnichain tokens are sent by either locking on their native chain when they exist on one chain, or burned when they exist on multiple chains or if sent between non-native chains. Tokens are received by the destination chain issuing new tokens, 1:1 for each token locked or burned."

"Urbański [from L2beat] disagrees with LayerZero’s whitepaper, which indicates that the protocol’s design ensures that the Relayer cannot collude with the Oracle.

“[The paper’s authors] even directly state that in order for their mechanics to work, it’s required that Oracle and Relayer are independent and do not collude,” Urbański told The Defiant. “But it’s up to app developers to choose who is serving as Oracle and Relayer, so they are free to set it up in a way that they are actually dependent and that they do collude.” The report raised eyebrows because LayerZero calls itself a “trustless” protocol in its whitepaper.

Ryan Zarick, co-founder and CTO at LayerZero Labs, told The Defiant. “You can build good and bad things on top of it. “As cross-chain applications become more complex, L2Beat is required to write customized and complicated monitoring tools to properly monitor the security of these applications,” Zarick continued. “It is far easier to mark all LayerZero-enabled applications as insecure and discredit them than spend the time to do the actual work in evaluating each app.”

"A LayerZero transaction/message only requires source gas in a single call. A transaction begins with a User Application (UA) starting a transaction (aka doing something on-chain). This transaction is then broken up into multiple parts (proof and block header) via the Oracle and Relayer in a flow that is facilitated by a LayerZero Endpoint. Once the Oracle and Relayer send their respective information from the source chain and the LayerZero Endpoint validates that the information is correct, the message is translated and executed on the destination chain.

  1. A User Application packages and transmits the data on Chain A to LayerZero’s endpoint on Chain A.
  2. LayerZero’s Endpoints on Chain A send the transaction’s information to LayerZero’s reference Relayer, whereas the block ID of the transaction is sent to the Oracle
  3. The Relayer and the Oracle receive the transaction proof and block header, respectively, from Chain A.
  4. LayerZero’s Endpoint on Chain B obtains the information initiated by the User Application on Chain A using the block header and emits it to the User Application on Chain B."

"LayerZero is a lightweight universal messaging interface that allows developers to seamlessly interact with contracts across dozens of blockchains. LayerZero Endpoints rely on an innovative Relayer and Oracle architecture to trustlessly relay messages between chains. This unique messaging structure and security model is the only solution available today that does not rely on wrapped assets, middle-chains, or vulnerable upgradeable contracts."

  • From Alphapls (28-3-2022):

"LayerZero is not a blockchain, it is a protocol, largely operating off chain with ‘ultralight client end points’ which are smart contracts built on chains it is aiming to connect. Chains will include L2s, as well as L1s; and later non-EVM, as well as EVM. LayerZero Endpoint exists on each (supported) chain, and any chain with a LayerZero Endpoint can conduct cross-chain transactions involving any other chain with a LayerZero Endpoint. In essence, this creates a fully connected network where every node has a direct connection to every other node. With minor boilerplate code, any blockchain is supported.

LayerZero refer to their light onchain clients as ‘LayerZero Endpoints’. They are made up of smart contracts which have three main functions:

  1. communicator
  2. validator
  3. network

For simplification, I’m going to refer to all of the above as ‘endpoint’ and run a simple example.

  1. Cross-chain action committed on chain A (e.g. against a deposited asset in a lending protocol on ETH, borrow USDC from the same lending protocol on Polygon) and sent to the endpoint.
  2. The endpoint sends information to the Relayer and Oracle - both separate entities and both off chain.
  3. The Oracle confirms the block header (the Oracle on testnet was Chainlink).
  4. The Relayer confirms the transaction on chain A (it’s function is similar to an Oracle but looking for a different bit of data).
  5. Presuming everything is in order, the rest of the action stated on chain A is committed on chain B (USDC is received in wallet on Polygon).

If there is any contention between the Relayer or Oracle as to information being passed on, the smart contract is paused and not committed to chain B. To ensure valid delivery, the only requirement is that for any given message sent using the LayerZero protocol, the Oracle and Relayer must be independent of each other. The protocol itself does not require any specific implementation of a Relayer, and in theory the users of LayerZero could even implement their own Relayer service. This design allows users to be sure that the Relayer cannot collude with the Oracle, and this independence is what allows us to implement trustless validated delivery."

Fees

  • From a commissioned report by Messari (30-4-2024):

"LayerZero protocol collects fees at the source chain. These fees are collected in the native token of the source chain and are used in two ways:

  1. To distribute to DVNs and Executors
  2. To pay for gas on the destination chain"

Upgrades

V2 went live on 29-1-2024.

Staking

Validator Stats

Liquidity Mining

Scaling

Interoperability

"As of September 2022, LayerZero supports 11 chains: Ethereum, BNB Chain, Avalanche, Polygon, Arbitrum, Optimism, Fantom, Swimmer, DFK, Harmony, and Moonbeam."

Other Details

Oracle Method

"Chainlink oracles are now fully integrated and live on mainnet!"

Their Other Projects

Stargate

"Stargate, the first bridge to solve the Bridging Trilemma, launches on top of LayerZero (and all 7 chains) in two days. Learn about how to participate in liquidity generation event that starts in two days here."

Revenue

While fees went down from $1.8 to 0.48c, revenue went from $2.3M in Q1 2023 towards $11.5M in Q1 2024.

Roadmap

  • Can be found [Insert link here].

Usage

"LayerZero users have sent over 300K messages across supported chains. Going deeper, BNB users are leading in terms of cross-chain messages sent. LayerZero recently surpassed 1000 connected contracts live on the LayerZero Mainnet."

Projects that use or built on it

"dApps like Stargate have already built cross-chain applications on top of LayerZero. Other examples include Radiant, which is building a multi-chain lending protocol, and SushiSwap, which recently launched a cross-chain AMM. You can find the growing list of LayerZero-based dApps here."

Competition

"CCIP will include all the functions [of] LayerZero, including a programmable token bridge to allow similar dApps to Stargate Finance to be built out.

The additional innovation with CCIP is the creation of ‘Hybrid Smart Contracts’ which will enable both on-chain and off-chain smart contracts to work together, in conjunction with cross-chain execution."

Pros and Cons

Pros

  1. "Simplicity — The goal for LayerZero is to put developers first. User applications building with LayerZero simply need to implement two functions — send and receive. If it can be written in Solidity, Rust, etc., then an application can be built on-chain right now. Furthermore, as there is no middleman in the system, two high-throughput chains can interact without constraint.
  2. Lightweight Clients — running smart contracts on Layer 1 can be extremely expensive. Therefore, LayerZero exports storage and fetching of transaction data to Oracles and Relayers, the two off-chain entities whose relationship ensures valid transactions, allowing the Ultra Light Node endpoints to be small and cost-effective. Furthermore, its lightweight clients’ low operating costs allow for the quick incorporation of new chains.
  3. Potential — LayerZero, as its name suggests, is a ground-level piece of infrastructure that can be utilized by liquidity networks, multi-chain yield aggregators, multi-chain lending protocols, and many other dApps to build out super interesting and uniquely multi-chain crypto use-cases.
  4. LayerZero Scan — Cross-chain transactions are now tied together in a single database via LayerZero Scan, which allows users and developers to easily pull state, status, and timing of transactions."

Cons

  • Made Goerli ETH tradable, could be seen as a cash grab.
  • LayerZero Labs had investment of ~$70M from bankrupt Alameda Research and also from Sequoia. This could mean fall-out risk since this equity will likely be sold due to bankruptcy. There is also around $11.5M locked in FTX (10-12-2022).

Team, Funding and Partners

Team

Funding

Partners

(:

Knowledge empowers all and will help us get closer to the decentralized world we all want to live in!

Making these free wiki pages is fun but takes a lot of effort and time.

If you have enjoyed reading, tips are appreciated :) This will help us to keep expanding this archive of information.

ETH tip address: 0x83460bE5F218b1520B69D702cE60A1DE37dD8E31