L2 is a collective name for solutions that solve the problems of scalability and speed on blockchain, primarily in the Ethereum network. We’ll tell you about the most popular L2 protocols, their advantages and drawbacks, and what will happen to them now that Ethereum has switched to Proof-of-Stake.
Back in 2016, Ethereum creator Vitalik Buterin first described the so-called blockchain trilemma. It boils down to the idea that an ideal blockchain should have three qualities: decentralization, scalability, and security. However, it’s very difficult to achieve all three at the same time, for several reasons.
Decentralization: the more nodes in a network, the harder it is for a malicious actor to take it over. But as you increase the number of nodes, you need more and more resources for them reach consensus, and that slows the network down.
Security: once again, when there are a lot of nodes, the network will continue to run even if some of them break down or get attacked. But scalability suffers: see the point on decentralization.
Scalability: you can create a very fast network if you delegate all transaction validation work to a small number of nodes. But such a blockchain will be centralized and easier to attack.
Ethereum is a highly decentralized and secure chain. But its scalability has long been a sore point: a single popular token sale could completely paralyze the blockchain, as it happened with the Otherside metaverse land sale in spring-2022.
Otherside metaverse demo. Credit: Yuga Labs
The transition to Ethereum 2.0 should help solve this issue, and Vitalik Buterin even believes that the network will reach 100,000 TPS. However, this will happen only after the introduction of sharding: the division of the blockchain state into a number of shards that will process transactions in parallel and connect to each other through the central Beacon Chain. According to Buterin, it will take 64 shards to reach those coveted 100k TPS.
Sharding is one of the types of L2 (level 2) solutions. They are called Level 2 because they sit on top of the underlying blockchain and take over part of its transactions. The results are eventually recorded on the main blockchain, but those transactions are processed and confirmed outside of it. This helps make the system scalable, meaning that its performance doesn’t suffer when the load grows.
Going back to sharding, we should note that there is no set deadline for its implementation on Ethereum; sometime in 2023 is the latest forecast. Some blockchains already use sharding, though, including NEAR (so far on the level of the blockchain state, not transaction processing) and Polkadot (under the name of parachains).
Sharding does have its problems, communication among shards and security the biggest among them. It’s easier to break a shard than the main blockchain. In Polkadot and Kusama, this risk is partly offset by the central Relay Chain providing shared security for all the parachains.
A sidechain is a separate blockchain that is linked to the main L1 chain but has its own security system. The best-known example is Polygon, launched in 2017 as an Ethereum sidechain called Matic Network. Since then Polygon has grown into an independent ecosystem with over 37,000 dApps, and nobody calls it a sidechain anymore.
Here are a few more sidechain examples:
This type of L2 solution implies that two participants open a channel and exchange assets. This is convenient when two addresses conduct many transfers between themselves. When a channel isn’t needed anymore, it can be closed, at which point all the transactions are committed to the main chain.
The most popular solution in this category is Bitcoin’s Lightning Network. In particular, BTC tips on Twitter use this protocol.
Channels, sidechains, and shards have been around for quite a while. The latest trend, which spread like wildfire in 2021, is rollups, such as Arbitrum and Optimism. These are separate blockchains that process transactions outside of the main chain, gather them into batches, and send that data to the main blockchain.
The key difference between sidechains and rollups is that the latter provide the main chain with cryptographic proofs that make it possible to verify the rollup’s „honesty“ (correctness of the data) without verifying the transactions themselves.
In turn, rollups come in two types: optimistic and ZK, or zero-knowledge.
Optimistic: these rollups assume all transactions are valid and transmit them to the main blockchain almost without additional processing. The rollup will only perform a verification if someone disputes the results. This approach increases scalability and dramatically reduces gas costs, but it can take a week or more to transfer funds from the rollup to Ethereum. The best-known optimistic rollups are Optimism and Arbitrum, as well as MetisDAO and Boba.
Arbitrum and Optimism are on the top 10 of the largest blockchains. Credit: DeFiLlama
ZK rollups: they validate transactions using complex cryptographic proofs and transmit these proofs to Ethereum mainnet together with the batches of transactions. ZK stands for „zero knowledge“, meaning that the main chain can verify that the proofs and the data are correct without knowing anything about their contents.
Such a system is more secure, and transferring assets to the main chain takes less time than is the case with optimistic rollups. The flip side is that ZK rollups can have trouble working with DeFi smart contracts.
ZK rollups are used in Immutable X; moreover, Polygon, Matter Labs, and StarkWare are working on EVM-compatible ZK solutions.
Up until this point we’ve been discussing theory, but what about practice? How can a regular user try L2 solutions — or should they?
Polygon, Arbitrum, and Optimism are cheaper alternatives to Ethereum that support the same large dApps, such as Uniswap, Aave, Curve, Balancer, Sushi, etc. If you like swapping tokens on DEXes, buying NFTs, earning with yield farming, etc., but don’t like paying up to $5 per transaction, you should try these L2 networks. You’ll be pleased with the low fees ($0.1 or less) and fast processing.
On the other hand, if you decide to play Axie Infinity, Alien Worlds, etc., you’ll definitely meet Ronin, Immutable X, WAX, and other gaming L2s.
All Ethereum-based L2s that we discussed in this article can be added to MetaMask using the Add Network feature. Simply Google the correct parameters for each network.
Vitalik Buterin believes that optimistic rollups will dominate in the next couple of years, but ZK rollups will come to play a key role in the ecosystem in the long term. For now, Polygon, Arbitrum, and Optimism rank 6th, 7th, and 8th on the list of the largest blockchains , with a combined $3.7 billion in TVL — so they are definitely worth your attention.