LayerZero: Omnichain Interoperability

Let’s be honest, bridging sucks. 

More than twice in the past week I have accidentally bridged a stablecoin onto a blockchain where it isn’t tradable, or stranded funds on a wallet with no gas (and subsequently begged friends at 2AM for $0.50 to bail me out… yikes). 

As it stands, there are three main ways to bridge money from one ecosystem to another: 

  1. Using a Centralized Exchange
  2. Using a Blockchain native bridge – think AVAX Bridge or Terra Bridge
  3. Using a Decentralized Router / Cross Chain Dex – think Multichain, or Thorswap

Centralized Exchanges are the most straightforward. I trust the CEX to take custody of my crypto asset and exchange it for a different native currency, then return it to me. My risk here is limited to the extent that I trust the solvency and legitimacy of the CEX. 

A blockchain native bridge is useful, as it allows for direct exchange of a limited basket of assets on one exchange for their equivalents on another. However, bridges of this sort are fundamentally self-limiting. As the number of chains that they want to service increases, the number of pools they have to support increases exponentially. This makes them unscalable beyond 2-3 chains and select pairs. 

Beyond scalability, blockchain native bridges run the risk of a ‘vendor lock-in’ scenario. If the majority of cross-chain liquidity is located on a single platform, the respective ecosystems become dependent on the bridge. Once again, this sacrifices core-tenets of decentralization and flexibility. 

To solve this, Thorchain (via RUNE) and Multichain (via MULTI) use aggregated pools. This allows them to create only a single pool for each asset against their native token. 

While this helps with scalability, it adds an unnecessary cost to every transaction. Instead of a direct 1:1 exchange, each swap involves an extra trade. On top of this extra routing, these options also generally charge a small service charge, something that bridges avoid. Ideally, an ideal bridging solution would be able to solve for scalability, but not impose extra costs on users via fees or extra trades. 

LayerZero

All current solutions also compromise on another key point: trustlessness. One of the differentiating features of crypto has always been its decentralization. Both of the scalable solutions require trust of a counterparty as the medium of exchange between blockchains. 

Centralized Exchanges require trust in the solvency and legitimacy of a centralized entity that is facilitating the transaction. This trust is fundamentally incongruous with the core tenets of crypto. An exchange router requires trust in both the immutability of both the smart contracts (questionable) and the medium of exchange (RUNE or MULTI).

CEX, DEX, L0 Comparison Chart from Page 4 of LayerZero Whitepaper

LayerZero seeks to resolve this trade-off between bridge scalability and centralization through an “omnichain” interoperability protocol, and is on a mission to eliminate the need for bridges. They’ve introduced the “ultra light node” (ULN), which alleges to have all the security of a light node, with the cost-effectiveness of middle chains. This is done by streaming block headers on-demand to the oracles, rather than keeping all block headers sequentially. 

The basis for the mechanism involves two core mechanisms: the oracle and the relayer. As it stands, LayerZero will offer a relayer, but users will be able to create their own. Current mechanisms for cross-chain exchange, CEX / DEX bridges, both require an element of trust. This seeks to replace that need for trust, with one of independence.

The underlying interaction is a fairly simple consensus mechanism that achieves ‘trust’ by creating a situation where it’s impossible to collude. If the Oracle (Chainlink) and the Relayer (3rd Party) have matching values for the block header and message. If the values match, a confirmed packet is sent to the endpoint, which deposits bridged funds to the user. As they put it:

“Instead of requiring trust, which is a strong condition, we only require the weaker condition of independence between the Oracle and Relayer. This requirement of independence instead of trust is one aspect of what allows LayerZero to be efficient and lightweight. As long as there is no malicious collusion between the Oracle and Relayer, then LayerZero guarantees valid delivery. This validation step will succeed if and only if the block header and the transaction proof match, which will only occur in the following two scenarios: 

1. The block header provided by the Oracle and the transaction proof provided by the Relayer are both valid. 

2. The block header provided by the Oracle and the transaction proof provided by the Relayer are both invalid, but still match. (Impossible, without collusion between the Oracle and the Relayer).”

In short, the Oracle, which is being run through Chainlink, and the Router, which is able to be created by anyone (but L0 offers one off-the-shelf), are theoretically unable to collude. As long as this premise holds, the odds of them confirming the same incorrect block are zero. Therefore, when the messages and headers that they send are internally consistent, it can be taken as sufficient evidence for the bridging transaction to proceed.

In Practice 

While the tech is interesting, it’s always much more practical to see how it works in execution. Currently, the team is allowing use of LayerZero through the LayerZero Endpoint, or, “a series of smart contracts on each chain included in the LayerZero network. The core functionality of a LayerZero Endpoint is encapsulated in three modules: the Communication, Validation, and Network. These modules act in a manner similar to a network stack, with messages sent down the stack on the sender side—Communicator to Validator to Network—then up the stack on the recipient side. In addition to the core modules, LayerZero Endpoint can be extended via Libraries, which are auxiliary smart contracts that define how communication for a specific chain should be handled.”

This design allows for smart contract calls of LayerZero infrastructure on any chain that has libraries present. Plus, the theoretically modular design means that adding libraries on new chains should be a relatively painless process- so scaling is easy. 

The LayerZero team lists three suggested use cases for the product: 

  1. Cross-Chain Decentralized Exchanges
  2. Multi-Chain Lending
  3. Multi-Chain Yield Aggregators 

Each suggestion is based on the ability for a LayerZero enabled protocol to draw on yield opportunities outside of the ecosystem that it’s based in. So, a lending protocol on Avalanche wouldn’t be limited to opportunities on AVAX. All of a sudden, the home chain becomes much less of a limiting factor, and much of the bridging process can be done on the back-end. 

For example, say I have this ETH on AVAX, and that the current best yield I can find on AVAX is 5%. On Polygon, there’s a base rate of 7%. I have two options- I can either take the reduced rate to avoid bridging funds, or you can deal with the hassle of untying funds to move to earn optimized yield. Now, at the very least, protocols will be able to significantly expand the opportunity sets available to users. 

The first instantiation, Stargate, launched recently. It offers omnichain routing capabilities (not unlike Anyswap, or Thor), as well as Pooling / Staking opportunities across multiple chains. As teams continue to build, it will be interesting to see just how seamless integration, particularly on the wallet end, can become

Endgame Theorycrafting

One thing is clear to me amidst all the cross-chain and scalability noise. The future doesn’t care about chain wars. The endgame for crypto is to have a front-end that allows users not to know what blockchain they’re on, while simultaneously allowing them the benefits of all of them.

As it stands right now, that’s impossible. I can confirm this by reminding you of every time you forget to switch your Metamask chain and have to get a popup. Or by reminding you of the pain of having to deal with bridging, and adding yet another chrome wallet extension added to my already largely unusable search bar. The future is definitely not that. 

Practically, LayerZero is the first step in the direction of the dream. Users can deposit one asset natively, and, through L0 library calls, end up with another native asset. Ultimately, for crypto to succeed this is a necessary step. It simplifies the UI/UX issues that have been plaguing us, and creates space for creative builders to add significant alpha / reduce cross-chain arbitrage opportunities.

Products that are able to do that create interesting value add propositions. Imagine Alchemix-type protocols that are able to provide liquidation-free loans, while minimizing pool-specific risk through diversification, and simultaneously maximize yield generation through greater opportunity sets. Metaverse projects could now run comfortably on a side-chain, but suffer none of the downsides or difficulties of attracting users to these projects on the ground floor.

At the very minimum, I see Layer0 as highly bullish for Sidechains, Layer Two mechanisms, and scalability. If connectivity between isolated ecosystems improves, differentiation between blockchains to build on becomes much more fundamentally driven by their value-add, and much less driven by the availability of liquidity and funds. With the rollout of EIP-4844 on the horizon, it’s a worthwhile time to investigate relative positioning on the scalability front – we see Arbitrum as best positioned among the Layer Two platforms.


This report is not investment or trading advice. Please conduct your own research before making any investment decisions. Past performance of an asset is not indicative of future results. The Author may be holding the cryptocurrencies or using the strategies mentioned in this report.

Stay up to date with our research

Sign up to receive an email when we release a new post

+ posts

VP of Research