Blockchain scaling: Sidechains and layer 2 solutions

Posted by

Scalability is the order of the day in the Ethereum ecosystem. Gone are the days when we speculated about theoretical scalability limitations of what is by far the largest layer 1 platform, Ethereum. Ethereum’s problems become apparent when we realize that transactions that used to cost a few cents now cost tens or hundreds of dollars. Without a solution to this scalability problem, Ethereum’s vision of a new user-owned Internet will come to nothing. In this post we look at different scaling solutions with a focus on sidechains and layer 2 solutions. If you want more details on the topic, I recommend the research article Layer-2 Scaling Solutions: A Framework for Comparison (82 pages) from THE BLOCK Research, which inspired me for this post.

State of Ethereum today

Ethereum’s capacity is currently limited to around 15 transactions per second. That’s nothing compared to VISA’s current transaction volume of around 1,500-2,000 transactions per second. Or Solana’s estimated maximum capacity of 65,000 transactions per second (Solana’s actual utilization today is around 2,000 transactions per second. Source: BARRON’S).

So, as we can see, Ethereum’s capacity is extremely limited. If such a limited platform is so successful with users, as is the case with Ethereum, then the consequences are clear: The platform is used to the limit. And this is exactly what we have observed in recent years. According to THE BLOCK, in 2016 Ethereum was still busy with a measly 8%. In 2018, the value then increased to 83%. In 2020 on 90% and in 2021 Ethereum was completely at the limit with a utilization of 99.6%. Accordingly, the cost of a single transaction has increased from $0.3 in 2017 to a whopping $21.1 in 2021 (capacities are being auctioned to the highest bidder); a state that makes it pretty much impossible for the masses to use Ethereum on a reasonable scale.

A comment on this from Ethereum founder Vitalik Buterin:

I 100% stood by my comment that “the Internet of money should not cost more than 5 cents per transaction”. That was the goal in 2017, and it’s still the goal now. It’s precisely why we’re spending so much time working on scalability. Tweet on January 1, 2022

Different approaches to scaling Ethereum

The Ethereum community is of course aware of these grievances and is working flat out on different scalability approaches. These can be roughly divided into the following two categories:

  • Short and medium-term approaches: Ethereum sidechains have been in operation for several years and layer 2 solutions such as rollups are in the starting blocks. These approaches are based on a multichain model for scaling Ethereum. They give the Ethereum network additional computing power by executing transactions outside of Ethereum layer 1 on a separate sidechain or “above” Ethereum on layer 2.
  • Long-term approaches: In the long term, Ethereum plans to transfer the layer 1 framework from today’s single-chain architecture to a multi-chain architecture, which is summarized under the keyword sharding. The aim is to run 64 shard chains in parallel, which are coordinated by a central beacon chain. This parallelization of transaction processing across 64 chains will massively increase Ethereum’s capacity. Only the gods know when that will happen. But it will probably be a year or two. And by the way: This sharding must not be confused with “The Merge”, which describes the conversion of Ethereum from Proof-of-Work consensus to Proof-of-Stake consensus. While the switch to Proof-of-Stake will reduce Ethereum’s energy requirements by more than 99%, it is not expected to have any impact in terms of scalability.

In summary, this means that the capacities of Ethereum layer 1 will not be increased significantly in the next few years and the scalability focus is therefore on short and medium term solutions such as sidechains and layer 2 solutions. We want to take a closer look at these sidechain and layer 2 solutions in the rest of this article.

Sidechains

Sidechains are independent, standalone layer 1 blockchains that are set up “next to” Ethereum layer 1. In principle, the interaction between Ethereum and a sidechain works as follows: Ethereum layer 1 users send their tokens from Ethereum to the sidechain. Much of the same applications (i.e., dApps) run on this sidechain as on Ethereum, but the utilization and transaction costs are much lower than on Ethereum because the sidechain scales much better. This means that after the users have transferred their tokens to the sidechain, they use DeFi services such as lending, yield farming, etc. at extremely favorable conditions before they then send the tokens back to the Ethereum layer 1 chain. This means that the execution of applications is outsourced from Ethereum to the sidechain where the better scaling of the sidechain can be used.

But how does the sending and returning of tokens between Ethereum and sidechain work? Roughly speaking, this works via a bridge smart contract – a so called bridge. In order to bring Ethereum tokens onto the sidechain, the users must send their tokens to the smart contract of the corresponding bridge. The tokens are then locked into the bridge’s smart contract (i.e., on the Ethereum side) and simultaneously re-issued on the sidechain as new tokens. These newly issued sidechain tokens can then be used for services on the sidechain before they are sent back to the bridge and the smart contract on the Ethereum side then releases the locked Ethereum tokens again.

The most widespread example of such an Ethereum sidechain is the Polygon PoS chain, which runs around 7,000 applications (dApps) and which processes more than twice as many transactions as Ethereum itself. And this at a cost ranging from a fraction of a cent to around a dollar depending on the computational complexity of the transaction to be executed. But how does a sidechain like Polygon PoS scale that well? The Polygon chain achieves this by sacrificing decentralization and thus security. Polygon PoS only has 100 validators securing the chain. In contrast, around 70,000 validators secure the Ethereum chain. With this much more centralized approach, Polygon achieves much greater scalability. However, the security and availability of the polygon chain are correspondingly lower. You have to be aware of that.

Layer 2 scaling

Layer 2 scaling solutions attempt to provide both the scaling of sidechains like Ploygon PoS and the security of Ethereum. They do this by executing the transactions in layer 2, but then storing the data resulting from the transactions themselves on Ethereum layer 1. In doing so, they bring the arithmetic operations away from Ethereum layer 1 to the much better scalable layer 2 (i.e., high scalability is achieved), but the transaction data and the data resulting from the calculations themselves are inserted into the Ethereum layer 1 blockchain (i.e., high security is achieved).

Rollups

The most widespread layer 2 solution are the rollups. With rollups, only the execution of the transactions takes place on layer 2, but no data is stored on layer 2. Data is stored on layer 1 as follows: Many transactions are bundled and compressed together (hence “rollup”) and settled or stored as a collective on the layer 1 blockchain. This bundling and compression keeps layer 1 transaction costs to a minimum.

Within the rollups category, a further distinction is made between optimistic rollups and ZK rollups:

  • Optimistic rollups: Put simply, the optimistic rollup assumes “optimistically” that the data computed by layer 2 and written to layer 1 is valid unless someone proves otherwise by providing mathematical proof to the layer 1 smart contract for the rollup that the data was not calculated correctly (this is called a “fraud proof”). The approach therefore assumes that the data written from layer 2 to layer 1 is controlled by a third party and as long as there is even one honest third party who checks the data, the system is secure.
  • ZK rollups: ZK rollups work slightly differently. Here, layer 2 must proactively provide mathematical proof (i.e., “validity proof”) that the data to be written to layer 1 is correct. Only then will they be accepted by the layer 1 rollup smart contract and written to the layer 1 blockchain.

What is interesting about both approaches is that in practice, layer 2 often consists of just one single computer (or multiple computers from a single institution). This means that often we don’t have a network of thousands of distributed computers on layer 2, but only a single computer that executes the transactions, bundles them into rollups and hands them over to layer 1 for settlement. As a result, layer 2 scales almost without limit, while layer 1 ensures security. The disadvantage of such a one-computer solution is, of course, the risk of the availability of this one computer. If it’s down, then the entire layer 2 is down. Tendencies are therefore moving in the direction that layer 2 should also be composed of a network of independent computers.

So, now we have dealt intensively with different scaling solutions. I hope that I was able to give you a better understanding of the challenges and possible solutions for scaling Ethereum. This is currently an extremely relevant research area and we can look forward to many more innovations for scaling.

(Disclaimer)

Source:
Layer-2 Scaling Solutions: A Framework for Comparison, THE BLOCK Research (2022)

GET NOTIFIED ABOUT NEW POSTS!

Sign up to get an email notification every time we publish a new blog post.

We don’t spam! See our privacy policy.