• Lawrence Cummins

Proof of Stake (PoS)

Proof of stake (PoS) protocols are a class of consensus mechanisms for blockchains that work by selecting validators in proportion to their stake in the associated cryptocurrency.


For a blockchain transaction to be recognized, it must be appended to the blockchain. Validators carry out this appending; in most protocols, they receive a reward for doing so. For the blockchain to remain secure, it must have a mechanism to prevent a malicious user or group from taking over a majority of validation. PoS accomplishes this by requiring that validators have some quantity of blockchain tokens, requiring potential attackers to acquire a large fraction of the tokens on the blockchain to mount an attack.


What Is Proof of Stake (PoS)

The Proof of Stake (PoS) concept states that a person can mine or validate block transactions according to how many coins they hold. This means that the more coins owned by a miner, the more mining power they have. The Proof of Stake consensus algorithm solve the problems of the current most popular algorithm in use - Proof of Work. While they both share the same goal of reaching consensus in the blockchain, the process to reach the goal is quite different.


Understanding Proof of Stake (PoS)

The proof of stake was created as an alternative to the proof of work (PoW) concept, to tackle inherent issues in the latter. Currently, only altcoins use the proof of stake concept. When a transaction is initiated, the transaction data is fitted into a block with a maximum capacity of 1 megabyte, and then duplicated across multiple computers or nodes on the network. The nodes are the administrative body of the blockchain and verify the legitimacy of the transactions in each block.


How does Proof of Stake (PoS) work

The Proof of Stake algorithm uses a pseudo-random election process to select a node to be the validator of the next block, based on a combination of factors that could include the staking age, randomization, and the node’s wealth.


It is good to note that in Proof of Stake systems, blocks are said to be ‘forged’ rather than mined. Cryptocurrencies using Proof of Stake often start by selling pre-mined coins or they launch with the Proof of Work algorithm and later switch over to Proof of Stake.


Where in Proof of Work-based systems more and more cryptocurrency is created as rewards for miners, the Proof-of-Stake system usually uses transaction fees as a reward. Users who want to participate in the forging process, are required to lock a certain amount of coins into the network as their stake. The size of the stake determines the chances for a node to be selected as the next validator to forge the next block - the bigger the stake, the bigger the chances. In order for the process not to favor only the wealthiest nodes in the network, more unique methods are added into the selection process. The two most commonly used methods are ‘Randomized Block Selection’ and ‘Coin Age Selection’.


In the Randomized Block Selection method, the validators are selected by looking for nodes with a combination of the lowest hash value and the highest stake and since the size of stakes are public, the next forger can usually be predicted by other nodes.


The Coin Age Selection method chooses nodes based on how long their tokens have been staked for. Coin age is calculated by multiplying the number of days the coins have been held as stake by the number of coins that are staked. Once a node has forged a block, their coin age is reset to zero and they must wait a certain period of time to be able to forge another block - this prevents large stake nodes from dominating the blockchain.


Each cryptocurrency using Proof of Stake algorithm has their own set of rules and methods combined for what they think is the best possible combination for them and their users.


When a node gets chosen to forge the next block, it will check if the transactions in the block are valid, signs the block and adds it to the blockchain. As a reward, the node receives the transaction fees that are associated with the transactions in the block.


If a node wants to stop being a forger, its stake along with the earned rewards will be released after a certain period of time, giving the network time to verify that there are no fraudulent blocks added to the blockchain by the node.


Proof of Stake (PoS) Security,


The stake works as a financial motivator for the forger node not to validate or create fraudulent transactions. If the network detects a fraudulent transaction, the forger node will lose a part of its stake and its right to participate as a forger in the future. So as long as the stake is higher than the reward, the validator would lose more coins than it would gain in case of attempting fraud.


In order to effectively control the network and approve fraudulent transactions, a node would have to own a majority stake in the network, also known as the 51% attack. Depending on the value of a cryptocurrency, this would be very impractical as in order to gain control of the network you would need to acquire 51% of the circulating supply.


The main advantages of the Proof of Stake algorithm are energy efficiency and security.

A greater number of users are encouraged to run nodes since it’s easy and affordable. This along with the randomization process also makes the network more decentralized, since mining pools are no longer needed to mine the blocks. And since there is less of a need to release many new coins for a reward, this helps the price of a particular coin stay more stable.


How Proof of Stake Addresses Mining Power


Mining requires a great deal of computing power to run different cryptographic calculations to unlock the computational challenges. The computing power translates into a high amount of electricity and power needed for the proof of work.


It is estimated that one Bitcoin transaction required the amount of electricity needed to power up 1.57 American households per day. That number has only since gone up. According to the University of Cambridge's Bitcoin Electricity Consumption Index, Bitcoin consumers about 119.87 terawatt-hours per year, which is more than countries like the United Arab Emirates and the Netherlands consume annually. To foot the electricity bill, miners would usually sell their awarded coins for fiat money, which would lead to a downward movement in the price of the cryptocurrency.


The proof of stake (PoS) seeks to address this issue by attributing mining power to the proportion of coins held by a miner. This way, instead of utilizing energy to answer PoW puzzles, a PoS miner is limited to mining a percentage of transactions that is reflective of their ownership stake. For instance, a miner who owns 3% of the coins available can theoretically mine only 3% of the blocks.


Risk of Network Attack


Bitcoin uses a PoW system and as such is susceptible to a potential Tragedy of Commons. The Tragedy of Commons refers to a future point in time when there will be fewer bitcoin miners available due to little to no block reward from mining. The only fees that will be earned will come from transaction fees which will also diminish over time as users opt to pay lower fees for their transactions.


With fewer miners than required mining for coins, the network becomes more vulnerable to a 51% attack. A 51% attack is when a miner or mining pool controls 51% of the computational power of the network and creates fraudulent blocks of transactions for themselves while invalidating the transactions of others in the network.


With a PoS, the attacker would need to obtain 51% of the cryptocurrency to carry out a 51% attack. The proof of stake avoids this ‘tragedy’ by making it disadvantageous for a miner with a 51% stake in a cryptocurrency to attack the network. Although it would be difficult and expensive to accumulate 51% of a reputable digital coin, a miner with a 51% stake in the coin would not have it in their best interest to attack a network that they hold a majority share.


If the value of the cryptocurrency falls, this means that the value of their holdings would also fall, and so the majority stake owner would be more incentivized to maintain a secure network.


In addition to Bitcoin, Litecoin (LTC) also uses the PoW method. Nxt (NXT) is an example of a crypto coin that uses the PoS method. Some coins like Peercoin (PPC) use a mixed system where both methods are incorporated. Currently, Ethereum (ETH) is in the process of switching to a PoS system.


What is Proof-of-Stake

As understandable from the name, nodes on a network stake an amount of cryptocurrency to become candidates to validate the new block and earn the fee from it. Then, an algorithm chooses from the pool of candidates the node which will validate the new block. This selection algorithm combines the quantity of stake (amount of cryptocurrency) with other factors (like coin-age based selection, randomization process) to make the selection fair to everyone on the network.


Coin-age based selection

The algorithm tracks the time every validator candidate node stays a validator. The older the node becomes, the higher the chances of it becoming the new validator.


Random Block selection

The validator is chosen with a combination of ‘lowest hash value’ and ‘highest stake’. The node having the best weighted combination of these becomes the new validator.


A typical PoS based mechanism workflow

  1. Nodes make transactions. The PoS algorithm puts all these transactions in a pool.

  2. All the nodes contending to become validator for the next block raise a stake. This stake is combined with other factors like ‘coin-age’ or ‘randomized block selection’ to select the validator.

  3. The validator verifies all the transactions and publishes the block. His stake still remains locked, and the forging reward is also not granted yet. This is so that the nodes on the network can ‘OK’ the new block.

  4. f the block is OK, the validator gets the stake back and the reward too. If the algorithm is using a coin-age based mechanism to select validators, the validator for the current block’s has its coin-age reset to 0. This puts him in a low priority for the next validator election.

  5. If the block is not verified by other nodes on the network, the validator loses its stake and is marked as ‘bad’ by the algorithm. The process again starts from step 1 to forge the new block.

Features


Fixed coins in existence

There is only a finite number of coins that always circulate in the network. There is no existence of bringing new coins into existence(as in by mining in case of bitcoin and other PoW based systems). Note that the network starts with a finite number of coins or ‘initially starts with PoW, then shifts to PoS in some cases. This initiation with PoW is meant to bring coins or cryptocurrency in the network.


Transaction fee as reward to minters/forgers

Every transaction is charged some amount of fee. This is accumulated and given to the entity who forges the new block. Note that if the forged block is found fraudulent, the transaction fee is not rewarded. Moreover, the stake of the validator is also lost which is also known as slashing.


Impracticality of the 51% attack:

To conduct a 51% attack, the attacker will have to own 51% of the total cryptocurrency in the network which is quite expensive. This deems doing the attack too tedious, expensive and not so profitable. There will occur problems when amassing such a share of total cryptocurrency as there might not be so much currency to buy, also that buying more and more coins/value will become more expensive. Also validating wrong transactions will cause the validator to lose its stake, thereby being reward negative.


Advantages of PoS


Energy-efficient:

As all the nodes are not competing against each other to attach a new block to the blockchain, energy is saved. Also, no problem has to be solved( as in case of Proof-of-Work system) thus saving the energy.


Decentralization:

In blockchains like Bitcoin Proof of Work system to achieve distributed consensus), an extra incentive of exponential rewards are in place to join a mining pool leading to a more centralized nature of blockchain. In the case of a Proof-of-Stake based system like Peercoin, rewards are proportional linear to the amount of stake. So, it provides absolutely no extra edge to join a mining pool; thus promoting decentralization.


Security:

A person attempting to attack a network will have to own 51% of the stakes. This leads to a secure network.


Weakness of a PoS mechanism


Large stake validators:

If a group of validator candidates combine and own a significant share of total cryptocurrency, they will have more chances of becoming validators. Increased chances lead to increased selections, which lead to more and more forging reward earning, which lead to owning a huge currency share. This can cause the network to become centralized over time.


New technology

PoS is still relatively new. Research is ongoing to find flaws, fix them and making it viable for a live network with actual currency transactions.


The ‘Nothing at Stake’ problem

This problem describes the little to no disadvantage to the nodes in case they support multiple blockchains in the event of a blockchain split blockchain forking. In the worst-case scenario, every fork will lead to multiple blockchains and validators will work and the nodes in the network will never achieve consensus.


What are Proof-of-Stake coins

Proof-of-Stake (PoS) coins are cryptocurrencies that are secured through staking. Users stake their coins for the chance of adding the next block to the blockchain and earning the associated reward. When staking, users effectively use their cryptocurrency as collateral. If they are found to be promoting invalid transactions, their stake is slashed and they lose a portion of their staked coins. Depending on the specific cryptocurrency, normal users either participate in the consensus themselves or delegate their stake to a staking pool.


What are the benefits of Proof-of-Stake

Cryptocurrencies that use PoS tend to be faster and cheaper to use than their PoW counterparts. In addition, they are much friendlier to the environment, as they consume a much smaller amount of energy than cryptocurrency mining, which is extremely energy-intensive.


What are the downsides of Proof-of-Stake


PoS models have not been battle-tested to the same degree of PoW models, and there are concerns about the long-term security and viability of various PoS designs. Interestingly enough, none of the top 3 cryptocurrencies (Bitcoin, Ethereum and XRP) currently use PoS, even though Ethereum will transition to PoS in the coming years. As existing PoS cryptocurrencies gain value and prominence, their security models will be under more and more pressure – only time will tell if PoS will eventually become the standard for cryptocurrencies moving forward.


Reference:


Investopedia, Binance, Coindesk


Recent Posts

See All