Table of Contents
Layer 2s are like that enthusiastic overachiever that actually gets work done by taking over most of the workload from you (say if you’re too dumb and slow to process anything) and churning out results immediately.
As discussed in our explainer on the blockchain trilemma, decentralised networks are sometimes too “slow” when it comes to processing transactions simply because of how decentralised they are. Blockchains are much less efficient as compared to their centralised counterparts like financial institutions where transactions can be quickly validated by a single entity instead of a “scattered” network of computers.
This is why a Layer 2, or a second network operating on top of the “original” blockchain, is often needed to improve the protocol’s overall scalability and efficiency. Prominent examples include Bitcoin’s Lightning Network and Ethereum’s Polygon.
What’s behind L2s?
To understand the mechanisms behind Layer 2s, we need to first understand Layer 1s (essentially the makeup of blockchains), and the issues that they face. The blockchain trilemma, a term coined by Vitalik Buterin, argues that blockchains will have to sacrifice scalability for decentralisation and security. A good example is Bitcoin – a Layer 1 blockchain. The network’s PoW (Proof-of-Work) consensus mechanism means that in theory, it’s highly decentralised and secure (essentially anyone can run a node), but also extremely slow (because of the need to expend computational power and essentially every node has to agree to the validity of a transaction), therefore making it an impractical payments system despite it being designed to be one. This is why a Layer 2 scaling solution like the Lightning Network has to be added to Bitcoin (the Layer 1) to extend the network and increase the amount of transactions that can be processed.
The Lightning Network is known as a “state channel” Layer 2 scaling solution, where a peer-to-peer channel between merchants and customers is created adjacent to the Bitcoin ledger (the Layer 1), therefore allowing them to send instantaneous transactions on a separate and more scalable network. Once the two parties stop transacting, the channel is then closed, transactions are consolidated, and the final “state” of the transactions are added back to the main blockchain.
Bitcoin’s TPS (transactions per second) currently stands at 5, which means that compared to centralised networks like Visa (1,700 TPS) or Mastercard (5,000 TPS), it’s an extremely inefficient payments system. The Lightning Network enables Bitcoin to theoretically possess unlimited TPS (transactions per second) as a single channel can process up to 250 TPS, and there’s no limit to the number of channels that can join the Lightning Network.
Changes coming to Ethereum
As for Ethereum, this is where it gets interesting because Ethereum Consensus Layer (formerly known as Ethereum 2.0) will implement what is known as Layer 1 scaling solutions. This means that instead of handling transactions off Ethereum via Layer 2s, scaling solutions will be implemented directly on Ethereum’s Mainnet (the layer 1).
This includes sharding (whereby the ecosystem will be made up of smaller individual chains known as “shards”, therefore spreading the network’s overall load and increasing scalability) and a change in consensus mechanism (from proof-of-work to proof-of-stake, which consolidates the the power to authenticate transactions amongst a group of validators, therefore making it more “centralised” and hence more scalable).
Currently, because of the high volume of transactions occurring on the Ethereum blockchain, the network is extremely prone to high gas fees and extended periods of congestion, which is why Layer 2 solutions such as roll-ups (optimistic or zero-knowledge) and side chains (e.g. Polygon which is EVM – Ethereum Virtual Machine – compatible. It allows decentralized applications (dApps) to deploy their code to the much faster Polygon network while still being connected to Ethereum’s Mainnet) are commonly used to boost transaction speeds and provide an alternative layer for dApps to use, all while decreasing congestion and gas fees.
Roll-ups essentially execute transactions outside of Ethereum and the data is then posted back to the Ethereum Mainnet where consensus on the validity of the transaction is reached. Optimistic roll-ups (e.g. Boba, Arbitrum and Optimism) assume that all transactions are valid without performing any computation, which does lead to significant improvements in scalability. However, because they don’t do computation by default, a mechanism known as “fraud proof” enables optimistic roll ups to run the transactions computation in the event of a fraudulent transaction, which may lead to longer transaction confirmation time. On the other hand, zero knowledge roll-ups, or ZK roll-ups, perform computation off-chain and submit a transaction validity proof back to the Ethereum Mainnet.
Do we actually still need Layer 2s?
The reason the above comparison between Layer 1 and Layer 2 solutions has to be highlighted is because of how ironic Layer 2 solutions are. If a Layer 2 is required to help a Layer 1 process its transactions, then what’s the actual purpose and utility of the Layer 1 blockchain?
Yes, Layer 1s such as Bitcoin and Ethereum do provide the network security for Layer 2s, and at this point in time, Layer 2s are absolutely essential to increase the scalability of inefficient Layer 1s. Bitcoin is quite honestly an extremely poor payments system and while Ethereum has actual utility in terms of programmability for DeFi and NFTs, paying transaction fees that are sometimes more expensive than the transaction itself isn’t exactly viable.
However, as the entire crypto ecosystem grows, we have already seen the emergence of networks (e.g. Solana and Avalanche) that are far more scalable than some of the “OG” Layer 1s without having to utilise Layer 2s. Ethereum Consensus Layer will also utilise Layer 1 scaling solutions, which might mean that the need for Layer 2s will soon become less apparent. But as for Bitcoin, if it were to be adopted as a mainstream payments system, then it’ll probably still depend on the Lightning Network, because no merchant wants to be paid 45 minutes later.
Read on to find out why you shouldn’t invest in Bitcoin.