Contents

LayerZero V2 Part 1: What It Is and Why It Exists

/images/part1-architecture-overview.svg

Blockchains are isolated. Ethereum can’t talk to Arbitrum. Base can’t talk to Optimism. Each chain is its own world — its own state, its own rules, its own tokens.

If you have 100 USDC on Ethereum and want to use it on Arbitrum, there’s no built-in way to move it. The two chains don’t know each other exists.

What LayerZero Does

LayerZero is a messaging protocol that lets smart contracts on different chains send messages to each other. Think of it as email between blockchains — Chain A sends a message, LayerZero delivers it, Chain B reads it and acts on it.

Key insight: LayerZero is NOT a bridge. It’s a messaging system. Bridges (like the OFT token standard) are applications built on top of that messaging system.

The Four Players

LayerZero V2 has four components. Each has one job.

1. Endpoint — The Post Office

A smart contract deployed on every supported chain. It’s where messages enter and exit.

  • On the source chain: your app calls Endpoint.send() to send a message
  • On the destination chain: the Endpoint calls your app’s lzReceive() to deliver it

The critical property: Endpoints are immutable. Once deployed, nobody can change them — not LayerZero, not anyone. The core routing layer can never be compromised through an upgrade.

2. DVN — The Security Guard

DVNs (Decentralized Verifier Networks) are off-chain services that verify messages are real. When your app sends a message on Chain A, DVNs independently check that the message actually happened — it’s not fake, not modified, not replayed.

Think of DVNs as notaries. Before a message can be delivered on Chain B, the notaries must sign off that it’s legitimate.

You choose your own notaries. This is V2’s big idea — your app picks which DVNs to trust. You might require both LayerZero Labs DVN AND Google Cloud DVN. Or add Polyhedra’s ZK-proof DVN as a third check.

3. Executor — The Delivery Driver

The Executor delivers verified messages. Once the DVNs say “this message is real,” the Executor calls lzReceive() on the destination chain.

The Executor cannot cheat. It can only deliver messages that DVNs have already verified. It can delay delivery, but it can’t forge, modify, or fake messages. And if one Executor is slow, anyone else can step in — it’s permissionless.

4. MessageLib — The Verification Rulebook

The MessageLib defines HOW messages are verified. The current default is ULN302 (Ultra Light Node 302). It handles encoding messages, collecting fees, and checking DVN verification.

MessageLibs are append-only. New verification methods can be added (like ZK proofs), but existing ones can never be removed or modified.

V1 Had Three Problems

  1. Centralized relayer: One entity (LayerZero Labs) ran the default relayer. If it went down, messages stopped.
  2. Coupled security: The relayer handled BOTH verification AND execution. A bug in execution could compromise verification.
  3. Upgradeable endpoint: The core contract could be changed by governance — a potential attack vector.

V2 Fixed All Three

Problem V1 V2
Who verifies? 1 Oracle (Chainlink) N DVNs (you choose)
Who delivers? 1 Relayer (LayerZero Labs) Any Executor (permissionless)
Can the core be changed? Yes (upgradeable proxy) No (immutable)
Security config Same for everyone Per-app customizable
If delivery fails? Channel blocked Retry anytime
Composed calls fail? Everything reverts Only the failed leg reverts

What’s Next

This is Part 1 of a series on LayerZero V2: