Blockchain has grown so much since its inception that it’s easy to forget that it is still a nascent technology with plenty of kinks to iron out. Perhaps the biggest conundrum is how to increase the scalability of a blockchain network, without compromising its security or decentralization. This problem, known as the scalability trilemma, is arguably the main thing holding blockchain technology from becoming mainstream, as it limits the capacity of public blockchain to process transactions.
Like other major blockchain protocols, Ethereum is in search of a solution to the problem. The good news is that the Ethereum development community is already working on a number of solutions that show a lot of promise. One such solution is sharding, which is poised to come as part of a larger upgrade to the Ethereum protocol. You can read more about it in our “Ethereum 2.0 Explained” piece.
In this article, we’ll focus on Ethereum scaling solutions that can benefit the network in its current form.
What are Layer 2 scaling solutions?
The term Layer 2 refers to solutions built on top of the mainnet (Layer 1) that are designed to circumvent inefficiencies on the mainnet. An example of a Layer 2 scaling solution for Bitcoin is the Lightning Network, which allows for off-chain payment channels to be opened between nodes. A number of Layer 2 scaling solutions are currently in the works for Ethereum. Let’s examine them more closely.
What are Rollups?
These Layer 2 scaling solutions execute transactions outside the mainnet, but post transaction data on it. This way, they can benefit from the security provided by Layer 1, while achieving higher transaction throughput and reducing fees for users. There are two types of rollups:
What are Zero knowledge rollups?
Also known as ZK rollups, these Layer 2 scaling solutions ‘roll up’ many transactions off-chain and generate a so-called validity proof for the whole bundle. That proof is then submitted to the Ethereum mainnet and acts as a substitute for all of the transaction data it is associated with. And with less data involved, the validation process on Ethereum can be a lot faster.
ZK rollups have some drawbacks, however. For starters, they are not compatible with the Ethereum Virtual Machine (EVM), which limits their utility to simple transactions. In addition, generating validity proof requires significant computational work and time (10-30 minutes).
What are Optimistic rollups?
In contrast to their zero-knowledge counterparts, Optimistic rollups do not perform any computation by default, because they assume that transactions are valid. Because of this, Optimistic rollups can offer significant improvements in scalability. However, a transaction can be disputed, in which case the rollup has to perform the transaction’s computation to verify its validity. Because the transaction can be challenged, Optimistic rollups can have longer transaction confirmation times than ZK rollups.
Optimistic roll-ups are EVM compatible, meaning that they offer the full utility of the Ethereum network.
This is a separate blockchain, anchored to the main Ethereum chain. Similar to Optimistic rollups, it uses fraud proofs to arbitrate disputes. The main advantages of Plasma are its high throughput and low cost per transaction. Among its notable drawbacks are that it supports only certain types of transactions, such as simple token transfers and swaps. Another drawback is that withdrawals are delayed by several days to allow for challenges.
While Plasma employs a similar mechanism to Optimistic rollups, Validium resembles ZK rollups in that it uses validity proofs. Unlike ZK rollups, however, the transaction data is not stored on the main Ethereum chain, which can produce some impressive results in terms of scalability – up to 10,000 TPS (transactions per second) per validium chain, with the possibility of multiple chains running concurrently. There is also no wait times for withdrawals, as no challenge period is needed due to the validity proofs.
On the downside, Validium has only limited support for smart contracts and generating validity proofs requires a lot of time and computational work.
This solution is Ethereum’s equivalent of the Lightning Network. A state channel enables direct transactions between two users. This method greatly reduces the need for using the main chain – users only need to pay for an Ethereum transaction when they open the channel and for another one upon closing it. Of course, Layer 1 can also be used for settling transaction disputes.
Similar to the Lightning Network, state channels are used to make direct transactions between users, but because Ethereum is a general-purpose blockchain, they can support more than simple transfers. As their name suggests, state channels can also support general state updates. This goes a long way toward reducing the computational load of the mainnet.
While state channels have some significant advantages over other Layer 2 scaling alternatives, they also have some drawbacks. Among those are the time and cost for opening and closing a channel, which makes this solution less convenient for processing transactions between random users.
What are Sidechains?
The term sidechains refer to distributed ledgers that operate independently and in parallel to the main Ethereum network. They feature their own consensus mechanisms like Prof-of-Authority and Proof-of-Stake, but at the same time are designed with interoperability with Ethereum in mind. A sidechain connects to the Ethereum network via a two-way bridge and supports cross-chain transfers of assets and information. However, it is not secured by Layer 1.
Layer 2 scaling solutions are here to stay
While Ethereum 2.0 is expected to tackle the scalability problem on a deeper level, the various Layer 2 scaling solutions have the potential to be a great supporting act. This potential becomes even more evident when considering that multiple Layer 2 technologies can work together to create powerful and flexible hybrid solutions. The scalability trilemma has been the main factor slowing down blockchain adoption, but with Layer 2, the obstacle it presents doesn’t seem insurmountable.