Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

blockchain
web3

What is proof of stake?

Chizurum Ibeawuchi

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Overview

Blockchain, being among the rapidly evolving decentralized technology, seeks the means to secure its network while maintaining consistency across the network without the need for a central authority. One of the ways blockchain achieves this is through the use of a consensus mechanism.

The transactions stored in a block must be verified, validated, and completed before the block can be added to the blockchain of a specific network. The majority of peers on the network verify the validity of these transactions before adding them to the blockchain.

In proof of stake, these majority peers are called validators and are selected based on the amount of crypto they staked (contributed). The validator with the highest stake is selected, and rewarded after verifying the block of transaction and adding it to the blockchain. Examples of blockchains that use proof of stake include Ethereum, Solana, Tezos, etc. Alternatively, in proof of work (where the majority of peers are called miners), the network requires a lot of computing power as the miners are in a constant effort to be the first to verify a transaction stored in the block, and then add it to the blockchain.

The network rewards the first miner to verify a block and add it to the blockchain with a predetermined amount of the network’s coin. The major examples of blockchains that use proof of work are Bitcoin and Ethereum.

What is proof of stake?

Proof of stakeProof of stake

Proof of stake is the latest consensus mechanism developed to ensure that data saved on the blockchain network is valid while providing low computational power. Proof of stake was developed in 2012 to improve the already existing consensus mechanism, proof of work. Proof of stake solves the problem of dependency on complex mathematical puzzles to verify and validate a block.

For the network to run smoothly, the proof of stake system requires the network participants to spend coins and dedicate financial resources. To earn rewards, a network participant stakes a certain amount of the network's native coin. Participants who stake their coins to earn rewards have a vested interest in the network's long-term viability.

Note: In a nutshell, proof of stake is a consensus mechanism for securing a blockchain network in which network participants, known as validators, are chosen based on the amount of the network’s native coin they staked to verify, validate, and update the blockchain.

How does proof of stake work?

Proof of stake works to efficiently secure the blockchain network by reducing the computational power and hardware requirements of the network, as well as lowering the barriers to entry as a network participant (validator).

Proof of stake processProof of stake process

The participant joins an activation queue after staking the coin. After activation, the participant becomes a validator and receives new blocks from network peers. The staked amount of the network’s native coin determines the validity of the validator as the next block producer. This means that the more money you stake, the more likely you are to receive a validating block, and vice versa.

When a validator successfully validates a block and adds it to the blockchain, the validator is rewarded with a certain amount of coin based on the smart contract's terms. However, if a validator is observed and found to have approved (validated) a fraudulent transaction or an invalid block of the transaction, the validator will lose his staked coins. Furthermore, if validators engage in malicious behavior, they may lose their stake as punishment.

Network participants can also choose to validate a block by joining a staking pool run by another validator and earning rewards from the pool.

Aside from the amount staked, other determining factors are used to ensure that the power to validate a block is not only in the hands of the wealthiest validators. Among the many, determining factors are, the length of time a validator staked a coin and pure randomization.

Why do we need proof of stake?

Proof of stake arises from the need to reduce the energy consumption of the network hence, developing a more efficient and effective way to secure the blockchain network.

Proof of stake comes with several improvements which include:

  1. Low energy requirement: Proof of stake eliminates the complex computational work required in verifying and validating a transaction. The energy efficiency provided by proof of stake allows for greater network scalability.
  2. High Speed: Speed is an essential element when it comes to operations such as payment.  On the blockchain network, the proof of stake protocol allows for extremely fast transactions. For example, The Ethereum network using proof of stake (Ethereum 2.0) processes 100,000 transactions every second, unlike Ethereum 1.0 which uses the proof of work protocol, which processes 30 transactions every second.
  3. Lower the barriers to entry as a validator: Proof of stake lowers the barriers for network participants to become validators. An investor, for example, can easily become a validator based on their crypto stake with a moderate level of technical knowledge and no sophisticated computer systems required.
  4. Hardware requirements are minimal: Validators are given the ability to validate transactions based on their stake in the network's native coin. As a result, a validator does not need to have sophisticated computer systems or other hardware to validate a transaction.
  5. High accuracy of data: The proof of stake protocol provides very accurate data to the network. This is because if a validator makes a mistake when updating the blockchain, he loses his entire stake. As a result, validators ensure that all blocks are correctly validated before being updated on the blockchain network.

Final Remarks

Some blockchains are embracing proof of stake as a new consensus mechanism. It may take time to deploy the proof of stake protocol in blockchains that existed before the development of proof of stake. However, the ease with which network participants can become a validator makes the network less safe. As a result, there is a need to improve capability so that, while the network consumes less energy, it is nevertheless safe.

RELATED TAGS

blockchain
web3

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring