Layer 2 Scaling Solutions (Definition + 4 Examples)

whiteboard crypto logo
Published by:
Whiteboard Crypto
on

Think about the highway. There are many vehicles on the road. There are motorcycles, cars, trucks, and semis. Each of these vehicles is designed to get someone somewhere else, but they also each have benefits and drawbacks.

If you wanted to move some lumber, you wouldn’t (or couldn’t) use a motorcycle. Similarly, if you wanted to feel the wind on your body and experience high G forces, you wouldn’t pick a semi.

Layer 2 Scaling Solutions are suggested methods of allowing a blockchain to work at a faster rate than it can do itself. Right now the 4 best solutions are Rollups, Plasma, Channels, and Sidechains.

When it comes to Layer 2 scaling solutions, there are many different options out there, and it is becoming more obvious that each solution has its own place, similar to how there are many options for vehicles—they each have different purposes. 

What are Layer 2 Scaling Solutions?

Layer 2 Scaling Solutions

So first, we must explain what layer 2 scaling solutions are trying to solve. Essentially, these major blockchains can only do 7 transactions a second, or 15 a second, which is very small compared to Visa which can do like 100,000 a second.

To compete with centralized methods, we need to find a way to process more transactions each second. 

There are 2 ways to scale: improving the base layer or outsourcing some of the work to a new layer. 

Here’s why we can’t scale the base layer:

Think of the base layer of a blockchain, like Bitcoin or Ethereum, as the foundation of a building. It’s what keeps everything secure and in order. But when we talk about making this foundation handle more transactions (scaling it), it’s not that simple. Here’s why:

  1. Balancing Act: Imagine trying to keep a seesaw balanced. On one side, you have decentralization – that’s what keeps the blockchain fair and safe from any one person or group taking over. On the other side, you have scalability, which means making the blockchain fast and able to handle loads of transactions. The tricky part is keeping the seesaw balanced. If you make the blockchain faster by changing its core rules, you might end up giving too much power to a few big players, and that’s not what we want.
  2. Traffic Jam Issues: Ever been stuck in traffic? That’s kind of what happens in the blockchain world when it gets too busy. More people using the blockchain means more transactions, and the system can get clogged up. This leads to longer waiting times for your transactions to go through and higher fees to jump ahead in line. It’s like everyone trying to use the same single-lane road at once – it just gets jammed.
  3. Tinkering with the Engine: Upgrading the base layer of a blockchain is like messing with the engine of a car while it’s running. It’s complex, and if something goes wrong, it can cause big problems. Plus, everyone using the blockchain has to agree on the changes, which is as hard as getting your entire extended family to agree on where to have dinner.

So, instead of just beefing up the base layer, people came up with a smart workaround: Layer 2 solutions. Think of these like adding express lanes or a subway system on top of the existing roads.

They handle the bulk of the traffic, moving transactions quickly and cheaply, without messing with the original road (the base layer). This way, you get a faster, more efficient system without sacrificing the security and fairness that the base layer provides.

We’ll get to the four scaling solutions we mentioned earlier, but first we need to get into a bit of the challenges they have and are trying to solve.

Blockchain Trilemma

Blockchain Trilemma

We have talked about the blockchain trilemma before, but basically there are 3 big important areas when it comes to a blockchain: Decentralization, Security, and Scalability.

Without going too in-depth, developers haven’t found a way to maximize all three. If they try to improve one, the other two start to lose their benefits. 

Because of this, developers have to be creative to find out how to scale a blockchain.

Now, I am going to go over some layer 2 scaling solutions. We say layer 2 because they usually aren’t code written to affect the actual true blockchain, but instead outside factors or tools that allow the network to scale through them. 

Also, keep in mind the motorcycle, car, truck, and semi analogy I used earlier—each of these solutions have a place in scaling a blockchain. It’s not so much as which one is best, but which one is best for the situation you are trying to solve. 

Solution 1: Rollups

First off, rollups are complicated. When we started learning about them, the more answers we found, the more questions we asked, and the more questions we asked, the more technical and confusing they got.

As an education yet entertainment channel we are going to try to explain these at such a high-level that you won’t get bored or scared from learning about them. However, we also have a rollup-specific page that explains them with a bit more detail. 

In short, there are two forms of rollups:

  • ZK-rollups and
  • Optimistic Rollups 

Again, the next few sentences are very high-level overviews of how they both work.

ZK-rollups are much faster, and more efficient rollups that combine a bunch of things you want to do on the blockchain into one “rolled up” thing. However this can’t use smart contracts. 

On the other hand, optimistic rollups actually have their own optimistic virtual machine which allows them to do stuff with smart contracts, but they are slower and less efficient. 

Either way, these rollups are basically “rolling up” a bunch of transactions into a single transaction that they can then push to the true blockchain.

An example of an Ethereum layer 2 solution that uses optimistic rollups is—unsurprisingly—Optimism Mainnet.

Again, we have many other layer 2 scaling solutions to get to, so we have to move on, but if you want the specifics of how rollups work, check out that article. 

Solution 2: Sidechains

Sidechains probably act how you think they would act. They are literally secondary blockchains that run on the side of a main chain and use the resources they have to offload the work. 

They can steal, or borrow, information from the main blockchain, and then use their virtual machine to execute smart contracts or validate transactions and then send those back to the main blockchain for security reasons.

A sidechain cannot operate without it’s parent chain, but a parent chain doesn’t need a sidechain. 

In the case of Ethereum, the Polygon network and Gnosis Chain are sidechains.

Solution 3: Plasma

Plamsa may be the most confusing layer 2 solution out there. In fact, we had written summaries of all the other solutions and then came back to plasma.

It is probably because there are no good explanations out there already that don’t involve the use of code or a complete generalization that they just work but you don’t need to understand how. 

In short, Plasma uses smaller, child chains (sometimes called plasma chains) which can have their own child chains so that they can broadcast important operations to the main chain.

Think about it like how the United States is divided into the federal system and local system. There might be federal news that is super important such as when the president signs an executive order, or there might be local news, such as when your cousin wins valedictorian.

Well, both of these are important pieces of information that should be recorded, however one of these might warrant a $10,000 photoshoot and 50 new articles about it.

You could also think of child chains as branches on a tree. These child chains handle lots of transactions and only report back to the main chain occasionally, which lightens the load on Ethereum. 

Solution 4: Channels

Lightning Network

Channels are a way to lock up your funds and to trade a virtual version of your funds on a network that is much faster.

For example, when it comes to Visa, when we swipe our card, we are not really sending dollar bills from us to the vendor. Instead, we are sending a virtual number representation of how many dollars we own to that vendor.

Since everyone agrees that the virtual dollar is equal to a real dollar, there are no issues. In a channel system, we simply use code to make sure you can only send what you have actually locked up. 

The Lightning Network is an example of a layer 2 scaling solution using channels for the Bitcoin blockchain. Essentially, you lock up some bitcoins with someone else, and then you can send your virtual bitcoins back and forth until you decide to settle up and push one transaction to the blockchain.

Similarly to the way a lightning bolt looks, you can pay anyone that is connected to the person you locked your initial coins up with. We have a whole video on the Lightning Network already that uses examples of exactly how this works.

A downside of channels is that they can only be used for transactions, not stuff like smart contracts or virtual machine code. They are application specific.

However, they still work—the Lightning Network has been called a great success in avoiding the high bitcoin transaction fees while allowing bitcoin to scale and stay secure. 

Conclusion

As you can see, there are many solutions to help scale the base layer of a blockchain, but no one solution is perfect. They each have their benefits and flaws, and some work better on some blockchains than others based on how the base layer works.

Thanks for reading, we hope you enjoyed it, and we really hope you learned something!

whiteboard crypto logo

WhiteboardCrypto is the #1 online resource for crypto education that explains topics of the cryptocurrency world using analogies, stories, and examples so that anyone can easily understand them. Growing to over 870,000 Youtube subscribers, the content has been shared around the world, played in public conferences and universities, and even in Congress.