
According to TheBlockCrypto, the revenue of Ethereum miners reached $800 million in January, surpassing the all-time high three years ago, and the previous high was $762 million in January 2018. And 40% of it, or $311 million, came from online transaction fees, a record.
Behind the high income of miners is the result of the low performance of Ethereum. At present, the TPS of ETH cannot exceed 25. The proposal of Layer 2, especially the gradual maturity of Optimistic Rollup and ZK Rollup, can improve the performance of Ethereum by more than 300 times, allowing people to see the dawn of off-chain expansion.
Layer 2: Let most things be done at Layer 2, and then trust can be passed to Layer 1 through interaction with Layer 1.
Layer 1: Blockchains including ETH1.x, ETH2.0, Bitcoin, Tezos, and Polkadot (parallel chains) all belong to Layer 1, and the efficiency of Layer 1 has a performance limit.
secondary title
1. Overview of Layer 2
Layer 2 is essentially a general term for a category of expansion solutions, including state channels, side chains, Plasma, and Rollup.
First look at the state channel.
State channels were one of the first widely discussed scaling solutions, they allow participants to exchange transactions off-chain multiple times, while committing only two transactions to the base layer.
Although payment channels have the potential for thousands of transactions per second, they also have some drawbacks. They do not provide public participation - participants must be known in advance, and users must lock funds in a multisig contract. Most importantly, this scaling solution is application-specific and cannot be adapted to scale general-purpose smart contracts.
Raiden is one of the main projects on Ethereum utilizing state channels. Additionally, the concept of payment channels is also widely used by the Bitcoin-based Lightning Network.
Next, look at side chains.
Sidechains are Ethereum-compatible, independent blockchains that have their own consensus model and block parameters. Sidechain interoperability with Ethereum is made possible by using the same Ethereum Virtual Machine, so contracts deployed to the Ethereum base layer can be deployed directly to the sidechain. xDai is an example of such a sidechain.
Then come to Plasma.
Plasma is a Layer 2 scaling solution, originally proposed by Joseph Poon and Vitalik Buterin. This is a framework for building scalable applications on Ethereum. Plasma utilizes smart contracts and Merkle trees to create an unlimited number of child chains—copies of the parent Ethereum blockchain.
Plasma can offload transactions from the main chain to subchains and allow fast and cheap transactions. One downside of Plasma is that users have to wait a long time to withdraw funds from the second layer. Similar to state channels, Plasma bodies cannot be used to scale up general-purpose smart contracts. The OMG Network is built on their own implementation of the Plasma chain called MoreViable Plasma. And the Matic network is another example of a revamped platform using the Plasma framework.
In general, the first three types of Layer 2 solutions have basically faded away. On the one hand, they belong to early technologies, and on the other hand, there are problems of one kind or another in function.
For example, the state channel needs to lock the corresponding tokens, the side chain fails to solve the exit cycle problem, and Plasma requires participants to monitor in real time, which is severely limited. In addition, although Plasma and state channels can scale millions of transactions per second, they are not compatible with DeFi smart contracts. Therefore, in the context of DeFi has long been the moat of Ethereum, Plasma and state channels obviously cannot meet the actual needs.
Finally, the most important layer 2 solution, Rollup, is considered to be able to solve ETH performance problems.
Rollup was first proposed by V God in 2014, when it was called "Shadow Chain", that is, the shadow chain. The failure of Layer 2 solutions such as Plasma and state channels has caused developers to re-emphasize Shadow Chain, which we now call Rollup.
Rollup builds on the "Shadow Chain" to achieve data availability by enforcing state off-chain and using only the Ethereum blockchain.
Rollup can be divided into two types, Optimistic Rollup and ZK Rollup. The validity of Optimistic Rollup is guaranteed by fraud proof and synchronization assumption, and the validity of ZK Rollup is guaranteed by zero-knowledge proof.
secondary title
First look at Optimistic Rollup.
First look at Optimistic Rollup.
Optimistic Rollup was proposed by Consensys researcher John Adler at the Ethereum Foundation Research Forum in July 2019. Currently, teams working on Optimistic Rollup include Optimism (formerly Plasma Group), Fuel Labs, Arbitrum, etc.
From a technical point of view, Optimistic Rollup is an integration of the Ethereum Virtual Machine (EVM). Optimistic means "optimistic". Optimistic Rollup makes an "optimistic" state prediction of Layer 1 based on Layer 2 data, or in other words, based on The blockchain of Optimistic Rollup tends to believe that nodes will not do evil.
The operating principle of Optimistic Rollup is as follows. On Layer 2, users run a machine (OVM) for processing transactions and smart contracts. All daily operations are carried out in the Layer 2 machine; on the Ethereum Layer 1 chain , the user has the same OVM machine, and when an emergency occurs, the OVM machine on the Layer1 chain will run.
If someone thinks that a Layer 2 OVM operation is fraudulent, he can re-run the operation on the Layer 1 OVM computer to prove the authenticity of the operation.
Then look at ZK Rollup.
Then look at ZK Rollup.
ZK Rollup was originally proposed by Barry WhiteHat, a senior researcher at the Ethereum Foundation, in 2018. Its security is almost the same as that of Layer 1 (Ethereum), and it can produce blocks within one minute and increase the throughput to 2,000 tps. Projects implemented by ZK Rollup include Matter Labs and Starkware, among others.
The characteristic of ZK Rollup is that it replaces the fraud challenge with zero-knowledge proof, and the confirmation time is faster. There is no need to wait for two weeks to complete the finalization of a block in the shadow chain like Optimistic Rollup.
ZK Rollup brings the possibility of greatly improving the performance of Ethereum.
Taking the introduction of ZK Rollup in DEX as an example, the conversion logic of traditional decentralized exchanges is realized on Layer 2 through ZK-Rollup technology, so that all conversions can be completed on Layer 2, while reducing user transaction costs while ensuring improve the user's overall trading experience. Compared with traditional DEX, DEX based on ZK Rollup has the following advantages:
First of all, it can achieve almost zero Gas fees, and all token exchanges occur on Layer 2; secondly, it brings higher TPS (Transation Per Second) to DEX, which hovers around 15 compared to traditional Ethereum, based on ZK The TPS of Rollup's DEX can theoretically reach the order of 3000; finally, to ensure that the transaction is carried out in real time, since all transactions are migrated to Layer 2, users no longer need to wait for the confirmation time of a block, and real-time transactions can be realized.
So, Optimistic Rollup and ZK Rollup, which one do users prefer?
According to feedback, liquidity providers for DeFi applications will prefer ZKR-Uniswap (Uniswap built on ZK Rollup) over OR-Uniswap (Uniswap built on Optimistic Rollup) because the former is more capital efficient.
If you want to improve the capital efficiency of Optimistic Rollup, you need to shorten its challenge period (Dispute Time Delay, DTD), or shorten the time for funds to be redeemed from Optimistic Rollup, and at the same time reduce the "fraud + review" on Layer 1. "The cost of the attack.
secondary title
3. Rollup's "mishaps"
Overall, Rollup has great potential for Ethereum, but is still facing many challenges.
The most prominent problem is the composability between different Rollup-based DeFi applications. In simple terms, if there are different DeFi applications on different Rollup chains, the information exchange between different Rollup chains will be faster than that of the Ethereum main chain. Information exchange on the Internet is more difficult.
In other words, there is currently more than one Rollup-based blockchain, and each Rollup blockchain can run its own application, or different applications use different Rollup technologies. Once two different DeFi applications are based on different Rollup , the communication between the two will become extremely difficult.
This is the problem Rollup is facing. As the saying goes, it’s hard to do it alone. In order to maintain the composability of DeFi applications, DeFi servers will have to coordinate on a specific Rollup chain.
In addition, there are certain thresholds for developer migration. From a developer's perspective, migrating code to lLayer 2 will inevitably involve corresponding code changes, and will also generate certain audit and maintenance costs, which will reduce developers' willingness to migrate to a certain extent.