First proposed by Ethereum co-founder Vitalik Buterin, the Scalability Trilemma refers to a blockchain’s ability to balance three core fundamentals that determine its functionality and operability– security, scalability, and decentralization.
Vitalik states that any blockchain technology can only feature two properties at most, never all three at once. Thus, it will always have to compromise on one of the fundamental properties. A good example is Bitcoin; while it has managed to optimize decentralization and security, it has had to compromise on scalability.
Crypto has come a long way since the early days of Satoshi and the Bitcoin whitepaper. Now with so many rival chains (known as alts) also being built with the stated goal of a permissionless, decentralized financial system, they not only have Bitcoin to compete with but also legacy payment processing systems.
To do this, blockchain networks must become highly scalable; capable of growing fast enough to accommodate the growing number of projects, users, transactions, and data being built on them every day.
As a result, decentralized networks must balance the ethos of decentralization, with the need for security, and scalability. Only by adequately incorporating all three into their structure will blockchain networks stand a chance against legacy systems.
The blockchain space is expanding rapidly as new solutions are constantly being launched, which leads to the issue of scalability. Scalability is one of the pillars of the blockchain trilemma with the others being security and decentralization.
Blockchain networks must solve for scalability. Layer 1 is the underlying structure built to optimize blockchain performance. Layer 2 are third-party protocols that integrate with an underlying Layer-1 blockchain to increase output and efficiency.
Blockchains have never been tested the way they are now, and with all the glowing promises of scaling while also promoting security and decentralization, one has to always give. By scaling, blockchain networks can successfully compete with centralized networks for transactions by offering higher processing capabilities and functionality.
Popular Layer-1 blockchains include Bitcoin, Ethereum, BNB, Terra, Avalanche, Fantom, Harmony, Cosmos, etc. So, layer 1 solutions are a set of solutions that improve the network itself to make the base layer or protocol more scalable. They are used to tackle the scalability problem.
How does it work?
Layer-1 solutions change the rules of the protocol directly to increase throughput and speed while allowing the necessary room for more applications, projects, and user activity. Layer-1 scaling solutions can mean that for example, there is an increase in the number of nodes contained in each block, or accelerating the rate at which blocks are confirmed, to increase overall network throughput.
There are generally three main approaches to implementing Layer 1 solutions – Proof of stake or PoS, Proof of work or PoW, and Sharding.
- Proof-of-Work, or PoW, is the traditional consensus mechanism for large chains like Bitcoin and ETH. It excels at decentralization and security by using miners to decode complex cryptographic algorithms, thereby removing authority from a single entity. However, PoW has to jettison scalability for the other two to work. It is also very slow and consumes a lot of energy and resources, especially computing power.
- Proof-of-Stake, or PoS, is a consensus mechanism that accommodates a distributed “stake” over a network. Users authenticate block transactions directly, on account of their stake or the number of tokens they hold. PoS is strong on scalability and transaction speed but weak on security. The Ethereum blockchain is notably moving its consensus model to a PoW model to increase scale, decentralization and accommodate the growing number of activities on its chain. Many newer blockchain networks favor PoS in their quest for speed and faster adoption as the Layer-1 chain market becomes increasingly competitive.
- Sharding is an experimental approach to Layer 1 solutions using the power of distributed databases. It involves the breaking up of a network into a series of separate database blocks known as “shards” making the blockchain more scalable. Because each network node is assigned to a particular shard instead of maintaining a copy of the blockchain in its entirety, it frees up processing power when not in need, and also helps for reallocation so that the chain can process transactions faster.
Related Article: Blockchain; a dark horse in Nigeria's economy
Layer-2 solutions are networks that operate on top of an underlying Layer-1 blockchain protocol to improve its scalability and operations. This enables Layer-1 to shift a portion of its transactional burden to an adjacent network, which then handles the processing requirements for each transaction and then sends it back to the main blockchain to finalize its results. By moving a large chunk of processing power to an external network, the base layer blockchain becomes less congested and ultimately more scalable.
A good example is Polygon and Ethereum. Polygon is an interoperability layer-2 scale solution for Ethereum-compatible blockchains. Users can deposit Ethereum tokens to a Polygon smart contract, interact with them within Polygon, and then later withdraw them back to the Ethereum main chain to finalize transactions.
Bitcoin also has a Layer-2 solution, known as the Lightning Network. This was built to improve transaction speeds in this fashion on the Bitcoin network.
Other examples of Layer-2 solutions include:
Nested blockchains: A nested blockchain is a blockchain sitting atop another blockchain. The main chain may set conditions and then delegate work to nested chains that process and return it to the main after completion. This distribution of work reduces the processing burden on the main chain and allows it to scale.
State channels: A state channel allows for interoperable communication between a blockchain and off-chain channel, improving overall transaction capacity and speed. It usually deploys smart contracts or multi signatures (multi-sig) to deploy its solutions to the blockchain and off-ramp channel. When the transaction is completed on the state channel, they are then sent over and recorded on the underlying blockchain. Bitcoin Lightning and Ethereum's Raiden Network are examples of state channels.
Sidechains: A sidechain is a network “by the side” of a blockchain (hence the name) that’s typically used for large transactions. Sidechains are usually built from scratch, and also use their independent consensus mechanism which can be optimized for speed and scalability. Here, the primary role for the underlying blockchain in transaction processing is to maintain overall security architecture, while the sidechain accelerates the speed and scalability of transactions. Sidechains are different from state channels as they are publicly recorded to their ledger and any sidechain security breaches will not impact the main chain.
Layer-1 and Layer-2 scaling solutions both serve the same purpose; they are both designed to accelerate the mass adoption of blockchain technology by making networks faster and more accommodating to a rapidly growing user base.
Also, they do not necessarily have to be mutually exclusive; Ethereum for example is changing its Layer-1 model to a PoS model, yet Layer-2 solutions like Polygon will still be very vital to maintain scalability in Ethereum without the need to jettison the other two parts of the blockchain trilemma. The more the merrier.