lzRead: Power Your App with Omnichain Data
Request, transform, and rely on data from any chain, wherever you are.Introducing lzRead, a new data primitive within the LayerZero protocol. Built for smart contract developers, lzRead allows seamless access to onchain data from any supported network with a single function call.
Any Data. On Any Chain. Over any period of time.
Why lzRead?
Traditionally, smart contracts were designed to only access the current state on their own blockchain. But with the proliferation of blockchains, valuable data is now fragmented, creating a need for a unified solution to access data across chains.lzRead gives developers a new way to think about building applications. It unlocks the possibility for smart contracts to efficiently compose with any external data from many chains across any period of time — all in a single function call.Benefits of the lzRead include:
- Comprehensive: Retrieve data across chains using standardized methods that simplify workflows and reduce development complexity.
- Configurable: Applications maintain complete control over security, what chains to utilize, and what entities retrieve, transform, and validate data.
- Simple: Developers can integrate lzRead with just a few lines of code, accessing any supported chain’s data directly.
- Cost-Effective: A pay-as-you-go model ensures fees are only incurred when making data requests, keeping operational costs low and scalable.
What is lzRead?
Using any standard smart contract language, developers can retrieve and compute data from one or multiple chains with a single function call, leveraging the full historical data of each chain.Developers only need to understand a few components before using lzRead. These include: Messaging Channels, Decentralized Verifier Networks (DVNs), and ReadLib.
- Message Channels: A channel is the medium in which a developer will send and receive data. These are parallel messaging streams that developers can configure for different requests. These can be used to optimize requests for number of chains, data redundancy, cost, speed, and security. Channels can be set up as single-source, multi-source, or multi-channel queries, offering flexibility depending on application needs.
- Infrastructure: Just like with the core LayerZero protocol, applications configure a set of DVNs to fetch requested data and transform it (i.e. perform computing tasks) according to the application’s specifications.
- Immutable Contract: An immutable Message Library called ReadLib securely processes data requests from applications and directs them to the designated DVNs. After the DVNs retrieve the requested data, ReadLib validates it, ensuring accuracy and integrity before the data is sent to the application.
How Does lzRead Work?
To start, developers deploy an lzRead-compatible Omnichain Application (OApp), configure DVNs, (set up channels), and begin building Read Requests.A Read Request includes the blockchain(s) to read from, the specific data needed (including time parameters), and any transformations (i.e., compute) the DVNs must apply before the data is sent back to an application.
lzRead Request Lifecycle:
- Request: The Omnichain application (OApp) sends the Read Request to the LayerZero Endpoint. From there, the request is securely passed to ReadLib, where the designated DVNs can access it.
- Fetch: DVNs gather the requested data from the specified chain(s),
- Compute (Optional): If the request includes Compute (Map and/or Reduce functions), the DVNs will transform the data as specified and combine it into a single, unified result.
- Verify: Each DVN returns the data to ReadLib, where it is validated according to the application’s DVN threshold.
- Return: The validated data is returned to the OApp by an Executor.
This flow supports a wide range of configurations, making lzRead adaptable to a number of use cases like synchronizing state, verifying asset ownership, and custom pricing calculations (e.g., TWAP, VWAP, etc.). Several of these use cases are already being designed and tested with our Day 1 Builders.
lzRead in Practice
By making cross-chain and historical data accessible, lzRead opens up a variety of powerful applications for crypto-native development.Here’s how Day 1 Builders are using lzRead:
- Cross-Chain Governance (Agora): Agora uses lzRead to gather votes from token holders across chains, enabling seamless governance for DAOs without needing to bridge assets.
- Asset Verification (ApeChain): ApeChain leverages lzRead to verify BAYC NFT ownership on Ethereum, creating “shadow tokens” that reflect mainnet ownership across chains without requiring users to bridge NFTs.
- Proof of Reserves (Ambient): Ambient integrates lzRead to fetch Total Value Locked (TVL) across multiple chains, enabling a zero-trust model for reserves verification in real-time.
- Cross-Chain Price Feeds (Gelato): Gelato aggregates token prices across chains with lzRead, providing reliable price feeds for liquidity management and automated DeFi operations.
- Election Resolution (Wintermute): Wintermute relies on lzRead to access real-time, cross-chain data from Ethereum, Arbitrum, and Base for election prediction markets, ensuring unbiased, transparent outcomes.
Additional builders like EigenLayer, Stargate, Ethena, and Plume are actively researching and developing unique use cases with lzRead. Others like AltLayer will provide services that make leveraging LayerZero with lzRead even easier for builders, further expanding its impact across DeFi, governance, and beyond.
Product Specs and Performance
- Supported Origin Chains: lzRead can be initiated on all EVM chains supported by LayerZero, with new connections added regularly.
- Supported Data Chains: Current and historical data is available for lzRead developers to access from Ethereum, Base, Polygon, Avalanche, BNB Chain, Optimism, and Arbitrum. Interested in another chain? Reach out here.
- DVNs: Day 1 DVN partners include BCW, Nethermind, LayerZero Labs, Animoca/Blockdaemon, and Nocturnal, with Gelato and AltLayer also developing DVNs. Each data chain has at least two DVNs for security and redundancy.
For detailed documentation and support for lzRead, visit the LayerZero website, check out the docs, or watch the launch video. You can also reach out here.
About LayerZero
LayerZero is an immutable, permissionless, and censorship-resistant interoperability protocol that seamlessly connects the onchain economy. With the addition of lzRead, it now also provides a powerful primitive to access data anywhere.