Ethereum Layer 2

After getting in touch with some advanced technology ecology, I looked back at the technology stack of Ethereum and found that everything has traces to follow. As the second leader of the public chain, Ethereum has directly or indirectly contributed too many technical directions and concepts on the basis of Bitcoin, such as cross-chain bridges, zero-knowledge proofs, DeFi (decentralized finance), DAO (decentralized Autonomous organizations), smart contracts... Any one of them is a very important research topic. Today, let’s briefly talk about the various expansion solutions Layer 2 of Ethereum, and come back to fill in the pits when we have a deeper understanding of the technology.

In addition, writing is one of the best ways to think and settle, try to maintain a good habit

1.1 Why should we build Layer2

Layer 2 is the general term for Ethereum expansion solutions

As one of the more successful decentralized blockchain networks, Ethereum has a daily upper limit of more than 1 million transactions, but this number is far behind the actual demand. For example, the daily transaction volume of Alipay is 25 million above the pen. So Layer 2 is mainly proposed to solve this pain point, that is, to improve transaction speed and transaction throughput but still have sufficient security

Current Ethereum transaction fees and Layer 2 average transaction fees

Layer2 average transaction fee

Ethereum transaction fees

1.2 Layer 2 Technical Solution: Rollup

Regardless of any layer-2 expansion solution, the Rollup solution is technically used. The simple understanding is to package multiple transactions into one on the layer-2 network, and then communicate with the Ethereum network regularly to submit the bundled transactions. In this way, the transaction fee will be cheaper and the confirmation speed will be faster for each user

1.2.1 Optimistic Rollup

All transactions are generally considered legitimate, but invalid/malicious transactions still need to be identified. Therefore, Optimistic Rollup has designed a dispute resolution system. Specifically, the party that submits the transaction to the first layer must provide a deposit, usually ETH, and other participants in the network can submit fraud proofs. At this time, the system will enter the dispute resolution mode. The transaction is re-executed on Ethereum, and if the transaction is fraudulent, the submitter's deposit will be slashed. This mechanism will prevent the submitters of batch transactions from defrauding at a greater risk of asset loss, so that honest transactions can eventually be achieved

The disadvantage is that enough time must be provided for network participants to submit fraudulent proofs, and this time may be quite long. Of course, some solutions to this problem, such as providing a fast "liquidity existence" to solve this situation, can achieve Almost real-time to the first layer

1.2.2 ZK Rollup

Another verification scheme for transactions is zero-knowledge proof. In this scheme, each transaction that cannot be sent to layer1 contains an encrypted proof called ZK-SNARK, and the first-layer contract can quickly verify

But this solution makes it harder to create an EVM-compatible ZK, and it also makes it harder to extend general-purpose applications without rewriting application logic

In addition, it should be noted that both need to run their own EVM version. Optimistic Rollup is easier than Ethereum EVM in terms of compatibility. It only needs to modify a small amount of code, and 99% of the contracts can be seamlessly transplanted. But they can all expand Ethereum’s TPS (15-45) to 1000-4000TPS, essentially increasing the possible data availability space by creating multiple shards, which makes it possible to store large amounts of data, and the combination of Ethereum and Rollup can Increase the transaction speed of Ethereum to 100k per second

1.2.3 Representative projects

Optimistic Rollup

the referee

ZK Rollup

zkSync

1.3 Layer 2 Technical Solution: Side Chain

A sidechain is an independent blockchain network running in parallel to the Ethereum main chain. Sidechains are connected to the mainchain through a two-way peg system, allowing assets to be exchanged between sidechains

There are two types of sidechains: one interdependent and one independent

When a chain depends on another chain (like Ethereum), it is considered a child chain and does not create its own assets, but obtains assets from transfers from the parent chain

But frankly speaking, although Ethereum is successful, it is also very "old" in technology. The limitations of its own design make many project parties feel that it is better to build a new chain than to build a new chain on top of it. Later, Solana focused on speed and Polkadot and Cosmos focused on lower-level scalability, etc.

Guess you like

Origin blog.csdn.net/weixin_51487151/article/details/127624582