LayerZero seeks to solve one of blockchain technology’s most pressing issues: interoperability. The protocol uses a novel approach to make it more straightforward for different blockchain networks to communicate and give users the smoothest experiences in Web3.
Imagine using three different sites to purchase one item online. Amazon wouldn’t be doing so great if it was this case. Instead, they are successful because they make user journeys easy and fast but rely on the underlying infrastructure.
Blockchain protocols could be better at talking to each other. This restricted level of blockchain interoperability creates a silo effect consisting of self-contained networks. In many ways, it’s reminiscent of the early days of the Internet when developers wanted to scale beyond local intranets and join the dots between them to create a World Wide Web.
For blockchain technology to achieve mainstream adoption, there needs to be a way for all blockchain and distributed ledger platforms to be interoperable, work in conjunction smoothly, and provide users with familiar and straightforward experiences.
The LayerZero interoperability platform is the leading generalized cross-chain messaging protocol with support from notable investors in the space, including Binance Labs, Multicoin Capital, a16z, and Sequoia. Other leading players like Uniswap, Coinbase, Gemini, and PayPal also support it.
Watch the latest Fuse meets show with Irene Wu, Head of Integrations and BD at LayerZero. Irene does a fantastic job of breaking down the complex ideas covered by LayerZero and explains further the benefits to builders on Fuse and the broader Web3 ecosystem.
Improve on previous attempts
One of the most common approaches to solving the issue has been to build a bridge between two blockchains, allowing users to transfer tokens and other information from one network to another. However, this approach has its limitations, mainly because it serves specific use cases and does not provide general interoperability.
At the same time, some protocols aim to serve as the connective layer between different blockchains. Two pioneers in that category are Polkadot and Cosmos, which use creative techniques to enable data transfers across blockchains. Both projects have dreams of creating a blockchain for blockchains.
While both methods have distinct advantages and disadvantages, the ideal scenario would combine strengths while eliminating weaknesses. Therefore, according to LayerZero – Utilizing an Ultra Light Node or a ULN is the right approach.
The LayerZero approach
The method employed by LayerZero uses on-chain light nodes. It uses decentralized oracles to stream block headers on demand, so it doesn’t need to keep all block headers sequentially. LayerZero uses this method to transfer messages between on-chain endpoints. The exchange is facilitated by two entities – an Oracle and a Relayer.
When sending a message from one chain to another, the origin chain’s endpoint notifies the specified Oracle and Relayer of the message and its target chain. The Oracle then forwards the relevant block header to the target chain’s endpoint, and the Relayer submits a transaction proof. Once that proof is validated on the target chain, the message can be sent to its designated address.
Among the advantages of this approach is the heightened security afforded by using an Oracle-Relayer pair. It enables the use of an established Oracle infrastructure, and the Relayer provides another level of protection. The Oracle and its corresponding Relayer must be compromised for a problem to occur.
With this, LayerZero joins that competitive environment, aiming to take things much further and create a proper omnichannel solution to serve as a base interoperability layer for the entire blockchain ecosystem. More importantly, this is not a theory. LayerZero technology is leveraged daily by dApp builders and projects in the Web3 space.
Reasons to use LayerZero
While the tech is impressive, it’s always more helpful to understand how it works in the real world. The LayerZero team lists several use cases for the product:
- Cross-Chain Decentralized Exchanges
- Multi-Chain Lending
- Multi-Chain Yield Aggregators
- Omnichain Fungible Tokens (OFT)
- Omnichain Non-Fungible Tokens (ONFT)
For example, say I have some ETH on AVAX, and the current best yield I can find on AVAX is 5%. On Polygon, there’s a base rate of 7%. I have two options: either take the reduced rate to avoid bridging funds or deal with the hassle of untying funds to move to earn optimized yield. Both require multiple steps and fees.
In DeFi, the benefits of LayerZero are straightforward for users, while the advantages for categories like gaming and NFTs are becoming more apparent. LayerZero imagines a world where it doesn’t matter what chain assets are ‘born’ – they can move seamlessly between all networks.
A more recent innovation from the LayerZero team is Omnichain Non-Fungible Tokens (ONFTs), which effectively let NFTs move freely across networks but always retain their ‘birth’ chain metadata.
Using LayerZero protocols can expand the opportunities available to users significantly. Moreover, a streamlined and less confusing user journey, hopefully reducing drop-off at critical moments and helping users complete actions quickly. Ultimately, this means Web3 developers can cherry-pick the best components from individual networks to build the best dApps.
Get started with LayerZero
LayerZero has now deployed its cross-chain messaging protocol to the Fuse Network blockchain. The Fuse Network mainnet endpoint addresses and the endpoints for other supported blockchains are available here.
Projects and developers on Fuse can now use the LayerZero protocol to enrich their applications with cross-chain functionalities built on top of it. But first, learn to integrate LayerZero into contracts and look at the deployed contracts for Mainnet and Testnet usage.
If you want examples, head to the official LayerZero GitHub.