The Way To DeFi — What is Layer 2?

Overview of the ecosystem of Layer 2 projects available on Ethereum. Source: Kyros Ventures
  1. Crowded ETH network

Before talking about Layer 2, we must understand Layer 1 first. Layer 1 refers to the Ethereum chain. With the blowout growth of the DeFi project, transactions on Ethereum have become sluggish and slow, and the corresponding gas fees are also prohibitively high. The low transaction efficiency has become an important reason to curb the development of Ethereum, therefore, many users will choose an ecology with a lower gas fee, which also explains why the BSC ecology broke out some time ago.

Then how to solve this problem? The answer is ETH 2.0.

According to the roadmap of Ethereum, ETH 2.0 will solve this problem ultimately and will turn to PoS to alleviate the problem of energy consumption. However, ETH 2.0 is a long-term goal, cannot solve the current problem immediately. Therefore, Layer 2 was proposed to alleviate the problem of high gas fees in Ethereum.

2. What is Layer 2?

Layer 2 is the network layer used to transfer data between adjacent network nodes in a wide area network or between nodes on the same local area network, and then record the transaction results on Layer 1, so that Ethereum will be less congested.

For example, Mr. A transferred 5 ETH to Mr. B, and Mr. B transferred this 5 ETH to Mr. C. If this action was executed on Ethereum, two calculations will be required. However, If Layer 2 did the calculation first and then provide the result to Ethereum, Ethereum will only record one result, which is: Mr. A’s account was balanced by 5 ETH while Mr. C’s account was balanced by 5 ETH. As for the specific process between them, it doesn’t really matter, unless you find an error and then go back and look at the transaction information.

In short, the emergence of Layer 2 is to help ease the computational pressure of Ethereum. At present, Layer 2 technology is mainly divided into two types: sidechain Plasma and Rollup.

3. Sidechain Plasma

The recently popular Polygon network (token Matic) uses Plasma technology to implement Layer 2. The characteristic of this technology is to generate an independent sub-chain (can be understood as another chain), on which transactions are carried out and support the interaction with Ethereum. It is worth mentioning that the Plasma chain can provide more security than ordinary sidechain technology. If the subchain is attacked, users can safely exit to avoid long-lasting impact.

At present, plasma technology has become the first product launched on Layer 2 due to its relative simplicity. Its biggest problem lies in security because when the side chain interacts with Ethereum, only the transaction result is provided, no details of the transaction process. Therefore, the security of the transaction is all provided by the operator of the sidechain. This is a big potential safety hazard.

Polygon also supports ZkRollup

4. Rollup

The biggest difference between Rollup and Plasma is that Rollup also transmits the transaction process information to Ethereum, and the entire transaction information will be verified by Layer 2 to ensure that it is correct, and the data will be packaged (compressed), stamped, and sent to Ethereum. The technology of Rollup can be understood as rolling up and uploading transaction information as well as transaction results. Rollup is divided into two factions: Optimistic Rollup and ZK Rollup. The difference between these two factions lies in how Layer 2 verifies transaction information.

4.1 Optimistic Rollup

Optimistic Rollup uses fraud proofs, which means that as long as the correctness of a transaction is not disputed, it means that the transaction is legal and correct. On the contrary, if you are questioned, you must make public judgments. If the transaction is proven wrong, the transaction will be invalid, if not, the questioner will be punished (in order to avoid malicious questioning). The characteristic of this technology is that it only takes up a small number of computing resources. While the disadvantage is that it takes a long time to ensure the correctness of the transaction. The current representative projects of this technology are Arbitrum and Optimism.

4.2 ZK Rollup

If Optimistic Rollup is a test of human nature, then ZK Rollup is a test of the technology. The so-called zero-knowledge verification is to use the principle of cryptography and use a large number of calculations to ensure the reliability of verification. Therefore, it can be seen that its biggest problem is the need for resources calculations and greater design. ZK rollup is the final solution of Layer 2, but due to its difficult design, it will be launched later. There are currently several players on this track: ZkSync, StarkWare, loopring.

5. Conclusion

With the development of the Ethereum ecosystem, more and more talents and technologies are constantly pouring into here. I believe that the future of Ethereum will be more interesting and efficient, and more fantastic projects will be born.

OmniBOLT (Omni Basis of Lightning Technology) is the world’s first stable coin circulation specification on Omnilayer for Lightning Network.