DeFi Technologies | Your Gateway to Decentralized Finance ...

All You Need to Know about Blockchain Scaling

December 14, 2021

All You Need to Know about Blockchain Scaling

Scalability has been blockchains’ nemesis thus far. Even is having to fend off challenges from newer blockchains that scale better than it does. Scalability matters because blockchains are unlikely to be mass-adopted and reach their full potential without providing a flawless user experience at scale. However, the scalability trilemma postulates you cannot have security, decentralization, and scaling at the same time. In an attempt to square the circle nevertheless, new-generation blockchains have been developed with a different architecture than legacy blockchains like Bitcoin or Ethereum. Are they having success with that, though? This article covers: 

  • The objective of scaling

  • Different types of scaling

  • Layer one and layer two scaling solutions and their (dis)advantages

Why scaling blockchains is the goal

With its poorly scaling architecture, it’s unlikely that Satoshi Nakamoto designed Bitcoin with commercial adoption in mind. Bitcoin’s limited block size and the consensus time are in-built blocking factors for using Bitcoin at scale. Although Ethereum was supposedly always built with a transition to a proof-of-stake consensus mechanism in mind, it faces a similar problem. The more people are using it simultaneously, the more gas prices rise. Ethereum becomes a victim of its own success.

However, ideally, you would want a blockchain that supports more transactions per second without significantly weakening security or being too centralized. Blockchains improve on the client-server relationship because they allow for a transparent record of ownership that cannot be censored or tampered with and has no central point of failure. Imagine being able to tokenize real-world assets and recording and subsequently trading them on the blockchain. This would bring along massive benefits for all layers of society, especially for those that are thus far excluded from owning assets. To do that, blockchains will need to scale.

Different types of scaling

Different factors influence the scalability of a blockchain.

Throughput: the transactions per second a blockchain can reach is called throughput. A more scalable blockchain has higher throughput. Throughput itself is determined by:

  • Latency: for Bitcoin the latency (or confirmation time) is ten minutes but other blockchains have instant transaction confirmation and hence no latency.

  • Block time: not to be confused with latency, this is the time needed to mine a block, in Bitcoin’s case, ten minutes. Proof-of-stake blockchains are pretty much always faster than Bitcoin.

  • Block size: the bigger a block’s size in a blockchain, the more transactions fit in a single block and consequently, the more transactions the blockchain processes.

These are factors impacting only the blockchain itself and not taking into account external influences or adding a second blockchain. Broadly speaking, you can distinguish between two types of scalability.

Horizontal scalability

Adding more nodes, increasing block size, and generally increasing throughput refer to horizontal scalability, as does adding a second layer of blockchains to the foundational blockchain. Currently, the blockchain industry is working on solutions that scale horizontally.

Vertical scalability

Adding more hardware or speeding up transactions by having more powerful nodes (instead of just more nodes) would be vertical scaling. For instance, faster internet would allow developers to build blockchains with massive block sizes. So would increasing storage capabilities, e.g., if everyone could store petabytes at home, blockchains could be bigger and, therefore, faster. To a degree, blockchains will automatically scale vertically as technology improves.

Layer one and layer two scaling solutions and their (dis)advantages

Layer one scaling tries to scale the existing blockchain; layer two scaling adds another blockchain on top of the existing one. Roughly speaking, the difference is whether the existing company is building more lanes on the blockchain highway or if a contractor does that. Both approaches have their intricacies and both have been tried with different degrees of success.

Layer 1 scaling

Bigger block size

The Bitcoin community discussed increasing its block size and eventually split over this, resulting in a hard fork and the creation of Bitcoin Cash, which does have bigger blocks. However, neither did Bitcoin Cash overtake Bitcoin in popularity, nor did it become particularly popular by itself because there is only so much a bigger block size can do. Even increasing Bitcoin’s blocks by a factor of 1000 would mean it’s ten times slower than Visa transactions, but the blockchain would be a thousand times bigger. 

Consensus protocol improvements

Instead of using the energy-intensive proof-of-work consensus mechanism, blockchains can use proof-of-stake or a variation thereof. This does away with miners and their energy consumption and switches from positive incentives (rewarding miners for doing their work) to negative incentives (punishing validators by taking away their stake if they misbehave). There is a broad consensus that proof-of-stake blockchains are easier to scale and carry far fewer adverse external effects. However, balancing decentralization and security has proven to be an obstacle. Blockchains are either not decentralized enough (Ripple) or not secure enough (Binance Smart Chain). No blockchain has found the optimal middle point yet.

Sharding

Instead of having all data in one database, you could split it up into several databases and spread the workload across these databases. This would be sharding.

Ethereum is in the process of transitioning to an architecture that uses sharding together with proof-of-stake. In the example of the blockchain highway, Ethereum wants to build more lanes itself, then divide traffic across those lanes, so not everyone is driving in the left lane. 

Not all the data would be processed by all nodes but only by their relevant shards. So not all nodes would have all the information, meaning synchronizing between the different nodes would take less time, and throughput would increase as a result. The current Ethereum chain, called the Beacon Chain once it scales, would act as the last resort of storing information. The other 63 shards, which are essentially blockchains, pass on the receipts of their work to this Beacon Chain, where it gets stored. 

This sounds promising in practice, but potential problems are:

  • Communication: nodes still need to communicate with each other to reach a consensus. But too much communication slows the system down again. 

  • Security: what happens in case of an attack? What if an attacker takes over one shard, essentially 1/64th of the entire Ethereum blockchain? How does the consensus mechanism within shards look like, and how many nodes comprise one shard?

While this solution is highly promising, it is also the most complex one to pull off, which is why it has taken Ethereum so long to do it. 

Layer 2 scaling

Nested blockchains and sidechains

Since public blockchains are permissionless, anyone can build their own infrastructure on top of them. In other words, contractors do not have to ask if they can build more lanes, they just do it, and if their solution is good, people will use it. These new blockchains generally aim to handle smaller transactions that clog up the legacy chains. Each layer two blockchain has an individual architecture.

Nested blockchains and sidechains are two similar layer two solutions. A nested blockchain relies on the legacy chain for security, while a sidechain has its own security and is more independent. For instance, a nested blockchain could be a private blockchain a company uses on top of Ethereum. A sidechain would be a solution like Polygon for Ethereum. You can transfer assets from Ethereum to Polygon and trade at much lower gas fees but rely on Polygon’s security for your funds’ safety. 

Payment channels

Conducting transactions away from the blockchain and only referring the final result to the blockchain would be a payment channel. A popular example is the Lightning Network on Bitcoin. On the Lightning Network you can trade with your counterparty, e.g., send money back and forth, at a very low cost. When you’re finished, the final tally is recorded on the Bitcoin blockchain. While this sounds promising as well, payment channels have proven to be liable to hacks and have failed to live up to their potential thus far. 

Conclusion

Blockchains will be scaled one way or another, but how? Will one scaling solution emerge as a clear winner, or is the future of blockchains a multichain, multi-layer one?

DeFi Technologies | Your Gateway to Decentralized Finance ...
© 2021 DeFi Technologies, Inc. All Rights Reserved
LinkedINTElegramoutubeTwitter