Analysis of Ethereum Layer-2 Expansion Solution

Loading

Need to expand

Since the Ethereum mainnet went live, the issue of its capacity expansion has been one of the most discussed topics, especially when some hot events caused network congestion, the attention and discussion on the topic of capacity expansion tended to become more intense.

The first fierce discussion on the issue of expansion took place in the “bull market” of the global crypto market in 2017. The famous “CryptoKitties” and ICO together caused congestion in the entire Ethereum network, and Gas fees skyrocketed in a short time.

This year, due to the popularity and enthusiasm of the DeFi market, network congestion is getting worse. Users sometimes even need to pay a gas fee of up to 500+Gwei. Even so, the transaction cannot be verified in a short time.

Generally speaking, when considering a blockchain or Ethereum expansion plan, there are two main approaches: expanding the base layer itself (layer 1) or expanding the network by offloading some work to another layer (layer 2).

Layer 1 and Layer 2 comparison

Layer 1 is what we usually call the standard basic consensus layer. At present, almost all transactions are settled here. The concept of Layer is not a specific concept of Ethereum. It is also widely used in other blockchain fields such as Bitcoin and Zcash.

Layer 2 is another layer built on top of Layer 1. It is worth noting that Layer 2 does not need to make any changes to Layer 1, it can use its existing elements. For example: Smart contracts are only built on Layer 1; Layer 2 can also take advantage of Layer 1’s solid security by fixing its state to Layer 1.

At present, Ethereum can process about 15 transactions per second on its base layer “Layer 1”. The expansion of Layer 2 can significantly increase the number of transactions processed within the same time limit. According to different existing solutions, we believe that the ideal processing speed should be 2000-4000 tx/s.

Ethereum 2.0 introduces a proof-of-stake and sharding mechanism, which will significantly improve transaction throughput on the basic layer. Even with the sharding mechanism, Ethereum still needs Layer 2 expansion to be able to handle hundreds of thousands or even millions of transactions per second in the future. Without sacrificing security and decentralization, Ethereum may leave the combination of Layer 1 and Layer expansion to the community and the future.

Layer 2 expansion plan

Layer 2 expansion is a general term for solutions that help improve Layer 1 functionality by processing things “outside of Layer 1” off-chain. We can understand that the improvement of its function is mainly manifested in the improvement of processing speed and processing throughput. Most importantly, the Layer 2 expansion solution can significantly reduce the gas cost of Ethereum network transfers.

State channel

State channels are one of the first widely discussed expansion solutions. They allow participants to exchange transactions off-chain multiple times, and only submit two things to the base layer.

Although payment channels have the potential of thousands of transactions per second, they also have some disadvantages. They do not provide public participation-participants must be known in advance, and users must lock funds in a multi-signature contract. Most importantly, this expansion solution is specific to applications and cannot be applied to expand general smart contracts.

Raiden is one of the main projects using state channels on Ethereum. In addition, the concept of payment channels is also widely used by the Bitcoin-based Lightning Network.

Plasma

Plasma is a Layer 2 expansion solution, originally proposed by Joseph Poon and Vitalik Buterin. This is a framework for building scalable applications on Ethereum. Plasma uses smart contracts and Merkle trees to create an unlimited number of child chains-copies of the parent Ethereum blockchain. It can offload transactions from the main chain to sub-chains and allow fast and cheap transactions. One disadvantage of Plasma is that users have to wait a long time to withdraw funds from the second layer. Similar to channels, plasma cannot be used to expand the scale of general smart contracts. The OMG network is built on their own implementation of the Plasma chain, called MoreViable Plasma. The Matic network is another example of a revised platform using the Plasma framework.

Side chain

The side chain is an independent block chain compatible with the ether. It has its own consistent model and block parameters. By using the same Ethereum virtual machine, the interoperability between the sidechain and Ethereum is possible, so the contract deployed to the Ethereum base layer can be directly deployed to the sidechain. xDai is an example of such a side chain.

Rollups

Rollups provides scalability by bundling or “rolling up” unilateral transactions into a single transaction and generating a cryptographic proof (also known as SNARK-a shorthand non-interactive knowledge argument). Only this cryptographic proof will be submitted to the grassroots. For Rollups, all transaction status and execution are handled in the side chain. The Ethereum main chain only stores transaction data.

There are two types of Rollups: ZK Rollup and Optimistic Rollup.

Although ZK Rollup is faster and more effective than Optimistic Rollup, it does not provide a simple method for migrating existing smart contracts to Layer 2. Optimistic Rollup runs an EVM compatible virtual machine called OVM (Optimistic Virtual Machine), which allows the execution of the same smart contracts as those executed on Ethereum. This is very important because it makes it easier for existing smart contracts to maintain their composability, which is extremely relevant in DeFi where all major smart contracts have been tested in actual combat. When it comes to ZK Rollup, Loopring and Deversifi are both good examples of decentralized exchanges built on Layer 2. In addition, ZkSync supports scalable encrypted payments.

Ethereum 2.0 can also expand the scalability of Rollups. In fact, because Rollups only needs to extend the data layer, it can be greatly improved in Ethereum 2.0 Phase 1 (about data segmentation).