Editors Note: This article comes fromimToken(ID:imToken), reprinted by Odaily with authorization.
Editors Note: This article comes from
, reprinted by Odaily with authorization.
Finance is the easiest scenario for blockchain to land. In the past year, many of the various decentralized financial products we have seen in the Ethereum ecosystem have the shadow of traditional financial products, such as decentralized lending, transactions, derivatives, etc. In the pursuit of efficiency in finance, the transaction processing capacity of the Bitcoin network is 5 transactions per second, and the Ethereum network is 15 transactions. Compared with the average of 2,000 transactions on the Visa network, the efficiency of tens of thousands of peaks is like a product of a different era. The TPS (transactions per second) of the blockchain limits the popularization of the blockchain to a large extent, and thus limits inclusive finance. Recently, a new term called DeFi post-modernism has appeared, and I think that the modern era of DeFi has not yet arrived. The popular DeFi in the past six months may only be BC. Limited by TPS, the transaction processing mechanism of the highest price makes the Ethereum network expensive and congested during the DeFi boom. When the congestion is the most, the gas value exceeds 1000 gwei, and it becomes commonplace for a single transaction to cost tens of hundreds of dollars. Such transaction costs also keep many people out of DeFi. Facing the current problem of extremely limited scalability, the Ethereum community and developers have proposed solutions in two directions, Layer 2 and sharding (an important upgrade of Eth2). Layer2 literally means a two-tier network. In contrast, the current Ethereum mainnet is also called a layer-1 network (Layer1), and the second-tier network is a system based on the current Ethereum mainnet. The Layer 2 solution is mainly from the perspective of reducing the burden of Layer 1, and moves the large amount of calculation requirements of Layer 1 to Layer 2; the fragmentation is from a more basic point of view, by increasing the number of Layer 1 to achieve the purpose of improving the basic bandwidth. Eth2 is expected to be implemented in four phases. It is currently in the start-up phase of the deposit contract at phase 0. The specific information about Eth2 will not be expanded in this article. We will continue to follow up on the latest progress of Eth2. Next, this article will introduce the common solutions and main progress of Layer2. We know that the current transaction processing capacity of Ethereum is mainly limited by block size and block generation time. The block size determines the number of transactions that can be accommodated in a single block of the current Ethereum network; the block generation time determines that a block can be generated every 12 seconds on average. There are many current mainstream Layer 2 solutions. This article focuses on Plasma and Rollup. Rollup can be subdivided into Optimistic Rollup and ZK Rollup. These solutions solve the problem of the limited transaction processing capacity of Ethereum from different angles. secondary title Plasma is the first solution in the Ethereum community to try to solve the network processing problem. It was proposed as early as 2017 and has high hopes. Before introducing Plasma, you need to understand the concept of side chain. Since the expansion of the Ethereum main network is not easy, developers thought of creating an independent blockchain connected to the main network, that is, a side chain, to achieve expansion of the main network by efficiently processing transactions on the side chain. The potential problem of the side chain is security. As an independent blockchain, the side chain needs to have its own miners and establish enough computing power to ensure security. Sufficient computing power and miners who do not do evil are not suitable for the current Bitcoin mining industry. For blockchains other than Bitcoin and Ethereum, it is not a small threshold.Plasma
Different from side chains, Plasma processes Layer 2 transaction data and submits it to Layer 1, and adds an exit mechanism for fraudulent proofs. In this way, Layer 1 computing power is used to ensure Layer 2 security.
In theory, Plasma can increase the TPS of Ethereum to 1-9k. As a result, Plasma has received widespread attention. But in the subsequent development, more practical problems were exposed:
All users are required to monitor all transactions on the Plasma chain
Rollup
Later, the development of Plasma stagnated and progressed slowly, but recently we have also observed that some projects continue to explore and make breakthroughs based on Plasma. The progress of related projects will be introduced below.
secondary title
Rollup is the Layer 2 solution that has received the most attention and is most likely to be implemented. As mentioned above, the number of transactions that can be included in each block of the Ethereum network is limited, while Rollup achieves TPS improvement by packaging and compressing thousands of transactions, and then synchronizing the processed and concise data to the Ethereum main network , to solve the problem of limited network transaction processing capacity.
The difference with Plasma is that Plasma synchronizes the results of transaction processing to Layer1. We cannot directly upload the data of Layer1 to know the information of each transaction. However, the transaction data synchronized to Layer1 after Rollup compression processing contains Basic information about each transaction.
ZK Rollup
From the above description, we can also understand that the Rollup scheme improves the transaction processing capability linearly. The more transactions are packaged and compressed, the larger the packaged data will be. In actual tests, Rollup can increase TPS by 100 times. Under the current Ethereum network (that is, the first generation of Ethereum), the TPS can reach up to 2k, which is the average processing capacity of Visa; after combining with the fragmentation of Eth2, the theoretical TPS can reach 20k+, which is close to or exceeds the peak level of the Visa network .
>According to how to ensure the correctness of compressed data, Rollup can be divided into ZK Rollup and Optimistic Rollup.
ZK Rollup ensures security through zero-knowledge proof zk-SNARKs cryptography technology, ZK is the abbreviation of zero knowledge (zero knowledge).
Zero-knowledge proof: The prover can convince the verifier that a certain assertion is correct without providing any useful information to the verifier.
ZK Rollup = transaction compression + zero-knowledge proof (zk-SNARK)
The core idea of ZK Rollup is to reach a transaction consensus under the chain, and ensure the security of the transaction state under the chain through zero-knowledge proof, compress the transaction data, and finally synchronize the data to the main chain.
By comparing the following figures, you can more intuitively understand how zero-knowledge proofs compress transaction data:
Optimistic Rollup
The purpose of compressing transaction data is achieved by performing zero-knowledge proof processing on the signature information in each transaction. The current ZK Rollup solution can increase the TPS of the current Ethereum network by 30 times, reaching a processing capacity of about 500 transactions per second.
However, due to the long process of creating zero-knowledge proofs for smart contracts, the current zero-knowledge proof algorithm is not friendly to general-purpose smart contract support. The current ZK Rollup scheme is more suitable for scenarios such as ordinary transfer transactions.
The Optimistic Rollup solution uses OVM (Optimistic Virtual Machine), which is a fully functional environment that is basically compatible with EVM (Ethereum Virtual Machine). Through OVM, it becomes easy to transplant DApps to Layer2, and it also makes it unnecessary for project parties to deploy various Layer2 expansion solutions, but only needs to access OVM to use various Layer2 structures.
Therefore, currently Optimistic Rollup is more suitable for DeFi applications. This solution can increase TPS to 100, and it can be further increased to 500 through BLS signature aggregation technology.
secondary title
The adoption of each program
Teams based on the ZK Rollup solution include Matter Labs, Hermez, etc. Take the Matter Labs team, which is the most widely used, as an example. The zkSync developed by it has been launched on the main network, and it is expected to launch a universally compatible Solidity code in 2021. Currently, ecological cooperation projects include Curve, Gitcoin, and Balancer.
Photo by Nick Fewings on Unsplash
The team based on the Optimistic Rollup solution is mainly Optimism. The OVM developed by them has been launched on the test network on September 25, and has reached ecological cooperation with Uniswap, Synthetix and Coinbase Wallet.
image description