LayerZero

Cryptoware
4 min readJun 27, 2022

— By Ibrahim Quabboua

Hello Peeps.

As you remember a couple of months ago, we discussed Cosmos and all the innovation behind it. The Cosmos ecosystem is growing rapidly but remains largely constrained due to the high costs of connecting to Ethereum and other EVM-based chains via IBC’s current transport layer.

Here we are introduced to the new exciting omnichain protocol: layer zero.

LayerZero is an omnichain interoperability protocol, capable of sending a message to any contract on any chain.
The message is a bytes payload allowing user applications complete control over its structure and interpretation.

Simply put: LayerZero is a messaging transport layer for smart contracts to communicate between chains.

LayerZero can enable these applications to communicate amongst themselves seamlessly (A →A, B →B), but what if A wanted to communicate with B? One way would be to get both the A and B teams to design an agreed-upon set of rules for interpreting messaging between the two applications. The messaging standard would be highly optimized for the specific type of communication A and B would like to perform. What if C would like to integrate a few months down the road, but they need modifications to the standard to meet their requirements?

This is where Cosmos’s Inter-Blockchain Communication Protocol (IBC) comes in. Besides being a standard for how communication can be established between two chains, IBC also has a robust set of standards, such as ICS-20 that define how messages should be formatted for token transfer. Instead of reinventing the wheel, teams from A, B, and C could leverage these community-driven standards to define their messaging rules.

By swapping out IBC’s transport layer with LayerZero, IBC can now flourish everywhere, allowing applications to have a community-driven standard for omnichain communication. LayerZero implements an array of innovations to make omnichain communication cheaper and faster. Interested readers can check out our Ultra Light Node design.

E.g:
Traditionally, the user in order to get their tokens from say Ethereum over into Avalanche would have to go through a series of different websites/UI, swap fees, wallet networks, and bridges/DEXs/CEXs depending on how they go about it. This is very inefficient but is the current state of chain hopping.

Traditional cross-chain bridging fails in 2 broad areas, having a consensus forming middle chain validate and forward messages between chains, and running a light node on-chain.

LayerZero fixes this with what it calls Ultra-Light Nodes (ULN). These offer the security of a light node but with the cost-effectiveness of middle chains. This is possible because ULNs perform the same validation as an on-chain light node but instead of keeping all the block headers sequentially, they are streamed on-demand by decentralized oracles.

Each LayerZero Endpoint is split into four modules:

  1. Communicator
  2. Validator
  3. Network
  4. Libraries

The first 3, communicator, validator, and network modules are what make up the core functionality of the Endpoint. These modules act similar to a traditional network stack. Messages are sent down the stack on the sender side (communicator), to Validator to Network, and then up the stack on the recipient side.

While each new chain supported by LayerZero is added as an additional library. These libraries are auxiliary smart contracts that define how specific communication for each chain is handled. Each chain in the LayerZero network has an associated Library and each Endpoint includes a copy of every Library.

Communication between 2 chains only requires that their Libraries be present on both ends, allowing LayerZero to be a fully connected network capable of performing transactions between any pair of nodes.

Exciting technology, waiting to see more applications on top of it. Meanwhile, we have only 1 DApp “stargate” that is live on layer zero. And from what I see, they nailed it.

--

--