layerzero.network (opens in a new tab)- Client
- LayerZero
- Services
- Infrastructure Development
- Web3 Development
- Smart Contract Development
- Industry
- Web3
- Stage
- Series B
Building an executor for LayerZero’s onchain messaging protocol
We built an open-source executor to listen to LayerZero’s onchain actions.
Our impact
Built an alternative executor node implementation targeting LayerZero’s V2 protocol
Made it open-source so that app developers can reference it to build their own executor
LayerZero linked to our executor in their V2 documentation on release
LayerZero is an open-source web3 messaging protocol for creating omnichain applications (OApps).
Overview
In helping developers move data across blockchains, LayerZero’s smart contracts support censorship-resistant messages and permissionless development across web3. It has enabled 130M+ total messages, supporting 70+ blockchains and 200+ applications.
The Vision
We wanted to create a third-party executor that would verify onchain actions on LayerZero’s protocol and help other developer do the same. LayerZero provided us with the smart contracts for their V2 protocol before it was released so we could build and open-source the alternative implementation of their executor node.
Why Lazer?
Our senior engineers have experience with Solidity, the programming language LayerZero uses for smart contracts, and a deep understanding of programming infrastructure nodes. We also build and ship fast, meaning we could get this out in time for LayerZero’s V2 release.

approach
Why build an executor?
Executors make sure that messages are executed on the destination chains. They create a smooth, automatic user experience in OApps by seamlessly confirming message transactions. Our end goal was that developers could review our code and build their own third-party executor, as an alternative to using an existing implementation for LayerZero.

approach
Testing and contract setup
We built our local testnet environment, using Hardhat scripts to deploy the LayerZero V2 contracts.
Hardhat allows us to test Solidity code and iterate fast. Thanks to our familiarity with Solidity, we dove into the contracts to isolate the relevant components that we needed to write and test our implementation.

approach
Building our implementation
We wrote a Typescript application for our executor node implementation, running integration tests during development by testing against local networks. We also wrote a test suite that verifies that the executor will call the correct method on the destination chain.

Conclusion
Strengthening the LayerZero ecosystem
LayerZero’s V2 supports permissionless execution by separating execution from verification. It allows developers to build and integrate third-party executors, and they included our open-source code as an example implementation in their documentation.
Building our own executor helps strengthen the LayerZero ecosystem by supporting the diversification of executor node implementations used in OApps.

