Scalability is the need of the hour. If you’ve been involved in the crypto / blockchain space in any way, then you must have heard of the “layer-1” and “layer-2” solutions. In this article, we will demystify these terms and explain the advantages and disadvantages of these two solutions.
Layer 1 is the term used to describe the underlying architecture of the main blockchain. Layer 2, on the other hand, is a superimposed network that sits on top of the underlying blockchain. Consider Bitcoin and Lightning Network. Bitcoin is the Layer 1 network, while the Lightning network is Layer 2. Now that we know the fundamental difference, let’s take a look at the Layer 1 and Layer 2 solutions that companies are currently working on. We will start with layer 2 solutions.
Consider the following layer 2 solutions:
- State channels.
- Nested blockchains.
A status channel is a two-way communication channel between participants, which allows them to conduct interactions, which would generally occur on the blockchain, outside of the blockchain. This reduces the waiting time, because you no longer depend on a third party like a minor. Here’s how a state channel works:
- Part of the blockchain is sealed via multi-signature or a kind of smart contract, which is agreed beforehand by the participants.
- Participants can interact directly with each other without submitting anything to minors.
- When all of the transactions are complete, the final status of the channel is added to the blockchain.
Bitcoin’s Lightning network and Ethereum’s Raiden network are the two most popular state channel solutions. Both use Hashed Timelock (HTLC) contracts to execute the status channels. While Lightning Network allows participants to perform a large number of microtransactions in a limited period of time, the Raiden will also allow participants to execute smart contracts through their channels.
Currently, OmiseGO, an Ethereum-based application, is working on a nested blockchain solution called Plasma. The principle of plasma design is quite simple:
- The main basic blockchain will establish the basic rules for this whole system. He will not participate directly in any transaction, unless he has to resolve certain disputes.
- There will be several levels of blockchains sitting at the top of the main chain. These levels will be connected to each other to form a parent-child chain connection. Delegates of the parent channel work among its child channels. The child strings then perform these actions and return the result to the parent string.
- Not only does this solution dramatically reduce the load in the root chain, but, if executed correctly, it will increase scalability exponentially.
- The biggest advantage is that it does not disturb the underlying blockchain protocol.
- Layer 2 solutions like state channels, and in particular the Lightning network, to perform multiple microtransactions without wasting time with the verification of the miner and paying unnecessary transaction fees.
Finally, we have Layer 1 solutions. This basically means improving the basic protocol itself to make the overall system more scalable. The two most common layer 1 solutions are:
- Modifications to the consensus protocol.
- Sharding.
Many projects like Ethereum are moving from older, more awkward consensus protocols like Proof-of-Work (PoW) to faster and less expensive protocols like Proof-of-Stake (PoS). Bitcoin and Ethereum both use PoW, in which miners solve cryptographically difficult equations using their computing power. Although PoW is fairly secure, the problem is that it can be very slow. Bitcoin only handles 7 transactions per second, while Ethereum can only handle 15 to 20 per good day. This is why Ethereum is looking to move from PoW to PoS (via the Casper protocol).
Sharding is one of the most popular Layer 1 scalability methods that several projects are currently working on. Instead of running a network sequentially on each transaction, partitioning will divide these sets of transactions into small sets of data called “fragments”. These fragments can then be processed in parallel by the network
The biggest advantage is that there is no need to add anything on top of the existing architecture. However, it’s still not without problems, which brings us to the next section.
There are two important issues with Layer 1 and Layer 2 scalability solutions.
First, we have a big problem with adding these solutions to existing protocols. Ethereum and Bitcoin both have multi-billion dollar market capitalizations. Millions of dollars are traded every day using these two cryptocurrencies. This is why it does not make sense to add unnecessary codes and complications to experiment with these protocols and play with so much money.
Second, even if you create a protocol from scratch that incorporates these techniques, they may still not solve the scalability trilemma.
The term “scalability trilemma” was coined by the founder of Ethereum, Vitalik Buterin. It is a compromise that blockchain projects must make when deciding how to optimize their architecture, balancing between three of the following properties – decentralization, security and scalability. For example. Bitcoin wants to optimize security and decentralization, which is why they end up compromising scalability.
The solution is to create a protocol from scratch with these integrated solutions. Additionally, he should also be able to resolve the scalability trilemma. Turing Prize winner Silvio Micali is building a project called “Algorand”, which is trying to do just that. Algorand uses a consensus protocol called Pure Proof of Stake (PPoS).
During PPoS:
- The chef and the selected verifiers (SV) are chosen at each stage of the Byzantine agreement.
- The cost of calculation faced by a single user only involves the generation and verification of signatures and simple counting operations.
- The cost does not depend on the number of users selected for each block. This number is constant and is not affected by the size of the entire network.
- The increase in computing power directly improves performance, which makes Algorand perfectly scalable. This means that as the network grows in size, it maintains a high transaction rate without incurring additional costs.
Scalability is the main reason that prevents widespread adoption of cryptocurrencies. To ensure that cryptocurrencies are scalable and fast enough for daily transactions, we need protocols that are specially designed to solve this problem. This is why projects like Algorand are essential, and we can only hope that other projects follow suit and provide a viable solution.
