Proof-of-stake is a consensus mechanism which randomly selects a subset of participating users to create each new block. This is significantly more energy efficient than proof-of-work, and removes barriers for widespread user participation in the consensus process.
Proof-of-Work: an unsustainable consensus mechanism.
Early blockchains were built on a consensus mechanism called proof-of-work (POW). To create new blocks under a proof-of-work model, users use their computing power to compete against each other to solve increasingly complex computer problems. The first computer to solve each problem is to create a new block and receives newly minted cryptocurrency tokens and or transaction fees as a reward. This process is called “mining.” Because there are a large number of users competing with their computing power, the proof-of-work model is energy-intensive. The bitcoin network is often claimed to consume more energy than entire nations such as Austria or New Zealand. Because problems are increasingly complex, the computing power requirements of mining will exceed that on consumer-grade hardware as blockchains mature, creating barriers to participation.
The proof-of-stake (POS) algorithm uses a pseudo-random selection method to select a node to validate the next block and receive rewards. While the POS algorithm has a random component, several factors weigh into the selection algorithm factors, including the staking age, randomization, and the size of the stake.
In a POS system, blocks are forged/minted rather than mined. With a proof-of-work (POW) system, a miner receives a block reward, while stakers receive transaction fees. When a node is chosen to forge the next block, it will check if the transactions in the block are valid, sign the block, and add it to the blockchain. As a reward, the node will receive the transaction fees associated with the transactions inside the block.
While each blockchain using proof-of-Stake has its own specific rules and mechanisms, the principles remain the same.
What is Staking?
Users who want to participate in the process of forging new blocks must stake their tokens. Staking is a process where tokens are locked into the blockchain. A user’s stake and any earned rewards can be withdrawn only after a certain period of time, giving the network time to verify that there are no fraudulent blocks. If a user’s node was to submit a fraudulent block to be forged, they will lose their tokens which are locked in the blockchain. As long as the stake is higher than the reward, forgers stand to lose more tokens than they stand to gain in the event of attempted fraud. This serves as a disincentive to fraud.
Staking more tokens dramatically increases the chance of a user being selected to forge new blocks. Users can delegate their tokens to a stake pool in order to pool resources with other users and increase the probability of being selected to create new blocks. When a node is selected to mint a new block, rewards will be split proportionally between all users who have delegated their stake to the given node.
Keeping Proof-of-Stake Fair
The number of tokens staked determines the probability of a node being selected to create the next block. The more tokens staked, the greater the chances of being selected. This creates an unfair advantage for wealthy nodes. To avoid favouring the wealthiest nodes, mechanisms are added to the selection process to create a more even playing field. Two common mechanisms are “Block Randomized Selection” and “Coin Age Selection.”
Randomized Selection: In the Randomized Selection method, the validators are selected by looking for nodes with a combination of the lowest hash value and the highest stake. Since the size of the stake is public, the next forger can usually be predicted by other nodes.
Coin Age: In the Coin Age Selection method, nodes are chosen based on how long their tokens have been staked for. Coin age is calculated by multiplying the number of days the coins have been staked by the number of coins staked. Once a node has forged a block, the coin age is set to zero and must wait a certain period of time before forging another block. This prevents large staked nodes from dominating the blockchain.
Staking by nature disincentives fraud by requiring forgers to stake their tokens in order to participate. In the event of attempted fraud, forgers stand to lose more than they stand to gain. Even if a forger was to attempt fraud, the probability of them succeeding approaches statistical impossibility.
To effectively control the network and the approval of fraudulent transactions, a node would require a majority stake in the network, also known as a 51% attack. This means that to take control of a system, a user would need to purchase half tokens in circulation. Depending on the value of a cryptocurrency, this would be impractical, to say the least.
Proof-of-stake (POS) has significant benefits for blockchains over a proof-of-work model. POS is energy efficient because it requires only a randomly selected subset of the participating user group to contribute computing power. Fraud is disincentivized by locking tokens through staking, and a 51% attack is statistical improbable making POS secure. Lastly because staking is easy and affordable, a larger user group is encouraged to participate. User participation, sustainability, and security are cornerstones of the decentralised movement making POS an ideal consensus mechanism for blockchain.