Layer2

تم النشر في ‏14 يوليو 2023تم التحديث في ‏7 يونيو 20242 دقيقة قراءة

1. What is Layer 2?

Layer 2 is built based on a Layer 1 blockchain (Ethereum) and aims to tackle issues such as slow trading speed, high trading fees, etc. The current Layer 2 offers solutions include Zero-knowledge (ZK) Rollups and Optimistic Rollups. The main difference between these two lies in their proving scheme for data validity, with ZK Rollups using zero-knowledge proofs and Optimistic Rollups using fraud proofs.

2. Why are perpetual contracts deployed on Layer 2?

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 over Optimistic Rollups?

ZK Rollups is dependent on proof of validity. New status is synchronized to Layer 1 blockchain and confirmed its validity. Optimistic Rollups rely on fraud proofs. Unless a 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.