The choice of MCDEX V3 expansion plan: Optimistic Rollup or ZKRollup?

The choice of MCDEX V3 expansion plan: Optimistic Rollup or ZKRollup?

Loading

Although ZKRollup is a more ideal technical solution in terms of function, why does this perpetual contract exchange still choose Optimistic Rollup?

Written by: MCDEX

MCDEX requires L2 plan

Ethereum is currently the most important public chain ecology. Although MCDEX V3 adopts a multi-chain deployment plan, MCDEX will continue to develop together with the Ethereum ecosystem to serve Ethereum users. However, as we all know, the gas fee of Ethereum L1 is expensive, and the network throughput is low and the block time is long. MCDEX needs the Ethereum L2 solution for the following two reasons :

  • Reduce gas fees for transactions . Since the trading logic of perpetual contracts is more complicated than that of spot, MCDEX’s contract gas fee is about 5 times that of spot (Uniswap) . When L1 is crowded, Gas Price soars, causing users’ transaction fees to increase sharply. We need to reduce Gas costs through the L2 scheme.

  • Enhance liquidation capabilities . On the one hand, MCDEX’s clearing system needs to be able to clear positions with insufficient maintenance margin in a timely manner; on the other hand, users want to obtain higher leverage, that is, less maintenance margin. This requires the clearing system to complete the clearing in the shortest possible time . Therefore, we need infrastructure with larger throughput and lower latency than L1. Even in order to improve the clearing capacity, even a slight increase in the centralization of the system is worthwhile.

Requirements for the L2 program

No solution is perfect. We need to make compromises based on business needs and choose the most suitable solution for us. When choosing the L2 plan, we put forward some of our requirements for the L2 plan:

Technology maturity : The technology of the L2 solution must be mature and reliable, preferably a solution that has already released the main network and has users and applications. If it is a solution under development, at least it can match our V3 release schedule.

Degree of decentralization : In order to obtain the largest consensus and support the asset scale of one billion or even tens of billions of dollars, the higher the degree of decentralization of the L2 solution, the better. In terms of safety, it is best to be as close as possible to the safety of L1.

Developer friendliness : L2 needs to be compatible with EVM as much as possible, and provide a mature and complete development tool chain (compiler, debugger, sandbox environment), node (compatible with L1 API), infrastructure (the Graph, etc.)

Cost and performance : L2 needs to greatly reduce Gas costs; maximize TPS and minimize confirmation time, thereby increasing the clearing capacity of MCDEX.

Optional L2 plan

When we examine the Ethereum L2 solution, some optional solutions are:

  • State channel
  • Side chain (e.g. xDai/Matic)
  • Plasma
  • ZKRollups (Matter Labs / Starkware)
  • Optimistic Rollups (Optimism / Arbitrum)

Starting from the requirement of compatible EVM, the state channel, Plasma, and Starkware solutions are basically excluded . Although Matter Labs’ ZKRollup will support general EVM smart contracts in the future, this technology is still under development, and it may take several months to see the final product. Its technological maturity and progress cannot meet our v3 requirements. In fact, the side chain is a relatively good “transition plan”. But considering that the progress of Optimistic Rollup projects will soon be officially used on the mainnet within 3 months, and Optimistic Rollup provides better decentralization features than side chains, we will focus on Optimistic Rollup solutions on.

OptimismOVM and Offchain Arbitrum are both excellent Optimistic-like Rollup solutions (although sometimes we call the former Optic Rollup and the latter Arbitrum Rollup). The difference in their technical principles is mainly that OVM uses a single-round interactive process (interactive), while Arbitrum uses a multi-round interactive process. The other technologies of the two programs are not much different. Therefore, the two programs can be considered the same in terms of decentralization.

The main reasons why we currently choose Arbitrum are the following:

  • On-chain cost: Multi-round interaction has lower on-chain cost than single round interaction.

  • Technology maturity: Neither plan has yet been released on the mainnet. But Arbitrum provides detailed documentation, code, and a testnet that can be used for permissionless evaluation. Its code is under audit. Its mainnet release plan also meets the progress requirements of our project v3. We judge that Arbitrum is more technically mature and confident than OVM.

  • Developer friendliness: Arbitrum provides a development environment and node API that is fully compatible with EVM. We deployed MCDEX V2 to the Arbitrum testnet without modifying a single line of code. Infrastructure including the Graph can also be used smoothly. In contrast, OVM requires developers to slightly modify the code when dealing with time-related operations. The bigger problem is that the OVM project is approved in the early stage, which means that developers who are not approved by the OVM team cannot use OVM in the early stage. This greatly limits the freedom of developers.

  • Sequencer model: The Sequencer model is a new feature to be released in Arbitrum. This feature allows users to quickly confirm the status of the transaction at L2 without waiting for the transaction to be submitted to L1. This feature slightly sacrifices the degree of decentralization, but greatly speeds up the transaction confirmation time. Using this function, MCDEX V3 will have extremely fast transaction speed and clearing capabilities.

I must admit that compared to Optimistic Rollup, ZKRollup is a more ideal technical solution from a functional perspective . However, ZKRollup still has greater technical risks, and it will take a long time for its technology to mature. Therefore, starting from a relatively mature technology like Arbitrum, it is a more secure plan to promote our business development. Finally, there is a possibility in the future: as the ZKRollup technology matures, the Offchain team can also add ZK proofs to Arbitrum, thereby upgrading Arbitrum from Optimistic Rollup to ZKRollup.

Disclaimer: As a blockchain information platform, the articles published on this site only represent the author’s personal views and have nothing to do with ChainNews’ position. The information, opinions, etc. in the article are for reference only, and are not intended as or regarded as actual investment advice.