Interpretation of layerzero: how to achieve full chain interoperability

Eth Chinese station 2022-04-03 14:49:06 阅读数:501

interpretation layerzero achieve chain interoperability

The original title :LayerZero - An Omnichain Interoperability Protocol

The original author :Ryan Zarick, LayerZero Official

compile :ETH Chinese station

For cross chain bridging and communication , Basically, every existing scheme is one of these two categories : The first is to verify and forward messages between different chains by an intermediate chain that forms a consensus ; The second is to run a light node on the chain . Let's talk about it .

Intermediate chain (Middle Chain)

Intermediate link receipt 、 Verify and forward messages between chains . In this mode , The intermediate chain has full signature right to all messages , This design will make it a single point of failure . When consensus is broken , All liquidity on the chain will be stolen immediately . Now the intermediate chain is only bound with hundreds of millions of dollars of assets , And the need to secure tens of billions of dollars of assets . As these chains become more and more decentralized , When this huge honeypot is used , The problem is serious .

Light nodes on the chain (On-Chain Light Node)


The light node on the chain receives and verifies the block header of the opposite chain . The transaction proof containing the message is forwarded and verified against the block header on the chain . This is the safest way to send messages between chains . Unfortunately , This is also the most expensive . Run a light node on the chain on Ethereum , Each chain of opposites costs thousands of dollars a day .

Ultra light node (Ultra Light Node)

Light nodes on the chain are extremely safe , But it's also extremely expensive . Intermediate chain is not expensive , But it's not that safe .


Next, we will introduce the ultralight node (Ultra Light Node, ULN), It has the security of light nodes and low cost of intermediate chain . Ultralight nodes are implemented by performing the same verification as light nodes on the chain ; But not all block headers in order , Instead, the decentralized Oracle distributes blocks on demand .


LayerZero Is a user application User Application (UA) End point on chain of structure , This endpoint runs an ultralight node (ULN).LayerZero Rely on two parties to transmit messages between endpoints on the chain : Predicting machine (Oracle) And repeaters (Relayer). When one UA from A Chain direction B When the chain sends a message , The message will pass through A Endpoint transmission on the chain . Then the endpoint will notify UA designated Oracle and Relayer The message and its target chain .Oracle The block header will be forwarded to B End of chain , then Relayer Submit proof of transaction . The proof is verified on the target chain , The message is forwarded to the destination address .


Security attribute

In splitting Oracle and Relayer Responsibility between ,LayerZero Using the established Oracle (Chainlink and Band) Safety features of , A layer of security is added through the open relay system . Although at first glance, it seems only a small difference , But its impact is quite profound . First , This means that in the worst case, the security of this new network is only as safe as a Oracle . If you use Chainlink As your prophet , Then arbitrary evil acts in the system can still be defeated first Chainlink DON Precondition ( It's not easy ). Even if Oracle Our consensus has been undermined , Also needed Relayer Active collusion . such as , In the most extreme cases ,Oracle A Our consensus has been undermined ,Relayer A Also colluded , All these risks are only received by those from Oracle A and Relayer A The user application of the message bears . All use Relayer B-Z User applications ( Run their own Relayer), Or all use Oracle B-Z Our user applications are still completely unaffected . In terms of risk model , This is a huge change compared with the intermediate chain system described earlier .


Use cases

In terms of current ecology , Cross chain messaging is synonymous with bridging . But use LayerZero There is much more to be done than bridging assets .LayerZero Cross chain state sharing can be realized 、 The bridge 、 To loan 、swap、 Governance and more .

State sharing

SushiSwap Exist in 12 On a different chain , Each instance runs in an isolated ecosystem . If they want to be with SushiSwap Synchronization status of the main instances in Ethereum , They have to write and use Wormhole、Rainbow The bridge 、Polygon Network Bridge and Avalanche Bridging code . The end result will be 11 Set of codes , There is a 11 Two independent interfaces and 11 There are different security attributes . Due to bridging and L1/L2 Our ecosystem is constantly changing , This will make the system more and more difficult to manage .


Use LayerZero Words ,SushiSwap There will only need to be a single interface and code base for all cross chain pairs . They just need to perform 「 send out 」 and 「 receive 」 function .「 send out 」 Including forming a message for the target chain , and 「 receive 」 Just explain the message .

Bridging of unified liquidity

Now bridges are competing to attract liquidity providers (Liquidity Providers, LPs), Spread liquidity between bridges and their separate paired pools .LP You must select a single fund pool connected to a chain , Instead of having a pool of funds that provides liquidity for all connected chains .LayerZero This solves the bridging problem : Ensure the source of certainty through the chain , Unify mobility across all chains . It means , When the user from A Chain transfer assets to B When the chain , Users will be guaranteed that the assets are in B On the chain , then LP Enter all from B Handling charges in chain transactions , Regardless of what the source chain is .



It's possible to do something about the existing AMM Encapsulate to perform cross chain swap ( You can convert one asset into another without modifying any existing code ). Users only need to make a transaction in the source chain , You can take the ETH Turn into Solana Upper SOL.

To loan

Now? , If a user is A There are assets in the chain , But I want to B Mobile mining on the chain , that ta Must be in A Chain mortgage lending -> Bridging assets ( Generate handling charges ) -> swap ( Generate handling charges ) -> Carry out liquidity mining on the target chain -> swap Return to the original assets ( Generate handling charges ) -> Bridge back to the original chain ( Generate handling charges ) -> Repay the loan -> Put forward mortgaged assets . Use LayerZero, You can A Collateral assets on the chain , Then borrow directly from the target chain 、 Mining for mobility 、 Repay the loan 、 then A The mortgage assets of the chain are unlocked . Bridging and... Are omitted swap Four handling charges for .


版权声明:本文为[Eth Chinese station]所创,转载请带上原文链接,感谢。