What “Execution” Means
In the LayerZero protocol, execution refers to the invocation of the LayerZero Endpoint methods on the destination chain after a message has been verified:-
lzReceive(...): Delivers a verified message to the destination OApp, triggering its logic. -
lzCompose(...): Delivers a composed message (e.g., nested calls) after the initial receive logic has triggered.
Executors: Execution as a Service
While you could manually calllzReceive(...) or lzCompose(... ) and pay gas on the destination chain directly, Executors automate this process:
- Quote in Source Token: Executors accept payment in the source chain’s native token and calculate the cost to deliver the destination chain’s gas token based on the instructions provided and a pricefeed formula.
-
Automatic Delivery: After verification, the Executor invokes the appropriate endpoint method (
lzReceive(...)orlzCompose(...)) with the specified resources and message. - Native Token Supplier: Executors are responsible for sourcing the native gas token on the destination chain, making them a resource for users needing to convert chain-specific resources.
- Fee for Service: Executors charge a fee for relaying and executing messages.
Permissionless Functions
Because the endpoint methods are open, your application remains decentralized and trust-minimized, as any party can run an Executor or call the endpoint directly.Message Options
Use Message Options to pass execution instructions along with your payload. Available options include:-
lzReceiveOption: Specifygasandmsg.valuewhen callinglzReceive(...). -
lzComposeOption: Specifygasandmsg.valuewhen callinglzCompose(...). -
lzNativeDropOption: Drop a specifiedamountof native tokens to areceiveron the destination. -
lzOrderedExecutionOption: Enforce nonce-ordered execution of messages.
Default vs. Custom Executors
Choose the executor strategy that fits your application:- Default Executor: Use the out-of-the-box implementation maintained by LayerZero Labs.
- Custom Executor: Select from third-party Executors or deploy your own variant.
- Build Your Own: Follow Build Executors to implement a bespoke message Executor.
-
No Executor: Opt out of automated execution entirely; users can manually call
lzReceive(...)orlzCompose(...)via LayerZero Scan or a block explorer.
See Executor Configuration for details on wiring up a non-default Executor in your OApp.
Executor concentration: a single point of failure for liveness
Unlike DVNs (which support multi-operator X-of-Y-of-N configurations), an OApp configures exactly one Executor per pathway. Today, every default Executor across every pathway in every preset network configuration is operated by LayerZero Labs. This is a structural concentration. It is not equivalent to the DVN concentration discussed in Security Stack (DVNs) — a compromised Executor cannot forge messages, because verification is independent. But a degraded or compromised Executor can:- Delay or fail message delivery on every OApp using it as the default.
- Censor specific messages by selectively refusing to call
lzReceive/lzCompose. - Mis-account gas / value delivery, breaking application invariants that depend on
msg.valueorgasleft()at the destination.
- Run your own Executor (option 3 above). Strongest liveness guarantee; highest operational overhead.
- Use a third-party Executor (option 2). Reduces LayerZero Labs concentration without requiring you to operate infrastructure.
- Run without an Executor (option 4). Trade automation for trust-minimization. Combine with a self-operated relayer that calls
lzReceivedirectly.