Proof Of Stake
Last updated
Last updated
Proof of Stake (PoS) is a consensus mechanism used in blockchain networks to validate transactions and add new blocks to the chain. Unlike Proof of Work (PoW), which relies on computational power to solve complex mathematical problems, PoS relies on validators who hold and lock up a certain amount of cryptocurrency as a stake. This mechanism offers several advantages, including energy efficiency, security, and scalability.
In a PoS system, validators are chosen to create new blocks and validate transactions based on the number of tokens they hold and are willing to "stake" as collateral. The higher the stake, the greater the chances of being selected as a validator. This selection process is designed to be random, ensuring fairness and security within the network.
To understand the Proof of Stake (PoS) concept better, let's imagine a simple example involving two friends, Tom and Jane.
Imagine Tom and Jane both want to participate in the PoS system of a new blockchain network called Arcturus. To do this, they need to lock up some of their Arcturus tokens as a stake. The more tokens they lock up, the higher their chances of being selected to validate transactions and create new blocks.
Tom and Jane's Stakes
Tom decides to lock up 100 Arcturus tokens, while Jane locks up 200 tokens. Since Jane has more tokens at stake, she has a higher probability of being chosen as a validator compared to Tom. However, the selection process is still random, meaning Tom can also be selected, just with a lower probability.
Let's see how the validator selection works step-by-step:
Stake Holding: Both Tom and Jane lock up their tokens. These tokens are held as a stake, which acts as a security deposit to ensure they act honestly.
Random Selection: The PoS algorithm randomly selects one of them to validate the next set of transactions and create a new block. While Jane has a higher chance due to her larger stake, Tom can also be selected.
Validation and Block Creation: Suppose Jane is selected. She will then validate the transactions, ensuring they are legitimate and follow the network's rules. Once validated, she creates a new block and adds it to the blockchain.
Reward Distribution: After successfully adding a block, Jane receives a reward. This reward includes transaction fees from the transactions in the block and possibly some newly minted Arcturus tokens.
PoS is designed to be resistant to various attacks, including the 51% attack. In PoS, acquiring 51% of the total stake is significantly more challenging and costly than acquiring 51% of computational power in PoW.
Economic Incentives: Both Tom and Jane have a strong incentive to act honestly because if they try to cheat, they risk losing their staked tokens.
Decentralization: The random selection process helps maintain decentralization by preventing any single participant from always being chosen.
Slashing Mechanism: If Jane or Tom act maliciously, they can be penalized by losing some or all of their staked tokens, a process known as slashing.
To understand PoS in detail, let’s delve into the mathematical formulas that govern the mechanism.
Where:
Stake Adjustment: After each round of block creation, the stakes are adjusted. If a validator misbehaves or fails to validate transactions correctly, their stake can be slashed (partially forfeited). This mechanism ensures that validators act in the network's best interest.
Where:
Probability of Selection: The probability of a validator being selected is proportional to the amount of stake they hold relative to the total stake .
Here, is the stake of validator , and is the total amount of staked tokens in the network.
Reward Calculation: The reward for creating a new block can be calculated based on the transaction fees included in the block and the block reward .
is the sum of transaction fees.
is the block reward issued by the network.
The adjusted stake can be calculated as:
is the original stake.
is the amount deducted for misbehavior.