Ethereum 2.0 should also focus on Layer 2, especially Rollup, to improve scalability.
One
Why does Ethereum need to expand so urgently?
In fact, it comes from the limitation of Ethereum itself. At the beginning of the design, the overall capacity of Ethereum was limited, at least before Ethereum 2.0. According to your simple estimation, if it is a pure ordinary transfer transaction in the Ethereum network, the number of transactions per second (TPS) should be less than 30. If there are some more advanced or complex smart contract types that need to be calculated, its TPS may be much less than 30 transactions, so it has a natural bottleneck.
The Ethereum blockchain is a network of bidding mechanism. Everyone can set their own target price. The transaction of the higher price will be confirmed as soon as possible. Therefore, the indicator called gas price in the Ethereum network can be very effective. Obviously evaluate the congestion level of the Ethereum network. We pulled the median of daily gas on the Ethereum chain calculated by Blockchair to measure the daily gas situation and trend of Ethereum.
When Ethereum is actually put into use, and gas starts to fluctuate, it may be around 2017. In fact, in 2017, 2018, 2019, or even early 2020, it can be seen that gas fees are generally within 10, even a Digits. There may be some peaks. For example, at the end of 2017, the first real large-scale application of Ethereum was an application that reduced the financing cost of start-up teams, pushing Ethereum’s gas to a level of nearly 100.
In 2018, there will be other more general application scenarios, which will also push the gas to the level of about 100, but it will immediately return to the single-digit level at one time.
We see that after the middle of 2020, the gas fee of Ethereum has increased rapidly.
On the day of 540, Uniswap, the most famous decentralized transaction protocol on the Ethereum chain, released new trends and made some airdrop operations. As a result, very, very many people on the chain transfer or operate, leading to Ethereum. This chain is very crowded.
What is the level of 540? The most common transfers cost at least a few dollars or even a dozen dollars, and the more complex smart contract operations also cost at least tens of dollars or hundreds of dollars, so this is the level. After the event of Uniswap, we saw that although the whereabouts were obvious, it still maintained a relatively strong historical high level, which may be less than the average level of 100.
Looking at it from another angle, there is a very obvious data for financial business on the chain. We use the data of DeBank, and DeBank takes all the data on the Ethereum chain. This is a trend chart of the number of transactions related to decentralized exchanges on the Ethereum chain throughout this year. At the beginning of the year, the number of transactions per day may be less than 10,000. By the end of the year, it had reached more than 100,000 per day. The level has increased by at least a large order of magnitude.
And the biggest problem is that there is no downward trend at all. The number of transactions is directly related to the cost of Ethereum gas, and the correlation is very strong, because each transaction needs to pay the gas cost, and the financial and transaction smart contracts on the chain It is more complicated than ordinary transfers, so the cost will be higher and will consume more computing resources on the chain.
So here comes the problem. Now that there is no decline or less trend in the applications on the Ethereum chain, the biggest problem now is the need to expand, because after increasing the gas cost by 1-2 orders of magnitude, the ether This concept of Inclusive Finance has been impossible to realize, so it needs a very fast speed to let more people use it. If more people need to use it, it needs a very fast speed to expand the capacity. .
two
Ethereum 2.0 or Layer 2?
(1) Layer 2 can land quickly.
We all know that Ethereum 2.0 ultimately solves the problems of scalability and expansion, but it may really take 2 years or more for Ethereum 2.0 to finally go live in the first and second phases of Ethereum. Although the zeroth phase is now online, it is only a beacon chain, and the infrastructure and direction of Ethereum itself have been slightly adjusted.
We see that at least this year, some Layer 2 network projects have been launched, and there will be more Layer 2 network projects going online next year, so there will be more and more choices for developers, and this ecosystem may also It will become more and more complicated.
(2) Ethereum 2.0 will also revolve around Layer 2 technology.
Ethereum 2.0 should also focus on Layer 2, especially Rollup, to improve scalability.
At least everyone agrees on one point, which is to deal with the short-term and mid-term expansion needs. The entire Ethereum ecosystem needs to focus its efforts on Rollup. Rollup is one of Layer 2 technologies.
three
What is Layer 2?
Since everyone is determined to vigorously develop Layer 2, then what is Layer 2?
The Chinese literal translation of Layer 2 is the second layer network. It is actually a relative concept, not a very direct concept. Its relative concept is Layer 1. What is Layer 1? It is the underlying protocol of the blockchain. For Ethereum, Layer 1 is the Ethereum network itself. In addition to the Ethereum network itself, other independent networks built above can provide other additional calculations or storage, and ordinary transactions. These resources of the Ethereum itself can be carried out on Layer 2, and then through some nodes and Without permission, the Layer 2 network and the Layer 1 network can perform specific data interactions to expand the Ethereum network.
Of course, the fundamental reason for this is because the capacity of the Ethereum network itself is limited, and the number of transactions per second is within 30. How to use the Ethereum Layer 2 network better? In fact, there is another point. Although I only drew a Layer 2 network here, in fact, as far as the Ethereum network is concerned, it is very compatible. Each team can develop its own Layer 2 network, so the Ethereum network may be A single Layer 1 and multiple Layer 2 networks will develop together.
four
What are the expansion solutions for Layer 2?
If you divide it by time, before 2018, I called it the first-generation expansion technology. After 2018, some second-generation expansion technologies may slowly emerge. Actually, the official will not mention it, but it is easier to remember.
The first-generation expansion technology is mainly based on Plasma, and there are actually some relatively early expansion technology solutions, including state channels. The state channel is a bit similar to the Bitcoin Lightning Network. A fast network channel can be established between two users. The two can deposit and withdraw a part of the funds in the channel, update their latest status regularly, and finally proceed to Layer 1 when they exit. Settlement.
Plasma will be briefly introduced later. In fact, several research teams have already abandoned Plasma technology, including the most important team in Plasma technology, the Plasma group. They are teams funded by the Ethereum Foundation. At the end of last year and early this year Said that the Plasma team will be disbanded and then reorganized. After the reorganization, they will study Rollup technology. The Rollup technology they study is called Optimistic Rollup. But there are still Matic and OMG teams that are still developing and researching Plasma’s technology, and Matic’s mainnet should be on the chain.
The second-generation expansion technology is also some other related solutions led by Rollup. Rollup mainly has two relatively large concepts: (1) ZK Rollup, which uses zero-knowledge proof to achieve data security; (2) Optimistic Rollup is a combination of some characteristics of Rollup and some characteristics of Plasma. Kind of expansion plan. Of course, there is also Volition (Validium), which is a combination of Rollup and Plasma related technologies. So overall, the expansion solution of Layer 2 is still based on the two larger ones, Plasma and Rollup.
I have compiled the relevant timeline here, which can be used as a reference. The Plasma paper was actually released in August 2017, and several optimized versions were released, including Plasma Cash, etc., with some progress. But in 2020, the Plasma Group team disbanded, and they reorganized to study Optimistic Rollup technology.
Rollup and ZK Rollup were actually in September 2018. In the middle of 2019, a team put forward the concept of Optimistic Rollup, which combined some of the advantages of ZK Rollup and Plasma to form such a concept. Almost in 2020, projects related to ZK Rollup and Optimistic Rollup concepts have been on the testnet.
Including the domestic team Loopring, they have already launched ZK Rollup trading at the beginning of 2020, but they are dedicated solutions that are only implemented for their own exchange applications and have not yet been given to others The team provides common solutions.
Fives
Plasma
I will briefly introduce how Plasma is implemented, and I will spend more time to introduce Rollup later.
Simply understand, the bottom Root Chain is Ethereum, and there is a Plasma Blockchain on Ethereum, which is another layer of the plasma blockchain network. Alice above is one of them, and of course there are others who regularly aggregate the status of many people to the Plasma Blockchain, and regularly publish some of the lowest hash values to the Ethereum network as a proof. It also incorporates some fraud proof mechanisms in it. If there are problems in the release process, you can still question or punish the nodes.
To put it simply, it is such a concept, but when the community pushes it or the project is adopted, some problems will be found. There are two larger problems.
1. When the Plasma blockchain interacts with the Ethereum chain, it does not include all transaction data of the Plasma chain. In fact, it does not include the data of each state change of the Plasma chain. This will cause the Ethereum chain to break away from the Plasma circle. There is no way to restore the data every time, so it relies heavily on Plasma protection.
2. The exit period is relatively long, because each node regularly submits relevant data to the Ethereum chain, but because of the fraud proof mechanism, users enter the Ethereum chain at a very fast speed, but they have to exit Plasma. In the case of blockchain, it may take at least a week to ensure relatively high security. Otherwise, someone may do evil in it for a short time, and the funds may be at risk.
However, Plasma itself still has some advantages because it will not submit all data to the main chain, so the potential expansion effect will be very high, which may be much higher than the later Rollup plan.
six
Rollup
Next, we will introduce Rollup. There is currently no suitable Chinese translation for Rollup. It can be understood as the concept of curling, rolling, storage, and aggregation. Although there have been discussions in the community about giving it a Chinese name, I think it is not particularly appropriate.
In fact, Rollup currently has two main concepts, mainly to solve the problem of Plasma data availability. In fact, two different solutions are used to achieve it, one is called ZK Rollup and the other is called Optimistic Rollup.
ZK is to use zero-knowledge proof. Optimistic means optimism. There are many optimistic aspects in its mechanism. It is believed that honest people will submit honest data, and if they are dishonest, they will be punished.
The main teams of ZK Rollup include Matter Labs, Loopring, Hermez and Aztec. Optimistic Rollup mainly includes OPTIMISM, Offchain Labs, and Fuel Labs. OPTIMISM is actually a team reorganized by Plasma Group. OFFCHAIN also belongs to Optimistic Rollup from the general category, but they are also called Arbitrum Rollup, which uses a more complex multi-round interaction scheme.
The most intuitive way to understand what is ZK Rollup and Optimistic Rollup. ZK is zero-knowledge proof, which uses zero-knowledge proof technology; Rollup, as I explained earlier, it means aggregation, or you can understand it as compression. I think it’s better to understand it as transaction compression. . The word Optimistic comes from the fraud proof in Plasma. The fraud proof is that it first optimistically believes that you will submit accurate data, and then question you.
So Optimistic Rollup is Plasma’s fraud proof mechanism plus the transaction compression meaning directly represented by Rollup. The ZK Rollup is also called validity proof in the community. Compared to the fraud proof Fraud Proof, it can also be called Validity Proof, because it directly provides a very clear evidence to tell you that the transaction is valid.
We can briefly understand what is called “transaction compression” and what is called Rollup?
We took a screenshot from the Hermez team white paper, which I think is very easy to understand. On the left is the number of bytes required for an ordinary Ethereum transfer transaction. Simply put, it is the required capacity. For example, a receiving user’s address requires 20 bytes, but at the same time, the transaction on the Ethereum chain needs to submit ECDSA. The signature proves that the transaction was sent by a certain sender, and a signature is required to ensure its security. This signature requires 64 bytes.
The solution provided by Hermez at the time was that both the sender and the receiver only need 3 bytes, and the Amount only needs 2 bytes, so the difference is very large in comparison, as long as a transaction can be realized in less than 10 bytes.
Let’s look at it in more detail and understand more directly how ZK Rollup compresses data and adds the ZK part. For example, there are some transactions on the chain, and each transaction has its sending address, receiving address, quantity or signature data, just like the Hermez team just now. The sending address and receiving address may be the address of the public key on the more complex Ethereum chain, which is 20 bytes. So how does ZK Rollup do?
The first step is to compress the data such as the sending, receiving and quantity of scattered transactions. The original very complicated public key address can be mapped to a string of numbers, for example, it can be mapped to numbers like 10293, sending address and receiving address. Can be compressed to such a small amount.
The second step is to compress the signature data and use ZK. There is a feature of zero-knowledge proof. How to understand it? It turns the original 6 signature data into a zero-knowledge proof. A zero-knowledge proof can prove that these 6 transactions are all valid transactions signed by the sender. Then pack these 6 transactions into a large Rollup transaction and submit it to the main chain.
Of course, in actual operation, the number of real transactions will be more, thousands or even more. My 6 transactions are just a simple example. As the number increases, the increase in the capacity of zero-knowledge proofs may not be so large, so many transactions will evenly share the cost of that part of the proof.
ZK Rollup will also bring some new challenges, of course, it also has its advantages.
Challenge 1: It is different from the signature mechanism. Generating zero-knowledge proof requires a lot of computing resources, and different solutions may be developed for different hardware. Therefore, computing resources may require a relatively large investment.
Challenge 2: It is relatively difficult to support general smart contracts, because zero-knowledge proves that it is not achievable by ordinary smart contracts. There are its circuits, designs, and so on, so it is supported by general smart contracts. Compared with the above difficulty, OR will be relatively more difficult.
Advantage:
Compared with Plasma, its advantage is that every transaction data exists on the Ethereum chain.
It can provide almost the same security as Layer 1, because it is equivalent to each transaction having its own signature to prove that each transaction is valid.
When users enter the network and exit the network, the speed can be very fast. Unlike Plasma or OR, the exit network may be calculated in units of days, and they may be realized in a few minutes.
According to the data published by various companies, the expansion effect that ZK Rollup can achieve may be an increase of up to two orders of magnitude, which should be less than 3000 TPS, but an order of magnitude increase will make a very, very large contribution to the entire network.
In fact, Optimistic Rollup can be directly compared with ZK Rollup. How to understand? The part of compression (Rollup) is relatively similar. It can compress the sent and received data, but it has a great feature that there is no zero-knowledge proof to ensure that the state is correct, and there is no zero-knowledge proof to ensure that every Each transaction is valid, but it is guaranteed by fraud proof.
That is, any node can send this Rollup transaction to the Ethereum main chain, but if someone finds that the submitted data is wrong, they can submit a fraud proof and submit their own proof. If this proof can also be proved to be valid, then The previously submitted nodes will be subject to some financial penalties. Therefore, the security of the chain and the security of Optimistic Rollup are ensured through the mechanism design of game theory and economics.
Compared with ZK Rollup, Optimistic Rollup has different challenges and advantages.
Challenge 1: Due to the use of fraud proof, the user’s exit cycle is relatively long, and the user experience may be relatively poor. Of course, there are actually some projects that are trying to solve the problem of a long exit period.
Challenge 2: Although everyone says that the security of Optimistic Rollup can be the same as that of the main chain, overall, because it does not have the ZK part, we think that its overall security may be slightly lower than the Ethereum main chain.
But it still has its own advantages.
Advantage 1: Like ZK Rollup, compared to Plasma, every transaction data is stored on the main chain, so data availability is no problem.
Advantage 2: It is easier to support general smart contract technology. For example, Optimism’s OVM technology can be compatible with Ethereum’s smart contract, so for developers, its migration cost may be lower on Layer 2.
There are also some teams that have disclosed their expansion effects. It seems that they are actually similar to ZK. The maximum level is two orders of magnitude, which may also be the theoretical maximum.
Let’s look at the comparison of these three directly. Compared with the two Rollups, Plasma’s biggest advantage is that transaction data and state transition data are stored on the main chain, so this chain can continue to operate without Layer 2 (layer 2 network) Yes, not to say that data availability will disappear after leaving Plasma.
There are also some features. ZK Rollup relies on cryptography and zero-knowledge proofs, while Optimistic Rollup relies on fraud proofs, game theory and economic mechanism design. To support general-purpose smart contracts, ZK Rollup is relatively difficult, and the other two are relatively simple. In terms of the exit period, Plasma may take about 2 weeks. Of course, there are better solutions that may be shorter, and Optimistic may take days. In terms of security, ZK Rollup may be the most secure. Although the other two will not lose money, they may pay some time costs in it.
You can take a look at the ecological panorama of the eight expansion plans of Ethereum that we have recently produced. In terms of general solutions, the first 3-4 teams may be the best ecological construction projects at present. They have relatively strong investment institutions, including Ethereum The Fang Foundation is inside. Paradigm, STARKWARE, and MATTER are all supporting the expansion team.
From an ecological point of view, Optimistic already has OPTIMISM, and ZK Rollup has Matter Labs. In terms of application, Optimistic’s applications SYNTHETIX, UNISWAP, and Compound are the head teams, and the head team of financial DeFi applications on Ethereum. The following teams, Aztec, Loopring, Fuel, and Hermez are currently still building their ecosystems.
I mainly answered these questions:
Why does Ethereum urgently need to expand? Because the speed of application development is too fast, especially financial applications, there is a natural ceiling on the capacity of the Ethereum chain, and it cannot be directly opened up in the short term.
What are the current Layer 2 plans? The core may still be Plasma and Rollup, which are the two programs that the community is most concerned about.
The biggest problem with the first-generation expansion technology Plasma is the lack of data availability, so it has not been rapidly applied in recent years.
Rollup, the second-generation expansion technology, its biggest principle is to compress on-chain transactions, states or smart contracts. Of course, there are sub-schemes, including ZK Rollup, which uses zero-knowledge proof, and Optimistic Rollup, which uses fraud proof to ensure Security.
What is the ecology of Rollup? We just saw that it is developing very fast, and different solutions are already building the ecosystem. Next year may be a year of faster development of the Rollup ecosystem, and many applications and networks may be officially launched next year.