logo academy

What is Proof-Of-Stake?

March 28, 2022

8 min

What is Proof-Of-Stake?
Intermediate

Technological development has brought new consensus mechanisms to the blockchain, and Proof-of-Stake is now widely used as an alternative to Proof-of-Work.

How consensus works in a blockchain

Blockchain technology is a distributed, immutable, transparent, secure transaction ledger that does not require trust from any participant. Its decentralisation stems from the fact that any person can become an active contributor to the development, maintenance and security of this huge ledger. 

All these features are possible thanks to a consensus mechanism, i.e. an algorithm that allows all the components of the entire network to agree on the information to be recorded on the blockchain itself. The consensus mechanism is extremely important because even if individuals do not know each other directly, they can rely on the functioning of the infrastructure itself, when normally in a centralised system they would need either intermediaries or a guarantee to exchange value.

The consensus mechanism of a blockchain is encoded into the protocol, and determines the specific processes by which consensus is achieved on that particular network. The processes and mechanics then determine the speed, level of decentralisation, security and scalability of the specific solution.

This is why there are so many different variants of Proof-of-Stake, but we will deal with the most common model that most blockchains refer to.

The birth of Proof-of-Stake

Proof-of-Stake (PoS) was born as an alternative to the much older Proof-of-Work (PoW) with a focus on energy efficiency, as it does not require hardware and computational power to validate transactions and generate new blocks. 

The concept was proposed and imagined in July 2011 on the famous BitcoinTalk forum, so much so that it also caught the interest of Vitalik Buterin and the developers of Ethereum. Initially, although fascinating, the idea of a Proof-of-Stake seemed almost impossible to realise as it was extremely complex due to the still immature technology. The launch of Ethereum in fact took place using the PoW and only in the following years was this newly proposed mechanism actually developed and successfully implemented (by other blockchains). The first technical whitepaper outlining a real Proof-of-Stake solution was published the following year by Sunny King and Scott Nadal.

The proposal on the forum aimed to solve several potential problems:

  • Speed – PoS speeds up transactions validation and therefore increases the scalability of the network
  • Trust – this system could improve the issue of trust among validators by selecting them based on quality
  • The hardware weakness – the idea was to eliminate the hardware needed to perform PoW mining because, as a physical component, it is exposed to potential bans or seizures by authorities and governments
  • Increased democratisation – the aim was for all token holders to be able to actively participate in the development and progress of the project by voting

The core of the whole protocol would be token staking, i.e. users wishing to become validators would have to deposit and bind their tokens in special smart contracts.

How Proof-of-Stake works

The protagonists of this mechanism are not the miners, but the validators. They do not use hardware with high computing power, but simply a network node and tokens that they block as collateral.

When aspiring validators stake their tokens, they send them to a specific address and, with the help of a smart contract, they are ”frozen”.

The choice of validators for a block is based on different criteria according to each protocol. There is usually a randomness factor, but in most cases, the probability of being chosen depends on the amount of cryptocurrency being staked. The way it works is not very different from the drawing of winning tickets in lotteries, the more tickets you have, the higher the probability of being drawn; likewise, the more coins you have in staking, the higher the probability of being chosen for the generation of the next block.

Once the validators have been determined, the generation of the next block takes place, and the validators who are not chosen usually become attestators, i.e. groups of validators who put a “validity stamp” on the new block proposed. The last step is more practical, as the new block can finally be correctly added to the blockchain. The next block will require the same process, so each time the validator will be different.

The stake: an incentive to follow the rules

One of the problems that could potentially plague any blockchain is the famous 51% attack.

This problem can theoretically occur also in PoS blockchains, although it is less likely. To manipulate transaction validation, unlike PoW it is not necessary to have 51% of the computational power but 51% of all tokens in circulation.

To avoid this situation, incentives are provided for everyone to behave as correctly and legitimately as possible. In fact, if someone tried to generate invalid blocks, they would immediately lose the entire amount staked through so-called slashing.

In most cases, the tokens would be burnt, i.e. they would end up in a special wallet of which nobody has the private key, in other words, they would be unusable forever.The whole system of incentives in favour of network security has been conceived and designed with game theory in mind, so that it is more convenient to comply with the rules than to try to circumvent them. This feature is not specific to PoS-based blockchains, but slashing is only effective where the concept of staking exists.

Versions of Proof-of-Stake

Over time, the developers of various projects have tried to adapt the PoS mechanism to the needs of their blockchain, mostly with the aim of making the consensus more scalable and more decentralised. Thus, a number of variants with unique features were created:

  • Delegated Proof-of-Stake (DPoS) – as the acronym implies, users delegate their tokens to “selected” validators, who verify transactions and take care of the creation of new blocks. Blockchains such as Eos.io use this consensus mechanism
  • Liquid Proof-of-Stake (LPoS) – those who do not have enough tokens or resources to become validators can delegate those they have to validators. The particularity of LPoS compared to DPoS is that the delegator does not have to keep the tokens blocked for rewards but can continue to use them. In case of fraud, the delegator does not lose the coins, while the validators to whom the Stake is delegated do. This feature makes the network more democratic because in this way everyone can participate in the network, no matter if you do not reach the minimum number of coins for staking. Tezos (XTZ) is a project using LPoS
  • Pure Proof-of-Stake (PPoS) – designed by the Algorand development team, based on the function invented by Silvio Micali (VRF), this version of the PoS differs in the anonymity of the validators and the high level of randomness and decentralisation. The validation of a single block passes through three different groups of participants, whose privacy is completely protected, while the process is completely verifiable
  • Nominated Proof-of-Stake (NPoS) – delegators (here called Nominators) choose Validators not randomly but according to a reputation criterion. Nominators tend to choose Validators who routinely adopt all safety practices and make positive choices for the network. In order to elect them, Nominators must block their coins, which ensures that Validators are chosen wisely. Polkadot (DOT) uses this type of consensus.

Proof-of-Stake is proposed as one of the solutions to the energy consumption of mining, but in practice it offers further tangible advantages in consensus management on blockchains, due to its greater adaptability to the specific needs and characteristics of individual projects.

Related