What is Layer 2 scaling and what are the L2 scaling technologies?

Theo Crowley
Pineapple Workshop
Published in
5 min readDec 28, 2022

What is Layer 2 scaling?

The Ethereum mainnet suffers from low transaction speed. The blockchain cannot handle the volume of transactions it experiences. As traffic on the network grows, users spend Eth to assure that their transaction is prioritized. This is often referred to as paying gas. This can make transacting on Ethereum very expensive. The user experience of decentralized applications (dapps) deteriorates if transactions are expensive to verify or cannot be verified.

It is important to note that other blockchains like Zcash and Bitcoin also use Layer 2 scalability solutions. However, this article focuses on the Ethereum use cases.

Layer 2 solutions help to scale the Ethereum mainnet blockchain. Layer 2s are often servers, or a cluster of servers run by individuals, third parties, businesses or groups of individuals. A group of servers run by a group of individuals is, of course, how the Ethereum mainnet works. These servers are often referred to as “nodes”, “sequencers”, “operators” or other similar terms.

Transactions are submitted to Layer 2 nodes instead of being submitted directly to Layer 1 nodes. Layer 2s handle transactions, bundle them, and then send a summary of transactions to the Layer 1 mainnet. Sending transactions from Layer 2 to Layer 1 submits the transactions and makes them unalterable. Submitting the Layer 2 transactions to Layer 1 is the process of “anchoring”. “Anchoring” is how Layer 2s maintain security. The precise details of the process varies among the various Layer 2 scaling solutions.

TL;DR

- Layer 2 solutions are needed to increase the speed and enhance the user experience of the Ethereum mainnet.

- Layer 2 transactions are sent back to the mainnet to reduce gas prices and leverage the mainnet’s decentralized, unalterable security.

- Layer 2s can support one to many applications.

Layer 2 Scaling Solutions

Rollups

Rollups execute transactions off-chain and then sent to Layer 1 via a validated cryptographic proof. Rollups scale the Ethereum mainnet while leveraging the mainnet’s security. Rollups can be used for any arbitrary contract execution and, therefore, can be used across a wide array of dapps.

There are two types of roll ups — ZK Rollups and Optimistic Rollups.

ZK Rollups

  • ZK Rollups are fast, but do not offer an easy way to migrate the rollups to Layer 1. It is important to note that zkSync and Polygon are actively working to better the rollup process, including developing an easy way to migrate the rollups to L1.
  • Teams are working on a complete overhaul of the EVM foundational infrastructure called zkEVM. The overhaul would make the network more compatible with zero knowledge proofs. The development of zkEVM has the potential to replace and make Arbitrum obsolete. We will explain Arbitrum in the coming paragraphs.

Optimistic Roll Ups

  • Optimistic Roll Ups run a compatible Ethereum virtual machine (EVM) called an OVM. The OVM allows Layer 2 to execute the same smart contracts that can be executed on the Ethereum mainnet. The bundles of transactions sent to Ethereum L1 are “optimistic” because all bundles are assumed to be valid, unless someone challenges the bundle. If the challenge is successful the operator who submits their bundle will lose their deposit. Optimistic Rollups are leveraged in DeFi, because smart contracts can maintain their original form.
  • Arbitrum is a type of optimistic rollup and is the second largest L2 protocol behind Polygon. Arbitrum runs a compatible Ethereum virtual machine (EVM) called an AVM.

Sharding

In computer science, sharding is the process of splitting up a database to spread the load of information. Sharding works alongside rollups to handle the data on the network. Spreading the data works to increase transaction speed and reduce network congestion.

Sharding has important networking implications outside of transaction speed. Sharding helps to scale a database without increasing hardware or the size of the existing database. With sharding, the ethereum network will not have to store all ethereum data. As a result, people should eventually be able to run validating nodes on their personal computer or phone.

Channels

A “channel” is a process whereby participants transact a number of times but only two transactions are submitted to the mainnet. The two most popular types of channels are state channels and payment channels. Channels can process thousands of transactions per second.

The downside of channels is that they are “premissioned”. This means participants have to be known upfront, which detracts from blockchain’s pseudonymous characteristic. Furthermore, users have to lock up their funds in a multisig contract to maintain that they will not act maliciously. Currently, channels are application-specific, meaning they cannot be implemented across an array of applications.

Plasma

Plasma is a framework for building scalable solutions on Ethereum.

Plasma uses smart contracts and merkle trees to create child chains. Child chains are copies of the parent, Ethereum blockchain. Child chains allow for fast and cheap transactions.

One downside of Plasma is that participants are required to wait for a period of time before they can extract their funds from the chain.

Matic network and OMG both have developed their own versions of Plasma.

Sidechains

Sidechains are EVM blockchains that run in parallel to the Ethereum mainnet. Sidechains are a proven scaling solution that allow dapps to build extensive ecosystems. These chains have their own consensus models.

Largest Downside to Layer 2s

Unfortunately, Layer 2s cannot communicate with other dapps on a different Layer 2. This represents a significant compromise to the interoperability of blockchain technology. A Layer 2 solution can only interact with transactions on the same Layer 2.

Another issue with Layer 2s is liquidity. Spreading Eth across a wide range of non-interoperable layers creates a dissociation of market Eth. Liquidity is split across Layer 1 and all the scaling solutions.

Lastly, Layer 2s create significantly more on-boarding and off-boarding headaches. It is hard enough to bring the population into the complexity of web3. Layer 2s exacerbate this issue. Layer 2s make the Ethereum ecosystem more complex and harder to navigate.

Why are there so many different Ethereum scaling solutions?

The overarching answer is that no Ethereum scaling solution provides an adequate, all-encompassing fix to the mainnet’s shortcomings. For some Ethereum use cases, security is most important. In such cases, transacting directly on the mainnet may be worth extra gas fees. For other use cases, like play-to-earn games that require a large number of small transactions, sidechains may reduce the cost of transacting, while sacrificing an acceptable degree of security.

Summary

In an effort to scale the blockchain, Ethereum has become a complex ecosystem. Nonetheless, the interoperability of Ethereum with Layer 2s and side chains has made Ethereum the perfect blockchain to utilize when developing a token or decentralized application.

For more in-depth information on Ethereum, please visit the Ethereum Developer Docs on Ethereum.org.

Pineapple Workshop

If you enjoyed this article or want to learn more about who we are and what we do, follow us on Medium and visit our website.

--

--