GravityX Capital Profile picture
Sep 4, 2022 32 tweets 12 min read Read on X
Increasing the no of users on-chain requires faster execution times, higher security, & cheaper txn fees.

#Sharding is one solution that claims to scale blockchains to process up to a million txns per second.

What's sharding? How does it work?

Let's find out 🧵👇 Image
In non-sharded blockchains, each node is responsible for processing every transaction and storing the entire state.

Even if there are 1000 nodes (⬆️ nodes = ⬆️ security), the TPS of the network is limited to the processing power of one node.

This creates a bottleneck.
Sharding is one of the most viable solutions to this problem.

It focuses on splitting the blockchain into smaller pieces called "shards."

Each shard can process a portion of the total transaction processing load, increasing the network's processing power. Image
The nodes in the shards execute transactions and store states limited to that shard.

Increasing the chance of Sybil attacks (by making it easy to execute) as the validator set is split into shards. Image

One challenge in this approach is that you can scale up to a certain capacity depending on the beacon chain capacity.

Although adding infinite shards is possible, you also have to scale the beacon chain to adjust that load.

The solution is Quadratic Sharding.

What is it?

If nodes include the beacon chain, then each shard will be able to process 4x more transactions & beacon chain will be able to maintain 4x more shards.

Throughput across the system will increase by 4 × 4 = 16

A node is responsible for three things-

- Processing transactions
- Storing the transactions data
- Relaying transactions to other nodes in the network.

Sharding partitions these three operations using the network, state & transaction sharding.

Network sharding: It handles the way the nodes are grouped into shards.

This can be used to optimize communication since message propagation inside a shard is much faster than propagation to the entire network.

State Sharding: The state of the blockchain is split across shards.

Nodes in a particular shard only process & relay txns limited to the state of that shard.

This linearly reduces storage & compute requirements and introduces problems of DA and cross-shard txns.

Transaction Sharding: Sharding of the compute power of a #blockchain network.

This is easy because every node has the whole state of the blockchain.

The only need is to ensure that shards don’t update the same state concurrently.

@zilliqa blockchain uses this.

Certain challenges arise due to sharding designs:

1. Cross-chain communication
2. State Validity/Data Validity
3. Data Availability

How are these tackled? Let's take a look. 👇

Cross-shard communication issue: If smart contracts are hosted on different shards & they want to send a message from one shard to another, it's not possible for nodes in one shard to complete these txns.

There are two approaches to solving cross-shard communication.

1. Synchronous: The blocks in both shards for the cross-shard txns are produced in sync, & validators collaborate on executing such txns. e.g., #Merge blocks technique.

2. Asynchronous: This approach executes txns asynchronously where it's possible for one shard to verify txns in another shard. e.g., the Beacon chain technique used in @Polkadot .

State validity problem:

A shard cannot confirm the current #shard state they are interacting with without downloading and validating the entire shard history.

This problem doesn't exist in non-sharded blockchains. Image

Validator rotation:

Rotating validators reduces the probability of malicious #validator behavior, i.e., colluding to produce a fork or invalid block. Allowing cross-shard txs only between neighbouring shards.

Nodes can verify blocks in their shards & neighbors as well.


Whenever a block header is published to the beacon chain, there is a challenging period for honest validators to prove that a block is invalid.

Succinct proofs:

Cryptographic proofs could prove a computation's validity, i.e., block production based on txns. Image

There are 2 types of nodes:

Full nodes: Downloads all blocks and validates every txns.
Light nodes: Downloads only block headers.

Validators in the shard are full nodes for that shard, & other participants in the system, including the #Beacon chain, operate as light nodes

Data availability problem:

Light nodes don't know when a new block is produced in a shard because all data in that block has already been published.

The dilemma is if block producers don't release all data, light nodes can't detect malicious txns hidden in that block. Image

Proof-of-Custody: Have notaries in shards on a rotating basis, downloading the blocks & confirming that they can do so.

Erasure codes: Light nodes verify data availability of block by downloading random chunks & verifying using #Merkle root for validity. @ethereum & Polkadot have solutions based on this.

Benefits of sharding

-High #TPS: Limited nodes execute transactions rather than all nodes.
-Reduced compute & storage needs: State size and processing load of shards < the whole blockchain.
-#Decentralization: Node requirements decrease, making it easy to run and maintain.

Multiple blockchain networks have introduced sharding to their scaling plans.

Some of them are:
~ #Zilliqa
~ #Polkadot
~ @NEARProtocol
~ #Ethereum 2.0
~ @harmonyprotocol
~ @ElrondNetwork
~ #Shardeum

Let's look at some of their design choices. 👇

In Zilliqa, shards handle processing but not storage i.e., the transactions are processed parallelly across shards while every shard holds a full blockchain state.


The same state is shared across all shards, so different techniques are used to make sure that shards don’t update the same state concurrently. Image

@NEARProtocol sharding has a single blockchain design rather than beacon chain & shard chains.

Each block has all shard txns & can alter all shard states.

Nodes only maintain the state for their shard.

Txns are split into chunks, & one chunk represents one shard. Image

@Polkadot uses #Parachains to achieve distributed database sharding.

Parachains attach to the security, a relay chain that provides rather than providing their own.

A key feature of parachains is that the computations they perform are inherently independent. Image

@ethereum sharding design is based on shard & beacon chains. It uses a receipt mechanism for cross-chain communication.

There is also a proposition to create 64 shards to scale Eth up to 100K txns per second.

It is yet to launch after the most awaited merge happens. Image

@harmonyprotocol has sharding on 3 dimensions, i.e., state, transactions, and network.

It has a beacon and shard chain design.

Crosslinks are used to post valid block headers to the beacon chain.

It allows cross-shard transactions as well. Image

@ElrondNetwork uses a novel state sharding technique called Adaptive state sharding.
It combines state + transaction + network sharding & allows to dynamically change no of shards based on nodes available and network usage to achieve efficient sharding.

Shardeum is an EVM-based sharded blockchain that uses dynamic state sharding.

It has unique features such as transaction-level consensus, which eliminates atomic processing complexities faced by block-level #consensus designs.
Sharding has huge potential to scale blockchains to serve the growing demand.

It's currently in development across chains; the first blockchain to solve for the complex design will attract users & accrue higher value

Follow @GravityX_Cap for more in-depth research.

• • •

Missing some Tweet in this thread? You can try to force a refresh

Keep Current with GravityX Capital

GravityX Capital Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!


Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @GravityX_Cap

Jul 18, 2022

@avalancheavax was built to address issues of scalability prevalent in top protocols. And, with rapid popularity, Avalanche moved a step ahead to cater to its ballooning users by introducing Avalanche Subnets.

What is it?

How does it work?

Let’s Dive in👇🧵 Image

Before we dive into #subnets
Let’s first understand Avalanche.

#Avalanche is a Proof-of-Stake smart contract platform for #dApps powered by the snowman consensus protocol with near-instant transaction finality. It has been the most successful EVM chain after #BSC. Image

@avalancheavax launched its mainnet in Sept 2020 & Avalanche Rush - a Liquidity incentive Program in Aug 2021. This was a huge success & led to many #dApps migrating & bringing a lot of capital onto the platform.
Total Value Locked had reached $24B at its peak. Image
Read 25 tweets
Jul 11, 2022

EVM is the defacto standard among blockchain developers with a huge community for support. This has led other EVM-compatible chains to explore this system and non-EVM chains to buidl EVM-compatibility layers on top of that.

Let’s take a deep dive into this 🧵

After launching with limited success, the so-called “Ethereum killers” are building solutions on top of the chains to support EVMs. For instance, Polkadot’s Moonbeam, @NEARProtocol Aurora, @cosmoshub Evmos & @solana Neon.

What is EVM?

The Ethereum Virtual Machine (EVM) is responsible for defining the rules for calculating a new valid state from block to block. The #EVM is a robust sandboxed virtual stack within each Ethereum node, responsible for contract bytecode execution.
Read 25 tweets
Apr 19, 2022

ERC 20 is a wildly popular token standard.

But, many in the dev community see it as limiting & since its development, several alternative token standards have come out.

In this thread, we look at major token standards and their characteristics.


First, what are Token Standards?

Token standards are a subset of smart contract standards. Blockchains that support smart contracts incorporate token standards to tell devs how to create, issue & deploy new tokens based on their underlying blockchain.

There are two main types of tokens (Fungible & Non-fungible)

A fungible token is a class of identical, interchangeable tokens. For instance, a US dollar can be called a fungible token because it is identical and interchangeable with another US dollar.
Read 25 tweets
Dec 14, 2021
AMMs are a radical concept. A new and ambitious AMM is set to be deployed on @terra_money. @astroport_fi aims to be an upgrade to Terraswap combining all the learnings and best practices of other AMMs and putting them into action.
Here's what it offers. 🧵👇
With the upcoming launch of @astroport_fi, Phase 1 called "The Lockdrop" is now live. Phase 1 will run from Dec. 14 to Dec. 21 & 75M $ASTRO will be distributed to users in this. In it, Terraswap LPs migrating liquidity to Astroport will receive one-time $ASTRO reward.
Astroport is an AMM on @terra_money aiming to improve pricing & trade efficiency. Combining the use cases of multiple dApps into one, it will attract more liquidity. Its flexible architecture can accommodate pool types of different kinds of innovations from pioneers of AMMs
Read 16 tweets
Dec 13, 2021
While the rest of the #Crypto market was grappling with a bearish turn recently, the @terra_money ecosystem stood out as one of the most resilient #Crypto projects. Their recent developments have set it soaring as of late.
Let's take a look.🧵👇
Terra's DeFi ecosystem has surpassed @avalancheavax & @solana in terms of TVL currently standing at $11.89B. Notably, it has increased since Nov 27 from $9.80B to $14.36B marking its ATH on Dec 5th.
There has been an explosion of $UST supply recently, growing from $2.88B to $8.73B with 203.13% increase since Nov 9. This has been a result of $LUNA Burn which started due to the on-chain votes for proposals 133 & 134 to burn the 88.675 million Pre-Columbus 5 $LUNA.
Read 12 tweets
Oct 28, 2021
Capital efficiency is one of the important areas of the DeFi 2.0 movement, and @MIM_Spell has been doing an excellent job in this branch. It became the the first decentralized stablecoin to be added as base currency on a CEX.

Let's delve a little deeper into it.🧵👇
On @bitfinex, $MIM has been added as a base currency for the BTC/MIM pair. $MIM is the first decentralized stablecoin to be added, although there exists OGs like $DAI, $UST . It's a huge step towards decentralized vision, which $MIM appears to be dominating.
TVL on @MIM_Spell has been steadily increasing, which could be due to the increased traction in light of current DeFi 2.0 trend. It has risen from $1.03B to $3.76B in previous 30 days, and it is projected to rise much more rapidly now that the project has gone multichain.
Read 13 tweets

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!


0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy


3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!