Layer 2: Blockchain Scaling Problems Solved ❓

Lina Nada Maach
The Innostation Publication
9 min readFeb 20, 2022

Everything you need to know 🤓

After a few days of diving head-first into web3, you think you’ve got most of the concepts you need nailed down…

You think you can get to work — join a DAO, start a DAO, develop projects…

or whatever…

But then you come across this thing called “layer 2” scaling solutions and it just becomes unbearable…

Video tutorials assume you have a certain level of experience, they refer to a few too many past events in the blockchain world, send you off to a few too many external resources…

It’s just painfulllllllllllll 😭

In this article, I will break down layer 2 for any of you going through the same struggle…

WE CAN DO THIS!!

Enough with the intro, let’s get into it…

What is all the hype about??

Ethereum can only process 30 transactions per second.

Bitcoin, even worse, can only process 4.6 transactions per second.

Let’s compare that to centralized payment solutions…

Visa alone can process a whopping 65000 transactions per second.

That’s a HUGE leap from bitcoin’s single digit numbers.

And let’s just not talk about gas fees…

It’s not unusual for Ethereum gas fees to cross $50. Neither is it for Bitcoin.

Is that the peer-to-peer payment system Satoshi envisioned 🤔? The crypto that people will use to buy groceries and get paid through 🤨?

Certainly not 😑.

Scalability is one of biggest obstacles that we see in blockchain right now…

What about blockchains out there with very low gas fees?

True… There are some blockchains out there that have close-to-zero gas fees, like Litecoin, Nano, Dash, and a few others…

But there is a catch there… And to understand it, we need to look at the Blockchain Trilemma!

The Blockchain Trilemma

3 Fundamental Concepts:

Blockchain is essentially based on 3 fundamental pillars that we can all agree on.

→ Scalability: It needs to be scalable to replace our current ways of doing things.

→ Security: Blockchains need to be secure to protect the network against double spending, mutability…

→ Decentralization: There must NOT be a central authority that has control over the system.

Yea we get it, but why are we talking about that right now?

Because when you try to improve one of the three foundations, the other two get compromised.

So if you’re trying to create a more scalable blockchain, you’re going to be compromising either security or decentralization — often both.

It was reported that a mine on Litecoin once exceeded 50% of the network’s total computing power, putting the blockchain’s decentralization at risk — and that’s just an example of what could happen as a consequence of compromising any of the pillars.

So how do we go about the problem?

For years already, blockchain developers have tried to come up with all sorts of blockchains that are more scalable without compromising on security or decentralization.

Some were able to find a better balance of the three pillars; however, as far as we know, none of them was able to find a good-enough solution to the problem.

Sooooo…

People started thinking…

Do we really need a whole new blockchain to solve the problem? Is there any other way to go about it??

Turns out there is… Leading to the creation of Layer 2 scaling solutions…

The TL;DR of Layer 2?

You can think of layer 2 scaling solutions like frameworks that you can use on top of the blockchain to make it more scalable, without compromising on the security or decentralization of the first layer — which is essentially the main blockchain (Bitcoin or Ethereum for example)

→ They are off-chain solutions, so the main chain doesn’t need to undergo any structural change.

Is that all?

Of course not! That’s the TL;DR I would use to explain layer 2 to my grandparents 😏 There is so much more to layer 2 than that. So…

Let’s dive into it!

4 Main Layer 2 Solutions

Layer 2 essentially represents a category of solutions to the scalability problem — that are off-chain and do not require a change to the main blockchain.

But in that category, there are a few different solutions that work better for certain problems. I will be going over the 4 main solutions being used right now…

Sidechains

Sidechains solve different issues by operating on a different chain with different consensus mechanisms & rules than the main chain.

Think about it like doing business in another country because they have “lower taxes” “looser laws”…

Sidechains connect to main chains through bridges. You exchange your assets in the main chain with vouchers you can operate with in the sidechain that you can trade back for your assets when you go back to the main chain.

Problem? Sidechains have different consensus and can be very shady and risky. You simply need to trust what’s happening behind the scenes in sidechains if you want to use them — AT YOUR OWN RISK.

Plasma

Plasma chains create child chains — or copies of the main chain where you can perform your transactions… Their biggest limitation, like channels, is limitations on smart contracts — no fancy contracts.

Some people would argue plasmas are not to be considered layer 2 solutions, depending on the exact definition of layer 2.

State Channels

So what if you buy coffee every morning from a café just around your house? Do you have to pay gas fees for EVERY SINGLE PURCHASE YOU MAKE?

That’s how it would be on layer 1, but there’s a better solution with channels…

Using channels, you would essentially lock a balance (e.g. 1 Eth) in the channel with the café and will be able to trade back and forth with them as much as you like. When you’re done business together, you leave the channel with your new balances… A big advantage is that you don’t need to pay gas fees for every transaction you make, only when you get INTO & OUT OF the channel.

The biggest limitation of channels is that there isn’t much you can do with it, in terms of like sophisticated and intricate smart contracts…

Rollups

Rollups essentially execute smart contracts outside of the 1st layer — or the main chain — but posts transaction data into the main blockchain. It derives its consensus mechanisms from Ethereum, and therefore maintains Ethereum’s security level… It takes a bunch of transaction data, compresses it and rolls it up to the main network, thus the name “rollups”.

TL;DR: Rollups move computations off-chain allowing for more transactions to be processed. Smart, eh?

We can ramble about rollups for days because of some considerations to factor in.

For example, how do we know that rollups are authentic and not faked?

Rollup mechanisms deploy smart contracts on the main chain, that define how the rollup mechanism would process transactions to determine if they are valid or not.

That’s also where we start talking about different types of rollups, with the two distinct types being optimistic rollups and zero-knowledge rollups.

Optimistic rollups (optimism): Optimistic rollups use what we call “fraud proofs”. As you can tell from the name, they are optimistic — they consider every transaction to be valid by default. But the party who submits a batch of transactions need to provide a bond. If another party spots a fraudulent transaction on the blockchain, they provide a bond to “get the transaction verified”. Whoever turns out guilty (either the party who submitted a fraudulent transaction or the party who accused a valid transaction) is slashed off their bond.

Zero-knowledge rollups (arbitrum): Zero-knowledge rollups use what we call “validity proofs”. It uses a cryptography algorithm — zero knowledge proof. Every batch of transactions submitted to the main chain comes with a cryptographic proof called a ZK snark, that can be verified by the first layer contract to accept or reject straight away.

FAQ: Is Ethereum 2.0 a layer 2 solution?

NO.

Shocking 🙄, I know…

But why? Let’s take a look at it… What are the main changes in Ethereum 2.0?

→ Sharding

→ Full transition to proof of stake

Now let’s drop the latter — let’s look into sharding…

Sharding is essentially splitting the blockchain into different “shards” that, instead of processing the whole network’s data, would only need to process one shard’s data.

Since that is a modification in the actual main network and not on top of it, sharding would be considered a layer 1 solution.

Drawbacks of Layer 2 Solutions

I’ve touched on some individual limitations of the 3 scalability solutions I talked about. But we still need to talk about some collective drawbacks of layer 2 solutions in general, particularly four key inconvenients…

#1: Layer 2 takes a toll on a blockchain interconnectivity

One of the biggest issues right now in blockchain is the lack of interconnectivity between different blockchains (you can’t connect with someone on Ethereum if you’re on Bitcoin for example)… That is a very problematic issue.

With layer 2, that problem can be made even worse by limiting interconnectivity within a network because layer 2 users are confined to the protocols of the solutions they use, and it’s becoming a challenge — for example, a Polygon user will have issues interacting with a Loopring user… There is room for solutions in this space however, it should come with time.

#2: Privacy and Security Concerns

Of course, as you might have noticed in the previous section, different solutions have different levels of security and privacy. But at the end of the day, none of the solutions reach the level of security that the main chains have, so depending on your priorities, you would want to give it some thought.

#3: More steps, more risks, more time to on-board

There are already countless things to deal with on a primary blockchain. Imagine even more tools and frameworks on top of that, wouldn’t it become too much? We’re not very familiar with blockchain technology as it’s fairly new to our world, so it still comes with significant risks we may or may not choose to consider.

Layer 2 makes the jump into blockchain more affordable due to lower gas fees, but it also complicates the learning curve for beginners — something we can’t avoid as it was bound to happen, but worth pointing out.

Conclusion

So how are we doing now? Did layer 2 make it to your everyday vocabulary??

Hopefully, because we’ve got to move on to…

LAYER 3!!

No I did not just make that up, it’s an actual thing (did you even know we already go Layer 4 as well? I know, it’s hard to keep up 😪…

Stay tuned for another article coming on layer 3… soon 🔔

P.S A thank you meme to get you going, but that’s how everyone feels about Layer 2 😉

We’re providing opportunities for the next generation of student thinkers, inventors, and learners, to publish their thoughts, ideas, and innovation through writing.
Our writers span from all areas of topics — from Growth to Tech, all the way to Future and World.
So if you feel like you’re about to jump into a rabbit hole of reading these incredible articles, don’t worry, we feel the same way. ;)
That’s why studentsxstudents is the place for getting your voice heard!
Sounds interesting? Why not join us on this epic journey?

--

--

Lina Nada Maach
The Innostation Publication

AI and Blockchain enthusiast. I write about Stem, emerging tech, growth, philosophy, culture, global causes, book recs, lifestyle, AI & Blockchain.