Sharding and Proof of Stake are both becoming popular topics in the blockchain industry owing to the fact that both of these concepts help to increase the scalability and performance of the blockchain.
What is sharding? In some traditional blockchain networks, the work done in the network requires the participation of all the nodes present in the blockchain. Work done could be validating a block, choosing the next block to be added, etc. Having all the nodes participate in every activity increases the transaction time and reduces scalability.
This is where sharding comes into the picture. In sharding, the blockchain network is split into several smaller networks each of which is doing some part of the work thereby distributing the load across the various groups. These groups of nodes are known as shards and you can think of them as simple smaller blockchains themselves. To manage these various shards, there is one chain known as the beacon chain/relay chain.
What is Proof of Stake? Proof of Stake is a type of consensus algorithm where an individual's stake in the network determines their participation in the consensus protocol. Proof of Work is much more energy-efficient than Proof of Work(where one needs to solve a complex mathematical puzzle) and opens up a whole new world of possibilities in the consensus space.
One of the questions that we constantly ask ourselves is :
How do we select the validators in a PoS system who can validate the blocks?
So far, some of the popular systems that we know of, like EOS and COSMOS have 21 and 100 active validators respectively. As you can see, these numbers are limited.
When you think about the various ways one can select the validators, some of the following options come to mind:
- Those with higher investment in the system, will get a higher chance to be picked as validators
- We can introduce some randomness in the system to pick the validators. The randomness may vary from system to system.
Another interesting question to think about is:
How do we reward the validators?
- We can reward them proportional to the amount of stake. This leads to a "rich get richer" problem.
- We can reward everyone equally regardless of their stake in the system
- Rewards can be proportional to the square root of stake amount (Quadratic Funding)
Keeping the above two questions in mind, let us see what Effective-Proof-of-Stake is:
How are validators selected? The top N stakers will be the validators.
The block rewards and voting power would be proportional to "effective stake"
So, what is effective stake?
effective_stake = max(min((1+c) * median_stake, actual_stake), (1-c) * median_stake)
Here, c is a protocol parameter (for example, c = 0.15)
Here is an image depicting the distribution of stake:
Image Source: Effective Proof-of-Stake
An effective stake is a stake that is capped around the median. With this design, those who have bigger stakes will have some incentives to centralize their stakes as there is a cap at the median whereas the ones with smaller stakes get rewards closer to the median. This idea creates a system approaching equality so that there isn't disproportionate reward distribution to the validators validating the blocks on Harmony.
The effective proof of stake model ensures that we can achieve our goals of supporting delegation, compounding stake while preserving decentralization. This PoS model makes harmony an ideal choice for building decentralized apps for the future.
What other proof-of-stake mechanisms are you familiar with and which ones interest you the most?