With the rise of cryptocurrencies, DeFi, NFTs and dApps there has been an increase in the demand for these decentralized services. Unfortunately, many users have experienced the frustration of paying high gas fees(the cost necessary to perform a transaction on the network) and a long verification time for their transactions, making these obstacles act as a roadblock to the mission of banking the unbanked with permissionless finance, turning decentralization more of a playground for the rich.
In order to compete with legacy systems of payment processing, blockchain networks must become highly scalable and capable of accommodating an exponentially growing number of users, transactions, and data.
So what has this to do with Layer 1 and Layer 2, why everyone is talking about “Layer 1 Crypto” and what the heck is even that?
While blockchain technology is proving itself to be a new pillar of the global economy, its underlying structure of decentralized networks faces a unique challenge known as the Blockchain Trilemma: the balancing act between decentralization, security, and scalability within a blockchain infrastructure. For example, Bitcoin chooses security and decentralization for its customers and ends up compromising on scalability. The problem lies in the fact that you cannot expect to have all three in just one system.
Scale is a big issue. This refers to a blockchain network’s ability to support high transactional throughput and future growth. Scalability is crucial because it represents the only way for blockchain networks to reasonably compete with legacy, centralized platforms with rapid settlement time. A commonly used comparison to indicate the gulf in scalability is that Bitcoin processes between 4-7 transactions per second (the processing speed of Ethereum is 15-20 transactions per second). Visa, on the other hand, transacts approximately 1,700 transactions per second. In order to compete with these existing centralized systems, blockchain technology must match or exceed these high levels of scalability. This is where Layer 1 and Layer 2 scaling solutions come along.
Layer-1 Scaling Solutions
In the decentralized ecosystem, a Layer-1 network refers to a blockchain – Bitcoin, Litecoin, Ethereum, etc. and is often called the base layer or root chain.
So while some people refer to it as Layer 1 Crypto, Layer-1 scaling solutions augment the base layer of the blockchain protocol itself in order to afford scalability. A number of methodologies are currently in development and practice that improve the scalability of blockchain networks directly. First layer solutions change the rules of the protocol itself in order to increase transaction capacity and speed while accommodating more users and data. Layer-1 scaling solutions can entail, for example, increasing the amount of data contained in each block, or accelerating the rate at which blocks are confirmed, so as to increase overall network throughput.
Other more foundational updates to a blockchain to achieve Layer-1 network scaling include:
Consensus Protocol Improvements: Some consensus mechanisms are more efficient than others. Proof of Work (PoW) is the consensus protocol currently in use on some blockchain networks. Although PoW is secure, it can be slow. That’s why many newer blockchain networks favor the Proof-of-Stake (PoS) consensus mechanism.
Sharding: Sharding is a mechanism adapted from distributed databases that have become one of the most popular Layer-1 scaling solutions. Sharding entails breaking the state of the entire blockchain network into distinct datasets called “shards” — making it easier to manage than to require all nodes to maintain the entire network. These network shards are simultaneously processed in parallel by the network, allowing for sequential work on numerous transactions simultaneously.
Layer-2 Scaling Solutions
Layer 2 blockchain technology is often referred to as an “off-chain” solution. Its main purpose is to scale blockchain transaction capacity while retaining the decentralization benefits of a distributed protocol.
To build a good blockchain ecosystem, apart from having a good blockchain development team, the core architecture must balance the needs of security, decentralization, and scalability. Layer 2 blockchain technology systems are those that connect to the blockchain and rely on it as a base layer of security and finality.
In other words, rather than changing the base, smart contracts are added to the main blockchain protocol that interacts with activities off-chain.
The way Layer 2 platforms and protocols work is that they process data in a way that decreases the burden the base layer (root chain) usually bears by offloading transactions from the main chain onto second-layer platforms. It allows you to massively cut down data processing on the blockchain by running computations off-chain, but the base chain will still be the ultimate judge when there are disputes.
The main benefit of the second layer is that it minimizes the amount of data storage on the base layer. Taking transactions off the base layer, while still anchored to it and frees up processing resources to do other things while still getting the security and decentralization benefits.
With the use of Layer-2 solutions, an estimation reveals that around 4,000 transactions can be processed in a second.
To give an example, Bitcoin is a Layer-1 network, and the Lightning Network is a Layer-2 solution built to improve transaction speeds on the Bitcoin network, but there are other varieties for Layer-2 solutions:
Nested Blockchains: A nested blockchain is essentially a blockchain within — or, rather, atop — another blockchain. Multiple blockchain levels can be built upon a mainchain, with each level using a parent-child connection. The parent chain delegates work to child chains that process and return it to the parent after completion. The underlying base blockchain does not take part in the network functions of secondary chains unless dispute resolution is necessary.
State Channels: A state channel facilitates two-way communication between a blockchain and off-chain transactional channels and improves overall transaction capacity and speed. A state channel does not require validation by nodes of the Layer-1 network. Instead, it is a network-adjacent resource that is sealed off by using a multi-signature or smart contract mechanism. When a transaction or batch of transactions is completed on a state channel, the final “state” of the “channel” and all its inherent transitions are recorded to the underlying blockchain. The Liquid Network, Celer, Bitcoin Lightning, and Ethereum’s Raiden Network are examples of state channels. In the trilemma tradeoff, state channels sacrifice some degree of decentralization to achieve greater scalability.
Sidechains: A sidechain is a blockchain-adjacent transactional chain used for large batch transactions. Sidechains use an independent consensus mechanism to that of the original chain, which can be optimized for speed and scalability. With a sidechain architecture, the primary role of the mainchain is to maintain overall security, confirm batched transaction records, and resolve disputes. Sidechains are differentiated from state channels in a number of integral ways. Firstly, sidechain transactions aren’t private between participants — they are publicly recorded to the ledger. Further, sidechain security breaches do not impact the mainchain or other sidechains. Establishing a sidechain requires substantial effort as infrastructure is built from the ground up.
Layer-1 and Layer-2 scaling solutions are two sides of the same coin: strategies designed to make blockchain networks faster and more accommodating to a rapidly growing user base. These solutions are not mutually exclusive either, and many blockchain networks are exploring combinations of Layer-1 and Layer-2 scaling solutions to achieve maximum scalability without sacrificing security or decentralization, so don’t consider those the only solutions for solving the mentioned obstacles above.