consensus algorithm is a mechanism that manages which participants in the
network get to set the state of truth that everyone else follows and agrees on. In
reference to how secure the agreement is, the algorithm applications include:
Determining whether a database can execute a decentralized transaction.
Designating a supervisor for A decentralized task. Coordinating and maintaining
consistency amongst duplicates of automata. Some of the popular consensus
algorithms are Proof-of-Work (PoW), Proof-of-Stake (PoS), Proof-of-Activity
(PoA), Proof of Vote (PoV), Proof of ElapsedTime (PoET), Proof-of-Importance
(PoI), Proof-of-Capacity (PoC), Proof-of-Burn (PoB). This paper will primarily
focus on PoW, PoS, PoA, and PoV.
PoW Proof of Work, in short PoW, was first developed in 1993 [1] to avoid denial-
of-service assaults and misuse of other services. [20] The goal of a connection
depletion attack is to overwhelm a server's resources and prevent it from
responding to valid queries by submitting a significant amount of connection (or
service) requests that are left unanswered. In the year 2009 [2,8], Bitcoin pioneered
a revolutionary use of proof-of-work as a consensus mechanism, broadcasting new
blocks to the blockchain and validating transactions. It then attracted attention and
is now a frequent consensus algorithm in several cryptocurrencies. Bitcoin is a
blockchain-based architecture that is supported by decentralized nodes working
together. The miners among all these nodes oversee bringing additional blocks to
the blockchain. Miners must attempt to guess a fictitious random number to
accomplish this. The above number must generate a result that meets the
requirements when concatenated with the block's data and runs through a hashing
algorithm. When a relationship has been established, some other nodes will
validate the effectiveness of the detection, and the mining node will receive a new
block incentive. As a result, finding a valid nonce [nonce is a random 32-bit
number that miners use as a base for their hash calculations] is a prerequisite for
adding a block to the main chain. [3,8] This nonce provides the solutions to a
particular block known as BLOCK-HASH. [9] It is named proof-of-work because
each authenticated block contains a block hash that symbolizes the miner's labor.
Proof-of-work helps defend the network against a variety of intrusions. [21] One
problem with proof-of-work is that it necessitates expensive computer machinery
that uses a lot of power, and while complex algorithm computations ensure
network security, they cannot be used for anything else. Even though proof-of-
work would not be the most effective approach, it is nevertheless one of the most
widely used techniques for achieving consensus in blockchains. Alternative
approaches and methodologies are being used to address the issues. However, time
will only tell which solution will replace the proof-of-work strategy.
How Does Proof of Work function?
Suppose there is a transaction that needs to be added to the blockchain. This
transaction will go into a pool of unconfirmed transactions called a mempool.
Then, miners will pick up this transaction from the mempool and start working on
it. They do this by using their computing power to solve complex mathematical
problems.
The mathematical problem that is being referred to here is a hash. Since there is no
way to reverse engineer a hash algorithmically, the only way to go about doing so
is through a trial and error method.
Hence, the greater the processing power of the mining computer, the greater the
likelihood of getting to the solution first.
The first miner who solves the problem adds the block of transactions to the
blockchain and thus earns their block reward. The other miners then verify that the
solution is correct and start working on the next block of new transactions.
PoS The Proof-of-stake method was first proposed in 2011 by an unknown user by
the username Quantummechanic on the bitcointalk site [30]. The fundamental idea
is that it serves no use to allow people to compete with one another in mining.
Therefore, Proof-of-Stake employs an election procedure in which one node is
selected at random to validate the following block. However, there is a subtle
change in terminology: Proof-of-Stake uses "validators" instead of miners, [1,36]
and new blocks are "minted" or "forged" rather than mined. The selection of
validators is not entirely random. A node must stake a particular amount of coins
into the network to become a validator. One may consider this to be a security
deposit. The stake size determines the likelihood that a validator will be selected to
forge the next block. Rich individuals can benefit from the strength of economies
of scale with PoW. The cost of their electricity and mining equipment does not
increase linearly; rather, the more they purchase, the better pricing they can obtain.
But returning to PoS, if a validator is selected to forge the following block, he will
determine whether all of the transactions included therein are, in fact, valid. The
costs connected with each transaction in this block go back to the validator as a
[Link] they nonetheless allow fraudulent transactions, validators will lose a
portion of their investment [2,36]. A validator can be relied on to perform their
duties effectively as long as the stakes are higher than what they stand to gain from
transaction fees. Otherwise, they will lose incentives instead of making it. It
functions as a financial motivator and endures so long as the stake exceeds the total
of all transaction fees. After a predetermined amount of time, if one node ceases to
be a validator, his stake as well as all transaction fees received will be removed.
Since Proof-of-Stake prevents everyone from mining for new blocks, it consumes
far less energy [1,14]. Moreover, it is more decentralized. "Mining pools" are a
prospect that exists within the proof-of-work protocol. The pool refers to the
individuals that are working together to raise their chances of mining a new block
and thus obtaining rewards. However, these pools now have control over a sizable
piece of the Bitcoin blockchain. They concentrate on the mining process, which is
risky. The network would have had a majority share and could have started
authorizing fake transactions if the three largest mining pools had united. PoS
encourages more users to set up a node because no expensive mining equipment is
required, which increases the network's decentralization and security. But even
PoS has several drawbacks and is far from being a flawless [Link]
who purchases the majority of the network's shares will be able to effectively rule
it and sanction fraudulent transactions. The 51% attacks, as it is known, were
initially cited as a flaw in the Proof-of-Work method. If a single miner or group of
miners can gather 51% of the hash power, they can effectively take over the
Blockchain. On the other hand, Proof-of-Stake makes this approach exceedingly
impractical because it depends on the value of a coin. If bitcoin were changed to
PoS, it would cost an astounding amount of money to own 51% of all coins.
Therefore, Proof-of-Stake reduces the likelihood of a 51% attack. The process
through which PoS mechanisms choose the subsequent validators must be heedful.
Since the stake size must be taken into account, it cannot be chosen at random.
However, the stake alone is insufficient because it will favor wealthy individuals,
who will be selected more frequently, receive more incentives and become
wealthier, increasing their chances of being selected as validators even further.
There are several solutions to the coin age selection problem. Another potential
issue is when the network selects the following validator but he fails to show up to
perform his duties. By selecting a large number of backup validators as a fallback,
this might be readily resolved. When compared to PoW, Proof-of-Stake entails
more hazards, and much research is required to comprehend these dangers and
mitigate [Link], Lisk, and Nxt are a few examples of coins that use Proof-
of-Stake, but more are expected 49 Volume 9 (2023), Issue 3 Blockchain: A
Comparative Study of Consensus Algorithms PoW, PoS, PoA, PoV to follow in
the future. For instance, the "Casper" Proof-of-Stake system is being implemented.
Casper is a consensus mechanism in which the PoW/PoS collaborate [3,36]. It is
actively being developed and is now available on the Ethereum test net.
Additionally, the Ouroboros Proof-of-Stake is being developed to preserve the fair
leader election process that guarantees the security of the protocol [37].
How Does Proof of Stake function?
Once you stake the minimum required amount of cryptocurrency on-chain, you are
eligible to validate transactions.
The validators are chosen randomly to validate the next block of transactions. The
more Proof of Stake cryptocurrency you stake (such as ETH), the greater your
chances of being chosen as a validator.
Once a validator has been chosen, they validate the block of transactions and add it
to the blockchain. They are then rewarded with cryptocurrency for their efforts.
Since a single validator produces blocks, how does the network ensure that the
validator does not engage in nefarious activity for personal benefit?
Validators participate in consensus by staking tokens on the crypto network
This is where the concept of “slashing” comes in. Slashing is when a validator's
stake is taken away as a punishment for engaging in malicious behavior.
For instance, if a validator tries to validate two different blocks at the same time,
they will be caught and their stake will be slashed. This serves as a disincentive for
validators to cheat PoS systems.
Limitations of Proof of Work
Proof of Work was invented by Cynthia Dwork and Moni Naor in 1993 as a way to
prevent DDoS (Distributed Denial of Service) attacks. It was only later that it was
adapted for use as a cryptocurrency consensus mechanism.
Since it's a legacy consensus model, it has its fair share of shortcomings that need
to be overcome in order to address the blockchain trilemma of decentralization,
scalability, and security.
Energy-intensive
Proof of Work is very energy-intensive. This is not just because miners need to run
powerful computers to validate transactions for the block rewards, but also because
all miners have to run for all transactions even though only one of them is
rewarded.
This renders a great amount of energy waste and also leaves a significant carbon
footprint.
For example, Bitcoin alone consumes about 110 Terra-Watt hours of energy per
year, which is more than the annual power consumption of countries like Finland,
Norway, and Bangladesh. Some estimates even put this figure at up to 150 Terra-
Watt hours per year, as much energy consumption as the entire country of
Argentina.
Low throughput
The Proof of Work system also suffers from low transaction throughput. This is
because the time it takes to mine a new block and add it to the blockchain is fixed.
For Bitcoin, this time is roughly fixed at 10 minutes. This means that the network
can only process a maximum of 7 transactions per second. In comparison, Visa
processes about 1,700 transactions per second (with some figures estimated at up
to 65,000 transactions per second).
Expensive
Another drawback of Proof of Work blockchains is that they require high
computational power to participate in the mining process. This creates a barrier to
entry for most people and also centralizes power among those who can afford
expensive computers capable of delivering such power.
The high cost of entry also leads to the centralization of power among miners,
which goes against the decentralized nature of blockchain technology.
Limitations of Proof of Stake
Scott Nadal and Sunny King are the two developers who invented Proof of Stake.
According to them, the Proof of Work consensus mechanism used by the Bitcoin
network and its forks are detrimental to the environment and present scalability
issues that would hinder the mass adoption of cryptocurrency as a payment system.
Proof of Stake was therefore developed to be more energy-efficient and overcome
the obvious challenges posed by Proof of Work.
But Proof of Stake also has limitations.
“Nothing at stake” problem
The “nothing at stake” problem is a challenge inherent in Proof of Stake where an
attacker can easily fork the blockchain and create two different versions of the
truth. This is because there is no incentive for validators to stay loyal to one chain
as they can verify transactions on both chains and get rewards from both.
The nothing at stake problem was first proposed by Ethereum co-founder Vitalik
Buterin in 2014 and is still a challenge that needs to be addressed by developers.
High stake requirement
Another limitation of Proof of Stake is that it requires validators to have a high
stake in the network. This is because validators would only be motivated to act in
the best interest of the network if they have a lot to lose.
While this may seem like a good thing, it actually centralizes power among those
who can afford to buy a lot of tokens.
For instance, to become a validator on the Ethereum 2.0 network, you would need
to stake a minimum of 32 ETH. This is a large sum for the average investor and
tech enthusiast.
Less secure
The Proof of Stake consensus algorithm is also more vulnerable to 51% attacks.
This is because it would only require an attacker to control more than 50% of the
stake in the network to fork the blockchain.
In essence, a “whale”, or somebody with enough capital to have a noticeable
impact on the market through large trades, can potentially become a validator and
have a significantly greater influence on verifying transactions.