As one of the most active blockchain platforms, Ethereum hosts a large number of decentralized applications, from DeFi (decentralized finance) to NFT (non-fungible tokens), and the ecosystem is very prosperous. However, the prosperity of transactions on the chain is also accompanied by some inherent challenges, such as crazy increases in transaction fees, longer transaction times, and increased failure rates due to network congestion, which greatly affects the enthusiasm of participants on the chain.
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 move the calculation and transaction from the main network (that is, L1) to the second layer network for execution, and only submit the final transaction results to the main network. This can make the transaction itself more efficient and less expensive, while still inheriting the security of the main network.
The more well-known L2 solutions include Rollups, side chains, etc.
Rollups are further divided into Optimistic Rollups and Zero-Knowledge Rollups (ZK-Rollups).
OP-Rollups
Lets first look at Optimistic Rollups, which puts all transaction calculations and status updates on the L2 network (which can speed up transactions and reduce transaction fees), and then compresses the original transaction data in batches and publishes it to the main network (this is used to ensure that the transaction is valid). When submitting, the L2 node will default to assuming that these transactions are valid and do not contain malicious transactions. This uses real-world laws: if no one can prove you guilty, then you should be considered innocent. This model removes a lot of useless verification, which can greatly speed up transaction confirmation and improve transaction efficiency.
After the transaction is submitted by the node, if the verifier finds that a transaction has a problem, he can submit a fraud proof within seven days. This proof will be verified by the smart contract on L1. Since the submitter needs to clearly point out the problematic transaction, the verifier only needs to verify the specified transaction, so it can quickly prove whether the transaction has a problem. If the problematic transaction is indeed included, the batch in which this transaction is located and all subsequent batches will have to be rolled back, and the L2 chain will be rolled back as a whole to the state before the malicious transaction was executed. The malicious node will be punished (confiscation of the pledged deposit), and the verifier will receive some rewards.
If no fraud proof is submitted by any node within seven days, all transactions will be confirmed as legitimate by the blockchain network.
At present, the Fraud Proof is a very practical design. It is like the Sword of Damocles in the myth. Its existence itself is more useful than using it to impose actual punishment. The sword holder can effectively deter pests, which is far greater than the effect of its own combat effectiveness. As far as the current situation is concerned, almost no node has ever submitted a fraud proof, let alone really proved that the node is doing evil. There are many reasons for this, such as the various projects that have implemented Op-Rollups have been fully tested, severe penalties have led to a high cost of doing evil, and the economic and credit losses caused by node evil are far greater than the insignificant benefits brought by evil.
In fact, compared to node misconduct, people more often encounter network fluctuations and network interruptions caused by software bugs. The disadvantages of Op-Rollups are mainly the capital flow problems caused by the seven-day challenge period and the centralization risk.
ZK-Rollups
In contrast to the naturally optimistic Op-Rollups, ZK-Rollups require a validity proof in addition to the compressed data itself when submitting data to the chain. In other words, ZK-Rollups also conduct transactions off-chain and package transactions and submit them to the mainnet, but before formally submitting them, a validity proof needs to be calculated off-chain.
The concept of ZK actually existed before the birth of blockchain, but the complexity of the real world makes its application scenarios very limited. When applied, it needs to be limited to a very small range, such as the privacy issues of specific two parties, and usually there must be a centralized verifier, which determines that it itself needs to be based on a certain degree of trust. The advantage of blockchain in applying ZK technology is that it can naturally converge complexity into smart contracts. It actually only needs to verify the data and calculations on the blockchain. It naturally cannot verify things that smart contracts cannot do. Therefore, compared with the former, people only need to believe in decentralized smart contracts, and this trust does not need to be anchored to any centralized organization or individual.
This is also the complexity of ZK-Rollups compared to Op-Rollups. It needs to compile a complex logic circuit diagram based on the data when the transaction is executed and the actual logic of the transaction execution. Then, based on this circuit diagram, a dedicated prover is used to generate a result that can be quickly verified through 加密货币graphic calculations (this takes some time). Since mathematical operations rely on powerful computers, there are usually dedicated compilers and verifiers to perform these tasks.
Layer 2 Costs
Well, there is another question. One of the purposes of L2 networks is to reduce the cost of users interacting on L1. So what are their own costs?
First, Op-Rollups have two main costs: one is the transaction fee that needs to be paid when submitting the compressed transaction data to L1; the other is the operating cost of L2 nodes (including their hardware and profits). Ultimately, these costs will be passed on to users.
The good news is that Ethereum鈥檚 current EIP-4844 solution has significantly reduced the cost of L2 interacting with the main network.
In addition, maintaining nodes requires locking up a large amount of funds, which cannot be used for other purposes, which may cause investors to miss opportunities and cause indirect losses.
The cost of ZK-Rollups mainly comes from the computational cost. Generating zero-knowledge proofs requires a lot of computing resources and the deployment of specialized hardware. And like Op-Rollups, it also needs to bear the transaction fees for submitting data to the chain.
In addition, specialized hardware is prohibitive for ordinary users, which will also lead to a more centralized network.
总结
Both Optimistic Rollups and ZK-Rollups are key answers given by the Ethereum ecosystem to address scalability challenges. Currently, the two solutions are still evolving. With the implementation of upgrades such as Ethereum EIP-4844, the cost of L2 data publishing has been greatly reduced, which will further unleash the potential of the two solutions.
This article is sourced from the internet: Web3 Beginner Series: Introduction to Ethereum Rollups
Key Takeaways – World Free Finance (WLFI) combines the USD1 stablecoin backed by the US dollar with the community-driven governance token $WLFI to connect traditional finance with DeFi. – $WLFI is designed to be non-transferable, with 100 billion tokens allocated for sales, community incentives, supporters, and the team. – WLFI has completed over US$550 million in financing, launched USD1 on multiple chains, and facilitated a settlement transaction of US$2 billion, demonstrating its rapid implementation capabilities. – Investors need to weigh WLFI’s unique political background and transparent reserves, and pay attention to regulatory pressure and liquidity risks brought about by token lock-up. Have you ever wondered what world free finance is? Imagine WLFI is like a brand new financial hub that will be launched at the end of 2024, integrating the…