[LRFC] Deploy Lyra on Polygon zkEVM

Simple Summary

Polygon zkEVM is an open-source ZK-Rollup that provides EVM equivalence for a frictionless user experience and to benefit from the security of Ethereum.

This proposal recommends launching Lyra on Polygon zkEVM by integrating with Quick Perps.

Abstract

Polygon zkEVM is an open-source ZK-Rollup that provides EVM equivalence for a frictionless user experience and to benefit from the security of Ethereum. Essentially all existing smart contracts, developer tools, and wallets work seamlessly. The zkEVM harnesses the power of ZK proofs to reduce transaction costs and massively increase throughput, all while inheriting the security of Ethereum. The mainnet beta was launched on March 27, 2023.

zkEVM currently crossed $15m TVL and has grown 50% in the last 7 days, and unique wallets have crossed 60K. Transactions have increased 8x over the last two weeks.
This just marks the beginning of growth of TVL, users and transaction growth as many new protocols launch in the next phase of growth.

This proposal recommends launching Lyra on Polygon zkEVM by integrating with Quick Perps, which is a Perps protocol with advanced features like trailing orders.

Assuming a passed proposal and successful integration, there will be ways to further integrate Lyra Protocol into the Polygon zkEVM ecosystem.

Motivation

Deploying early on Polygon zkEVM Mainnet Beta will solidify Lyra’s position as a leader in the multi-chain EVM ecosystem. Increased users and assets will help accelerate Polygon zkEVM’s growth, introducing Lyra’s unique user base to the new blockchain ecosystem. In tandem, increased volume through Lyra grows the protocol and expands Lyra to a new suite of ZK enthusiasts.

Increased users and assets will help accelerate Polygon zkEVM’s growth, introducing Lyra’s unique user base to the new blockchain ecosystem. In tandem, increased volume grows the protocol and expands Lyra to a new suite of ZK enthusiasts.

Specification

Delta Hedging-Lyra aims to keep the exposure of liquidity providers close to delta-neutral. It does this by either opening a long or short perpetual futures position through QuickPerps.

QuickPerps is QuickSwap’s new decentralized Perpetual Exchange built on Polygon zkEVM mainnet Beta, allowing users to trade spot & perpetual swap contracts for $MATIC, $ETH, $BTC, $USDC, $USDT, and $DAI with up to 50x leverage.

Given QuickPerps’ decentralized and permissionless nature, spot and perpetual swap contract trades are powered by a liquidity pool called QLP. When users deposit liquidity to the QLP pool, they receive QLP tokens, which represent their total stake in the pool - they can then borrow up to 50x the value of their collateral from this pool to go long or short.

The current liquidity on Quick Perps is $4.5 mn, with immediate plans to scale.

The Polygon zkEVM Mainnet Beta is EVM equivalent, with technical specifications on block-times and timestamp required on part of the Lyra technical team.

Polygon Labs

This proposal is being made by Jack Melnick, Senior Manager, Growth BD, an employee of Polygon Labs. Polygon Labs is a legal entity focused on the ecosystem growth and maintenance of the suite of Polygon networks.

Legal

The legal entity that is supporting this proposal is Polygon Labs Services (Switzerland) AG, a Swiss corporation known as “Polygon Labs”.

Conflict of Interest Declaration

There are no existing financial or contractual relationships between Polygon Labs and any of Lyra’s legal entities, including Lyra, Lyra tokens, nor investments of Lyra.

Risk Profile

Deploying on Polygon zkEVM should pose minimal risks, relative to deploying on alternate blockchains. As an Ethereum Layer 2, it uses Zero Knowledge proofs to inherit Ethereum’s core safety, while allowing developers to easily deploy existing EVM codebases. The bridge has been disintermediated, and Lyra can expect reputable oracle providers to be available as data providers. Polygon’s zkEVM testnet has been running for the past six months. Additionally, the deployment has been audited multiple times, by auditors including Spearbit and Hexens. Risks are outlined in detail here: https://wiki.polygon.technology/docs/zkEVM/

## Protocol security

Please address the following questions if you’re proposing a cross-chain deployment:

Does the bridge support arbitrary message passing? Yes

Is the bridge secured by a trusted entity, by a multi sig, or a protocol/set of incentivized nodes? No trusted entity, multi-sig, or a protocol/set of incentivized nodes, only L1 and L2 security. Pure smart contract interactions only.

Does the bridge leverage the security of the source chain (e.g. Ethereum L1) or destination chain, or is security provided by another third party entity? All based on L1 and L2. L2 security is based on the L1.

Is it possible for a fraudulent message to be passed to the destination chain? If so, are there any recall mechanisms? There are two ways to use the bridge, which do not allow for a fraudulent message to be passed to the destination chain:

· Native supported messages: Allow only bridging of ERC-20 and ETH. There is no fraudulent message that can be passed.

· Custom Messages: Custom receiver logic on the other side of the bridge. When you send a message, the message needs to be received by a smart contract, so you have to build the receiver smart contract, which is specific to the logic of that smart contract. The security is up to the person building the receiver smart contract. These custom messages do not take custody of any funds. All that is known is that the message will pass the bridge if implemented correctly. The bridge is just the message carrier.

What are the ramifications of fraud to the malicious actor? There is no ramification to contemplate due to there being no possibility of passing a fraudulent message to the destination chain, as described above.

Has the bridge code been audited? By a third party? As part of the main zkEVM audits, the bridge code was audited.

4 Likes

Lyra on zkEVM would be huge step towards expanding Lyra’s cross-chain presence and would also give it a huge first mover advantage. All the necessary requirements and tooling is already present and I hope to see this proposal pass :pray:

3 Likes

Is QuickPerps a GMX fork and is there a way to get a MATIC token grant for incentives? It would be important for bootstrapping liquidity on zkEVM.

I think this proposal would be interesting if Polygon can commit to either providing a reasonable amount of liquidity for the vaults or a MATIC grant to be used for incentives. Without that I dont see it being worth the dev time and it would probably just fragment the AMM liquidity.

3 Likes

No doubt it will be interesting to deploy on Polygon zkEVM, but as part of the defi lego building parts LYRA needs a lot of liquidity and protocols to be built there before it can even thinking to deploy on Polygon zkEVM.

Launching now it will drive to a protocol liquidity fragmentation and use of resources that could be really needed for other tasks with higher risk/return for the protocol (looking to Lyra v2 development…)

1 Like

I agree with Muir here.

Would be nice if Polygon could help out with incentives or liquidity for the vaults.

2 Likes

I agree with Muir, MasterMojo, and Alvaro.

1 Like

I think it’s a great proposal and I’d vote yes for sure, QuickPerps has proven already within a week’s launch to be driving zkEVM adoption & Lyra integrating with QuickPerps would be a game-changer, the tech is really starting to hit home

3 Likes

Ross from rhino.fi here. We would love for you to deploy on zkEVM and would love to help try and make this happen. I will reach out via Discord to see how we can best support

rhino has a super-fast, gas-free bridge to zkEVM that is currently one of fastest, cheapest (and most private) ways to on-board onto zkEVM. We have known the zkEVM team for the past several years and are big fans!

Disclaimer - I am a LYRA holder

2 Likes

Pretty sure the Quick team has leaked alpha that Polygon will give out Matic incentives for quickperps and that will be on top of the Quick and usdc incentives thats active right now

2 Likes

I like this proposal and the idea of seeing Lyra on a zkEVM. What markets would you be interested in seeing deployed? I would support this proposal under the following circumstances:

  • Incentives or grant in MATIC to bootstrap liquidity
  • technical integration isn’t too complex
  • Quickswap has sufficient liquidity
1 Like

Hey so polygon should be able to help with incentives.
Can speak to them about a grant.

Tech side is fairly straight forward. GMX fork.

QuickSwap team is also happy to help with integration where possible.
QuickPerps currently has 5 million tvl within a couple weeks.
This is with a small fraction of incentives from our side. Rewards will ramp up and the ecosystem as a whole will grow, along with that QuickPerps.

4 Likes

A great, well thought out proposal. Can’t underestimate the power of first mover advantage!

TVL and users are skyrocketing on zkEVM and gas costs are way down already

3 Likes

Thanks for the proposal. I have a few questions relating to the technical details required to launch on Polygon:

  1. What codebase would be deployed?
  2. What markets would be launched?
  3. What configuration/variables would be set?

For the proposal to pass, it would need to specify these things.

1 Like

Also can you please ensure the post complies with the template provided here: Lyra Request For Comment (LRFC) Template

1 Like

Do we have a list of configurable values that would need to be specified? since these were previously set by the council, none of the prior LEAPs to launch markets serve as a template. Is it every parameter specified here that would need to be listed: Pricing Parameters - Lyra Documentation is so, how can someone observe what is set for the current pools for reference?

1 Like

Yes for each market, there will need to be a full of configurable parameters specified.

You can see the current parameters for some markets here:

  1. Optimism ETH
  2. Arbitrum WBTC
  3. Optimism OP
1 Like