Introduction
Proof-of-stake is a contentious consensus protocol in the blockchain. After uncovering all of the flaws in Satoshi Nakamoto's proof-of-work implementation in Bitcoin, blockchain behemoths like Ethereum decided to switch to proof-of-stake. Furthermore, extensive research is being conducted to integrate the PoS consensus method on the Ethereum blockchain.
Proof-of-Stake (PoS) is an additional consensus technique (PoW). Keeping a decentralised network synced requires a consensus process. In plain terms, it's a situation in which the majority of network users consent to the upcoming change in the network.
There must be set protocols for the entire network to agree upon in order to keep the decentralised network in alignment. The network's participants must agree on the modifications to be made, and if there appears to be a discrepancy, the change should self-correct.
![Decenteralized network]()
What is Proof-of-Stake (PoS) in blockchain?
Proof-of-stake gets around proof-of-drawbacks, works such as excessive power and energy usage. In the case of proof-of-work, each miner must do a difficult mathematical calculation, and ultimately, only one miner is chosen. The amount of computing and energy resources wasted as a result of doing things this way is enormous.
Proof-of-stake (PoS) therefore stakes some coins early, in contrast to PoW. Consequently, some of the coins belonging to the participants (or validators) must be staked. They will forfeit their stake if it turns out that the block they are trying to create in the network contains fraudulent transactions. If not, they will receive the coins they staked.
Note
Proof-of-stake is a technique that allows network users to add additional blocks of transactions. The goal is to avoid having to pay for mining a new block from scratch every time the network grows.
In addition, we have validators for proof-of-stake. In essence, validators are network users that want to add their block of transactions. To guarantee their choices, they must stake some of their coins in the escrow account.
As a result, several validators have been chosen. Random selection determines which of them will have the opportunity to add their blocks. First, via attesting, other validators determine whether the block of the selected validator is valid or not. He receives the award if it is deemed valid. If not, he forfeits his stake.
Let's first thoroughly understand the operation of Proof-of-stake and the validation process.
How does the Proof-of-Stake Algorithm work?
We now understand the following points,
- Blocks in the PoS protocol are forged rather than mined.
- Here, the already-added network participants may take part in order to add or fabricate a new block of transactions. They may also be known as validators.
- A percentage of the coins that validators receive must be given away or temporarily locked up as a stake in the escrow account.
- Based on their stakes, one of the validators' blocks was chosen at random.
- Other validators will check and vouch for the chosen block.
- Consider a block that has been endorsed as legitimate by every validator. The block grows the blockchain network, and the person who verified it gets paid.
- Otherwise, it will be marked as invalid and the participant would forfeit the coins they staked if it is fraudulent or causes any discrepancy.
Let’s take an example of the above steps using a diagram.
![Proof-of-Stake in Blockchain]()
However, the above process raises a few questions. Such as,
Why would validators certify to another block if their blocks are not chosen?
So, if any network user registered as a validator, they must take part in the validation procedure. If not, they will forfeit some of the coins they staked as a penalty for the validator's lack of understanding of the procedure. Additionally, this is known as "slashing the validator."
How does one of the validators gets selected?
The number of coins staked or the length of time a validator has been staking are only two examples of the many criteria available to choose between participating validators. They are dependable and trustworthy, as evidenced by these limits. A random function may also be used occasionally to choose participants, ensuring that each person has an equal chance.
Is proof of stake a viable option for a first consensus mechanism?
It's not right now. PoS are useful once a significant number of participants have been recruited. Therefore, it cannot be too early because doing so increases the possibility of a 51% attack by participants in a dominating network. One can begin with a Proof-of-work (PoW) consensus mechanism before switching to PoS, as Ethereum is doing.
This brings us to our next section: proof-of-work VS proof-of-stake.
Proof of Work VS Proof of Stake
![Proof-of-Stake in Blockchain]()
Delegated Proof of Stake (DPoS)
Delegated proof of stake (DPoS) system, a recent advancement in the proof of stake concept, must be mentioned. Validators are chosen through an election mechanism in the delegated PoS process. Here, other network users can vote for the validators they prefer. A network participant's whole number of tokens can cast the same number of votes for validator nominations. Additionally, validators have the ability to create and approve new blocks that are added to the network.
In a nutshell, it's an extra layer of the PoS process that gives network users (or delegates) the ability to elect the validators through voting.
![Proof-of-Stake in Blockchain]()
Conclusion
The proof of stake (PoS) consensus mechanism is covered in full in the aforementioned article. It includes an example, several questions, and a full explanation of how PoS functions. Additionally, a table of comparisons between proof-of-stake (PoS) and proof-of-work (PoW) consensus algorithms is included. The Delegated Proof-of-Stake Mechanism is finally highlighted.