LayerZero Worker Services
LayerZero's separation of verification and execution into independent worker services enables configurable security models and permissionless message delivery. Worker services are off-chain infrastructure that Message Libraries coordinate to verify and deliver cross-chain messages while following on-chain rules.
Two Types of Workers
DVNs (Decentralized Verifier Networks)
DVNs are LayerZero's implementation of the "verifier networks" discussed in previous modules. Each DVN is an independent verification service that implements one of the verification approaches from Module 1 (ZK proofs, committee consensus, light clients, etc.).
Executors
Executors are permissionless services that deliver verified messages to destination chains. They compete to provide fast, reliable message delivery while following execution parameters set by Message Libraries.
DVN Architecture & Implementation
DVNs prove message authenticity according to Message Library rules and fit into the X-of-Y-of-N configuration model:
DVN Implementation Examples
DVN 1 (ZK Proofs): Uses zero-knowledge cryptography for mathematical verification DVN 2 (Committee A): Uses multi-signature consensus from validator set A DVN 3 (Committee B): Uses multi-signature consensus from validator set B DVN 4 (Middlechain): Uses shared security from intermediate consensus layer DVN 5 (Native Bridge): Uses existing chain-to-chain sequencer bridge infrastructure for verification DVN 6 (Custom): Uses specialized verification logic for specific use cases
X-of-Y-of-N in Practice: The configuration shows a 2-of-4-of-6 setup where DVN1 and DVN2 are required, and any 2 of the 4 optional DVNs (DVN3, DVN4, DVN5, DVN6) must also verify.
DVN Configuration
// Configure DVNs per pathway (matching our 2-of-4-of-6 example above)
SetConfigParam[] memory params = new SetConfigParam[](1);
params[0] = SetConfigParam({
eid: remoteEid, // The remote chain
configType: 2, // 2 = ULN config
config: abi.encode(
UlnConfig({
confirmations: 15,
requiredDVNCount: 2, // DVN1 (ZK) + DVN2 (Committee A)
optionalDVNCount: 4, // DVN3, DVN4, DVN5, DVN6 available
optionalDVNThreshold: 2, // Need 2 of the 4 optional DVNs
requiredDVNs: sortedAddresses([zkProofsDVN, committeeADVN]), // Must be sorted!
optionalDVNs: sortedAddresses([committeeBDVN, middlechainDVN, nativeBridgeDVN, customDVN])
})
)
});
endpoint.setConfig(address(this), receiveLib, params);
DVN Providers
DVNs are independent verification services. Common providers include LayerZero Labs, Google Cloud, Polyhedra (ZK), and others. Each has different trust models, latency, and cost characteristics.
See the DVN Providers page for current addresses and availability per chain.
Executor Architecture & Implementation
Execution is permissionless - anyone can deliver verified messages:
// Executors are optional and permissionless
// You can opt-out of automated execution and manually call:
// - lzReceive() directly
// - lzCompose() for composed messages
// - Use LayerZero Scan UI for manual execution
Execution Model
Permissionless: Anyone can be an executor Optional: You can opt out and execute manually Competitive: Multiple executors reduce costs Manual Fallback: Always available via LayerZero Scan or direct calls
Note: Execution is separate from verification. DVNs verify, Executors deliver.
Execution Options Configuration
import {OptionsBuilder} from "@layerzerolabs/oapp-evm/contracts/oapp/libs/OptionsBuilder.sol";
// Options configure EXECUTION, not verification
bytes memory options = OptionsBuilder.newOptions()
.addExecutorLzReceiveOption(
200_000, // Gas for lzReceive execution
0 // Native token amount for receiver
)
.addExecutorNativeDropOption(
1_000_000_000_000_000, // 0.001 ether (uint128)
bytes32(uint256(uint160(receiver))) // Receiver as bytes32
)
.addExecutorOrderedExecutionOption(); // For strict ordering
// DVNs are NOT configured via options - they're set via pathway config
_lzSend(dstEid, payload, options, fee, refundAddress);
Worker Service Coordination
Message Libraries coordinate both DVNs and Executors to ensure secure and reliable message delivery:
- Message Libraries define the rules for verification and execution
- DVNs verify messages according to their specialized verification methods
- Executors deliver messages once verification requirements are met
- On-chain enforcement ensures all rules are followed before message execution
This separation enables:
- Independent scaling: DVNs and Executors can scale independently
- Competitive markets: Multiple providers can compete on cost and performance
- Flexible security: Applications can choose verification approaches per pathway
- Reliable delivery: Multiple execution options with manual fallbacks
See Also
- Module 3: LayerZero as Master Interface - Message Libraries and pathway configuration
- Module 5: Application Design Patterns - Using worker services in applications
- Deployments - Current DVN and Executor addresses