Blockchain has been making significant leaps in DeFi, globally. But for it to compete with the legacy, centralized platforms that boast of high TPS, it needs to work on scalability.
Any blockchain should typically have three qualities that should be non-negotiable.
Fair distribution of computing power and a consensus mechanism in place. A chain that runs without any centralized parties in it. No government and no intermediaries.
The chain can survive an attack against 51% of its participating nodes.
The blockchain can support the increasing number of transactions that it’s subject to when users and adoption start increasing.
While decentralization and security are present in most of the popular blockchains, including Bitcoin and Ethereum, scalability has largely become an issue for most of them at some point or the other.
This inability to maintain all three elements in a blockchain was named the “Blockchain Trilemma” by Ethereum co-founder Vitalik Buterin.
For example, the most popular blockchain network, Bitcoin, with its own native coin $BTC is known to process only 4-7 transactions per second, whereas VISA processes 1700 transactions per second.
Needless to say, there’s plenty of room for both growth and improvement here only if the base network, also known as Mainnet, would support the scale. The base network, also known as Layer 1 needs to be optimized for most blockchains so they are better able to handle higher transaction throughput and maintain a high throughput capability.
As the adoption of Layer 1 blockchains increase, the load of transactions increases on it simultaneously. This leads to slower and more expensive transactions. To improve throughput and make the blockchain more scalable, changes must be made to Layer 1. However, any change made to Layer 1 will change the rules and workings of the original layer. This is not an ideal situation. This is where Layer 2 comes in. It renders the external, secondary source of support, a parallel network built alongside Layer 1 to improve throughput capability and TPS.
When it comes to Layer 1, multiple nodes in the network need to verify all transactions before they can be validated. In the case of Bitcoin, which uses Proof of Work (PoW) as the consensus mechanism, this becomes even longer process, as each miner (representing a mining node) needs to solve a cryptographic puzzle to be eligible to verify this block. The complexity in verifying each transaction before adding it to the blockchain, makes this a long process, especially for users who might be worried when they don’t see their transaction confirmation immediately (or sometimes even in 8 minutes) and who are used to VISA immediate transaction confirmations.
There are, however, several scaling options available for Layer 1. Simply changing the consensus mechanism to Proof of Stake (PoS) can reduce processing fees, as well as, reduce the load on resources by over 99.95%. The blockchain development team is the one that comes up with these scaling solutions. Depending on the type of solution, the network will need to carry out a hard fork or soft fork.
Other scaling options like SegWit which is backward compatible can help improve throughput capability. SegWit (Segregated Witness) removes the need to have digital signatures as a part of the transaction, thereby allowing each block to house more transactions without affecting the network’s overall security.
And then there is sharding. Sharding refers to a form of database partitioning that is applied to Blockchain Distributed Ledgers. In this method, a network along with its nodes is divided into shards. The workload is then distributed to these shards thereby improving transaction speed.
Each shard is entrusted with a certain portion of the workload which it completes and reports back to the main chain with its local data.
As mentioned earlier, Layer 2 solutions are built parallel to the mainnet. Here are some of the popular solutions that have helped relieve workload pressure on Layer 1 while improving TPS significantly.
Sidechains work independently from the main chain. They have their own set of validators, which means the bridging smart contracts on the mainnet do not verify the validity of the sidechain. This system works on trust, as you need to trust that the sidechain, which can control the assets on the original chain, is operating as it should.
Rollups, especially the Zero Knowledge Rollups, bundle transactions and submit them as one transaction on the main chain. The system used validity proofs to ascertain the integrity of the transactions. Assets on the original chain are held with smart contracts which confirm that the rollups are functioning the way they should.
As the name implies the main chain (parent) and the set of secondary chains (child) “nested” atop the main chain work in unison. The child chains work according to the rules set by the parent chain. The task of processing the transactions and handing them over to the main chain lies exclusively with the child chains. The parent chain is only required to ensure dispute resolution, as and when needed.
In a state channel, a two-way communication channel is created by sealing off a part of the main chain and connecting it to an off-chain transaction channel. The process occurs using a multi-signature or a pre-agreed smart contract. The channel then executes a batch of transactions and once the set of transactions is completed the resultant state of the channel is sent to the mainnet for validation. This method improves the speed of processing transactions significantly by freeing up the entire blockchain from validating the transactions, thereby improving the capacity of the network.
The change from PoW to PoS as a consensus mechanism is one such example, where miners stand to lose out on their incentive of mining coins for every block they add to the chain. This change, therefore being a difficult one, would need a hard fork to happen.
Newer blockchains are now focusing on integrating scalability to their mainnet instead of adding layer 2 which might raise questions about security. Legacy blockchains like Bitcoin and Ethereum on the other hand are constantly looking at improving their main chain and adding Layer 2 based on particular use cases rather than a permanent fixture.
While the Blockchain Trilemma remains developers are continuously working towards organically melding all three aspects of decentralization, security, and scalability, to the original network as much as they can. The road forward will unfold based on the kind of developer community and user base these blockchains build, as they will dictate the number of transactions the blockchain sees and how it builds competency to handle the same.