Ask Datarella #3 – What is Staking?

Kira Nezu

11 September 2019

If you’re wondering why a blockchain company like us is writing a blog post about killing vampires, or if you’re confused because you’d think that meat products good for barbecue have nothing to do with our core competencies, you’ve landed in the right place!

This is a short explainer and introduction to proof-of-stake (PoS), which in the context of blockchain and distributed systems is a method for agreeing upon what is the true informational state of a distributed system. This is called the consensus mechanism in blockchain-talk and is often compared to proof-of-work (PoW), which is based on the simultaneous computation of many, many relatively simple calculations.

How does it work?

Proof-of-Stake is a process which starts with a pseudo-random number. This number is used to perform a lottery to see which node gets to validate the next block. And this is where the stake comes in. The probability of a node being allowed to validate a block can be based on the percentage of tokens that node has staked. The chosen validator then proposes a block. Some types of PoS allow for nodes with more stake to have more votes on the validity of this block.

In order to motivate nodes to participate honestly in the validation process, there are rewards and penalties in most PoS-models. The rewards are there so that someone will perform the common good of validating transactions, and the penalties are there to prevent corruption or attacks on the blockchain. One widely discussed attack is the nothing-at-stake attack which is when a node attempts to create blocks, or vote for all blocks, on top of many or all of the competing chains in an non-finalised state. It is in fact even in the interest of all rational nodes to do this, since the marginal cost is very low. For a penalty to be able to control for this type of behaviour, we need to know the full set of validators which are allowed to stake before the fork takes place, but then it’s easy to create a negative reward for those voting for multiple blocks. Another method of penalising validators for misbehaving is to create so conditions for when a validator is deemed dishonest beyond reasonable doubt. If this happens to a validator, the staked tokens are slashed. More here and here.

Why is PoS an improvement for blockchains?

Two reasons mainly:

  1. It requires less energy. The wasted-energy argument of many blockchain discussions is based on the assumption that blockchains use PoW. I won’t get into the details of how PoW works here, but since PoS doesn’t require any racing to find a special key between different nodes like PoW, the energy consumption is drastically improved.
  2. Economic incentives can be programmed into the model in a more certain way than in PoW. For example, centralisation cartels can be prevented by improved game-theoretic design and 51% attacks can be made incredibly expensive.

It should be noted that just as with many other parts of blockchain technology, there is room for development and innovation in staking protocols. There is already many different types of PoS with each having their own benefits and drawbacks. Hopefully, after having read this introduction, you feel empowered to dive deeper in other aspects of consensus mechanisms and blockchain!