LayerZero's ecological project and multi-chain ambition

22-09-22 09:30
Read this article in 29 Minutes
总结 AI summary
View the summary 收起
Original title: "LayerZero's multi-chain ambition"
Original author: Tiga, W3.Hitchhiker; Revision: Evelyn, W3.Hitchhiker


Brief Analysis of LayerZero Technology


LayerZero is a cross-chain communication protocol, which can connect " Information" is passed to another chain. Layerzero closed a $2M seed round in April '21, followed by $6.3M in September '21 and $135M in March '22. Participating institutions include Binance Labs, Multicoin, Delphi, A16Z, Uniswap, Polygon, Coinbase and many other institutions. The investment lineup can be said to be top-notch.


LayerZero deploys a series of smart contracts on the chain ( Endpoint) realizes decentralized information cross-chain services. The ultra-light node is running on Endpoint, and the "ultra-light" two fonts now only provide the Block header of the specified block. During the transmission process, Oracle and Relayer 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 functional responsibilities of the Relayer and the Oracle are the same, they both play the function of the oracle, but the content of the transmission is different, the two operate independently of each other, and then the Endpoint of the receiving chain verifies and matches the information sent by the Relayer and the Oracle, Improve the security redundancy of LayerZero.



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


Communicator : Dapp-oriented interface,


Validator: The receiver is responsible for verifying the information,


Network: It is an interface for receiving or sending information to the Network of other chains.


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 4 parameters, which will be sent to the Communicator through LayerZero. The four parameters are:


t: the only transaction proof of transaction T

dst : the identifier of the target chain Endpoint

payload: the data that the Dapp of chain A wants to send to chain B

relayer_args: the relayer parameter that A wants to use

< br>

Step 2: Communicator packs these parameters into Packet(dst,payload), and sends it to Validator together with t and relayer_args.


Step 3: Validator passes t and dst to Network.


Step 4: Validator sends Packet(dst,payload), t and relayer_args to Relayer together. Step 4 and Step 3 happen at the same time


Step 5: Network sends dstdstdst and the ID containing the current transaction block ( cur_blk_id) to Oracle.


Step 6: Oracle gets block header from chain A


< p>

Step 7: Relayer obtains the transaction proof t of transaction T from the A chain and stores it off the chain.


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


Step 9: The Network of the B chain will receive the block hash (marked as blk_hdr_hash) and send it to the Validator of the B chain


Step 10: Validator sends blk_hdr_hash to Relayer


Step 11: After the Relayer receives the blk_hdr_hash sent by the B-chain, it returns the data matching the blk_hdr_hash to the Validator of the B-chain.


Step 12: The Validator of the B chain matches the blk_hdr obtained from the Oracle with the transaction proof t obtained from the Relayer, If the match is passed, Packet(dst,payload) will be sent to Communicator. If the matching fails, ignore this transaction directly.


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


Simply speaking, the Dapp of the A chain tells LayerZero to deploy on the A Endpoint of the chain: "I want to send a XXX message to the B chain". The process of sending a message can also be regarded as a transaction. When the transaction is on the A chain, the Oracle will go directly to the A chain to check whether it is really uploaded. After the chain is completed, the Relayer will also go to the A chain to obtain the proof of the transaction. Oracle and Relayer will send the content they obtained to the Endpoint of the B chain. If the two contents match, the message of the A chain will be sent to the B chain. Conversely, if the content obtained by Oracle and Relayer does not match, the transaction will be ignored directly.


In terms of security, LayerZero will be safe The security defense is dispersed to 4 points, which are Endpoint, Oracle, Relayer, and the chain itself. They are mutually coupled, and this decentralized structure can make LayerZero more secure.


When a part of it is attacked maliciously, other parts will block the process of LayerZero and isolate the maliciously supplied part. Among the four parts, the weakest The link is Oracle and Relayer, because the difficulty and cost of 51% attacks on mainstream chains are very high, and 51% attacks are not something that LayerZero considers and defends. Endpoint is essentially a smart contract, and security risks can be minimized through security audits. If Oracle and Relayer are not attacked at the same time, LayerZero can guarantee its security.


In the worst case, that is, when Oracle and Relayer are hijacked at the same time and collude with each other, Oracle provides a malicious block header, and Relayer provides a malicious transaction proof, and the content provided by the two matches. First of all, the probability of this situation is very small, because Oracle and Relayer are independent components, and the oracle service used by LayerZero is provided by Chainlink, so the security is still very guaranteed. Second, it is impossible to verify transaction proofs against a block header without knowing the specific block header. Conversely, the block header cannot be reversed based on a transaction proof. This is the basis for ensuring the security of Oracle and Relayer, and it is also the guarantee for the security of LayerZero.


LayerZero Ecosystem Overview


Stargate


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


Stargate's cross-chain method is different from other cross-chain bridges, and uses an OTC-like method to cross-chain. Liquidity pools are established in each chain, users "pledge" assets in the liquidity pool of chain A, and "redeem" assets in the liquidity pool of chain B, without the participation of intermediate assets, information exchange between chains A and B It is achieved through LayerZero.


As the "son" of LayerZero, Stargate is much more than a cross-chain bridge, as can be seen from Stargate's documentation The goal of Stargate is to serve as a technology provider for cross-chain assets, so that more projects can easily use Stargate to realize cross-chain functions. Therefore, Stargate’s business needs to be divided into two parts: 2B and 2C. The 2B business model is far more imaginative than the 2C model. Based on Stargate, more complex Dapps can be built upwards.


Hashflow


Hashflow It is a cross-chain DEX with zero slippage and MEV protection, which realizes cross-chain messaging by using LayerZero. Hashflow currently supports Ethereum, BSC, AVAX, Polygon, Arbitrum and Optimism chains.


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


< p style="text-align: center;">


RadiantCapital


Radiant is a LayerZero/ Stargate's multi-chain lending project currently only supports five tokens: USDC, USDT, DAI, BTC and ETH. Users can choose to mortgage the above five assets on Arbitrum to lend out other assets. Currently Radiant only supports USDT and USDC cross-chain lending, that is, users can mortgage assets on one chain and lend USDT or USDC on another chain.



SushiXSwap


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



Other Layerzero ecological projects (some are not yet online)


OmniBTC: a three-in-one dex built on DEX+Lend+Bridge of Sui and Aptos

rage_trade: a decentralized contract on Arbitrum

MugenFinance: Layerzero-based RealYield

InterSwap: LayerZero-based Swap

CashmereLabs: Full-chain DEX

holographxyz: Full-chain NFT Mint, Bridge protocol< /p>

OmniX_NFT: full-chain native NFT platform and trading market

Moonbean: LayerZero has been integrated

Clearpool: will be integrated with LayerZero

Angle Protocol : Integrate with LayerZero


The items listed here are incomplete, and the rest are listed items, please readers to explore by themselves.


LayerZero Vision


It is not only Token that needs and can be cross-chained, but also the functions and services of various protocols. With the development of crypto, the current blockchain world already has a bunch of truly innovative projects/protocols worthy of praise. Their mechanisms are mature and their operations are stable, and they can be used as an underlying "part" by other protocols.


These protocols themselves are also programmable, composable, and interactive, and web3 is far more open and inclusive than web2. Smart contracts naturally expose APIs. If the gap between chains can be broken, liquidity and users can freely and conveniently shuttle between various protocols and chains, developers can create more and more As an imaginative "thing", DeFi can also evolve and continuously broaden the boundaries of crypto/web3.


What will the blockchain world look like in the future? What changes will LayerZero make to the blockchain and what impact will it have? I don’t know, but what is certain is that the future development of blockchain must be in the direction of interconnection, which is convenient for users and developers. The inventor of the World Wide Web, Tim Berners-Lee, said of design principles: "Simplicity and modularity are the cornerstones of software engineering; distribution and fault tolerance are the lifeblood of the Internet". Using the mature protocol modules on each chain in series and parallel, the web3 killer app will definitely emerge in the future. Geniuses need a stage as well as a hammer and nails, and LayerZero can serve as the hammer and nails for web3 geniuses.


It is reasonable and conservative to predict that the gas fee of the blockchain in the future will be reduced by several orders of magnitude, and the number of DeFi users will also increase by several orders of magnitude, and the huge market demand will be born For the "ocean freighter" between the outgoing chain and the chain, the cross-chain cost is infinitely close to 0 due to the marginal effect. Cost reduction is a necessary condition for scaling up, just as the price of power batteries has dropped by 10 times in ten years, and electric vehicles have entered millions of households.


202209: LayerZero update V2 version:


- will support non-EVM chain

- Launch of LayerZero Scan

- Reduce gas fee by 20%

- Security patch


Original link


欢迎加入律动 BlockBeats 官方社群:

Telegram 订阅群:https://t.me/theblockbeats

Telegram 交流群:https://t.me/BlockBeats_App

Twitter 官方账号:https://twitter.com/BlockBeatsAsia

举报 Correction/Report
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit