Web3 Newbie Series: Introduction to Ethereum Rollups

Ethereum, as one of the most active blockchain platforms today, supports a large number of decentralized applications, from DeFi (Decentralized Finance) to NFT (Non-Fungible Token), and the ecosystem is very prosperous. However, the prosperity of on-chain transactions is also accompanied by some inherent challenges, such as transaction fees skyrocketing frequently due to network congestion, longer transaction times, and increased failure rates, which greatly affects the enthusiasm of on-chain participants.

In order to solve the above problems without affecting the distributed characteristics of the main chain, the community mainly adopts the L2 expansion solution. The core principle of L2 is to execute computations and transactions on a second-layer network rather than the main network (which is L1), only submitting the final transaction results to the main network. This allows transactions to be more efficient and cost-effective while still inheriting the security of the main network.

Some well-known L2 solutions include Rollups, sidechains, etc.

Rollups are further divided into Optimistic Rollups and Zero-Knowledge Rollups (ZK-Rollups).

OP-Rollups

First, let's take a look at Optimistic Rollups, which perform all transaction calculations and state updates on the L2 network (this can speed up transaction speeds and reduce transaction fees), and then batch compress the raw data of transactions and publish it to the mainnet (this is used to ensure the validity of transactions). When submitted, L2 nodes default to assuming these transactions are valid and do not contain malicious transactions, using the principle of real-world law: if no one can prove you are guilty, then you should be considered innocent. This model eliminates a large amount of unnecessary validation, greatly speeding up transaction confirmation speeds and improving transaction efficiency.

After a transaction is submitted by the node, if the validator discovers an issue with a transaction, they can submit a fraud proof within seven days. This proof will be verified by a smart contract on L1. Since the submitter needs to clearly specify the problematic transaction, the validator only needs to verify the specified transaction, which allows for a quick determination of whether the transaction indeed has issues. If it indeed contains a problematic transaction, then the Batch containing this transaction and all subsequent Batches must be rolled back. The L2 chain will be rolled back to the state before the malicious transaction was executed, and the malicious node will be punished (forfeiting the staked collateral), while the validator will receive some rewards.

If no fraud proofs submitted by any nodes are received within seven days, all transactions will be confirmed as legitimate by the blockchain network.

Currently, the "fraud proof" is quite a practical design; it is like the sword of Damocles in mythological stories, and its existence is more useful than actually using it to impose penalties. The sword bearer can effectively deter pests, far outweighing the impact of its own combat power. From the current situation, almost no nodes have submitted fraud proofs, let alone truly proving that nodes have committed wrongdoing. The reasons are multifaceted, such as projects implementing Op-Rollups having already undergone thorough testing, severe penalties resulting in high costs for wrongdoing, and the economic and credit losses from node misconduct being far greater than the negligible gains from the misconduct itself.

In fact, compared to malicious node behavior, people more often encounter network fluctuations or interruptions caused by network volatility or software bugs. The disadvantages of Op-Rollups mainly lie in the liquidity issues caused by the seven-day challenge period and the risks of centralization.

ZK-Rollups

Unlike the naturally optimistic Op-Rollups, ZK-Rollups require an validity proof to be attached along with the compressed data itself when submitting data on-chain. In other words, ZK-Rollups also conduct transactions off-chain and bundle them for submission to the mainnet, but before the formal submission, a validity proof must first be computed off-chain.

The concept of ZK actually existed before the birth of Blockchain, but the complexity of the real world made its application scenarios very limited, often needing to be restricted to a very small scope, such as privacy issues between specific two parties, and usually requiring a centralized verifier, which determines that it inherently needs to be based on a certain degree of trust. The advantage of Blockchain when applying ZK technology is that it can naturally converge complexity into smart contracts. It essentially only needs to verify the data and computations on the Blockchain; there are things that smart contracts cannot do, and thus it cannot verify those either. So compared to the former, people only need to trust decentralized smart contracts, and this trust does not need to be anchored to any centralized organization or individual.

The complexity of ZK-Rollups compared to Op-Rollups lies in this aspect. It requires compiling a complex logical circuit diagram based on the data during transaction execution and the actual logic through which the transaction is executed. Then, based on this circuit diagram, a specialized prover uses cryptographic calculations to generate a result that can be quickly verified (this process takes some time). Since mathematical operations depend on powerful computing resources, there are usually specialized compilers and verifiers to carry out this work.

Layer 2 Cost

So, there is another question: one of the purposes of the existence of L2 networks is to reduce the cost of user interactions on L1. What about the costs of the L2 networks themselves?

First, there are Op-Rollups, which have two main costs: one is the transaction fees that need to be paid when submitting the compressed transaction data to L1; the other is the operational costs of L2 nodes (including their hardware and profits). Ultimately, these costs will be passed on to users.

The good news is that the Ethereum EIP-4844 proposal has significantly reduced the costs of interactions between L2 and the mainnet.

In addition, maintaining nodes requires locking a large amount of funds, which cannot be used for other purposes, potentially causing investors to miss opportunities and incur indirect losses.

The cost of ZK-Rollups mainly comes from computational costs, as generating zero-knowledge proofs requires a large amount of computational resources and the deployment of specialized hardware. Additionally, like Op-Rollups, it also has to bear the transaction fees for submitting data to the blockchain.

Moreover, professional hardware makes it daunting for ordinary users, which can lead to greater centralization of the network.

Summary

Whether it is Optimistic Rollups or ZK-Rollups, both are key answers provided by the Ethereum ecosystem to address scalability challenges. Currently, the two major solutions are still evolving, and with upgrades like Ethereum EIP-4844 being implemented, the data publishing costs for L2 have been significantly reduced, which will further unleash the potential of both solutions.

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 1
  • Share
Comment
0/400
Elisarosas01vip
· 6h ago
Buy to earn 💎
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)