What is Consensus Algorithm?
A consensus algorithm is like Bitcoin’s PoW (Proof-of-Work), which requires miners to solve complex cryptographic mathematical puzzles for which they get rewarded with certain amount of Bitcoins. The type of mechanism to be used depends on the type of network. Let’s discuss few of the mechanisms.
Proof of Work (PoW)
PoW is currently the most common and one of the most robust consensus mechanism for blockchain technology. The miner has to solve mathematically complex puzzles on the new block before approving the block to the ledger. The PoW method defines that the nodes must adopt the fork which carries work, and it is very unlikely that the two competing forks will generate the next block together.
PoW was implemented as a core component of the Bitcoin codes, responsible for generating new blocks and maintaining the network secure (through the process of mining). Bitcoin was proposed as an alternative to the traditional global monetary system, which is centralized and inefficient. PoW introduced a viable consensus protocol that made money transmittance headed by a central authority unnecessary.
PoS is a substitute approach for PoW which requires fewer CPU computations for mining. As in case of PoW, a miner is rewarded by resolving mathematical problems and creating new blocks, in Proof-of- Stake, the creator of a new block is chosen in a deterministic way, depending on its wealth, also defined as stake. This means that in the PoS mechanism, there is no block reward. So, the miners take the transaction fees.
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.
Delegated Proof of Stakes(DPoS)
Delegated Proof of Stake (DPoS) is a popular evolution of the PoS mechanism, here users of the network vote and elect delegates to validate the next block. Delegates are also called witnesses or block producers. Using DPoS, you can vote on delegates by pooling your tokens into a staking pool and linking those to a particular delegate. You do not physically transfer your tokens to another wallet, but instead utilize a staking service provider to stake your tokens in a staking pool.
With DPoS blockchain consensus protocols, coin holders use their coin balances to elect delegates, called witnesses. These witnesses have the opportunity to stake blocks of new transactions and add them to the blockchain. Those who have more coins or tokens will have a greater impact on the network that those with fewer.