Blockchain Layer 1 vs. Layer 2: The Essentials
Show More
Quickly grasp the article's content and gauge market sentiment in just 30 seconds!
The popularity of cryptocurrency and blockchain has been growing exponentially, significantly increasing the number of users and transactions. This has caused infrastructural bottlenecks for blockchain network operations. To achieve mainstream adoption, the industry needs to look for solutions to resolve its scalability issues in order to cater to the burgeoning numbers of users, transactions and data.
Two of the main solutions employed by the industry include Layer 1 and Layer 2:
Layer 1: Underlying blockchain architecture
Layer 1 scaling solutions: Fundamental changes made to Layer 1
Layer 2: Third-party integration on top of Layer 1 networks
Layer 2 scaling solutions: Improving the speed of Layer 1 platforms without making any fundamental changes to their code or architecture
In this article, we’ll be exploring the blockchain trilemma, Layer 1 and Layer 2, and how to help blockchains achieve scalability.
Blockchain Trilemma
The term blockchain trilemma refers to the conundrum of a blockchain simultaneously achieving the following three characteristics:
Decentralization: Distribution of computing power/consensus throughout a network
Security: Defense against malicious actors and network attacks
Scalability: A blockchain’s ability to support high transactional throughput
It’s argued that any system can only achieve two out of the three characteristics, forcing it to give up on one.
Examples of the Blockchain Trilemma
Typically, blockchains have struggled with the blockchain trilemma. Let’s take a look at a few prominent examples.
Ethereum
Ethereum is decentralized and highly secure, with approximately 561,000 validators. It’s nearly impossible to attack Ethereum’s blockchain, as it would require an attacker to take over 51% of the validators in order to compromise the network. However, this comes with a trade-off in scalability, which is why Ethereum’s network fees rocket during times of high activity.
Binance Smart Chain (BNB Chain)
In contrast to Ethereum, BNB Chain only allows a maximum of 21 validators. It’s therefore apparent that BNB Chain isn’t decentralized. However, this allows it to achieve a high degree of security and scalability.
Why Is Blockchain Scalability Important?
The definition of the word “scalability” varies from expert to expert. However, at its core,blockchain scalability refers to a system’s capacity to offer a rich experience to every user, irrespective of the total number of users at any given time.
The term throughput refers to the number of transactions a system handles per second. While companies/payment channels like Visa process nearly 20,000 TPS with the VisaNet electronic payment network, Bitcoin’smain chain can perform only 3 to 7 TPS.
The difference in capacity might be shocking, but there’s a simple explanation behind it. Bitcoin adopts a decentralized system, while VisaNet runs on a centralized system. The former utilizes more processing power and time to safeguard the privacy of its users. Each data transaction has to go through multiple steps, including acceptance, mining, distribution, and validation by a node network.
With cryptocurrency expected to become an imperative force in the business world, blockchain developers are trying to increase the scope of blockchain handling. By creating blockchain layers and optimizing Layer 2 scaling, they want to speed up processing times and ramp up the number of TPS.
Blockchain’s Scalability Issue
Let’s use Ethereum as an example. In blockchain technology, a consensus mechanism is a fault-tolerant system that allows agreements on a single network state in distributed nodes. Theseprotocols ensure that all nodes agree on transactions and are synchronized. This makes the Ethereum chain immensely difficult to overwrite or attack.
Due to the stability and security of Ethereum, theICO craze began, leading individuals to create cryptocurrencies and decentralized applications (DApps) on the blockchain. Consequently, there was an influx of users and an uptick in the number of transactions made on Ethereum. As the system became clogged, the transaction fee — or gas paid to parties processing transactions on Ethereum’s network — increased.
When a blockchain network is clogged, pending transactions end up in the memory pool and take more time to process. To tackle this, miners start prioritizing transactions that have higher gas prices in order to confirm them. This further raises the minimum cost required to make a transaction.
The cycle of price increment gets to a point where gas fees skyrocket, making the situation worse for everyone. Layer 2 scaling is aimed at providing a solution to this problem and lowering the costs of transactions.
What Are Layer 1s?
Layer 1s are the primary blockchain network on which other blockchains and DApps are built on. They are able to support transactions and operations that are conducted on the blockchain. To improve scalability, a Layer 1 will have to make direct changes to the blockchain’s code or architecture. Examples include enhancing the speed of block confirmation or increasing the data-containing capacity of a block.
Ethereum, Binance Smart Chain and Solana are the most prominent Layer 1s.
Let’s take a look at some Layer 1 scaling solutions.
Layer 1 Scaling Solutions
Consensus Mechanism
Different blockchains utilize different consensus mechanisms.
Blockchains such as Bitcoin make use of proof of work (PoW). Even though a PoW system is highly secure, it can be slow. This is because it requires substantial computing power to solve cryptographic algorithms. Ethereum started off with a PoW consensus mechanism, which led to severe network congestion when a large number of users came onto the Ethereum network.
Ethereum has since switched over to use a proof-of-stake (PoS) consensus mechanism through The Merge, and now processes and validates new blocks by consensus from the network. This switch has allowed Ethereum to change its speed from 10–20 transactions per second (TPS) to more than 20,000 TPS. This is achieved while retaining decentralization and security.
Chain Fork
Layer 1 scaling solutions are usually introduced by the blockchain’s development team. Forking a chain means upgrading or adjusting a blockchain. There are 2 types of forks: soft fork and hard fork.
Soft forks are architectural changes that are compatible with the existing blockchain. On the other hand, hard forks are changes to the blockchain architecture that is distinctly different from the existing one.
An example of a soft fork would be Bitcoin network’s SegWit soft fork, which helped increase the network’s performance from approximately 1,600 transactions per block to 3,000.
Whereas larger changes to be made to the blockchain, such as increasing Bitcoin’s block size to 8MB, requires a hard fork. This will create two versions of Bitcoin, one updated and one old network.
Sharding
Sharding is one of the scaling techniques that divides large transaction sets into smaller data sets known as "shards". The network processes these network shards concurrently in parallel, enabling sequential work on several transactions rather than having a network process each and every transaction sequentially. This is a faster and more effective mechanism.
Furthermore, rather than keeping a copy of the blockchain in its entirety, each network node is assigned to a certain shard. Individual shards exchange addresses, balances, and general states utilizing cross-shard communication protocols while also providing proofs to the mainchain.
Examples of blockchains that have integrated sharding are Ziliqa and Tezos.
However, it should be noted that Sharding is experimental and no Layer 1 has successfully implemented it yet.
What Are Layer 2s?
A Layer 2 enhances the scalability and efficiency of a blockchain protocol by running on top of it. It will enable transactions away from Layer 1 using an external, parallel network.
To finish the transaction results, Layer 2s takes bundles of transactions from the main chain, processes them on their behalf, and then bundles the transactions back into Layer 1. The Layer 1 blockchain becomes less crowded and ultimately more scalable by abstracting the majority of data processing to auxiliary architecture.
Prominent examples of Layer 2s are Polygon, Optimism, Arbitrum, zkSync and Bitcoin’s Lightning Network.
Layer 2 Scaling Solutions
Here are some of the Layer 2 scaling solutions.
Nested Blockchain
Nesting is one of the Layer 2 scaling solutions whereby a blockchain protocol houses other blockchains within or on top. The nested blockchain architecture typically involves a main blockchain that sets rules and parameters for a broader network, while executions are undertaken on an interconnected web of secondary chains.
The nested chain comprises both parent and child chains. The parent chain will delegate to the child chains to perform the transaction. The transactions will be carried out by the child chains, who will then inform the parent chain of the outcome. The parent chain will provide Layer 1 with the outcome once the transactions have been completed.
Unless it becomes required for dispute resolution, the underlying base blockchain does not participate in the network operations of nested chains. Because everyone is working together, it is one of the greatest scaling methods and is quicker. The division of labor in this paradigm lessens the processing load on the mainchain, improving scalability tremendously.
An example of this is the OMG Plasma Project, which acts as a Layer 2 blockchain for Ethereum to ensure cheaper and quicker transactions.
State Channels
Two-way communication between a blockchain and off-chain transactional channels can be facilitated through a state channel. The state channel is essentially a network-adjacent resource which carries out activities using a multisig or smart contract mechanism, without the need for validation by nodes of the Layer 1.
Transactions can be executed without having to submit transaction data to Layer 1. Once the transactions have been completed, the final state of the channel will be sent to Layer 1 for validation. This mechanism allows to improve transaction speed and increases the overall throughput of the network. State channels feature unmatched speed and privacy. Without the need to route through third parties such as miners, state channels are one of the best existing scaling solutions.
Both Raiden Network on Ethereum and Lightning Network on Bitcoin are examples of state channels. Both of these use state channels that are executed by hashed timelock contracts (HTLCs). While the Lightning Network allows users to complete a lot of microtransactions in a short amount of time, the Raiden will also let users run smart contracts through their channels.
State channels like Lightning Network are also entirely secure, since only the participants know about the transactions. On the flip side, the Ethereum Layer 1 blockchain records all transactions in a publicly auditable ledger.
Sidechains
Large batch transactions frequently use sidechains, which are distinct blockchain networks with their own sets of validators (and consensus mechanisms), which coexist with a Layer 1 to improve its speed and scalability.
With a sidechain design, the Layer 1’s main responsibilities are to uphold general security, validate batch transaction records, and settle conflicts. Once the sidechain has finished processing transactions from the main chain, assets are locked. Also, the majority of sidechains have a federation or other independent third party that double-checks to see if there are any irregularities in the activities between the mainnet and the sidechain. Either smart contracts or a collection of humans can make up the federation.
There are two main difference between sidechains and state channels:
Transactions made on a sidechain are not private between participants; rather, they are made public on the ledger.
The mainchain and other sidechains are unaffected by sidechain security flaws.
Rollups
One scaling approach that is increasing in popularity in the blockchain environment is rollup. In rollups, groups of transactions from a Layer 1 are bundled up, processed off-chain, and then loaded back into the main chain.
As a result, Layer 1s do not have to handle everything independently. Rollups enable Layer 1 networks like Ethereum to become more scalable. Rollups also function differently. Others adopt the optimistic approach, while some use the zero-knowledge procedure.
The two types of rollups are:
Optimistic Rollups: These assume transactions to be valid by default. Thus, they only conduct computation to detect fraud if there’s a challenge.
Zero-Knowledge Rollups: These rollups run computations off-chain. Subsequently, they submit the validity proof to the base layer or mainchain.
Rollups help to increase transaction throughput, open participation, and reduce gas fees for users.
Limitations of Layer 1 and Layer 2
Blockchain layering comes with several benefits. For instance, the primary advantage of Layer 1 solutions is that developers don’t have to add anything to the existing architecture, since the base layer is changed.
Meanwhile, Layer 2 scaling solutions don’t tamper with the base layer protocol. Additionally, these solutions allow multiple microtransactions without requiring users to pay sky-high transaction fees, or waste time on miner verification.
However, both these blockchain layers have limitations that need to be taken into consideration.
Addition to Existing Protocols
The main problem with blockchain layers is adding them to existing protocols. Both Bitcoin and Etherium have market caps in billions. Users are trading millions of dollars every day. Therefore, it doesn’t make sense to complicate the process through unnecessary coding and experimentation, since this would require a lot of money.
What’s the Future After Layer 1 and Layer 2?
Scalability is one of the reasons crypto mass adoption isn’t possible in the blockchain industry at the moment. As demand for cryptocurrency increases, pressure to scale blockchain protocols will also mount. Since both blockchain layers have certain limitations, the solution in the future will be to build a protocol that can tackle the scalability trilemma.
The Bottom Line
With regard to the aforementioned bottleneck, there are two options available: 1) mitigate the scaling problem, or 2) look for viable alternatives. Blockchain developers are opting for the former, shifting toward Layer 2 scaling in action with Ethereum.
At the time of publication, blockchain systems are still being developed. The pressing question for the future is whether blockchain layers and Layer2 scaling will be temporary or permanent.
Grab Up to 5,000 USDT in Rewards
Get additional 50 USDT welcome gift instantly when you sign up today.