Cross-chain platform LayerZero announced the launch of its V2 version on January 31st, bringing permissionless, censorship-resistant, and immutable interoperability to over 20 chains. What is the core protocol design of LayerZero V2? What are its highlights? This article is compiled, organized, and written by Foresight News, based on the official articles “LayerZero V2 is Live” and “What is LayerZero V2?”
Table of Contents:
1. Core Protocol Design of LayerZero V2
2. Highlights of LayerZero V2
3. Changes in the Core Protocol Architecture of LayerZero V2
Today, LayerZero announced the launch of V2, bringing permissionless, censorship-resistant, and immutable interoperability to over 20 chains.
Core Protocol Design of LayerZero V2:
According to the LayerZero V2 whitepaper, there are four components in V2, including an immutable endpoint that enables censorship resistance, a message registry of on-chain verification modules (MessageLib), a decentralized verification network (DVN) for cross-chain data verification, and permissionless executors (independent from the context execution logic of cross-chain message verification).
From a process perspective, LayerZero is divided into an execution layer and a verification layer. The verification layer securely transmits data between chains, while the execution layer interprets this data to form a secure and censorship-resistant messaging channel. The isolation of executors from any verification-related code minimizes the possibility of introducing attack vectors into critical security code.
LayerZero implements a permissionless and configurable verification model, allowing anyone to operate their own DVN and integrate it with LayerZero without permission. The permissionless nature of executors also ensures that channel liveness can be restored in case of executor failure, decoupling the protocol’s liveness from any single organization or entity.
Highlights of LayerZero V2:
As mentioned above, LayerZero V2 separates message verification (handled by the security stack) and execution into two different stages, giving developers more control over their application’s security and independent execution. According to LayerZero’s description, the highlights of V2 include:
1. Universal message passing: The ability to send and write messages of any type between chains, including arbitrary data, external function calls, and/or tokens.
2. Modular security: Developers can choose from a preferred combination of over 20 decentralized verification networks (DVNs) when selecting a security stack for verifying cross-chain messages.
3. Permissionless execution: Anyone can execute executors in V2.
4. Unified semantics: OApp and OFT contracts allow developers to build applications and tokens on each blockchain with endpoints in a consistent manner.
5. V1 compatibility: V1 applications have migration options. If deployed on V1, applications can utilize new security and execution models through ULN 301.
Changes in the Core Protocol Architecture of LayerZero V2:
According to the LayerZero V2 documentation, as message verification (handled by the security stack) and execution are separated in V2, message nonces can now be executed out of order while still maintaining censorship resistance. By default, even if a previous message execution fails, subsequent message flows will continue to be delivered and executed. This unordered message delivery achieves the highest possible message throughput by using improved on-chain nonce tracking.
LayerZero V2 also significantly improves programmability in various ways, such as:
1. Simplifying the protocol contract interface, reducing the complexity of sending and receiving messages through the protocol.
2. Path-specific libraries in Endpoint V2 allow developers to configure different MessageLibs for specific paths, providing greater flexibility and customization for applications.
3. Horizontal composability.
In terms of interaction gas efficiency, which is of concern to developers and ordinary users, LayerZero states that V2 contract standards have been restructured to reduce the inherent gas costs of underlying contracts. Additionally, V2 optimizes the compiler to lower gas costs for deployment and execution.
In terms of chain compatibility, LayerZero V2 improves chain compatibility through a chain-agnostic design, improved gas payment options, and default values in specific libraries, helping OApp (chain-agnostic applications) developers design a unified single application architecture that can span both EVM and non-EVM chains.
Related Reports
LayerZero’s airdrop confirmed? What does the “SSL certificate” controversy reveal?
LayerZero faces criticism from nine major competitors, revealing the inside story of the cross-chain bridge battle.
Uniswap Cross-Chain Bridge Report: LayerZero under observation, Wormhole as an exemplary student.