Spotlight: LayerZero

5 min read

LayerZero, a fast, secure, & cost-efficient protocol for inter-chain communication

One of the biggest challenges cryptocurrency users (and developers) face today is the sheer number of chains that exist. While communication across chains is common, it isn't always easy to implement, and it can be quite costly to do in a secure way. LayerZero aims to solve this challenge by making cross-chain communication more seamless and efficient.

Seena Foroutan, Global Head of Business Development, said,

We are delighted that Neptune Mutual has decided to build on top of the LayerZero protocol for their cross-chain messaging needs.

Edward Ryall, co-founder of Neptune Mutual, said,

We are excited to be using LayerZero’s messaging solution, and we have integrated it into the UI of our cover marketplace, making it an ideal choice for those wishing to bridge $NPM from one chain to another.

What is the LayerZero Interoperability Protocol?#

The LayerZero interoperability protocol facilitates fast and secure communication between blockchains. And it does so while still retaining one of the most important characteristics of most blockchains: decentralization. Current interoperability solutions tend to rely on a trusted intermediary. By removing this need for trusted third parties, LayerZero allows blockchain developers to create cross-chain apps that respect the spirit of trustlessness and decentralization that makes Web3 so important.

How Does LayerZero Work?#

Traditionally, if you wanted to bridge across chains, you would need to use a middle chain to receive and validate the transaction, or you'd need to run a light node on-chain. Middle chains present a security risk and could introduce more opportunities for smart contract vulnerabilities. And light nodes, while secure, are expensive to run.

LayerZero uses ultra-lightweight on-chain clients called LayerZero Endpoints. These endpoints allow every node to communicate with every other node, making cross-chain transactions possible without the overhead cost of traditional light nodes.

LayerZero doesn't just act as a relayer. It can be used with ChainLink Oracles (and other oracles and relayers) to detect malicious actions and ensure consensus reports are correct. Each LayerZero endpoint has four modules:

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

Whenever support for a new chain is added to LayerZero, it's added as a library. The other three modules can be thought of as a traditional networking stack or a part of the OSI model. The sender passes a message to a communicator, which hands it off to a validator and then to the network. The message then travels up the stack (Network>Validator>Communicator) on the recipient side.

All that's needed for communication between two chains is that the libraries are present on both sides. As long as that condition is met, it's possible to perform transactions between any node on the network, regardless of what chain they're running on.

The LayerZero network supports more than 30 different chains, including both EVM-compatible chains and non-EVM chains. This allows developers to reach a much wider audience with their apps and helps keep fees for cross-chain actions as low as possible.

How LayerZero Differs from Polkadot and Cosmos#

If you're familiar with other scaling and interoperability chains, such as Polkadot or Cosmos, you may be wondering what sets LayerZero apart from them. Polkadot supports interoperability using XCMP channels to communicate with parachains within its own network. It also supports communicating with blockchains outside the Polkadot ecosystem, but this relies on bridges that have the issues listed above.

Cosmos is closer to LayerZero in terms of how it works. However, it requires a full-chain light node. LayerZero doesn't need this since it only needs to verify certain transaction events and block headers rather than everything that's happening on both chains. This makes for a lighter and less costly solution.

Advantages and Real-World Uses of LayerZero#

At Neptune Mutual, we've embraced the idea of omnichain in our ecosystem. Not only do we offer our services on the Ethereum Base Layer and on Arbitrum, but we also provide cover for a variety of pools that operate on other chains. While our services are offered on multiple chains, the chains themselves don't need to talk to each other. They each maintain their own security assumptions and don't attempt to validate what's going on elsewhere.

However, our omnichain offerings do lead to bridging cross-chain. Our users and liquidity providers engage in cross-chain transactions frequently. This is where LayerZero comes in. Vitalik Buterin, the inventor and co-founder of the Ethereum cryptocurrency, has often expressed concern about the security of cross-chain communication, especially given the way many supposed solutions to the issue introduce a centralized authority. LayerZero solves many of Buterin's objections and offers a scalable, secure, and decentralized solution to a problem that plagued early DeFi platforms.

Cross-chain protocols that use liquidity networks are complex to operate at the moment because of the need to manage assets on both chains. LayerZero can take a lot of the complexity out of this process.

Some providers are already using LayerZero in the real world. For example, Radiant allows users to earn interest and borrow assets, providing cross-chain DeFi services that are powered by LayerZero. Radiant's liquidity providers earn LayerZero's Omnichain Fungible Tokens (OFTs) in the form of RDNT for providing liquidity. OFTs allow tokens to be transferred across chains without the need for the tokens to be wrapped or for the use of a middle chain.

Another example of an implementation of the LayerZero protocol is the Aptos Bridge. This bridge transfers assets from Ethereum to the Aptos protocol using LayerZero's messaging primitive. Aptos is a relatively new Layer 1 blockchain that aims to solve many of the scalability issues that have plagued older-generation blockchains. It claims to offer performance of up to 160,000 transactions per second. The Aptos Bridge makes it possible to transfer USDC, ETH, WETH, USDT, and even various forms of wrapped Bitcoin onto the Aptos chain.

Building a Better DeFi Ecosystem#

Whatever blockchain you do most of your transacting on, and whether you're a DeFi or a CeFi user, it's important to protect your cryptocurrency holdings. The parametric cover pools provided by Neptune Mutual cover a variety of DeFi exchanges and projects, and there are some pools targeting centralized exchange products too.

If you're leading a DeFi project or developing dApps and are interested in working with us, contact us today and speak to our team members. Whatever chain you're operating on, we can help you build better products for your users.

By

Tags