Author: The Mandalorian

Ethereum Mall is very lively and has many shops. You can trade in shops like Uniswap and Curve, or play games in shops like Axie Infinity.

Ethereum Shopping Mall adheres to the principle of decentralization. When users consume, there is no institution like a bank to provide unified settlement services.

Instead, independent cashiers (nodes) jointly maintain a decentralized ledger. This decentralized ledger is the Ethereum blockchain itself.

Since there is no unified manager, in order to ensure that the ledgers of each cashier are consistent and to prevent some cashiers from maliciously tampering with the ledgers, the Ethereum Shopping Center has formulated detailed rules for each independent cashier.

First, each cash register must download the ledger, which means that everyone's ledger is consistent from the beginning.

After that, users start submitting transactions. Each cash register has a data packet, and everyone grabs the transactions submitted by users and tries to fill the data packet.

Then, everyone will follow a specific proposal rule and choose a data packet from a certain cash register as the standard (to reach a consensus). At this time, this cash register has a new data packet (new block), right?

Therefore, he needs to broadcast the information of his new data packet, and other cash registers download this new data packet. In this way, everyone's ledger is consistent again.

Here comes the key question!! After other cashiers download the new data package, they also need to verify whether the transaction in this data package is real. How to verify it? It is to simulate and execute the transaction contained in the data package.

In order to verify transactions, the cashier must also maintain the current status (current balance of the user account, smart contract status, etc.), store historical status and other information.

In general, the cashiers in Ethereum shopping malls need to complete tasks at four levels: consensus (ensuring ledger consistency), settlement (confirming transactions), data (recording users' current account balances and historical transaction records, etc.), and execution (executing user transactions).

That is, usually, Layer1 is divided into four layers:

1) Consensus layer

2) Settlement Layer

3) Data Layer

4) Execution layer

This makes Ethereum very decentralized and secure, but inefficient, causing people to often queue up for settlement.

Thus, the "modular" reconstruction of the Ethereum shopping mall began. (The concept of "modularity" was first proposed by the Celestia team, usually referring to the expansion of Ethereum)

The reconstruction plan is called "Rollup". The principle is to build several more buildings around the original Ethereum shopping center, also serving as shopping centers.

Afterwards, high-rise buildings with names like “Arbitrum, Optimism, zkSync, Scroll” were built one after another, and of course, there was Manta Pacific built by Manta Network.

These towers are connected to the Ethereum main building by a "bridge".

For example, when users are shopping in the Optimism building, after a while, the "cashiers" in the Optimism building will compress and package the sorted user transactions and submit them to the Ethereum main building.

The cashier in the Ethereum main building conducts the final settlement, confirming that the user's shopping behavior in the Optimism building is valid.

Do you remember that the Ethereum main building needs to complete four levels of tasks: consensus (ensuring ledger consistency), settlement (confirming transactions), data (recording users' current account balances and historical transaction records, etc.), and execution (executing user transactions)?

As a result, other shopping malls took on the execution function, which is to separate the execution layer from the Ethereum main building and reduce the burden on the main building. In other words, each Layer2 is actually the Ethereum execution layer, and so is Manta Pacific.

The Ethereum main building actually becomes the "settlement center" to confirm the finality of transactions in other buildings.

Migrating user transactions to the building and turning the Ethereum main building into a settlement center is indeed a clever approach. Compressing transactions submitted by users in other buildings and submitting them to the Ethereum main building settlement center in batch form can greatly improve the efficiency of the main building in processing transactions.

The question is, how can the Ethereum main building determine whether the transactions submitted by other shopping malls are correct? What if the cashiers of other shopping malls cheat and maliciously tamper with user transactions?

Therefore, the Ethereum main building verifies the correctness of transactions in two ways: Fraud Proof / Optimistic Rollup and Validity Proof / ZK Rollup.

Fraud proof is based on economic assumptions. Other cashiers can challenge a cashier for doing evil and prove that he or she maliciously tampered with transaction information. If the challenge is successful, the cashier can obtain the fines and confiscations of the evil cashier.

Shopping malls planning to adopt fraud proof include Optimism, Arbitrum, and others.

The validity proof is based on cryptographic assumptions. When users make transactions in shopping malls such as zkSync, Starknet, Scroll, and Linea, the cashiers of these shopping malls will collect everyone's transaction information and generate a cryptographic-based zero-knowledge proof (ZK proof for short) to prove that the user's balance and other status information have changed.

The cashier will transmit the ZK proof to the settlement center of the Ethereum main building. The settlement center will use cryptography to verify the ZK proof and thus verify the correctness of the transaction information represented by the proof.

Therefore, Optimistic/ZK represents the way the Ethereum main building verifies the correctness of transactions in each shopping mall, while Rollup represents the way each shopping mall packages and compresses its own transactions and transmits them to the settlement center of the Ethereum main building.

Another point is that since ZK proofs involve the use of cryptography and mathematical principles, the encryption method is very different from the original Ethereum main building, so the settlement system of the Ethereum main building does not actually support the generation of ZK proofs.

This has resulted in shopping malls such as zkSync, Starknet, Scroll, and Linea having to transform their settlement systems.

This transformation requires the original merchants in the Ethereum main building to learn and adapt to new settlement systems of shopping malls such as zkSync, Starknet, Scroll, and Linea, which is not very friendly to the original merchants in the Ethereum main building.

In contrast, Optimistic Rollup shopping malls represented by Optimism and Arbitrum have almost no clearing system compatibility issues.

Secondly, although the ZK Rollup shopping mall is theoretically safer than the Optimistic Rollup shopping mall, the security of the ZK clearing system itself, the security of the language for writing the ZK clearing system, and the security of the compiler that compiles the ZK programming language into Ethereum’s native language all need to be tested by time.

In addition, at present, the transformation between Optimistic and ZK has also become very modular, so the services, user experience, scale effects and network effects provided by shopping malls may be more important.