The number of crypto users has risen exponentially since the launch of Bitcoin and Ethereum. Over time, the network traffic on these “Layer 1” blockchains has grown considerably, resulting in higher fees and increased transaction times. One solution to ease network congestion and allow for more transaction throughput is what are known as Layer 2 networks. These third-party protocols are built on top of existing blockchains to bear the brunt of transaction activity. This allows significantly more transactions to be processed without compromising the main chain’s security, improves scalability and clears a path for blockchain networks’ long-term growth.
A blockchain’s scalability refers to its ability to accommodate an ever-increasing number of users and transactions. Scalability not only determines a blockchain’s transaction speed, but its potential for growth and widespread adoption.
Because transaction capacity is hard-coded into these blockchain systems, their long-term growth is at the mercy of how many transactions they can process. Layer 2 networks address these issues by processing transactions independently of the main chain through a secondary framework. This enables congested Layer 1 blockchains to remain speedy and efficient, even as demand skyrockets.
But what exactly are Layer 2 solutions? And how do they differ from Layer 1 blockchain networks? We cover the essentials on these and other topics straight ahead.
A quick primer on blockchain layers
Layer 1 refers to the underlying architecture of a blockchain itself. Bitcoin, Litecoin and Ethereum are all examples of Layer 1 blockchains, or “mainnets”. Layer 1s are so named because they’re the primary networks within their respective ecosystem. Layer 1 networks establish the parameters for how a blockchain operates. This includes things like which consensus mechanism the network uses, average block time and various other rules. Layer 1 blockchains can independently verify and finalize transactions without the need for external networks, but transaction times can slow considerably during periods of high network traffic.
Layer 2 solutions are like miniature, secondary blockchains that run parallel to a Layer 1 network to improve efficiency and scalability. These solutions take over much of the transaction processing work that would ordinarily be completed on the main chain. Once the transactions are processed and validated on a Layer 2 network, the records are transferred to the main chain to be permanently recorded. Some of the best-known Layer 2 networks include Ethereum-based Arbitrum and Bitcoin-based Lightning Network.
What is a Layer 2 network?
In simplest terms, Layer 2 solutions are protocols that sit atop a Layer 1 blockchain to improve some aspect of its performance, most often scalability or privacy. Layer 1 networks like Bitcoin and Ethereum experience slow performance at times of high network traffic. Layer 2 solutions shift transaction processing work away from the main chain until completed transactions are ready to be recorded. This frees up critical network capacity on the Layer 1 chains, ensuring their continued speedy and secure operation. Layer 2 blockchains are able to conduct transaction activity so much faster because they are engineered for maximum scalability, as opposed to decentralization and security being the priority for Layer 1 chains.
A common issue with Layer 1 networks is their poor scalability, which we’ve seen with Bitcoin and other major blockchains as their user load has increased. A major part of Layer 1 blockchain security is their immutability, or the inability to modify them. While this is essential for protecting users from would-be scammers and thieves, it makes implementing certain changes to a Layer 1 network’s functionality virtually impossible.
Benefits of Layer 2 solutions
Layer 2 solutions play an important role in the world of cryptocurrency, making transactions faster and less expensive while addressing major blockchains’ biggest limitations. As Layer 1 networks become less congested through the use of Layer 2 solutions, their scalability improves, which allows them to accommodate more users without network slowdowns.
Layer 2 networks’ emphasis on scalability enables them to perform thousands of transactions per second. This allows Layer 1 blockchains to vastly increase their transaction throughput without modifying their construction or compromising their security or decentralization. Bitcoin, for example, is only capable of processing approximately 7 transactions per second (TPS). By contrast, Lightning Network, the most popular second-layer protocol for Bitcoin, can theoretically process as many as 1 million transactions per second. Since BitPay began its support for the layer 2 platform, Lightning Network payments processed by BitPay rose over 200%.
How Layer 2 scaling solutions work
Transactions performed via the Layer 2 network are consolidated then broadcasted to the mainnet, rather than broadcasted 1 by 1. By sparing the mainnet much of the computation-heavy validation work, Layer 1 blockchains are able to scale more effectively. More specific details about how information is packaged and transferred between L2 and L1 networks will vary based on the specific type of L2 in use.
Types of Layer 2 solutions
There are several different categories of Layer 2 networks, including state channels and rollups. And while the way they’re implemented and how they function vary, they all serve the purpose of providing users with a low-cost, faster alternative to transacting on the L1, but with similar security benefits as using the L1.
State channels
State channels allow two or more people to conduct multiple off-chain transactions without broadcasting them to the entire network. This spares major blockchain networks from a lot of resource-intensive processing work. It has the effect of freeing up network capacity, reducing transaction fees and enabling instant settlement. The Lightning Network, built upon the Bitcoin blockchain, is an example of a state channel Layer 2 protocol.
Rollups
Rollups are systems that process transactions on a Layer 2 blockchain before porting them back to the main chain, reducing transaction costs. In rollups, transactions are bundled together, sometimes thousands at a time, and recorded on the Layer 2 chain before being “rolled up” into a single transaction. That transaction is then fed to the slower, more expensive mainnet for recording, splitting the cost of a single transaction across many users.
There are two primary types of rollups: Optimistic rollups and zero-knowledge rollups (or ZK-rollups)
Optimistic rollups allow Ethereum users to execute smart contracts outside the mainnet without broadcasting every transaction back to the entire network. As the name implies, optimistic rollups assume all off-chain transactions are valid. Once each batch of rollups is submitted to the mainnet, there’s a “challenge period”, usually 7 days long, during which any user can challenge a rollup transaction through what is known as a fraud proof. If the proof finds the transaction was incorrectly conducted, the rollup executes the transaction again with the corrected information. If the fraud proof fails and there are no other challenges, the bundle of transactions is permanently recorded on Ethereum after the 7-day window. Some examples of optimistic rollups include Arbitrum, Optimism and Boba.
Zero-knowledge rollups, or ZK rollups, improve transaction throughput by processing thousands of transactions per second while only publishing basic summary data to the mainnet. ZK rollups validate transactions by generating cryptographic proofs known as validity proofs. With zero-knowledge rollups, interactions between chains are governed by smart contracts. Once users sign a bundle of transactions, a third party known as a “prover” verifies them before adding them to the processing queue. At periodic intervals, provers batch up thousands of queued transactions to generate what is known as a zero-knowledge proof. This is a brief and specific piece of data which can be verified almost instantaneously without any additional transaction information. The prover then submits their proof to the mainnet, which a smart contract then verifies and records. Some examples of ZK rollups include StarkWare, zkSync and zkPorter.
A note on sidechains and validiums
Sidechains are independent blockchains that closely align with a main chain, allowing various interactions between the layers. Sidechains allow certain digital assets to be transferred between different blockchain networks, enabling greater interactivity and compatibility across chains. The primary drawback of sidechains, however, is that they are not covered by the security apparatus of its parent Layer 1 chain. This requires them to conduct their own security, using either proof-of-work or proof-of-stake consensus. A well-known example of a sidechain is Bitcoin’s Liquid Network, or Polygon (MATIC) for Ethereum.
Validiums are a type of scaling solution designed to improve throughput by processing transactions off the Ethereum mainnet. Similar to ZK rollups, validiums utilize zero-knowledge proofs to verify these transactions without storing any transaction data on the mainnet. Validiums are capable of processing up to 9,000 transactions per second, compared to Ethereum’s average of around 30 TPS.
Wrap up on Layer 2 networks in crypto
As the number of crypto users worldwide continues to grow, the most popular cryptocurrency networks have faced scalability challenges as they struggle to keep up with the spikes in demand. Left unaddressed, these challenges threaten the future growth of the largest blockchain ecosystems. Layer 2 solutions allow mainnets to effectively outsource much of the transaction processing work to more scalable networks. The rerouting of network traffic ensures faster transaction speeds, lower fees, and allows for greater scalability.