Shardeum: Fast, Auto Scaling, Fair

The autoscaling EVM-based layer-1 blockchain aims to solve the Blockhain Trilemma and provide consistently low gas fees via dynamic state sharding.

Matthew Ambrose
Cosmostation
13 min readMar 8, 2024

--

Sharding… promised to be the solution to the scalability limitations of traditional blockchain architectures while maintaining decentralization, security, and trustlessness; has yet to live up to its full potential.
Current sharding solutions have fallen short as some have struggled with linear scaling, security issues, high overhead costs, and developmental complexities.

This is where Shardeum comes in.

But first, what is sharding? (A reminder)

Sharding is a scalability technique used to improve network performance, reduce network congestion, and boost throughput by partitioning the blockchain into multiple smaller, more manageable segments called “shards”. Each shard operates semi-independently and processes its own set of txs and smart contracts.

So what about Shardeum?

Founded by Nischal Shetty and Omar Syed, Shardeum is an autoscaling EVM-based layer-1 blockchain designed to achieve horizontal scaling and parallel processing. Shardeum’s unique architecture ensures immediate finality and high throughput that increases linearly with the network thereby ensuring sustainably low transaction fees forever. It promises to be the next evolution in sharded networks by solving sharding’s existing issues in a novel way, with a design that allows anyone to participate in validating activities.

Solving the Blockchain Trilemma

Usually networks are forced to choose two of the three core components found in blockchain technology at the cost of one.
But Shardeum has proposed a solution that may address all three components in the following way:

Networks often have to choose one or two of the three core components

Scalability

Using dynamic state sharding (explained further down), consensus is reached at the transaction (tx) level. This results in high speeds because of parallel processing.

Security

The protocol is secured by using both PoS (Proof of Stake) and PoQ (Proof of Quorum) in its consensus, and validators are put into an auto rotation mechanism to mitigate collusion avenues. The nodes are randomly selected to be auto-rotated into the active set in a cycle of every 1 minute and prevented from choosing their shard or address range.

Decentralization

Shardeum is permissionless and built for the community to run nodes so TPS can easily be scaled, and participation, regardless of location and background, is possible.

How does Shardeum work?

Starting with nodes…

Shardeum has two types of nodes:

  • Validator Nodes

These validate network txs and are lightweight as they store only a subset of the network’s state data. Validator nodes process txs on a First Come First Serve-basis, and send txs and receipts to archiver nodes for storage.

Validator nodes are either in Active or Standby mode and they are routinely cycled in and out of consensus duty on a rotation basis. Validator nodes which have been active in the network for the longest time are periodically removed from the network and replaced by randomly selected standby nodes. A slow and constant rotation of validator nodes enhances the decentralization level of the network and prevents attacks from slowly adaptive adversaries.

Validator nodes have to stake a minimum amount of $SHM to participate and are rewarded in $SHM for active participation. The rewards come from predefined SHM emissions, and tx fees earned.

The amount of rewards earned is based only on the duration the node actively participated in the network. (NOT the time spent in standby OR the amount of txs processed).

Validator nodes cannot claim rewards while participating in the system. They must first exit the network (both active and standby mode) and then unstake to receive their reward distribution.

  • Archiver Nodes

Unlike validator nodes, these do not cycle in and out of rotation.
Instead archiver nodes are each assigned two validator nodes and they store the complete state and history of the network.

Because of this the archivers need to be supernodes with large amounts of storage, RAM, CPU and bandwidth. They are not involved in any consensus and are expected to be run by professional node operators.

Archiver nodes need to stake a larger amount of $SHM than validator nodes but they may participate as long as they wish once they are accepted into the network.

In order to leave the network archiver nodes need to first submit a request and have their departure approved. Failure to do so results in slashing.

Because of the importance of the role and its heavy running requirements, archiver nodes can receive up to 10x more in rewards than validator nodes and are allowed to claim rewards once a day.

Archiver nodes can also receive additional rewards by providing data subscription services to exchanges, dApp UIs, explorers, and others.

Upon mainnet archiver nodes will first only be run by the Shardeum team. Later upgrades are planned that will allow community members to run their own archiver nodes.

  • Node Cycle

Once a validator node has been active in the network and becomes the oldest node it will be removed from the network. The network accepts nodes from the standby list and removes nodes that have become the oldest.

Validator Node Rotation Cycle

The cycle is one (1) minute in duration.

Unstaking is only allowed once a validator has been removed.

  • Slashing

Validator nodes can be penalized for leaving early, syncing too slowly, double voting, not voting, etc.

Some actions are more heavily penalized than slashing, such as immediate removal from the network. Nodes can also be removed due to slashing IF the sum of the initial staked amount, plus the rewards earned, minus the penalty, is less than the minimum required stake.

To mitigate this risk nodes can create a slashing buffer by initially staking more than the required stake amount.

Tech Stack:

So what makes Shardeum tick?
For that, here’s a detailed look under the hood at some of the tech driving the network.

Shardus

In development since 2016, this software implements the protocol layer of the network and powers Shardeum. It is the base upon which the rest of the tech stack has been built. Shardeum is essentially the result of taking the Shardus protocol and adding EVM and smart contracting functionality at the application layer.

PoQ

This is a leaderless approach where a majority of consensus participants vote yes or no to a tx (using digital signatures). The outcome is a non-forgeable receipt that’s used as proof. This process does not happen in “a block” but rather on each tx as it comes in, which means greater tx speed as there is no waiting for blocks to be finalized.

PoQ example:

There is a vote happening among 100 school students to elect their student president.

→ “Student A“ and “Student B“ are running for the position.

→ All voters have one vote and their votes are recorded, so that these can be checked again at any time in the future.

→ 51 students vote to Student B, which means B has the majority and wins the election.

→ This result, and the votes backing it up serve as a “proof” that makes the victory legitimate.

→ If any student voted for both A and B, we will have proof of this adverse action which will see the double voter punished.

→ This is Proof of Quorum.

PoS

The widely used PoS consensus mechanism is implemented in Shardeum as a Sybil deterrence and slashing mechanism to ensure validators do not act adversely. (Eg. double voting)
→ TL;DR: The PoS backs up the PoQ.

Dynamic State Sharding (DSS)

DSS divides the nodes in the network into smaller groups (shards) which store a subset of the state data and process different sets of txs for parallel processing.

In doing so the tx throughput of the network increases directly proportional to the number of shards in the network.
More nodes = More parallel txs

This is a way to achieve both scalability and decentralization while maintaining security. It also solves some of the issues found in previous traditional state sharding solutions.

State sharding is normally more complex, not truly scalable, and breaks atomic composability (explained further down).

State sharding can also lead to security issues if incorrectly implemented. For example, to halt a shard or engage in attacks across other shards and the network, adversaries may only need to compromise the BFT limits of a single shard and not a majority of the network. Add to this the current static sharding designs that fixes the number of nodes in a shard and the total number of shards as well.

DSS meanwhile, differs in that the Shardus protocol assigns each node within a shard to cover one or more unique address ranges. This means that for any given address there is a well defined number of nodes holding the data for those addresses.

In the case when more nodes are added to the network in times of increased demand… other nodes can slightly reduce the total addresses they cover, and because there are an increased number of nodes, the addresses will still maintain a level of node redundancy.

Linear Scaling

This is when each node is able to immediately increase the overall network tx processing rate. Normally static sharding networks need to make a “full shard” with a certain number of nodes before another shard can be added (step-wise scalable).

But in Shardeum each node added to the network immediately increases the transaction throughput, storage capacity, and bandwidth of the entire chain.

Example: If 100 nodes provide 1,000 TPS, then 200 nodes provide 2,000 TPS.
This concept works even if only a single node is added (101 nodes = 1010 TPS)

Auto Scaling

In Shardus nodes can vote to increase or decrease the size of the network based on the network load (monitored every 60 seconds). The network aggregates these votes to come to consensus on the new size it wants to attain. If it is greater than the current size, more nodes are allowed to join, and if it is less, nodes are removed until the new size is reached.

This feature makes the network the first one capable of maintaining the level of state data redundancy needed, whilst also increasing and decreasing the network size as needed.

This approach creates a positive trickle down effect for the network and its users as the chain’s operating costs (node rewards) are lowered, resulting in less gas fees.

Atomic & Cross Shard Composability

Atomic Composability is the ability to invoke multiple smart contracts and chain them together within one tx. This normally doesn’t work in other sharded networks as smart contracts may be on different shards and txs may only be allowed to invoke smart contracts that are all in the same shard. The result is a drawn out process where a user may need to invoke multiple txs for a desired move.

This is where Shardeum comes in.

It solves this issue by forming virtual tx groups to process txs independently. These groups are spread across different shards, with overlapping address ranges. In this way the chain remains sharded but acts as if it isn’t.

This means a user can save on gas fees because they don’t need to invoke a smart contract on one shard then move the output to another shard and invoking another smart contract there.

Blockless Architecture

Blocks have limiting factors such as tx bundling, block size, block rate, and gas limits.

But in Shardeum consensus on individual txs works better because of its parallel processing capability and therefore a higher TPS. This architecture also means that nodes cannot alter tx order or which txs are included/excluded.

Benefits of Shardeum

Because it’s EVM compatible users and devs can easily deploy smart contracts from Ethereum to Shardeum in just a few clicks and txs are fast because block level consensus is not necessary for finality.

There is also no need to download new wallets because Shardeum supports EVM-based wallets by default.

Security Risks & Solutions

That being said… no project is without risks. Here are some of the issues facing the network and its mitigation strategies.

  • Sybil Attacks: Sybil attacks can easily take out a badly designed sharded network as they need to only overtake a single shard to do damage.
    Mitigation: Shardeum is designing its network to ensure that such an attack on a single shard has the same economic cost as an attack on the whole network (via staking, slashing, network removal standby nodes, and node rotation.)
  • Shard Takeover Attack: When an attacker fills a shard with their own nodes in order to control the shard. If they control 33% of the nodes they can halt the shard. If they control 66% they can forge txs within the shard.
    Mitigation: Shardeum prevents single-shard takeover attacks by not allowing nodes to select which shard they join. Nodes are randomly selected to be rotated into the active set and prevented from choosing their shard or address range.
  • Nothing at Stake: PoS validators or attackers could potentially earn tx fees from two versions of the network in the event of a fork, as there is no cost for validating on both chains.
    Mitigation: Shardeum uses the energy efficient PoQ for consensus, and PoS is used to prevent Sybil attacks. This means that validators that double sign/equivocate will be slashed. Moreover, digital signatures used to make PoQ receipts can not be forged.
  • Censorship: This happens when a validator/attacker has control over which txs will be included in a block and uses their status to prevent the txs going through (blacklisting).
    Mitigation: Shardeum’s blockless architecture prevents validators from altering the order of txs within blocks and from deciding which txs are included, and because the network uses leaderless consensus, no validator is elected as leader = no validator can single-handedly prevent txs being processed.
  • DoS or DDoS Attack: Denial of service or distributed denial of service occurs when nodes are knocked offline and fail to meet liveness requirements.
    Mitigation: Nodes should have DDoS protection by running their node with an ISP with a strong DDoS protection mechanism. BUT even if a node is taken down, other nodes in the shard have account range redundancy and can still validate the tx. Also Shardeum validator cycle means that other nodes or shards will be waiting and can join if needed.
  • Transaction Flooding: This happens when an adversary floods the network with valid txs to try to slow the network.
    Mitigation: Shardeum prevents tx flooding by imposing economic costs in the form of SHM gas fees. These fees are inexpensive enough to allow a beneficial user experience, but will cost an adversary a large amount should they engage in a tx flooding attack.

Tokenomics:

Denoted as $SHM Shardeum’s native coin is a utility token with a number of functions including: Staking, governance, rewards, gas, and tx fee burning.

The token is designed to be scarce/deflationary as the more the network grows, the more tokens will be burned over those distributed.

It will have a max supply of: 508 million $SHM (which is not alterable)

Distribution parameters:

  • 51% Community (259,080,000 SHM) — reward to validator and archiver nodes
  • 18% Sale (91,440,000 SHM) — 3 month cliff then 2 year daily linear vesting
  • 15% Team (76,200,000 SHM) — 3 month cliff then 2 year daily linear vesting
  • 11% Foundation (55,880,000 SHM) — unlocked at Token Generation Event (TGE)
  • 5% Ecosystem (25,400,000 SHM) — unlocked at TGE

Shardeum Ecosystem

The ecosystem looks promising as well, with over 150 projects joining the network with applications ranging from auctions, ticketing, gaming and domain registration.

Funding & Support

Shardeum has received a total of US$ 26.3 mil. in backing across four funding rounds with notable supporters including: Jane Street, Big Brain Holdings, Foresight Ventures, CoinGecko Ventures, Wemade, MH Ventures, Nestcoin, Mapleblock Capital and more.

Shardeum has also sold 32% of its 18% sale allocation to private investors in two seed rounds.

Governance & Community

  • Swiss-based Foundation (FDAO)

To start, Shardeum will initially be supported by a foundation that consists of its key members. The goal here is to steadily transition into a widely decentralized DAO that is composed of community members (called committers) who will be globally distributed.

This decentralized DAO process will be done by first setting a high entry threshold for DAO participation in order to maintain a secure environment in Shardeum’s early stages.

The threshold will then be reduced (via proposals) for greater decentralization and increased participation. The move to a DAO will be ensured via an established timeline.

  • Proof of Community

Looking at the work done so far, Shardeum’s Sphinx betanet had 40,000 community-run validators and a total of over 75,000 validators have participated so far.

There are more than 65 decentralized Shardeum communities in nations such as India, Vietnam, Turkey, Japan and Nigeria and the network has held over 250 Proof of Community events across 8 countries, attracting more than 15,000 participants. Over 4,000 smart contracts have been deployed through Proof of Community workshops. Till date, over 11,000 smart contracts have been deployed on the network making Shardeum one of the most participated web3 networks in existence.

While Shardeum initially focused on the Asian and African markets, it’s now looking to the USA, where it has participated in key events such as the Stanford Blockchain Week, and Messari Mainnet.

Roadmap

Shardeum plans to mainnet in Q1 of this year (2024).
After that it will focus on technology upgrades meant to increase security, autoscale based on storage needs, introduce community-run archiver nodes, and more.
There will also be a push to grow both the community and ecosystem, and to facilitate the transition of governance to a decentralized DAO.

What is Cøsmostation?

Cøsmostation is a proud backer and validator for Shardeum. In addition to supporting exciting new projects, we are also a genesis validator and a key player in the Cøsmos ecosystem and a validator for Ethereum. We pride ourselves in providing invaluable infrastructure legos essential for scaling and onboarding users onto blockchain networks.

Mintscan

Moreover, Cøsmostation offers its own blockchain explorers, Mintscan alongside other EVM explorers such as Kavascan. These provide insightful interactions with chain data across various networks and also feature user-centric designs, with transparency placed at the core.

--

--