Topics Blockchain

What Is LayerZero: Revolutionizing Omnichain Interoperability

Intermediate
Blockchain
Jan 8, 2024

When Bitcoin (BTC) and other early blockchains arrived on the scene more than a decade ago, the issue of cross-chain interoperability was rarely a discussion point. This was by design, as these blockchains were more focused on the security of their operational environments and rarely planned to establish links with other decentralized networks. As a result, the blockchain platforms developed as isolated islands with little cross-chain connectivity.

When Ethereum (ETH) and other smart contract chains hit the market from the mid-2010s, the proliferation of blockchain networks and the birth of decentralized apps (DApps) prompted active R&D in cross-chain communication.

The most common solution proposed in this area was crypto bridges that used the concept of wrapped tokens. While these bridges greatly improved communication efficiency between chains, the need for token wrapping, the confusing technology and other issues related to these platforms limited their attractiveness to crypto users and developers.

A breakthrough in this industry niche came about in late 2021 with the arrival of LayerZero, a cross-chain protocol for efficient and lightweight communication between blockchains. As of late 2023, LayerZero is used by nearly 50 blockchain platforms, making it by far the most “well-connected” cross-chain technology. The project’s team has recently announced plans for the launch and airdrop of the protocol’s native token, ZRO, at some point in the first half of 2024. Given LayerZero’s popularity and footprint in the blockchain world, the news immediately catapulted the project into the spotlight.

Key Takeaways:

  • LayerZero is a protocol for cross-chain messaging and interoperability that has been adopted by nearly 50 blockchain platforms, including Ethereum, Avalanche, BNB Chain and Polygon.

  • The protocol allows chain-agnostic, native-level crypto asset transfers, borrowing and swapping. It also offers features such as natively transferable NFTs and cross-chain governance execution.

  • Launched in 2021, LayerZero has operated without a native token, but recently announced plans for the launch and airdrop of one in the first half of 2024.

What Is LayerZero?

LayerZero is a cross-chain interoperability protocol designed for efficient and lightweight message and transaction exchanges between different blockchains. It offers an efficient and secure alternative to the standard blockchain bridges widely used for cross-chain activities by crypto users, developers and DApps.

Developed by LayerZero Labs, a Vancouver, B.C.–based technology startup, the protocol’s operations were launched in September 2021. LayerZero Labs was founded earlier the same year by three University of New Hampshire alumni — Bryan Pellegrino, Caleb Banister and Ryan Zarick. Pellegrino is the startup’s CEO, Banister is Principal Engineer and Zarick is the CTO.

LayerZero is one of the most high-profile startups in the blockchain industry. So far, it's raised over $260 million in funding, with some notable companies among its investors. The project’s impressive investor list includes the likes of Sequoia Capital, OpenSea, Uniswap (UNI) and PayPal, in addition to over 40 other institutional investors. LayerZero is currently valued at $3 billion, one of the highest valuation amounts among blockchain protocols and DApps.

In December 2023, LayerZero announced the protocol’s V2, to be launched in January 2024. LayerZero V2 is a major upgrade that will significantly improve security, programmability and cross-chain message verification procedures.

As of this writing (Jan 4, 2023), LayerZero is used by 48 blockchain platforms and Layer 2 solutions, including the industry’s big players — Ethereum (ETH), BNB Chain (BNB), Avalanche (AVAX) and Polygon (POL).

The first DApp by LayerZero to utilize its cross-chain connectivity is Stargate Finance (STG), a bridging solution that lets users transfer crypto assets across several blockchains without the need for token wrapping. Using Stargate, you can easily transfer and swap tokens across chains with a single transaction.

LayerZero Key Features

LayerZero features a secure, modular and scalable cross-chain communication setup that also delivers a simple user experience.

Trustless Cross-Chain

Many bridging solutions in the crypto world are dependent upon off-chain verifiers that have the final authority to validate transfer data. The problem of reliance upon these so-called trusted bridges has often been cited as a potential vulnerability. In contrast, LayerZero’s architecture involves cooperation between two entities independent of each other — the Oracle and the Relayer — to process cross-chain messages. We’ll take a closer look later on at these two important parties within the LayerZero ecosystem.

The independence of the Oracle and Relayer from each other should, in theory, provide a completely trustless and secure cross-chain communication environment, assuming that they’re both honest actors. Nevertheless, some analysts have raised the security issue of a potential collusion between the Oracle and the Relayer. The LayerZero team hasn’t remained indifferent to this criticism, and the protocol’s V2, to be unveiled next January, completely overhauls the trustless verification setup.

Modular and Scalable

Developers can extend LayerZero’s core functionality on a blockchain using specialized modules, called Libraries, that are part of the protocol’s smart contract set. Libraries allow new functionality to be implemented in a blockchain-specific way without modifying LayerZero’s core code. The protocol is also highly scalable, since it uses a lightweight messaging setup for cross-chain communication.

Simple User Experience

A key feature of LayerZero is its user-friendliness. Cross-chain operations using the protocol are carried out as single transactions without the need for token wrapping and unwrapping — procedures typically associated with asset transfers on traditional crypto bridges. The user experience is, therefore, akin to having tokens swapped or transferred on the same chain.

How Does LayerZero Work?

On each blockchain platform within the LayerZero ecosystem, the protocol establishes a set of smart contracts called Endpoints that allow different chains to exchange messages with each other. When two blockchains — let’s call them Chain A and Chain B — establish direct communication, two critical off-chain entities, the Oracle and the Relayer, process the messages to confirm their validity.

The LayerZero Oracle reads a header block, which can be described as a metadata of transactions, from Chain A and sends it to Chain B. Independent of the Oracle, the Relayer generates transaction proofs. If the metadata supplied by the Oracle and the transaction proof sent by the Relayer match, the Relayer proceeds to execute the transaction.

Since the launch of LayerZero, the protocol’s off-chain verification procedure with the Oracle and the Relayer has been criticized as being insufficiently decentralized. Some analysts have argued that with just two entities collaborating to process the protocol’s messages, LayerZero is at risk of potential collusion between the Oracle and the Relayer.

In LayerZero V2, the Oracle is replaced by Decentralized Verification Networks (DVNs). DVNs carry out transaction verification in LayerZero and are open to parties capable of verifying cross-chain data to join and help validate messages. It’s envisioned that DVNs will feature many verifiers, helping ensure sufficient decentralization, trustlessness and security for the protocol’s messaging service. Meanwhile, the Relayer is substituted with Executors, entities whose roles are limited to transaction execution only, without responsibility for verification.

LayerZero Endpoints

LayerZero Endpoints are a critical element of the entire protocol’s functionality. While the Oracle and Relayer in V1 and DVNs in V2 are largely responsible for message validation and fraud prevention, the Endpoints are smart contracts that enable the actual exchange of messages between two blockchains’ native environments.

Endpoints residing on each participating blockchain are made up of four modules: Communicator, Validator, Network and Libraries. The first three modules enable the core functionality of the protocol, while the Libraries module allows the protocol’s developers to extend its core functionality and add blockchain-specific custom functions. These custom libraries allow LayerZero to be adapted to diverse blockchains with different architectures and virtual machine environments. For instance, LayerZero is capable of supporting both EVM-compatible networks and non-EVM chains — a rare feature in the realm of blockchain technology.

LayerZero Scan

Tracking messaging activity on LayerZero is no joke, given the nearly 50 blockchains and Layer 2 solutions supported by the protocol. This is where LayerZero Scan comes in handy. This cross-chain explorer app lets you see the protocol’s message exchanges across all participating chains. The explorer lets you view the messaging activity separately by source and destination chains. You can also explore transaction activity by each DApp that uses LayerZero.

LayerZero Use Cases

Unlike most other solutions for cross-chain communication, the LayerZero protocol offers a lightweight messaging system that facilitates many novel use cases and opportunities.

OFTs (Omnichain Fungible Tokens)

LayerZero is among the key projects that have promoted the idea of an omnichain, a web of interconnected blockchain platforms that feature native-level interoperability. As the protocol’s developer, LayerZero Labs launched the OFT (Omnichain Fungible Token) standard, which lets developers create tokens with native-level functionality across multiple chains. 

The OFT standard involves burning the token on one chain while minting a copy of it on the destination chain. Meanwhile, the original OFT token standard can only be used with EVM-compatible chains. LayerZero has extended the standard in the latest version, OFTV2, to support non-EVM platforms as well.

ONFTs (Omnichain Non-Fungible Tokens)

ONFT is the non-fungible counterpart of the OFT standard. NFTs created based on the ONFT standard can be transferred and stored on a native level across chains supporting the standard.

Cross-Chain Governance

LayerZero opens up opportunities for DApps to use cross-chain governance voting. The protocol can also be used to implement the changes accepted by the voting. Given the trend in which many DApps spread their presence across multiple platforms, this is a crucial use case. Some DApps now operate on dozens of different chains and Layer 2 protocols, making cross-chain voting and proposal execution a challenge. LayerZero, with its vast network of participating blockchains, greatly simplifies these processes.

Cross-Chain Swaps

Token swaps via decentralized exchanges (DEX) are some of the most popular transaction types in the crypto industry. LayerZero can be used to enable flexible and low-cost swaps across chains. The technology has already caught the eye of some big-name DEX platforms that have adopted the protocol, such as Uniswap, SushiSwap (SUSHI) and the leading DEX on Avalanche, Trader Joe (JOE).

Cross-Chain Borrowing

LayerZero’s technology allows seamless cross-chain borrowing transaction processing. Users can deposit their collateral on one chain and get funds issued on another platform. This is a critical functionality for cross-chain applications offering lending and borrowing services across multiple blockchain environments.

Cross-Chain Bridging

LayerZero also facilitates cross-chain asset bridging without the need for token wrapping and unwrapping, a significant improvement over the standard bridging technology. Thanks to its protocol, cross-chain asset transfers involve fewer operations. The entire transfer process also becomes smoother and clearer for end users. Its bridging technology enables the creation of OFTs and ONFTs as described above.

Closing Thoughts

Lack of interoperability between blockchains continues to hinder the wider adoption of blockchain technology. The standard bridging solutions that have emerged are still far from being able to offer a totally smooth user experience. With this in mind, LayerZero is unique in its push for native-level cross-chain communications. Perhaps we could call the protocol the pioneer of crypto bridging 2.0.

Instead of trying to force transferred assets into the destination chain formats, LayerZero offers a distributed infrastructure for chain-agnostic crypto transfers, as well as other use cases. By enabling the infrastructure, LayerZero has taken a major step toward the realization of the true omnichain concept — a key solution to the siloed blockchain world of today.

#Bybit #TheCryptoArk