Layer 2 and Layer 1 Blockchains: The Battle for Scalability

Anietie David
8 min readMar 7, 2022

--

image showing blockchain layers
Photo by Shubham Dhage on Unsplash

Over the last decade, scalability has become a core factor of how good or bad a blockchain project is. Blockchain technology is a game-changing technology that provides seamless operations for protocols, digital currencies, and businesses.

Without the need for a third party or a central body, blockchain technology facilitates easy transactions while keeping the network secure and transparent. To keep up with multiple transactions, blockchain networks must be scalable with top-notch security.

To help with scalability, there are protocols often referred to as layer one or layer two blockchains. Are you curious about what these layers are and why they exist? Let’s talk about the blockchain trilemma and how these protocols help with scalability.

What Is Blockchain Scalability?

In blockchain technology, scalability refers to a growth in the throughput rate of the system, which is measured in transactions per second. Blockchain layers are increasingly necessary to improve network security, recordkeeping, and other tasks as cryptocurrencies become more widely adopted in everyday life. “Throughput” refers to the number of transactions handled by a system per second.

A decentralized ecosystem’s first layer is the blockchain. Layer two is a third-party integration that works in tandem with layer one to increase the number of nodes and hence the system throughput. Many layer two blockchain technologies are being used right now. These systems use smart contracts to automate transactions.

The growth of a network in digital space in terms of transaction processing speeds and processing capacity to handle the inclusion of additional applications and increased user operations is known as blockchain scalability. Scaling allows blockchain networks to compete with centralized networks for transaction volumes, application development, and user engagement by providing larger processing capacity and capabilities.

The Blockchain Trilemma

The blockchain trilemma refers to the notion that, in terms of decentralization, security, and scalability, decentralized networks can only provide two of the three benefits at any given time.

Computer scientists devised the consistency, availability, and partition tolerance (CAP) theorem in the 1980s to express possibly the most significant of these difficulties. The CAP theorem states that decentralized data storage, such as blockchain, can only satisfy two of the three guarantees mentioned above simultaneously. This theorem has evolved into the blockchain trilemma in the context of the currently distributed networks. The widely held notion is that public blockchain infrastructure must sacrifice security, decentralization, or scalability.

Watch how Harmony Protocols explains the concept of blockchain trilemma using balloons.

It is rare (almost impossible currently) to find a blockchain that can optimize for all three desired features simultaneously. Ethereum is the most recent example of the trilemma in action. The Ethereum platform has seen a boom in usage due to the growth of decentralized finance (DeFi) applications this summer. Ethereum can only grow to a certain point.

Due to the increased demand, transaction fees have risen to the point where some people cannot engage with the blockchain. Increased Ethereum fees are an example of the trilemma, as we can see that Ethereum did not scale without sacrificing security or decentralization.

As a result, the holy grail of blockchain technology is to create a network with impenetrable security over a broadly decentralized network while also handling internet-scale transactional throughput.

Layer 1 Blockchains

A layer-1 blockchain is a set of solutions that improve the base protocol itself to make the overall system a lot more scalable. The adoption of Layer 1 solutions is one of the leading strategies for addressing the scalability challenge. A Layer 1 blockchain is a collection of solutions that improve the fundamental protocol to make the system more scalable as a whole. The consensus protocol and sharding are the two most common methodologies offered for achieving Layer 1 solutions.

Bitcoin, Ethereum, Binance Smart Chain (BSC), Litecoin, Terra, Cardano, Algorand, and Avalanche are all examples of Layer 1 blockchains in use. However, because the underlying network relies on a rise in the number of miners to assure better transaction speed and volumes, Bitcoin remains the most affected by scalability difficulties.

One of such solutions is a consensus algorithm. A consensus mechanism is a protocol used in computer and blockchain systems to obtain the necessary agreement across distributed processes or multi-agent systems, such as cryptocurrencies, on a single data value or a single network state. It’s useful for keeping track of items, among other things.

layer 1 blockchains
Photo by Shubham Dhage on Unsplash

The traditional consensus mechanism for Bitcoin and Ethereum is Proof-of-Work (PoW). Its goal is to use miners to decode complex cryptographic algorithms to achieve both consensus and security. PoW, on the other hand, has two major flaws: it is slow and energy-intensive. The PoW algorithm is widely used on the Bitcoin and Ethereum blockchains.

Proof-of-Stake (PoS) is a distributed consensus process used on the blockchain network. Users can use their stake to authenticate block transactions. In terms of transaction speed, PoS outperform PoW, but not in terms of security. Through Ethereum 2.0, the Ethereum blockchain intends to migrate from PoW to PoS.

Ethereum 2.0 refers to a collection of enhancements that are currently being implemented to make the Ethereum blockchain more scalable and long-lasting. Cardano, Polkadot, Solana, and several other blockchains use the PoS consensus mechanism.

Another technique being used for Layer 1 solutions is sharding. Sharding is an experimental method in the blockchain realm since it entails breaking up a network into some distinct database blocks known as “shards” — hence the term “sharding” — to make the blockchain more manageable.

Because all “shards” are processed in a parallel sequence, this strategy also reduces the present requirements for all nodes to process or handle transactions to maintain the network, allowing for more processing capacity to be freed up for other activities.

Layer 2 Blockchains

A secondary framework or protocol created on top of an existing blockchain system is referred to as Layer 2. The primary purpose of these protocols is to address the major cryptocurrency networks’ transaction speed and scale issues.

A blockchain should theoretically be able to manage any number of transactions per second (TPS), but this is not usually the case. L2 scaling solutions can help tackle difficulties like this by giving the main blockchain some breathing room without increasing block sizes or implementing other measures that would alter the protocol’s ability for decentralization and security.

The Bitcoin and Ethereum blockchains, for example, aren’t capable of processing thousands of TPS, and as traffic rises, so do transaction fees. The Bitcoin Lightning Network and Ethereum Plasma are two important examples of layer 2 solutions. As a result, these methods are sometimes referred to as “off-chain” scaling options.

Because the second layer is added as an extra layer, there is no requirement for the main chain to undergo any structural changes when applying off-chain solutions. Layer 2 solutions, as a result, can provide high throughput without compromising network security.

There are several layer 2 Blockchain protocols today. Here are some of them;

Bitcoin: The Lightning Network

One of the most well-known layer 2 solutions for Bitcoin is the Bitcoin Lightning Network. When compared to centralized payment networks, the Bitcoin blockchain can only manage roughly 3–7 TPS. Bitcoin’s low TPS and block size are a deliberate choice to keep hardware costs low while still allowing for high levels of decentralization.

Like other layer 2 solutions, it takes transaction bundles from the main chain to be dealt with off-chain before transferring that information back. The Lightning Network also brings smart contracts to Bitcoin, which is a big improvement to the network overall.

Source: TechCabal

This layer 2 solution brings lightning-quick payments on the Bitcoin blockchain, as fast as milliseconds, as the name implies. The average transaction time for Bitcoin is currently around 10 minutes. If the network is crowded, however, it can vary significantly.

Instant payment, scalability, low cost, and cross-blockchain swaps are all features of the Bitcoin lightning network. Fees are considerably lowered by settling transactions off-chain as a layer 2 solution, enabling immediate micropayments.

Sidechains and Parachains

Sidechains are a cross between layers 1 and layer 2 scaling methods. A sidechain is a blockchain that is linked to the main chain of a cryptocurrency, such as Bitcoin. They’re linked by a two-way peg (2WP), which is a technology that allows open bitcoin transfers from the main chain to a tier two chain that requires some third-party trust.

The Liquid Network, which is connected to Bitcoin’s main chain, is an example of a sidechain. It tries to solve scalability issues by outsourcing some of the validation and transaction processing procedures to another blockchain, similar to existing layer 2 scaling methods. This allows the main chain to handle a higher volume of transactions.

Parachains are short for “parallel chains.” As you might expect, in a system of interconnected blockchains, these chains run parallel to one another. They’re all built on the same framework, so they all have the same security features, and they’re all linked to the same central relay chain. They can, however, each function independently to address their applications. Polkadot is built around this concept. Because the distribution is efficiently dispersed to manage workloads, Parachains allow for very quick transactions.

Zero-Knowledge Rollups

Zero-knowledge rollups, or ZK-Rollups, are data bundles that are collateralized on the main chain by a smart contract before being sent off-chain for processing and computation. With the ability to process 2,000 TPS, they can produce a block in under a minute. The term “zero-knowledge” refers to the fact that all verifiers can be aware that they have the same information without it being revealed.

Because data is stored off-chain, the ZK-rollups layer 2 scaling approach outperforms layer 1. Important smart contract data are requested less frequently than data from layer 1 blockchains. This saves a lot of computing power, and transaction validation takes up less space on the blockchain. As a result, gas prices fall, making transactions faster and less expensive.

Here is a video that explains what rollups are and how they are important to blockchain scalability.

Optimistic Rollups

Optimistic rollups run on Ethereum’s base layer to allow for the execution of a large number of smart contracts. This is done without stressing the network. They continue to have the same level of security as the Ethereum main chain. To achieve faster transaction speeds, data aggregators will compute Merkle roots. They do, however, have a lower throughput than Plasma and ZK Rollups.

The fundamental difference between layer 2 transactions and ZK-rollups is that layer 2 transactions take longer. Before the state can be updated, optimistic rollups must rely on external validators to check the Merkle roots. However, optimistic rollups have the advantage of supporting smart contracts in the same way as the underlying smart contracts blockchain does.

Arbitrum

Arbitrum is a layer 2 solution for Ethereum smart contracts that improve their speed and scalability while also adding privacy features. Developers can use the layer 2 platforms to perform unmodified EVM contracts and transactions on layer 2 without compromising layer 1 security. Arbitrum touts itself as the best scaling option for DeFi apps, allowing any Ethereum contract to be scaled via Arbitrum rollup.

Conclusion

Many might say scalability is one of the reasons hindering crypto adoption. As demand for cryptocurrencies continues to increase, there will be a huge demand for scalable blockchains for fast and easy transactions.

Layer 1 and layer 2 blockchains provide solutions for existing blockchains to create a scalable environment for transactions. I believe that in the nearest future, there will be a solution that can tackle the blockchain trilemma; a scalable network that is fully decentralized and secure.

--

--