Venus Upgrade - Omnichain Money Markets

Introduction

This proposal outlines implementing LayerZero technology to make Venus a true omnichain protocol. With this implementation, Venus will move closer to becoming the most efficient, cross-chain capital solution available. LayerZero will work closely with the Venus team to build and deploy an omnichain extension of the current protocol. This extension will allow users to deposit collateral and create debt positions, regardless of the source or destination chain.

What is LayerZero?

LayerZero is an open and permissionless Omnichain Interoperability Protocol designed for lightweight message passing across chains. Our technology provides authentic and guaranteed message delivery with configurable trustlessness; the protocol is implemented as a set of gas-efficient, non-upgradable smart contracts.

LayerZero is currently live on 10 chains including Ethereum, Polygon, Arbitrum, Optimism, BNB Chain, Avalanche, and Fantom, and on testnet and undergoing audit on 16 chains including Moonbeam, Gnosis Chain, and Solana among other non-EVM chains.

LayerZero Labs has consistently operated with the principle that security is the highest priority. In the last two years, LayerZero Labs:

  • Developed and launched the the LayerZero protocol on mainnet

  • Developed and launched Stargate, the first fully composable liquidity transport protocol, built on top of LayerZero and made possible by the invention of the Delta Algorithm

  • Stargate became the fastest growing DeFi protocol ever, reaching $4.4B TVL in under two weeks

  • Created Pre-Crime in response to security failures at major cross-chain protocols, a proprietary security advancement ensuring application-defined invariants are checked before the delivery of each message.

  • Commissioned $3.5m+ total audits from top auditors including Quantstamp, Zokyo, Zellic and Trail of Bits in the last year alone and are currently on audit #20; the most recent audits are publicly available on Github.

During this time, LayerZero Labs has built a world-class team of engineers, community managers, and product strategists and earned the support of investors and advisors including FTX, a16z, Sequoia. LayerZero remains the only battle-tested major cross-chain communications provider to never be hacked and is trusted by the top protocols and dApps across DeFi, NFT infrastructure, and gaming.

What does this solve?

Current lending and borrowing solutions across chains are generally broken or inefficient. If a user wants to collateralize on their “home chain” and seek exposure on a destination chain, they typically must:

  • Borrow on the home chain

  • Use an external bridge (which often wraps assets, introduces more fees, exposes users to inherent risk)

  • Arrive at the destination chain

  • Possibly need to swap to a desired asset (another fee)

Users then need to incur even more fees if they wish to collateralize additional debt positions on the destination chain. The overall process involves 10+ clicks and high overhead of risk and latency; this process is broken in terms of economic viability and overall user experience.

Omnichain Solution

Once deployed, the Venus omnichain extension will allow debt positions to be taken out against collateral on remote chains. This will ultimately give users the experience they truly want, with minimal risk and significantly reduced fees. Simply collateralize on your home chain of choice and borrow in your desired asset on the destination chain.

Imagine the most simple case, where every chain has (STABLECOIN, GAS) as available pools within the lending protocol. With omnichain functionality, Venus users can now collateralize SOL on Solana and borrow USDC directly on USDC; collateralize ETH on Ethereum and borrow BNB directly on BNB Chain. In other words, users can enjoy the direct point-to-point experience across chains without painful complexity or cost of existing methods.

This solution can be quickly implemented with no external bridges, no external fees, and no external risk. LayerZero’s unique omnichain messaging primitive is the only live and battle tested solution that can provide this experience for Venus users.

LayerZero Technical Structure

LayerZero is a lightweight universal messaging interface that allows developers to seamlessly interact with contracts across dozens of blockchains. LayerZero Endpoints rely on an innovative architecture to trustlessly relay messages between chains.

  Communication flow in a single LayerZero cross-chain transaction.

In a single call, paying only source gas, users can send a message (or a bundle of messages) to contracts on any supported chain. Thus, users are able to create a single contract that is capable of interacting simultaneously across multiple chains via our messaging primitive.

LayerZero achieves this in a secure and decentralized manner by using a Relayer and Oracle architecture. From a decentralization and security perspective, this model never moves information through middle-chains. With no transport chain dependencies or reliance on disparate validation methods, users can be confident in the authenticity of cross-chain messages and transactions.

In the context of Venus, this messaging protocol would allow for the opening of positions on remote chains with collateral in another ecosystem. This message transport capability has already been proven and deployed at scale as demonstrated by Stargate Finance.

Technical Challenges

Technical implementation at the core protocol layer is quite straightforward and will be significantly accelerated by the LayerZero integrations team. The core nuance in this process relates to handling liquidations across chains.

Fortunately, liquidations can be processed in a completely atomic way. This means that flash loans can still be used and that nothing changes in terms of liquidation mechanism. The only hurdle to consider is that Venus would need a price feed/oracle for the borrowed asset vs. the collateralized asset. For instance, if a user collateralized BNB on BNB Chain and borrows SOL on Solana, they would require a BNB/SOL price feed (or BNB/USD and SOL/USD).

If an oracle feed did not exist for a given pair, this need could be fulfilled by LayerZero message delivery. Once price feeds are addressed, all liquidations can be completed locally with only repayments from remote chains requiring an additional outbound message. This allows Venus to keep the protocol design almost identical to what is currently live with the sole exception of allowing debt positions to be taken against remote assets and to allow these positions to be acknowledged as repaid when necessary.

LayerZero Advantages

1. Independence & Application Specific Upgrades

LayerZero enables Venus to commit to application-specific feature upgrades. The importance of this capability cannot be understated. Generalized upgradeability has led to hundreds of millions in losses! Most smart contracts used in competing cross-chain solutions are upgradable. As a result, it doesn’t matter how secure their infrastructure is, if a protocol is updated to add a new feature and there’s a bug in the update, every other application that interacts with the smart contract is automatically exposed to new smart contract risk. There is no way for applications to reject these upgrades. This vulnerability due to upgradeable smart contract design is inherent to every other competing cross-chain provider and is exemplified by the recent Nomad hack.

LayerZero uses immutable contracts with a novel opt-in validation library upgrade system that gives any application the choice to either accept or reject any or all future LayerZero protocol enhancements. It is impossible for LayerZero Labs or any multisig process to force changes to a Venus integration once it’s established. Applications with high security standards have the choice to accept protocol enhancements or not.

For example, LayerZero could add libraries to support ZK-rollups, optimistic roll ups, or gas optimization to enhance core protocol functionality. Venus can choose to not accept such library upgrades or selectively upgrade depending on governance belief in new best practices in security or industry research at the community’s discretion. Our team’s belief is that current security practices should not and will not be the industry best practices 10 years from now. As researchers move the industry forward, so should the security model of cross-chain infrastructure. LayerZero’s opt-in validation library empowers applications to evolve with cutting-edge research and industry best practices.

LayerZero is the only generic messaging protocol that puts the power and ability to control the development of omnichain functionality fully in the hands of the Venus protocol - where it belongs.

2. Security Model

LayerZero’s Oracle and Relayer systems lead to the best possible security outcomes for end users. Specific to cross-chain transactions, competing middle-chain bridge designs can be censored by malicious actors looking to tamper with cross-chain activity. If a malicious actor takes control of the middle-chain they can reorder or choose not to deliver specific messages sent across chains. This fully compromises the security of any omni-chain functionality.

LayerZero’s bifurcated Oracle-Relayer security model ensures that either every message is censored or none are, rendering message censoring unattractive for malicious actors. Oracles and Relayers cannot censor messages without censoring all messages due to the sequential nonce ordered enforcement on the receiving chain. As a result, if an attacker obtained control of the Oracle and Relayer, and succeeded in censoring a message, every subsequent message would also be censored and the attack would stop. No hard stop would occur and Venus could expediently resolve the issue. Venus would simply select a new Oracle or Relayer and messaging would resume. This bifurcated model prevents effective collusion amongst potential malicious actors and ensures the ongoing operation of cross-chain transactions.

In addition to our built-in security model, LayerZero leads the industry in cross-chain security with Pre-Crime, a proprietary module which launched in April and currently secures Stargate.

3. Immutability & Customization

In addition to the security benefits described above, LayerZero underlying design is a series of immutable (i.e., non-upgradeable) smart contracts. This immutability is critical in infrastructure design as the attack surface becomes exponentially larger when cross-chain contracts are upgradeable and universal. This has become increasingly evident in the spate of recent cross-chain bridge exploits.

LayerZero offers what no other cross-chain solution can: control over security parameters at the application layer. When using LayerZero, Venus has the ability to configure off-chain infrastructure, block confirmation parameters, and Oracle/Relayer selection. Venus is never forced to opt-in to any permanent off-chain infrastructure configuration and has the ability to change parameters at will for security and user-experience purposes among others. The unique ability to deploy different Oracle, Relayer, and infrastructure configurations allows users to optimize for both cost and trustlessness.

4. Efficiency & Cost

LayerZero was designed and built with efficiency as a first principle cost where other solutions have high transaction costs. As the volume of Venus transactions increases, a lightweight and modular cross-chain solution will be critical for scaling. LayerZero messages are extremely lightweight and have one of the smallest possible headers today. Four fields and ~100k gas interactions on both send() and receive() functions are already deployed with upcoming opt-in libraries set to reduce gas consumption to sub-100k.

LayerZero is capable of both singular and batched cross-chain communication. By combining batched transactions with the most efficient messaging primitive, LayerZero allows Venus to scale their user experience to all relevant chains at the lowest possible cost.

Implementation Support

LayerZero Labs is well-resourced and fully prepared to support the entire Venus integration process from start to finish including providing on-going product and smart contract support to the protocol. We have developed a thorough Venus support plan and will provide:

  • Full-funded access to our 3 retained audit firms

  • LayerZero is currently on audit #20 and has allocated more capital to security audits than all competing cross-chain providers combined

  • Up to $15M bounty – the largest ever security bug bounty

  • All engineering requirements and ongoing integration support

  • A dedicated advisory and implementation team

LayerZero Labs will provide a dedicated team of engineers and an Integration Lead to the Venus cross-chain implementation. We are confident that our team and Integration Lead will exceed expectations and quickly deliver omni-chain functionality to Venus.

Conclusion/Summary

LayerZero Labs is ready to work closely with the Venus team on architecture, code review, and technical implementation to fully deploy these new omni-chain capabilities. Our solution leads the cross-chain communication space and has the potential to significantly improve the Venus user experience across all supported chains

15 Likes

This would be amazing!

3 Likes

Reading through the text I notice a very confident party that knows what they are doing. No avoiding security and even stating leading the cross chain security with Pre-Crime.

Conclusion part gives me the vibe of a possible teaming up with an eager team ready to provide almost finalized turn key solutions.

Hate to admit but for the first time a going cross chain triggered a low amount of warning risks alarms. I am convinced and I like this move.

P.S. When the pancakeswap Dex was anounced I thought the Dex planned to integrate was the cross-chain capable stargate. :slight_smile:

3 Likes

Super excited about this huge upgrade :fire: As always, security of the protocol is the first priority. So it should not be rushed.

3 Likes

This is a very interesting proposal that could add huge TVL to the protocol. I’ll be eagerly waiting for the AMA with the LayerZero team to learn more about it. :fire:

1 Like

Great proposal , although it won’t add extra TVL immediately upon implementation but gradually in few months it will have high impact . This is a fundamental work for the protocol and i like to see such works more .

how I have been waiting for this for a long time, thank you that my Wishlist was realized after not so long time

It is a perfect proposal. Great initiative and revolutionary! We need do it. Thanks LayerZero Team.