Proposal to Launch Curve on zkSync

Summary

To support Curve’s multichain mission and expand cross-chain experiences, we propose the deployment of Curve to zkSync 2.0 as a mainnet launch partner on behalf of the community.

  • zkSync ecosystem has over 150 projects committed to launching on mainnet, including top DeFi protocols, infrastructure, on/off ramps, etc.
  • Deploying on zkSync will onboard new users & increase user activity on Curve by decreasing costs compared to Ethereum without security degradation
  • zkSync shares Ethereum’s ethos as a free open-source project with a commitment to personal sovereignty, decentralization and community ownership

Through our ecosystem fund we will further grow a large list of projects that can be built on Curve as well as incentivize usage. We also propose that the Curve community provides CRV tokens as incentives to bootstrap the initial launch of Curve on zkSync.

About zkSync

zkSync 2.0 is a ZK rollup that supports generalized EVM compatibility for the Ethereum blockchain. The primary benefit of zkSync 2.0 is that developers who have created EVM dApps can port to zkSync 2.0 effortlessly and realize significantly lower gas fees and more transactions per second without compromising on security.

zkSync 2.0 is a significant leap forward in Layer 2 technologies with long awaited improvements and benefits for Ethereum developers:

  • EVM Compatible - supporting generalized EVM smart contracts on a ZK rollup making it easy to deploy existing dApps
  • ToolChain Compatible - able to port smart contracts with existing tools
  • Ethos Compatible - aligned with the ethos of decentralization and open-source
  • Certainty - using zero knowledge proofs offering certainty of security not probability
  • Future Proof - ecosystem partners that adopt zkSync 2.0 now will enjoy all future improvements without the need to change their code

Proposal

There’s significant value in Curve being available on an EVM compatible ZK rollup. Deploying early on zkSync helps solidify Curve’s market share and join established projects like Argent, 1inch, and Sushi that have committed to launch. There are also inherent speed, cost, and liquidity benefits without the typical security tradeoffs.

Transactions are expected to be roughly 1/50th the cost on ETH L1. This results in significant savings for Curve users. And while speed may be on par to other L2s in the short term with up to 2000 TPS at peak load, future scaling upgrades are expected with zkPorter i.e. off-chain data availability and L3.

Additionally, the time to move funds from ETH L1 to zkSync using the native trustless bridge is around 15 minutes and is significantly better than the on/off-ramp time of optimistic rollups which rely on fraud-proofs and typically take 7 days to resolve. This creates a much better user experience and improves liquidity across layers.

Stablecoins on zkSync will be listed on Curve to provide opportunities for CRV holders to earn trading fees. We propose that the Curve community also provides CRV tokens as incentives when appropriate. Through our grant programs we will further grow a large list of projects that can be built on Curve.

Specifications

Matter Labs will work with the Curve team to deploy all necessary smart contracts to start Curve pools and provide any additional tooling necessary to manage incentives for the Curve community, as well as work with third party vendors to perform smart contract audits. zkSync is EVM compatible so the deployment is expected to be completed with little to no alterations to the smart contracts.

References

Technicalities

  • Solidity/Vyper support; recommended to use ^0.8.0 and Vyper ^0.3.3 details
  • RPC is public: We fully support the Ethereum JSON API, with some additions for L2-level features. More information here
  • The Graph is currently indexing zkSync v1 and v2
  • Covalent available immediately after mainnet
  • Working on all other plugins (ape, founders, remix, truffle, tenderly)
  • Chainlink finalising, deploying shortly after mainnet
  • Audits in progress with multiple tier 1 auditors and bug bounty program

For:

Curve will be the first major stablecoin swap on zkSync, unlocking opportunities within DeFi and giving users a better experience.

Against:

20 Likes

how do we vote For this proposal

1 Like

ok ok ok ok ok ok ok ok ok ok
good project

To add to this proposal and show that this is very feasible, I’m adding below a deployed version of the Curve CryptoSwap Factory on zkSync 2.0 testnet.

I was able to do this by simply forking curvefi/curve-factory-crypto, updating the contracts to Vyper v0.3.3 and configuring hardhat with the zkvyper plugin.

The repo with deployment addresses, test transactions and more can be found here

Note: To update the contracts to v0.3.3 I had to:

  • Change N_COINS to uint256 (eg)
  • Change FEE_INDEX to uint256 (eg)
  • Convert some uint128 values to uint256 for comparisons (eg)

I have not looked much at the Vyper version changes so I’m not sure if these changes I made introduce possible vulnerabilities and are only to be used for testing. In the future, the CurveCryptoSwap2 should be used instead since it is already using v0.3.3

3 Likes

thanks for the awesome information.

i believe zkSync would be one of the dominant ecosytem for the next bull run. I’m in favor of this prop.

2 Likes