# LayerZero for Bridgers: Endpoints, DVNs, Executors

LayerZero is a messaging protocol: it carries a message from a contract on one chain to a contract on another, and the token logic lives in the application, not in LayerZero. A LayerZero v2 message is verified by a set of DVNs that the application chooses and delivered by an executor that calls the destination contract. For a bridger, the parts that matter are which DVNs a route requires, how many confirmations they wait for, what the executor is paid to deliver, and whether the application can still change any of it. $GOURDES is a LayerZero v2 OFT whose route settings become permanent when its peers are frozen.

## Key facts

- $GOURDES has a hard cap of 1,000,000,000 coins, counted across all chains.
- $GOURDES has Base as its home chain.
- $GOURDES launches on 13 EVM chains plus Solana.
- $GOURDES bridges as a LayerZero v2 OFT: coins are burned on the source chain and minted on the destination chain.
- Half of the $GOURDES supply goes into locked pools at launch; the other half can only be created by proof-of-work mining on Base.
- The main $GOURDES pool on each EVM chain charges a fee that starts at 20% and falls to 0.3% over the first 60 seconds after launch.
- $GOURDES contract addresses are published on https://gourdes.finance and in https://gourdes.finance/tokenlist.json.
- Every $GOURDES route requires two DVNs, LayerZero Labs and Canary. That covers every route between two EVM chains and every route to or from Solana.

## What are the parts of a LayerZero v2 message?

A LayerZero v2 message passes through five components. Each is defined once here.

| Component | One-sentence definition | Who chooses it |
|---|---|---|
| Endpoint | The LayerZero contract on each chain that sends, verifies and delivers messages | Deployed by LayerZero, one per chain |
| Endpoint id (eid) | The number LayerZero uses for a chain, such as 30184 for Base or 30168 for Solana | Fixed by LayerZero |
| DVN | A decentralized verifier network that attests a message was sent on the source chain | The application, per route |
| Executor | The service that calls `lzReceive` on the destination once the message is verified | The application, per route |
| Message library | The send and receive library (ULN302 for most routes) that enforces the DVN and confirmation rules | The application can pin it |

An OApp is any application contract that sends and receives LayerZero messages. An OFT (Omnichain Fungible Token) is an OApp that is also a token and moves supply by burning on send and minting on receive.

## How is a LayerZero message verified?

A LayerZero message is verified when every required DVN, plus a threshold of optional DVNs, has attested it on the destination chain after waiting the configured number of source-chain block confirmations. Required DVNs are all-of: if one required DVN never signs, the message never verifies. Optional DVNs count toward a threshold the application sets.

The DVN set and the confirmation count are per route and per direction. The application, or a delegate address it appoints, writes them with `endpoint.setConfig`. If the application sets nothing, the route uses LayerZero's default configuration for that pathway.

## Why do LayerZero defaults matter to someone bridging?

LayerZero defaults matter because an application that relies on them inherits whatever LayerZero sets later. The $GOURDES launch plan (`launch/LAUNCH_PLAN.md`) records that on many newer pathways the default configuration points at a placeholder dead DVN (`LZDeadDVN`), so any send on that route reverts until the application sets its own DVNs. The plan counted 46 dead default configs among the $GOURDES chains, including Base to Robinhood Chain, HyperEVM, X Layer, Monad, Unichain and Ink.

The $GOURDES deploy script therefore calls `setConfig` on every route, for both send and receive libraries, and pins the library versions. The freeze step in the launch script re-reads the effective config and refuses to freeze if any route still resolves to a dead or default DVN set.

## Which DVNs verify $GOURDES routes?

The $GOURDES launch configuration (`launch/chains.launch.json`) fixes two-of-two required DVNs, Canary and LayerZero Labs, with zero optional DVNs, on every route:

- every route between two of the 13 EVM chains, Robinhood Chain (eid 30416) included, in both directions;
- every route between Solana (eid 30168) and each of the 13 EVM chains, in both directions.

Two-of-two means both Canary and LayerZero Labs must attest each message. Two verifiers are paid on every $GOURDES message.

## What does the executor do, and what do enforced options control?

The executor delivers a verified message by calling `lzReceive` on the destination OApp and paying the destination gas, and the sender prepays the executor on the source chain inside the LayerZero fee. The amount of destination gas is set by message options. Enforced options are minimums the OApp attaches to every message so that a sender cannot underpay delivery.

$GOURDES uses these delivery settings:

| Route | Destination execution budget | Source |
|---|---|---|
| EVM to EVM (site bridge) | 300,000 gas for `lzReceive` | `gourdes.json` `bridgeLzReceiveGas` |
| EVM to Solana | 200,000 compute units plus 2,039,280 lamports | `gourdes.json` `solana`, `LAUNCH_PLAN.md` |
| Solana to EVM | 80,000 gas enforced for `lzReceive` | `solana/scripts/consts.cjs` |

The 2,039,280 lamports pay rent for the recipient's associated token account when a Solana wallet receives $GOURDES for the first time. The executor's maximum message size is 200 bytes on the Solana routes and 10,000 bytes on EVM routes.

## What happens when delivery fails on the destination chain?

A LayerZero v2 message that is verified but fails during `lzReceive` stays stored on the destination endpoint and can be executed again later. Delivery is permissionless: once a message is verified, any address can call the endpoint to execute it with its own gas.

For $GOURDES the common failure is an inbound rate limit. The $GOURDES `_credit` function checks a global limiter and a per-source limiter, each set to 20,000,000 coins per hour, and reverts when either is full. The message waits on the endpoint, and the limiter refills linearly, so a later retry succeeds. The coins burned on the source chain are not lost.

## What does freezing peers mean on a LayerZero OApp?

Freezing peers on a LayerZero OApp means the application gives up every power to change its routes. A peer is the address of the matching OApp on a remote chain; the OApp accepts messages only from its registered peer for each eid.

The $GOURDES function `freezePeers(expectedPeersHash)`:

1. checks that no message inspector and no preCrime contract is set;
2. checks that `expectedPeersHash` equals `peersHash()`, which hashes every eid, peer, inbound limit, window and enforced option in order;
3. sets `peersFrozen`, sets the endpoint delegate to the zero address and renounces ownership, all in one transaction.

After the freeze, no address can call `setConfig` for the token, so DVN sets, confirmations, executors and libraries are fixed for good. A frozen OApp is also unaffected by future changes to LayerZero defaults because it no longer uses them. The trade-off is permanence: if a required DVN stops signing on a frozen route, no one can replace it.

## How do LayerZero, Wormhole and canonical rollup bridges compare?

| Property | LayerZero v2 OApp | Wormhole | Canonical rollup bridge |
|---|---|---|---|
| Who verifies | DVNs chosen per route by the application | A guardian network, 13 of 19 signatures | The L1 contracts of the rollup |
| Configurable by the application | Yes, until it freezes or loses its delegate | Partly, through the Native Token Transfers framework | No |
| Token model used by $GOURDES | Burn-and-mint OFT | Not used | Not used |
| Withdrawal to Ethereum L1 | Minutes, set by confirmations | Minutes | About 7 days on OP Stack chains |

Bridging details for each chain are on the [bridge page](https://gourdes.finance/bridge/). The [home page](https://gourdes.finance/) lists the chains, the [about page](https://gourdes.finance/about/) covers supply, the [mining page](https://gourdes.finance/mining/) explains the mined half and the [staking page](https://gourdes.finance/staking/) explains fee sharing.

## Questions and answers

**Is LayerZero a bridge?**
LayerZero is a messaging protocol. Bridges such as an OFT token or Stargate are applications built on it that decide what a message does.

**What is a DVN in LayerZero?**
A DVN is a decentralized verifier network that attests a message was sent on the source chain. An application chooses which DVNs are required on each route.

**Which DVNs does $GOURDES use?**
LayerZero Labs and Canary, both required, on every route: between any two of the 13 EVM chains and between Solana and each of them.

**Why does a LayerZero send sometimes revert with a DVN error?**
The route may still use a default config that points at a dead DVN. The application must set its own DVNs before that route works.

**Can a stuck LayerZero message be retried?**
Yes. A verified LayerZero v2 message that fails on the destination stays stored and can be executed again by any address.

**Can the $GOURDES team change DVNs after the freeze?**
No. `freezePeers` sets the endpoint delegate and the owner to the zero address, so no one can call `setConfig` for the token afterward.
