Why We Need Layer 2 Solutions to Solve the Blockchain Trilemma
Developers have had to choose between scalability, security, and decentralization while building on the blockchain. Either the network is decentralized and scalable but not secured; secured and scalable but not decentralized; or decentralized and secured but not scalable.
To solve this issue, developers came up with the Layer 2 solution, which takes off a load of authenticating transactions while inheriting Layer 1 security and decentralization.
In this post, you will learn how scalability is a problem in blockchain technology, what layers 0, 1, and 2 are, and how layer 2 solves the problem of scalability.
If you are a beginner looking to understand blockchain in the most simplified way, I talked about it in my previous article.
What exactly is the blockchain scalability problem?
Web3 is the next version in the evolution of the Web3which uses blockchain technology. Since its birth with Bitcoin, blockchain technology has received a lot of praise and attention as a significant solution. This is due to the concept of "transparency," which allows for a decentralized network and the traceability of transactions.
Blockchain technology is fundamental to Web3, as it serves as the foundation for all projects and transactions. Just like web2 applications are built on a client-server (centralized) network, every application, solution, and project in web3 is built on a blockchain (decentralized) network.
For a technology to be regarded as a "foundation," projects must be secure and scalable on it. Scalability, decentralization, and security need to be well considered while building on top of the blockchain, this allows you to produce and sustain a viable network on the blockchain. Due to the lack of a centralized authority, the viable networks produced by the blockchain must be very safe and secure. They must also be scalable to handle increasing numbers of users, transactions, and other data.
Scalability has been an issue since the inception of blockchain technology. As more users adopt the use of the blockchain and more transactions are made, more nodes come into the network. While more nodes in the system can help make the network more decentralized and less prone to attack, this may cause the blockchain network to clog, requiring more computing power and internet connectivity, making it difficult to process more transactions per second, which ultimately lowers its ability to scale.
What happens when the blockchain can achieve decentralization but is unable to scale? Or when it's decentralized and able to scale but not secured? From the diagram above, we can see the increasing rate of blockchain transactions over the years. The question above leads us to the problem of the blockchain, which is called the "blockchain trilemma."
Explaining the Blockchain Trilemma
The Oxford Learner's Dictionary defines a trilemma as a situation in which a difficult choice has to be made among three alternatives, especially when these are equally undesirable.
The founder of Ethereum, Vitalik Buterin, proposed a set of three main issues developers encounter when building the blockchain, making them sacrifice one "aspect" as a trade-off to accommodate the other two. These issues are
Decentralization
scalability
security
As noted above, these three items need to be considered without sacrificing any to build and sustain a viable network on the blockchain. Decentralization is a must, as that is the core concept and pillar of the blockchain itself.
For security, blockchain networks should have defenses that cannot be penetrated by malicious users. Lastly, due to the increasing number of users, transactions, and data on the blockchain, it must be scalable to accommodate the number as it grows.
If decentralization is traded off, then our system becomes centralized, which does not subscribe to the concept of Web 3. If security is traded off, then we stand a chance of inviting malicious attackers into our system.
Finally, trading off scalability contradicts the main goal that it seeks to achieve, which is the ability to handle large volumes of transactions, resulting in higher transaction fees because the volume of transactions that a blockchain can handle is inversely proportional to the time required to complete them.
In summary, the blockchain trilemma is the inability to handle a large volume of transactions while maintaining security and staying decentralized, which leads to increased transaction fees.
To solve this issue, layer 2 solutions started to spring up, which have been quite effective. Developers can now build on the blockchain without sacrificing any of the three core concepts. Before I proceed into how the layer 2 solutions solve the blockchain trilemma, I will quickly summarize what layers 0 and 1 are when it comes to the blockchain.
Layer 0: This is the component of the blockchain that helps make the blockchain a reality. It consists of the hardware, internet, and equipment needed to run the blockchain network's communication without any glitches.
Layer 1: This is a collection of solutions that improve on layer 0. It includes the coding languages, the consensus mechanism (proof of work or proof of stake), and all the rules embedded in the code for the operation of the blockchain. A blockchain is considered a layer 1 blockchain when it processes and finalizes a transaction on its blockchain. An example is Bitcoin, BNB, and Ethereum.
However, there is a problem with Layer 1, which is scalability. To scale layer 1, developers ultimately have to sacrifice either security or decentralization. To avoid this, blockchain developers decided to come up with a solution. This solution is called the Layer 2 solution
What are layer 2 solutions?
Since the majority of people are now leaning toward using blockchain solutions for their transactions or projects, the number of transactions in the network grows with time. Layer 1's (the main layer blockchain) scalability issue has been a problem, leading to a rise in transaction costs, and this is what layer 2 intends to solve without sacrificing decentralization or security.
Layer 2 is a new network that sits on top of Layer 1 and tries to scale it. Layer 2 inherits the security and decentralization of Layer 1 while maintaining constant communication with it. It manages authentication for the blockchain network's growing quantity of transactions, while Layer 1 only conducts the creation and addition of blocks to the blockchain.
Layer 2 can be further categorized into the following:
State Channel
Side chains
Roll-ups
Nested chains
Some examples of a layer 2 solution include:
Polygon Matic
Lightening Network
Celer Network and so on...
Conclusion
If you stayed till the end, it means one thing: you learned how the scalability issues of the blockchain affect the network, the blockchain trilemma, the layers of the blockchain, and how layer 2 solves this issue in the blockchain.
Summarily, the blockchain started with Layer O and Layer 1, with Layer 1 being the main layer of the blockchain, but the issue of scalability affects Layer 1. To solve this, developers came up with the layer 2 solution, which takes the problem of scalability off layer 1 by dealing with transactions while still inheriting layer 1 decentralization and security and, in the process, reducing cost.
Thank you for reading up to this point. You can connect with me on Twitter | Github| and LinkedIn
See you in my next post, where I'll go over layer 2 in detail.