Crypto is hot now. In fact, it has been hot since mid 2020 but more people started getting into it when coin prices were reaching a new ATH (All Time High) every day since the beginning of 2021. Cryptocurrencies is a part of every investor's portfolio. The growth is humongous.
This was unexpected and hence the advancements in the technology were not in the same pace as the incoming investors. As with any other technology, scalability issues occurred. As I mentioned in my previous post, the average transaction fee in the Ethereum Mainnet reached the ATH price of $71.72 on May 19, 2021. In this post, I will explain what scalability is and how the scalability issues are being dealt with.
In the context of blockchain, Scalability is the ability of the blockchain to accommodate a higher volume of transactions. If you have read my post on Polygon, you may have a little idea about how transaction fees build up with more and more transactions in the network. If the blockchain cannot accommodate large volume of transactions to be done without increasing the price fee, the scalability of the blockchain is said to be compromised. With more users and use cases, the transaction rate is bound to keep increasing and the blockchain should be able to handle it with compromising on the performance. The aim here should be to increase TPS (transactions per second) or the throughput of the chain.
The blockchain trilemma figure is something you would come across very often. Here it is:
The trilemma here is that no blockchain has been able to achieve these three qualities (Scalability, Decentralization and Security) together. Having any two of qualities meant that you would have to compromise on the third one.
Scalability issue simplified
In order to better understand the scalability issue, let's imagine a situation of a pandemic. With the virus spreading rapidly, all the states in the country apart from one (say, A) has announced lockdown for 3 months. Now, the state A is in high demand to get in as people would be able to find jobs and feed their families. But state A cannot compromise on the safety. So, it has shut down all the routes of entry into it apart from one, where they make sure that people coming in are not infected with the virus. At first, they have a testing system which is expensive (2 day quarantine) and takes a lot of time. With more people trying to get in, this only made people waiting for a lot of days. So they announced that anyone willing to pay more money will be tested first and can go in to the state. As expected, people started paying more money and the price started increasing considering the amount of people and the demand. It became hard for regular people to get tested.
This is analogous to blockchain in the following way:
- Demand for state A - Demand for blockchain technology
- Testing system - Consensus mechanism
- Expensive and time taking - Proof of Work
- People willing to pay more money for preference - Users proposing higher gas fee for faster transaction
- Testing price increases - Average transaction fee increases
Layer 2 solutions
Let's get back to the above scenario. Now, with advancements in testing, state A has come up with a rapid test which outputs the infection result in a lot easier, faster and cheaper manner. Before they incorporate it in the main entry route, they open up a second route in which this rapid testing is done. This means two things:
- Less congestion of the main route
- Consequently, lesser fee without compromising of safety.
This second route in the context of blockchain is Layer 2. Layer 2 refers to a secondary framework or protocol that is built on top of an existing blockchain system. The rapid test would be analogous depending on what consensus mechanism is implemented in the protocol. Proof of Stake is one of the famous ones. It is important to note that Layer 1 scaling is also possible using techniques like Sharding. ETH 2.0, a layer 1, incorporates both sharding and uses Proof of Stake consensus mechanism.
As can be seen on this website, the gas fee have dropped down significantly over past few months, thanks to these Layer 2 solutions, a lot of DApps have migrated to those networks.
ETH 2.0 may not happen until the end of 2022. Until then, these layer 2 solutions will help achieve better throughput.