LayerZero Is Connecting the Multi-chain World. Can You Earn Airdrops on Multiple Chains?

Do repost and rate:

Source: LayerZero

In this scenario, the relayer operates off-chain and serves to carry the proof that a transaction has occurred. This proof can be traced back to the block ID to identify the transaction in question. On the other hand, the oracle simply passes along the transaction’s original information.

The wallet on the receiving end of the transaction can communicate with the relayer. By presenting the block ID from the oracle, the relayer can use that information and match it with the original transaction, proving its legitimacy.

LayerZero establishes heightened security due to the separation between the relayer layer and oracle layer. LayerZero leverages the accuracy of prominent oracles, such as Chainlink, while also benefiting from an open relayer system, creating a form of checks and balances

Typical Cross-chain Bridging

In cross-chain scenarios, bridge contracts assume that transactions executed on the other blockchain are valid based on the rules of that chain. Users need to trust that another chain’s validators won’t collude, be corrupted/compromised, and that they can execute transactions and withdrawals at any time. This must be considered before evaluating any additional trust assumptions introduced from an external relayer bridge.

Additionally, networks connected by a bridge but don't have a shared state (i.e., EVM-to-EVM chain) entertain additional risk, specifically around finality on each chain. For blockchains, a transaction is considered final when the block containing it can't be altered. 

However, the finality of most blockchains (specifically, Ethereum, as it's involved in the majority of bridging activity) is probabilistic, not deterministic. That is, there’s no set number of blocks after which the block becomes immutable. It merely becomes evermore expensive with each additional block built on top of it, and thus, less economically rational/feasible for an attacker to alter the transaction. 

When a transaction is conducted on a source blockchain, an event is typically recorded and used to trigger a similar transaction on a destination blockchain. For a relayer to transfer an event on the source chain, the source chain transaction must be finalized. The destination chain must select the number of block confirmations required to feel comfortable that the block is final and that security on the Ethereum base layer can't be compromised. 

Assets that have been bridged from chain A and “wrapped” on chain B would suffer if chain A is 51% attacked and transactions are reverted. This would result in chain B assets no longer being fully collateralized. In these scenarios, the bridge and bridged assets are only as safe as the weakest blockchain.

With L2 networks and rollups, bridge smart contracts don't make these same assumptions. They can verify that transactions executed on L2 are valid per the rules of Ethereum L1. Validation is executed by proving systems (fraud proofs and validity proofs) that can be checked on L1. Therefore, L2 users are far less exposed to the centralization risks presented by the validator sets of other chains or bridges. 

With an L1 rollup, a protocol only needs to deploy an asset once for default interoperability with all rollups. Rollups inherit the L1’s security while featuring “escape hatches” that allow users to exit to L1 vs. being stuck on the destination chain if something goes wrong. Because of this, they need an exponentially cheaper security budget than creating your L1 or bridge with a validator set. Finally, rollups can store data on or off-chain depending on their need, creating flexibility in the design space and user experience.

However, interacting with any type of bridge carries risk (on both chains):

  • Smart Contract Risk — A bug in the code that can cause user funds to be lost
  • Technology Risk — Software failure, buggy code, human error, spam, and malicious attacks can disrupt user operations
  • Speed — If adequate liquidity isn’t available, users must wait until there is. This can be hours, days, or even weeks while the crypto markets continue to trade and funds are tied up

Differences

Upon full development, LayerZero presents several distinct features that differentiate it from its competitors. Firstly, LayerZero can operate on any chain, encompassing both fast-finality and probabilistic-finality chains. Additionally, the protocol facilitates cross-chain swaps in a single transaction, incurring gas fees only on the source chain, resulting in a user experience akin to a native swap.

For developers, LayerZero provides a straightforward protocol to achieve cross-chain functionalities in a trustless manner without the need for intricate intermediate chains or smart contracts. Endpoints’ modular design enables LayerZero to seamlessly integrate support for new chains by merely introducing an additional Library rather than modifying the three core modules—Communicator, Validator, and Network. Libraries serve as auxiliary smart contracts that delineate a specific chain’s communication standards.

In terms of the threat model, LayerZero's security relies on the fact that a compromised or colluding oracle and relayer combination would only impact user applications using that particular oracle and relayer. Applications employing different oracle and relayer combinations would remain unaffected.

How Does LayerZero Work?

To initiate a message transfer, transactions are dispatched to a chain's Endpoint. The Endpoint then requests the pre-selected oracle provider to obtain the pertinent block header from the source chain and transmit it to the destination chain's Endpoint.

A transaction proof is also created by the source chain's Endpoint and sent by the relayer to the destination chain's Endpoint. The destination chain's Endpoint compares and confirms the oracle's and relayer's block headers and the proof before submitting the message on-chain. The user on the source chain compensates the oracle and relayer for each transaction.

However, if an attacker successfully infiltrates the oracle network and operates their own relayer to collude and push transactions through the network, safety can be compromised. The protocol claims to be the first trustless interoperability protocol. Consequently, the message sender must trust the oracle provider to ensure security. Although the application could run its own relayer to ensure proper delivery, this would negate the cost advantage of using a third-party service. Therefore, it can't be called a completely trustless interoperability protocol, nor can it resolve the interoperability trilemma in this situation.

Breaking it apart into pieces:

Initiating Cross-Chain Transactions with Oracle and Relayer: To begin a cross-chain transaction, a user submits a transaction request to the Oracle, which is responsible for verifying the request's authenticity and ensuring the user possesses the necessary assets to complete the transaction. Upon validation, the Oracle then communicates with the Relayer, which initiates the transaction on the destination chain.

The Relayer's role is to create and sign the transaction on the destination chain, utilizing the assets provided by the user on the source chain. Once signed, the Relayer sends the transaction back to the Oracle for a final check on the signature and authenticity of the transaction.

Transaction Confirmation and Verification: When the Oracle has validated the transaction, it notifies the user on the source chain to confirm the transaction's successful execution. The user can then proceed to verify the transaction on the destination chain, ensuring a secure and transparent process.

Extensibility and Scalability with LayerZero Endpoint Design: LayerZero's Endpoint design allows for an effortless integration with any blockchain, offering a lightweight and scalable solution that can run on costly Layer 1 chains like Ethereum without prohibitive expenses. This flexibility opens the door for greater adoption and interoperability among various blockchain networks.

Security and Independence through Arbitrary Relayer Services: The LayerZero protocol does not limit users to a specific relayer service, effectively preventing collusion between the Relayer and Oracle, and ensuring the integrity and security of the transaction process.

Eliminating Intermediary Costs and Maximizing Liquidity: By enabling native transactions between supported chains, LayerZero eliminates the need for intermediary costs such as bridge and swap fees. This allows users to move liquidity freely across chains, capitalizing on opportunities on chains where they may not hold assets.

Efficient Cross-Chain Communication with Light Client Architecture: LayerZero's light client architecture enables swift and efficient cross-chain communication without necessitating expensive cross-chain state machine replication. This makes LayerZero an ideal solution for fostering interoperability between various blockchain ecosystems, unlocking the full potential of cross-chain transactions.

Omnichain Fungible Token (OFT)

The Omnichain Fungible Token (OFT) standard, developed by LayerZero Labs, functions as a comprehensive multichain standard for fungible tokens. Designed to ensure compatibility with various established fungible token types across chains, OFTs are interoperable with ERC-20s, BEP-20s, Aptos-based fungible tokens, and others. Since the introduction of the first OFT alongside Stargate Finance's governance token, STG and OFTs have been gaining substantial traction.

To illustrate the problem that OFTs resolve, consider a hypothetical scenario in which 2 UNI tokens are transported from Ethereum to Avalanche via Wormhole and Synapse. The distinct wrappers used on Avalanche would disrupt the fungibility previously enjoyed by UNI tokens on Ethereum. Furthermore, these wrapped UNI tokens would lack the same utility (voting) as their Ethereum counterparts unless the protocol endorsed a specific wrapped configuration.

OFTs offer a solution by enabling applications to natively mint and burn a single, unified token standard across multiple chains using LayerZero's Endpoint smart contracts. When a user transfers their OFT from chain A to chain B, the Endpoint on chain A burns the OFT, logs the change in overall OFT supply, and requests the Endpoint on chain B to mint the corresponding amount for the user. This cross-chain message transfer complies with LayerZero's modular interoperability framework.

Although this process necessitates trusting an oracle-relayer pair for accurate delivery, LayerZero's design permits applications to select trust assumptions on a transaction-by-transaction basis. Essentially, LayerZero's OFT standard allows any application to operate as a bridge for its native tokens.

The unified and adaptable design of OFTs presents several notable advantages:

  1. OFTs eliminate the need for assets to be locked on one chain before being minted on another. Assets are burned on the source chain and issued to the destination chain, removing honeypots typically associated with bridge exploits.
  2. There's no canonical version of the token. An application's OFT deployed on chain A holds the same value as the version on chain B, as both can be minted and burned at a 1:1 ratio.
  3. The requirement for liquidity networks common in other bridging solutions is eliminated due to the fact that assets can be minted and burned 1:1 on demand. Users only pay gas fees to bridge an OFT, making transfers of varying amounts equally cost-effective.

As Ethereum Layer 2s and other Layer 1 networks continue to gain traction, the benefits offered by OFTs have led to their widespread adoption across the multichain landscape.

Oracles and Relayers

LayerZero is an innovative protocol designed to address the limitations of existing cross-chain solutions in the blockchain space. It facilitates seamless cross-chain transactions by leveraging a combination of Endpoints, oracles, and relayers while ensuring a secure and cost-effective process.

Endpoints are lightweight on-chain clients implemented as smart contracts, with each supported chain having a LayerZero Endpoint. These Endpoints serve as the user-facing interface for LayerZero, enabling direct transactions across chains without intermediaries.

oracles, independent third-party service providers, play a vital role in LayerZero by reading block headers from one chain and sending them to another. Chainlink and Band Protocol are currently the chosen oracle service providers, although the protocol allows for the integration of other providers as well.

relayers, on the other hand, are responsible for fetching transaction proofs in off-chain functions. Since LayerZero doesn’t specify a specific relayer implementation, users have the freedom to implement their own versions, promoting a collusion-resistant, trustless, validated delivery.

LayerZero's security is built on the independence of the oracle and relayer, ensuring the protocol remains lightweight while maintaining a high level of security. For an attack to be successful, both the oracle network and the relayer must be compromised or collude.

Existing cross-chain transaction solutions often suffer from drawbacks, such as multiple transactions, high costs, and the involvement of trusted intermediaries. LayerZero addresses these issues by enabling single transaction swaps and achieving trustless Valid Delivery for tokens and arbitrary data.

The protocol distinguishes between two types of cross-chain bridging and messaging: the middle-chain method and the on-chain Light Node method. Both approaches come with their own trade-offs in terms of cost and security. LayerZero enhances these methods by introducing a hybrid solution called Ultra Light Nodes, combining the benefits of both approaches.

In summary, LayerZero's unique hybrid approach streamlines cross-chain transactions, offering a secure and cost-effective solution for the blockchain ecosystem. By incorporating Endpoints, oracles, and relayers, LayerZero sets a new standard for seamless communication between different blockchains, paving the way for enhanced interoperability and user experiences.

Differences Between a CEX, DEX, and a DEX built on LayerZero

Centralized exchanges require custody of user assets to use their products, trading services, and other features. This allows the exchange to keep track of the deposits off-chain and even use those assets (no different than a typical bank) to generate yields and offer customers rewards. This forgoes the fundamental ethos of blockchain in the first place and puts user assets in the hands of central authorities. In the event of a failure or bankruptcy, as shown in multiple recent examples (i.e., Voyager, Celsius, FTX, etc.), users may receive only a small percentage of their original funds, if any, back following a crisis.

Because of this major shortcoming in CEXs, decentralized exchanges (DEXs) have grown substantially in popularity and scope. A DEX uses smart contracts to facilitate the automatic minting of coins when a user swaps between assets. Although this methodology is far more centralized and safe than CEXs, it still requires an intermediary token (or pool) and an additional transaction. This adds time and cost to the end user submitting the transaction. 

DEXs that leverage LayerZero technology can provide services that avoid trusting a central authority while also eliminating the need for intermediaries, saving the end-users time, money, and effort. With increased efficiency, this also makes the blockchain economy more usable in general, adding value to stakeholders and making individual ecosystems more accessible.

Exchanges built on top of LayerZero can execute single cross-chain transactions that send a local transaction from chain A and then notifies the destination chain (chain B). This enables a clean and simplified transaction swap without any dependencies on third parties. Smart contracts on either side of the transaction handle the exchange entirely through LayerZero’s messaging protocol.

Ultra-light Node

On-chain light nodes serve the purpose of receiving and validating block headers for each pairwise chain on the opposing chain. Transaction proofs containing messages are forwarded and validated on-chain against these block headers. Although this method of transmitting messages is highly secure, it's also significantly more expensive. Running a light node on Ethereum, for instance, incurs tens of millions in daily costs per pairwise chain.

LayerZero addresses this issue by introducing Ultra Light Nodes (ULN), which provide the security of a light node while maintaining the cost-effectiveness of middle chains. This is achieved by having ULNs perform the same validation as on-chain light nodes, but instead of storing all block headers sequentially, they’re streamed on-demand by decentralized oracles.

When using Chainlink as the oracle, any malicious activity within the system hinges on the ability to defeat the Chainlink DON, which is no trivial task. Furthermore, if the oracle's consensus is compromised, active collusion with the relayer is also required.

The LayerZero protocol incorporates distinct modules, including the LayerZero protocol itself, LayerZero Endpoints, and third-party oracles and relayers, which warrant further examination. The uniqueness of this model lies in the fact that the ultra-light node (LayerZero Endpoint) does not maintain the state of other blockchains, as seen in the light client model introduced by IBC. Instead, the oracle is responsible for reporting the state of each blockchain, while the relayer handles general message passing and proofs.

LayerZero has devised the Ultra Light Node, which essentially functions as a just-in-time light client, provided on an as-needed basis. oracles transmit block headers, and relayers convey transaction proofs. Together, they fulfill the roles of an on-chain light client but at a lower cost due to their non-continuous operation.

At present, LayerZero relies on permissioned off-chain agents, drawing upon the trusted reputations of institutions for the system's functionality. Over time, LayerZero aims to establish app-designated oracle-relayer pairs to discourage collusion.

Regulation and Society adoption

Ждем новостей

Нет новых страниц

Следующая новость