Expert: Comparision of Layer 2 Scaling Solutions
Since its launch in 2015, the Ethereum ecosystem has been growing. However, at the same time, Ethereum’s scalability cannot support the rapidly increasing transaction need since around 15 trades can be processed per second only. This leads to Gas fee floating at a high level, with DApps restricted to be applied at a large scale.
To solve the scalability problem, developers have been putting forward many solutions, including Layer 2 ones. Vitalik Buterin once said that Layer 2 is the future of Ethereum scaling and using Layer 2 solutions to scale can preserve its decentralization smartly. In this article, we will let you understand Layer 2 by introducing how it works, common Layer 2 solutions, leading Layer 2 projects, and the current landscape.
What Is Layer 2
Literally, Layer 2 means a network on the second layer. In this sense, the existing Ethereum mainnet can be regarded as Layer 1.
Layer 2 is for scaling the mainnet through the transition of a great volume of computation from it to Layer 2. Only the computation results are submitted to the mainnet. In this way, the performance of the mainnet, including its throughput, can be improved. In plain language, this process is similar to building an overpass to let more cars and pedestrians on a crowded road.
During that process, no structural changes are required for the mainnet since the computation is done separately on Layer 2. Therefore, some Layer 2 solutions allow high throughput and less Gas fee with the same security and decentralization level as the mainnet.
It is worth noting that Layer 2 solutions are different from sidechains, which are independent blockchains based on their own security mechanism. In contrast, those solutions rely on the mainnet’s security since they are still part of the network.
Common Layer 2 Solutions
Four kinds of Layer 2 solutions, namely Rollup, Plasma, State Channels, and Validium, will be introduced below based on their difference in handling compressed data and how Layer 2 basically works.
Rollup can be divided into ZK Rollup and Optimistic Rollup, according to their difference in confirming the availability of compressed data.
ZK Rollup ensures the validity of off-chain transaction data through zero knowledge proofs. Encrypted proofs are submitted during the submission of the compressed data. zkSync and Starkware are powered by this Layer 2 solution.
Advantage：Transactions and proofs can be verified instantly after being submitted to the mainnet. Transaction data is stored on the mainnet with a relatively high level of security and decentralization.Less data is included for high scalability.
Disadvantage：A great volume of data availability computation is needed. The transaction order can be decided by node operators.
Optimistic Rollup assumes transaction data are valid by default. Yet, it is equipped with a fraud-proving scheme for the disputed transactions. Arbitrum and Optimism are supported by this kind of Rollup.
Advantage：Compatible with EVM and Solidity. Transaction data is stored in the mainnet with a high level of security. No computation is needed allowing higher scalability.
Disadvantage：The challenge period is relatively long with a fraud-proofing mechanism. More data will be produced given a disputed transaction. The transaction order can be decided by node operators.
For Plasma, it is preferable to execute transactions off-chain before settling them on the mainnet based on a fraud proofing system for the disputed ones. OMG network and Polygon are running on this scaling solution.
Advantage: High trading speed with low costs given fewer interactions with the mainnet. Strong security under no supervision.
Disadvantage: Don’t support general-purpose computing and many types of trades. Plasma relies on operators for data storage. Don’t support rollback leading to unavailable data. Delayed withdrawal caused by the challenge period.
Like the Lightning Network commonly used in the Bitcoin network, State Channels preferably submit only the first and the last transaction onto the mainnet. Other transactions are handled off-chain before their proofs are uploaded to the mainnet. Celer Network and Raiden Network are built on top of those channels.
Advantage: High efficiency without waiting for blocks to be packed. Theoretically, an infinite TPS can be achieved given high throughput. Off-chain trades can be settled immediately for channel participants. Suitable for large traders.
Disadvantage: Relatively high time and capital costs for settlement and channel establishment. Funds need to be locked in payment channels. Not accessible for all with limited use cases.
Validium also guarantees data availability through zero knowledge proofs like ZK Rollup. But the difference between them is that Validium keeps data available off-chain. DeversiFi and ZKSwap are Validium-powered projects.
Advantage：No withdrawal delay. Resistant to some economic attacks for fraud proofing systems.Securing data validity through availability proofs.
Disadvantage：Using exclusive languages with limited support for general-purpose computing and smart contracts. High computing power is needed to generate ZK proofs. Don’t support rollback leading to unavailable data.
Four Leading Layer 2 Projects
Arbitrum, Optimism, zkSync, and StarkWare are four leading Layer 2 projects.
Arbitrum became one of the most notable Layer 2 projects after launching its testnet in May 2021. Data from l2beat shows that as of August 5th, 2022, Arbitrum dominated the market with a TVL of more than 2.4 billion US dollars, accounting for almost 52% of the Layer 2 total.
Apart from that, according to DefiLlama, DEX GMX boasts a TVL of more than 200 million US dollars, taking up 27.85% of Arbitrum’s total. Curve, Stargate, and SushiSwap rank high on the TVL list. 38 of the 100 projects in the Arbitrum ecosystem enjoy a TVL of more than 1 million US dollars as per the DeFi TVL aggregator.
All in all, Arbitrum is an established Layer 2 leader, with its ecosystem covering tracks including wallets, exchanges, bridges, infrastructures, DeFi, and NFT.
Optimism is one of the early Layer 2 projects with an announcement that its token OP will be issued in May 2022. Its user amount and TVL once surpassed those of Arbitrum after the airdrop of OP issued.
DefiLlama shows that by August 5th, Optimism was only second to Arbitrum in terms of TVL, with tokens worth 1.22 billion US dollars locked in the former, accounting for 25.15% of the Layer 2 total.
In the Optimism ecosystem, AAVE takes up 41.08% of the total with a TVL of 381 million US dollars. Other projects with a TVL of over 100 million US dollars include Synthetix and Velodrome.
zkSync is a Layer 2 solution introduced by Matter Labs, a European team. It was launched on the mainnet in June 2020. As of August 5th, the TVL of zkSync stood at 65.43 million US dollars with ZigZag, a DEX, being the DApp with the greatest TVL on the network.
In February 2022, zkSync 2.0 was introduced on an Ethereum testnet by Matter Labs saying that it is the first EVM-compatible zk Rollup, which means users can enjoy projects in other EVM ecosystems through zkSync.
Overall, many DApps have not to be officially launched in the zkSync ecosystem. In this sense, this network is too immature to be compared with Arbitrum and Optimistic.
The StarkWare testnet was launched by StarkWare Ltd. in June 2021. Its mainnet went live in November of the same year. The Ethereum mainnet can be scaled through STARKs.
Statistics show that the TVL of StarkWare only takes up 0.02% of the Layer 2 total. This means that this project is still in its infancy like zkSync.
Also, StarkWare is the only project that does not support EVM among the four.