Summary of Ethereum Layer 2, understand it all at once
比巴卜呀
2021-06-30 10:17
本文约1861字,阅读全文需要约7分钟
Ethereum layer2 summary, understand it all at once

The purpose of layer2 design is mainly to solve the problem of high gas on Ethereum, by putting some transactions off the chain to complete, and the chain only needs to verify whether the off-chain transactions comply with the set rules. The handling fee for on-chain verification is often much less than the cost of directly executing transactions.

The layer 2 solutions currently proposed on the market are mainly sidechain (side chain), Rollup, State channels (state channel), Plasma and Validium.

sidechain (side chain)

As can be seen from the name, a sidechain can be imagined as a chain next to the main chain. The sidechain is essentially an independent blockchain with its own consensus mechanism. The side chain connects itself to the main chain through a bridge, locks the assets on the main chain, and keeps the operation on the side chain, and then the results are fed back to the main chain.

secondary title

 Rollup

Rollup is currently the hottest and most mainstream layer 2 network liberation solution on the market, and it has been personally affirmed by V God. The solution of Rollup is to package and aggregate the original multiple transaction data into one transaction for processing, which can be understood visually from the meaning of rollup. In this case, the actual calculation and storage are done off-chain, and only data transaction records need to be recorded on the chain, which reduces the calculation and storage pressure of the main network and improves network throughput.

Rollup solutions can currently be subdivided into three types: ZK rollup, Optimistic rollup and Arbitrum Rollup

Note:

Note:

1) Zero-knowledge proof means that you can fully prove that you are the legal owner of certain rights and interests without disclosing relevant information. That is, the "knowledge" given to the outside world is "zero".

2) Fraud proofs: Fraud proofs present evidence that the state transition was incorrect. They reflect an optimistic view of the world: assuming blocks represent the correct state of L2 data until proven otherwise. But in reality, a committed block may contain erroneous state transitions.

ZK rollup currently has a big problem that it is not compatible with EVM, while Optimistic Rollup is largely compatible with EVM, but not 100% compatible, while Arbitrum Rollup is 100% compatible.

Arbitrum Rollup and Optimistic Rollup differ in the verification of fraud proofs. Arbitrum Rollup uses multiple rounds of fraud proofs, while Optimistic Rollup uses a single round of fraud proofs. At present, the mainnet of Arbitrum Rollup has been launched, while the launch of the mainnet of Optimistic Rollup has been postponed to July.

 

State channels

The state channel can be said to be a relatively early layer-2 solution, which is to build a channel under the chain for transactions. This solution is adopted by Liquidity Network and Celer Network.

You can think of the state channel as a pipe. When two (multiple) parties conduct transactions, the two (multi) parties must have the same pipe specifications to proceed, otherwise there is no way to proceed. Therefore, the state channel is suitable for small transactions, and cannot carry such a large transaction volume as the exchange, and the channel setting takes a certain amount of time.

Validium

Validium is a new two-layer solution that has emerged in recent years. Like ZK rollup, it uses zero-knowledge proof. The difference is that Validium's asset data is stored off-chain, while ZK rollup is stored on-chain. This means that Validium has low security and is suitable for dapps such as games that require less security trust.

Plasma

Plasma transfers transactions from the main chain to the Plasma chain through smart contracts and encrypted verification. The main chain only needs to verify the block header hash value submitted by the Plasma chain, thereby improving transaction speed and realizing on-chain expansion. Plasm has the advantages of low transaction costs and high throughput, but there is a delay in withdrawals, and it does not support the expansion of general-purpose smart contracts.

Plasma uses fraud proofs. If a fraud proof is submitted to the root chain, the block will be rolled back and the block creator will be punished.

Recently, the very popular horseshoe (matic) uses the Plasma method. Of course, the ambition of horseshoe is far more than that. They plan to be an aggregator of the entire 2-layer network.

Since the current DeFi projects all adopt the AMM model, the existence of impermanent losses makes some projects face the lack of depth of liquidity pool after the later stage of fatigue, the loss of users who provide liquidity, and the projects gradually decline. In addition, different items cannot interoperate with each other. If you want to exchange, you still need to go back to the first floor and then go to another item, and the handling fee cost will increase a lot. The development of the 2-layer network may evolve a new DeFi model and become the mainstream in the future.

Attachment: Layer 2 Solutions and Projects


比巴卜呀
作者文库