L2 or Layer 2 networks are an approach to scaling popular networks effectively. They package thousands of transactions on a separate network into a single batch that is then submitted into the main chain. This way, you can use the infrastructure of the main network, without paying huge gas fees whenever it’s congested.
Growing pains are natural for a technology as promising as blockchains, the explosive growth and demand dynamics of their usage leads to networks like Ethereum being congested every once in a while (for example, whenever there’s a big NFT drop, or a DeFi windfall). But, early adopters shouldn’t have to pay the price of adoption.
That’s why Layer 2 networks were invented, to alleviate the skyrocketing price of gas whenever people get a little bit too excited with the on-chain transactions. Through them, you can participate in the web3-enabled interned without having to budget a big chunk of your funds for transaction fees.
<aside> 📈 No matter the approach a network takes to verify its transactions, they’ll eventually run into problems with either scaling, or security. Ethereum is strongly in favor of putting security first in the way they grow. So, what happens when the network becomes sluggish and the transaction fees skyrocket into the hundreds of dollars?
</aside>
That’s exactly the problem we have faced time and time again as the NFT and DeFi waves challenged crypto adoption along the past years. What use is a network if you have to pay substantial gas fees just to participate?
When facing this problem, some visionary developers found a way to solve it by thinking outside the box, or might we say, within a box?
They theorized that by packaging transactions into a single data container, they could effectively lower the cost of participating in web3 to just pennies. These transactions could then be sent as a bundle to Ethereum where they’d be secured forevermore. We call this approach “Layer 2 scaling”, because it adds a second layer to interacting with Ethereum.
So, essentially, you get to do your DeFi investments, collect NFTs and everything else you’d do in the Ethereum Network. And then, the transactions are rolled up into Ethereum in a block-by-block basis (some L2s opt for a different quantity, but a single block, or 1000 transactions is usually the norm). You save up on gas, Ethereum keeps verifying and securing every on-chain action, and we’re all happier as a result
So, we’ve established how L2s solve the scaling problem by bundling information into blocks, instead of processing the transactions as they come.
This approach sounds solid in paper, but then the question becomes “How can you be sure there aren’t any fake transactions in that bundle?” See, Ethereum is well known for its security thanks to its strong consensus layer which verifies every single transaction that's input on the network.
By skipping this step, L2 networks would technically be vulnerable to spoofed transactions, who’s to stop you saying you have thousands of ETH in your wallet? well, here’s how the different approaches to secure L2 scaling come in.
Some of the most widely used approaches to L2 scaling include:
ZK proof merits its own article down the line, but for now, just know that ZK rollups verify your transactions without identifying who submitted them in the first place, and then submit the data to ETH as a whole package deal.
That’s why Proof of Stake is significant for Ethereum. It optimizes data usage and computational costs, but most importantly, it allows the network to scale and adapt into its final form down the line.