At Crypto Explained, we are on the mission of making crypto easy for everyone.
If you appreciate our effort, don’t forget to subscribe to receive our weekly Newsletter directly in your email!
In times of volatility, continue to educate yourself. If you understand how crypto works, then you will have confidence, and push through bear markets.
And that’s what we are doing here!
So today I’m taking on Part 1 of 2 articles: I will first break down the different types of Layer 2 Solutions for you, and next week, I’ll do a specific zoom in on Rollups!
Ready?
First thing first…
Background context you should know first.
If you already know this, skip this part and scroll down directly.
The Scaling problem:
OG blockchain Ethereum can process around 10 to 15tps (transactions per second), which is very low compared to the thousands of transactions companies like VISA can process.
This is a huge issue because it causes network congestion - think of it as a highway with hundreds if not thousands of cars trying to pass through, but only 15 can do it at a time.
Because of this high demand, the processing cost, aka Gas Fee, can increase significantly.
Now, to scale a blockchain you have 2 options: you can either scale the base layer to increase its capability, or you can outsource to a different layer:
The first option is a bit of a no go due to the Blockchain Trilemma (it is extremely hard to scale while balancing all three cornerstones of a blockchain: decentralization, security, and scalability).
4. This leaves us with option number 2, aka Layer 2 Solutions.
So what are Layer 2 Solutions?
Let’s recap.
In a nutshell, Layer 2 is a collective term for solutions designed to help scale applications by moving some of the transactions “off-chain”.
What this means is that instead of everything happening on the main blockchain (Layer 1), most of these transactions are recorded off-chain (Layer 2) and only the “final” or “ summary” transaction is stored on the main blockchain.
Think of it like going to a bar: you can pay everytime you order a drink, or you can open a tab, and pay a single bill at the end of the night. In this case, you’re making only one transaction, saving time and transaction fees!
If you wanna read a bit more about what Layer 2s are, here is a full article you can read!
Now that we set up enough context, let’s get down to business.
Think of it this way: when you need to travel from point A to point B, you have different methods of transportation… you can drive a car, you can take a long-distance bus, take the train, take a flight, or even ride a motorbike.
Each option offers you a way to reach your destination, but each has different pros and cons: so your choice will depend on a trade-off among different factors, such as how much time you have, how much you are willing to pay, how comfortable you want to be, etc.
Similarly, when it comes to Layer 2 Solutions, there are few options.
Is there one better than the other? Well, it depends on what you care about the most: speed, cost, security…
Let’s establish some basic knowledge here:
Layers 2 can mainly improve 2 capabilities: transaction speed, and transaction throughput.
There are 2 things that can be posted in a blockchain: the processing of transactions, and the transactions data.
And finally, there are 4 most common types of Layer 2 Scaling Solutions:
State Channels
Plasma Chains
Sidechains
Rollups.
Let’s dive into each of them.
1. State Channels.
Channels allow two parties to exchange transactions off-chains as many times as they want, instantly, for next to nothing, while only submitting 2 transactions to the base layer:
When you open the channel
When you settle and close the channel.
This allows for extremely high transaction throughput.
However, there are downsides too:
it is not open participation, you have to lock up some funds, and most importantly it is application-specific (only for transactions), so it has a limited use case and cannot be used to scale general-purpose smart contracts.
A good example is the Lighting Network on the Bitcoin blockchain. Here is a full article explaining all about it.
2. Sidechains
A Sidechain is an independent blockchain that is connected to Ethereum mainnet by a two-way bridge.
It can be EVM compatible
, which means they can run Ethereum-native dapps, supporting general computation scaling.
Now, sidechains typically have their own consensus mechanism and block parameters, which means they do not post state changes and transactions data back to the Ethereum mainnet.
By not relying on Ethereum’s security system, it is generally less secure. At the same time, they do tend to sacrifice some measure of decentralization to achieve higher speed and capacity.
3. Plasma Chains
Also known as child chain, is a separate blockchain that is anchored to the main Ethereum chain.
This solution leverages the use of smart contracts and merkle trees to enable the creation of an unlimited number of child chains, which are copies of the parent Ethereum blockchain.
Plasma Chains use “fraud-proof” to arbitrage disputes
- more on this later when we cover rollups.
It enables fast and cheap transactions, but the downside is that there is a long waiting period for funds withdrawals, and cannot be used to scale general-purpose smart contracts.
It might sound similar to Sidechains. But the key difference is that Plasma Chains rely on the mainnet for their security, which tends to make them more secure compared to the sidechain.
4. Rollups
It’s literally a rollup of a group of transactions. It bundles them into one single transaction that is submitted to the base layer.
In a way, rollups get the best of both worlds: it’s a general-purpose scaling solution, while still fully relying on the security of Ethereum, therefore achieving scalability without compromising on security.
Each rollup deploys a set of smart contracts in the Layer 1 that are responsible for processing deposits and withdrawals and verifying proof.
Speaking of “proof”, there are 2 types of proofs.
Depending on which one is used, we can identify 2 types of rollups.
If a rollup uses “validity proof”, it’s what we known as “Zkrollup”
If a rollup uses “fraud proof”, then we are talking about an “Optimistic Rollup”.
Regardless, it is fair to say that both types of rollups should be ready to scale Eth from a 15tps to 1000-4000tps.
………………..
I’ll be making a pause here, in order to avoid making the content too long and heavy. I’ll focus on the explanation of the differences between these 2 types of rollups in next week’s article.
Make sure to subscribe so you don’t miss out!
In the meantime, if you wonder why I bother to zoom in on the type of rollups, the answer is that Rollups seems to be the key Layer 2 solutions.
The Ethereum community is actually quite vocal about scaling through a combination of Ethereum 2.0 and Layer 2 Rollups.
For those of you interested, here is an article writen by Vitalik Buterin about a rollup centric Ethereum Roadmap. Worth a read.
Thanks for making it this far! If you enjoyed it, make sure to like, subscribe and share, so more people can find us!