Crypto Layer 2 Networks Detailed Guide for Beginners

by CrabCommander

With Ethereum’s Optimism update coming out soon, and other networks also implementing similar features, there is obviously a lot of hype around the idea of ‘Layer 2 Networks’. Unfortunately, there’s also a lot of misunderstanding about what that actually means. As always, you should DYOR when you have time, but I wanted to at least take a moment to clear up a few points about what Layer 2 stuff actually is.

For the purpose/simplicity of this post I’m going to use ETH as the example, but the points are largely parable to other networks implementing L2 solutions.


What Layer 2 -Is-

Let’s start from the top here. The goal of ‘Layer 2’ systems at large is to reduce the overall volume of network traffic on the main ETH network. This is done via condensing multiple transactions into fewer/smaller transactions. That’s it. Everything else that follows is basically discussions of how to do that.

This bears repeating. Everything surrounding Layer 2 exists for the sole goal of condensing many transactions down into fewer, smaller transactions on the main network itself.

How this is done varies immensely, but the most important thing to note is that all ‘Layer 2 Systems’ require some at least partially-trusted third party to do the transaction bundling for you.

This brings us to our second point…

What Layer 2 -Is NOT-

Layer 2 nodes/networks are not necessarily a large, decentralized network, or anything else of the sort. While some solutions are part of the ETH main-net, others may be off-chain computers as small as a single laptop running in your mom’s basement.

It is important to understand as well, there is not one large ‘Layer 2 Network’, instead, there are many different ones. Again, any system, even a single computer, can potentially be a “Layer 2 Network”, as long as it is can properly manage & bundle transactions for submission onto the ETH network.

This brings us to the important discussions of types of Layer 2 technologies – which is to say, the different methods of bundling transactions. (I’m not certain I can link the ETH docs page about these and not have the bot eat my post, but Google “ETH Layer 2 Scaling” and you’ll find it. There’s a good 8-10 methods already completed or in serious development.)

“Sidechain” Based Bundling Methods

(Ex. Plasma, Validium, and Sidechain strategies in the ETH L2 doc page)

First, before I go on, it bears noting that “Sidechains” here just means means other blockchains which are compatible with ETH. This does not necessarily mean these “Sidechains” have to be large, decentralized, publicly available, or even more than a single computer running it in your husband’s girlfriend’s basement.

For these systems, you take your assets off the ETH network, plop them onto a Sidechain (via a smart contract), do a number of transactions on said Sidechain, then only take them back out onto the ETH main-net when you’re done. The Sidechain bundles back the results of your actions to the ETH network either periodically, or when you take your assets off the side chain, reducing the number of main ETH chain transactions.

The concern here may be obvious: These Sidechains may potentially be completely opaque and centralized, and may only have a single smart-contract connection point between ETH and the Sidechain. Furthermore, you only gain the benefits of the L2 cost reductions while you keep your assets in the specific Sidechain network, and will have to pay standard ETH fees to withdraw them from the specific Sidechain network, and..

Hey, is this starting to sound like a Centralized Exchange to anyone else?

(It’s worth noting some of these strategies attempt to implement methods to prevent fraud, but diving into that was beyond the scope of this post. Furthemore, depending on the exact strategy used, the “Sidechain” may not even be a blockchain, but instead possibly something as simple as a centralized SQL server, etc.)

“Channel” Based Bundling Methods

(Ex. the Channel and State Channel strategies in the ETH L2 doc page)

These are a little simpler, but narrower in use case. Basically you have two parties sign on the network saying they’re doing something together. After they’re done doing whatever they were doing off-network, they submit the final result of their transactions together, again signed by both parties to the ETH network.

Now, obviously these are only useful in pretty niche instances where you are transacting multiple times with the same party during a limited time window, but they could still have valid uses. Such as (for example) day trading repeatedly with a liquidity pool multiple times in sequence, or a casino where you open a channel to the game and it takes out a micro-payment each time you spin the slots. It’s worth noting that at the end you’d have to functionally sign a closing ‘recipt’, and would need to make sure that it is for the correct amount that the casino or defi app claimed they billed you for. (And things could obviously get a little messy if either party refuses to sign)

“Rollup” Based Bundling Methods

(Ex. ZkRollup and Optimistic Rollup strategies in the ETH L2 doc page)

The last, and recently most excitement-inducing method is ‘Rollups’. These effectively stay on the main ETH chain the whole time, but focus around significantly reducing the data size of individual transactions, thus reducing gas costs. In these methods, you must submit your assets to a smart contract which manages the “Rollup”. While in the Rollup you may perform transactions with others in the Rollup at reduced cost (thanks to the compression mentioned above), and when you’re done, you can withdraw your funds back, though you’ll have to pay normal ETH fees for that and…

Hey, this is starting to sound suspiciously like a Centralized Exchange again!

Well, there’s definitely some similarities, and there’s no getting around the fact that you have to trust the Smart Contract operator. Thankfully, beyond that trust, everything else is still as stable as the rest of the main network, via main-net cryptographic proofs or fraud checks.

On the downside, these rollups are slow, taking 10-30 from minutes for one strategy to up to 2 weeks on the other in order to reach full finality.

TL;DR;

“Layer 2” Networks is a bit of a smoke and mirrors term that encompasses at least 3 significantly different methods to bundle and/or shrink down transactions, some of which may be opaque, centralized systems. “Layer 2” is not a magical instant-solution to ETH’s issues, nor does it inherently guarantee the security of your assets in the same way as the ETH main-net does.

Related Articles

1 Response

  1. Caner says:

    Hey Crab, you do not mention Polygon, probably the most popular layer 2 system. Can you put right this omission please?

Leave a Reply

Your email address will not be published. Required fields are marked *