Why do so many blockchains rely on Sharding for Scalability?
4 min read

Why do so many blockchains rely on Sharding for Scalability?

Why do so many blockchains rely on Sharding for Scalability? Here we take a look at what is sharding in blockchain.
Why do so many blockchains rely on Sharding for Scalability?

Any blockchain project built to host smart contracts and decentralized applications (DApps) will undoubtedly have Sharding their architecture design. Cryptocurrency investors and decentralized finance enthusiasts alike have had to come to the reality that current blockchain implementations cannot scale. Besides, the current gas prices and usage of the Ethereum network will have made it painfully obvious. Blockchains are slow, the fees are high and any applications built on them are having problems to scale. But if a public blockchain is to achieve any business adoption. Notably, in the financial technology (FinTech) sector, to compete with legacy payment systems (that are hundreds of times faster). Then it must find an answer to boost throughput, address latency problems and increase scalability.

The debate around blockchain scalability has been raging for several years now. Creating communities so entrenched in their positions that whole hard forks have been born due to the debate. Namely, Bitcoin Cash due to the controversy over the initiation of SegWit. To summarize, we find two camps: on-chain vs off-chain scaling. Lightning Network is an example of Bitcoin taking an off-chain approach to staking. Whereas, with ETH 2.0, the goal is to become a Proof-of-Stake sharded blockchain is an on-chain solution for scalability. So then, we are going to look at the second option. To explore why so many blockchains are relying on sharding as the solution for all of their scalability problems.

What is Sharding?

Sharding refers to a form of database partitioning, also known as horizontal partitioning.

What may come as a surprise to many crypto enthusiasts, Sharding is not a new term or technical invention. Hence it was not born with blockchain, it has existed since the late 90s. It is a process that is regularly used by companies that need to manage large centralized databases effectively. The idea is simple: split up a large database. Subsequently, smaller segments are easier to manage. Overall this will increase the performance of the system and reduce the query response time. For example, most companies will break up their customer database by geographic locations. Placing them on unique servers as a way to cope with traffic.

What is Sharding for blockchains?

The same thing!

Currently, one of the bottlenecks faced by blockchains is that the network of nodes is responsible for verifying every transaction. Sharding a blockchain means breaking up the blockchain into smaller segments (known as shards). Each shard can be responsible for a set of account balances and smart contracts. Sets of nodes will assign to individual shards for the verification of transactions and operations. Instead of each node having to verify everything that happens on the entire network.

By breaking up the blockchain into smaller segments that become more manageable, it leads to higher throughput of transactions. Overcoming the problems of scalability many networks are facing today. Elrond, for example, uses a mechanism known as Adaptive State Sharding. In brief, it allows parallel transaction processing up to 10,000 transactions per second.

Is Sharding secure?

This is where different approaches could mean everything.

While most DApp developers appear agree that Sharding is a much-needed scalability solution. Projects are taking different approaches to their architecture namely how to deal with cross-shards communication. This is because you can argue that a blockchain split into different isolated segments is a security concern. In particular, it is easier for hackers to take over a single shard than the whole network. Due to the reduced hash power required to control an individual segment. This type of attack is a 1% attack or a single-shard takeover. The attackers would then aim to use their shard to submit invalid transactions to the whole network.

The popular solution to this attack vector is to implement a randomness element to the network, namely to node assignation. For example, nodes are randomly reassigned to different shards. Making it hard for an attacker to predict which shard their malicious node would be interacting with. Another challenge is how a thin client (think a web wallet) will deal with not having a full blockchain state. Also, how shards should communicate with each other if they appear to be separate networks. This is where teams have different implementations, and only time will show us the clear winner.

Who uses it?

Many smart contract blockchains are designed to use sharding. Here is a small list of projects we recommend taking a look at:

  • Zilliqa: the first public chain to have implemented it. Its testnet achieved 2,828 TPS in a controlled environment but so far their mainnet has not shown the same speed.
  • Elrond: the ERD platform boasts a 10,000 TPS due to their new approach to sharding, the mainnet launch is imminent.
  • Ethereum 2.0: once serenity is implemented. ETH 2.0 will use sharding and it is estimated that along with using rollups it could reach 100,000 TPS.
  • PChain: a blockchain that many like to call What Ethereum could be. Namely, it follows eth’s native EVM and has reached over 128k TPS on their mainnet.
  • QuarkChain: Ran multiple competitions on their mainnet to finally reach a peak of 1,000,000 TPS.
  • Cardano: ADA also has a different approach where the ledger is not split into shards. Theoretically, the throughput could go as high as 1 million TPS.

Stay safe and trade well!