Web3 Beginner Series: Introduction to Ethereum Rollups

This article is machine translated
Show original

Ethereum, as one of the most active blockchain platforms, carries a large number of decentralized applications, from DeFi to Non-Fungible Token, with a very thriving ecosystem. However, the prosperity of on-chain transactions is accompanied by some inherent challenges, such as transaction fees skyrocketing due to network congestion, longer transaction times, and increased failure rates, which significantly affect the enthusiasm of on-chain participants.

To solve these problems while not affecting the distributed nature of the main chain, the community mainly adopts L2 scaling solutions. The core principle of L2 is to move computation and transactions from the mainnet (L1) to the second-layer network for execution, submitting only the final transaction results to the mainnet. This allows transactions to be more efficient and lower in cost while still inheriting the security of the mainnet.

More well-known L2 solutions include Rollups, sidechains, and others.

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

OP-Rollups

Let's first look at Optimistic Rollups, which performs all transaction computations and state updates on the L2 network (this can speed up transaction processing and reduce transaction fees), and then publishes the compressed raw transaction data to the mainnet (to ensure transaction validity). When submitting, L2 nodes will by default assume that these transactions are valid and do not contain malicious transactions, using a principle similar to real-world law: if no one can prove you guilty, you should be presumed innocent. This mode removes a large amount of unnecessary verification, greatly accelerating transaction confirmation speed and improving transaction efficiency.

After a transaction is submitted by a node, if a validator discovers a problematic 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 specifically point out the problematic transaction, validators only need to verify the specified transaction, thus quickly proving whether the transaction is indeed problematic. If a problematic transaction is found, the entire Batch containing that 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 their staked collateral), while the validator will receive some rewards.

If no fraud proof is submitted by any node within seven days, all transactions will be confirmed as legal by the blockchain network.

Currently, the "fraud proof" is a quite practical design, like the sword of Damocles in mythological stories, where its mere existence is more useful than actually using it for punishment. The ability to effectively deter "pests" is far greater than the effect of its own combat power. In the current situation, nodes almost never submit fraud proofs, let alone actually prove node misbehavior. The reasons are multifaceted, such as the projects implementing Op-Rollups have already undergone thorough testing, the severe penalties make the cost of misbehavior very high, and the economic and credit losses from node misbehavior far outweigh the negligible gains.

In fact, people more commonly encounter network fluctuations or interruptions caused by software bugs rather than node misbehavior. The drawbacks of Op-Rollups mainly lie in the capital circulation issues caused by the seven-day challenge period and centralization risks.

ZK-Rollups

In contrast to the optimistic Op-Rollups, ZK-Rollups require an additional validity proof when submitting data to the chain, beyond the compressed data itself. That is, ZK-Rollups also perform transactions off-chain and package transactions for submission to the mainnet, but before formal submission, they need to calculate a validity proof off-chain.

The concept of zero-knowledge actually existed before the birth of blockchain, but the complexity of the real world limited its application scenarios, typically restricted to specific privacy issues between two parties and usually requiring a centralized verifier, which meant it inherently required a certain degree of trust. The advantage of blockchain in applying zero-knowledge technology is its ability to naturally converge complexity within smart contracts, essentially only verifying data and calculations on the blockchain. What smart contracts cannot verify, it naturally cannot verify either. Therefore, compared to the previous approach, people only need to trust the decentralized smart contract, and this trust does not need to be anchored to any centralized organization or individual.

The complexity of ZK-Rollups relative to Op-Rollups lies in this: it needs to compile the data and actual logic of transaction execution into a complex logical circuit diagram, and then use a dedicated prover to generate a quickly verifiable result through cryptographic calculations based on this circuit diagram (which takes some time). Since mathematical operations depend on computationally powerful computers, specialized compilers and verifiers are typically used for these tasks.

Layer 2 Costs

So, one purpose of the L2 network is to reduce user interaction costs on L1, but what are its own costs?

For Op-Rollups, the costs mainly come from two areas: the transaction fee for submitting compressed transaction data to L1, and 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 Ethereum's EIP-4844 proposal has significantly reduced the fees for L2 interaction with the mainnet.

Additionally, maintaining nodes requires locking a large amount of funds that cannot be used for other purposes, which may cause investors to miss opportunities and result in indirect losses.

The costs of ZK-Rollups primarily come from computational costs, as generating zero-knowledge proofs requires significant computational resources and requires dedicated hardware. Like Op-Rollups, it also needs to bear the transaction fees for submitting data to the chain.

Moreover, specialized hardware deters ordinary users, which can lead to further network centralization.

Summary

Whether Optimistic Rollups or ZK-Rollups, both are key answers from the Ethereum ecosystem to address scalability challenges. Currently, both solutions are still evolving, and with Ethereum upgrades like EIP-4844, the data publication costs of L2 have been significantly reduced, which will further unleash the potential of both approaches.

Source
Disclaimer: The content above is only the author's opinion which does not represent any position of Followin, and is not intended as, and shall not be understood or construed as, investment advice from Followin.
Like
Add to Favorites
Comments