Layer2

Date de publication : 23 janv. 2024Date de mise à jour : 16 mai 2024Lecture de 2 min

1. What is Layer2?

Layer2 is built on a layer-by-layer blockchain network (Ethereum), aiming to solve the problems of slow transaction processing speed and high transaction fees faced by the layer-by-layer network. Currently, Layer2 solutions include Zero-knowledge (ZK) rollups and Optimistic rollups, with the main difference being how to ensure the validity of the data. ZK rollops uses zero-knowledge proof, while Optimistic rollups uses fraud proof. Optimistic rollups solutions in the market include Arbitrum and Optimitic, while ZK rollops solutions include Zksync.

2. Why deploy ZKDEX on Layer2?

Ethereum can process about 15 transactions per second (TPS), and the cost is extremely high during peak period. While perpetual contract trading can be high in frequency and performed in real time, higher TPS may provide better trading experience for perpetual contract traders. Layer 2 has increased its throughput significantly and reduces costs while ensuring data integrity and availability.

3. Why choose ZK Rollups instead of Optimistic Rollups?

ZK Rollups is dependent on proof of validity. The new status is synchronized to Layer 1 blockchain and confirmed its validity. Optimistic Rollups rely on fraud proofs. Unless fraud proof is submitted to Layer 1 blockchain, the new status is assumed to be valid. ZK Rollups have several advantages over Optimistic Rollups:

  • Security: Data shall always be valid under ZK Rollups. However, status under Optimistic Rollups shall be invalid until no proof of fraud has been submitted during the 7-day challenge period, it shall be then confirmed that it contains invalid data. In comparison, ZK Rollups are more secure.

  • Withdrawal Efficiency: Withdrawals on Optimistic Rollups require 7 days, while withdrawals on ZK Rollups can be completed in up to 12 hours.