What are Layer 1 and Layer 2 Blockchain Networks?
As the smart contract wars heat up, Team 1 vs. create 2 blockchains.
From Proof-of-Work to Proof-of-Stake blockchains, each has its own way of scaling to accommodate transaction volume.
All computer networks rely on bandwidth to relay data, including blockchain networks. However, the latter is more prone to a bandwidth scaling problem than highly centralized networks:
What is the Blockchain Scalability Problem?
- Blockchain networks are decentralized, composed of nodes (computers in a network that hold the entire ledger). This means that each node must use significant computing, bandwidth, and storage resources to provide and maintain access to the ledger.
- The more decentralized a blockchain is, the more nodes it will have. While this redundancy is good for network security, it is not good for speed. That’s because multiple nodes contribute to transaction verification.
This balancing act between security, decentralization and scalability is known as the Blockchain Trilemma. Simply put, if a blockchain network is highly centralized, it is less secure and more scalable. The low number of nodes will make transactions faster because the computing power will be less distributed.
In turn, the low number of nodes will increase the network’s vulnerability. After all, it takes control of 51% of nodes to be compromised by hackers.
In such a scenario, it would then be possible to block new transactions from being added to the blockchain. Moreover, the transactions can be reordered or even reversed. The latter will then lead to the double-spending problem, where the same amount of digital cash is used more than once.
Needless to say, the looming threat of the 51% attack will render all cryptocurrencies worthless. For this reason, it is no coincidence that the most decentralized blockchain networks are the most popular: Ethereum (ETH) with 4,457 nodes and Bitcoin (BTC) with 15,733 nodes. Out of thousands of cryptocurrencies, the pair has a market capitalization of $503B, or 57% of the total value of all cryptocurrencies.
But because they are so decentralized and secure, they are less scalable. In practice, this means high transaction fees and long transaction confirmation times.
So the more decentralized the blockchain, the more popular it is, but it becomes less affordable and slower. That’s a bit of a mystery.
How is the Blockchain Trilemma addressed?
What do you do with a safe but congested highway? It’s quite simple – you connect a road to it to relieve traffic. This is exactly the difference between Layer 1 and Layer 2 blockchain networks.
Layer 1 is the main blockchain network responsible for on-chain transactions, while layer 2 is the connected network responsible for off-chain transactions. The Bitcoin network is layer 1.
It offers a blistering speed of five to seven transactions per second (tps). This resulted in transactions that sometimes took hours to complete. Suffice it to say that such a network could never enable Bitcoin to be used as a cryptocurrency in normal day-to-day shopping.
Bitcoin’s Lightning Network is a layer 2 scalability solution that enables Bitcoin transactions with negligible fees and near-instant transaction time.
On a technical level, the Lightning Network is a peer-to-peer (P2P) system that opens channels between parties, such as a customer and a store. Although the amount of transactions is unlimited and almost instantaneous, one must lock a certain amount of Bitcoin first. Once locked in, recipients effectively bill the locked amount as needed and as long as the channel remains open and funded.
Most importantly, because there are no Layer 1 acknowledgments needed on an LN channel. When the transactions on a channel are completed, the channel is closed and the payment record is consolidated as a single transaction. As such, it is then added to Bitcoin’s Layer 1.
The end result is to collect more transactions off-chain (at layer 2) and add them in a compact form to layer 1. Similarly, the same principle of collecting data off-chain to feed back to layer 1 works with Ethereum and its many layers 2 scalability solutions.
Although they serve the same purpose, layer 2 scalability solutions can be further divided into:
- State channels, such as the Lightning Network, which uses two-way channel communication without submitting transactions to miners. Apart from LN, state channels are employed by Celer, Ethereum’s Raiden Network and Liquid Network.
- Nested blockchains, such as Ethereum’s OMG Plasma Network, where the two act in a parent-child relationship. While Layer 2 executes transactions, Layer 1 issues and verifies them.
- Rollups, as the most common Layer 2 scalability solutions. They collect and run multiple transactions off-chain and bring them back to layer 1 for permanent record.
- Side chains, a hybrid between channels and nested blockchains. They connect to the Layer 1 main chain via “bridges” and have their own consensus mechanisms, which means that the main chain does not have to validate transactions. Sidechains are often used to aggregate a large number of transactions. For example, the largest blockchain game, Axie Infinity, has its Ronin sidechain connected to Ethereum.
However, there are blockchain Layer 1 networks that do not rely on external Layer 2 networks of any kind. They were designed from the start to internally handle scalability as layer 1 networks.
Create 1 blockchains and scalability solutions
Although Ethereum relies on external L2 scalability networks, it also has some Layer 1 scalability tricks up its sleeve. However, they will most likely be implemented later in 2023 as part of the general ETH 2.0 upgrade from Proof-of-Work to Proof-of-Stake consensus.
The most important is cutting. Even before blockchain technology became popular, sharding has been a popular database management method. This layer 1 scaling solution divides the network into pieces called shards. Each shard processes and validates transactions in parallel.
Furthermore, nodes assigned to shards do not need to contain the entire blockchain record. Instead, they share data (balances, addresses) between each other and feed proof to the main chain. Alongside Ethereum, blockchains using or exploring sharding are Tezos, Zilliqa and Qtum.
Here are some PoS blockchains that are Layer 1s:
Algorand (ALGO)
Algorand has its modified Pure Proof-of-Stake (PPoS) consensus. Simply put, it means that all ALGO holders with just one token get network rewards when people use the blockchain. In contrast, Ethereum has a fairly high entry barrier with a stake of 32 ETH (~$90k).
In terms of scalability, Algorand has an integrated two-tier architecture where more complex transactions reserved for DeFi protocols are handled by one chain, while simple transactions (token transfers) are handled by another. In this way, Algorand can inherently achieve tps up to 1000, drastically outperforming Ethereum’s layer 1 by 14-17 tps.
But considering that Algorand has less than 100 dApps available, compared to Ethereum’s nearly 3,000, it remains to be seen whether it is truly scalable. One can argue that a low barrier to staking can make the network more vulnerable to malicious actors. Similarly, Algorand does not have a cutting mechanism to punish bad actors, unlike Ethereum.
Elrond (EGLD)
Elrond uses sharding as its main scalability for layer 1. Theoretically, it can process up to 100,000 tps thanks to the combination of secure proof-of-stake (SPoS) consensus protocol and Adaptive State Sharding (ASS).
ASS is dynamic sharding, where shards are either split or merged, depending on the network’s traffic load. Furthermore, not only the network is split, but also the transactions themselves. Security is enhanced by the fact that validators are distributed across shards, making it less likely that a malicious shard takeover will occur.
Bear Market Survival Guide: The Metrics You Need to Know in a Tough Market
Celo (CELO)
Celo is a hard fork of Go Ethereum (Geth), which happened in 2017. After forking, it implemented proof-of-stake and a completely new address system. This makes it possible to use a phone number as a public key, pushing Celo as the global mobile payment solution.
Celo has its own stablecoin. Actually three of them: cEUR, cUSD and cREAL. Because Celo uses PBFT (Practical Byzantine Fault Tolerance) for its PoS consensus, it can tolerate malicious nodes even when there are a small number of them. In other words, an additional node that is added increases the network’s communication overhead exponentially.
Harmony (ONE)
Another blockchain with its own tweaked PoS, Harmony uses efficient proof-of-stake (EPoS). The main chain consists of four shards that simultaneously confirm and add new transactions. Not only do each have separate validators, but each can execute transactions at different speeds, resulting in different block heights.
Block height is critical to blockchain security because it differentiates between the blocks. With both sharding and block height randomization, Harmony strikes a balance between scalability and security. This is further enhanced by Harmony’s cross-chain Horizon bridge, which allows the network to connect to Ethereum’s Layer 2 scalability solutions.
Will independent layer 1 blockchains prevail?
There are many more layer 1 networks to consider: Cardano (ADA), Solana (SOL), THORChain (RUNE), Polkadot (DOT), Avalanche (AVAX), Fantom (FTM), Binance Smart Chain (BNB), Tron ( TRX) ), Kava (KAVA) Radix (DLT) and others.
However, none of them have been stress-tested under real-world conditions as much as Ethereum has been, with its large portfolio of dApps. On paper, every L1 network claims to solve the Blockchain Trilemma in one way or another.
The most realistic and practical way seems to be to relieve the bottleneck of layer 2 networks. This bridging introduces a degree of complexity to the end user, but so does cross-chain bridging.
Finally, the blockchain ecosystem will be diversified with many layers 1 vs. layer 2 solutions that work together as a meta-blockchain network.