Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
4 views16 pages

Blockchain2 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views16 pages

Blockchain2 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Proof of Work (PoW)

Proof of Work consensus is the mechanism of choice for the majority of


cryptocurrencies currently in circulation.

The algorithm is used to verify the transaction and create a new block in the
blockchain.

The idea for Proof of Work(PoW) was first published in 1993 by Cynthia Dwork
and Moni Naor and was later applied by Satoshi Nakamoto in the Bitcoin paper in
2008.

The term “proof of work” was first used by Markus Jakobsson and Ari Juels in a
publication in 1999.

Cryptocurrencies like Litecoin, and Bitcoin are currently using PoW. Ethereum
was using PoW mechanism, but now shifted to Proof of Stake(PoS).
Purpose of PoW

The purpose of a consensus mechanism is to bring all the nodes in


agreement, that is, trust one another, in an environment where the nodes
don't trust each other.

All the transactions in the new block are then validated and the new block is
then added to the blockchain.

The block will get added to the chain which has the longest block height.

Miners(special computers on the network) perform computation work in


solving a complex mathematical problem to add the block to the network,
hence named, Proof-of-Work.

With time, the mathematical problem becomes more complex.


Features of PoW

There are mainly two features that have contributed to the wide
popularity of this consensus protocol and they are:

It is hard to find a solution to a mathematical problem.

It is easy to verify the correctness of that solution.


How Does PoW Work?
The PoW consensus algorithm involves verifying a transaction through the
mining process.

Mining:
The Proof of Work consensus algorithm involves solving a computationally
challenging puzzle in order to create new blocks in the Bitcoin blockchain.

The process is known as ‘mining’, and the nodes in the network that engages
in mining are known as ‘miners’.

The incentive for mining transactions lies in economic payoffs, where


competing miners are rewarded with 6.25 bitcoins and a small
transaction fee.
This reward will get reduced by half its current value with time.
Energy and Time consumption in Mining

The process of verifying the transactions in the block to be added,


organizing these transactions in chronological order in the block, and
announcing the newly mined block to the entire network does not take
much energy and time.

The energy-consuming part is solving the 'hard mathematical problem'


to link the new block to the last block in the valid blockchain.

When a miner finally finds the right solution, the node broadcasts it to
the whole network at the same time, receiving a cryptocurrency prize
(the reward) provided by the PoW protocol.
Mining reward

Currently, mining a block in the bitcoin network gives the winning miner
6.25 bitcoins.
The amount of bitcoins won halves every four years. So, the next
deduction in the amount of bitcoin was due at around 2024(with the
current rate and growth).
With more miners comes the inevitability of the time it takes to mine the
new block getting shorter.
This means that the new blocks are found faster. In order to
consistently find 1 block every 10 minutes. (That is the amount of time
that the bitcoin developers think is necessary for a steady and
diminishing flow of new coins until the maximum number of 21 million is
reached (expected some time with the current rate in around 2140)),
the Bitcoin network regularly changes the difficulty level of mining a
new block.
Challenges With PoW

The Proof-of-Work consensus mechanism has some issues which


are as follows:

The 51% risk: If a controlling entity owns 51% or more than 51% of
nodes in the network, the entity can corrupt the blockchain by
gaining the majority of the network.

Time-consuming: Miners have to check over many nonce values


to find the right solution to the puzzle that must be solved to mine
the block, which is a time-consuming process.
Challenges With PoW
Resource consumption: Miners consume high amounts of
computing power in order to find the solution to the hard
mathematical puzzle. It leads to a waste of precious
resources(money, energy, space, hardware). It is expected that 0.3%
of the world's electricity will be spent on verifying transactions by the
end of 2028.

Not instantaneous transaction: Transaction confirmation takes


about 10–60 minutes. So, it is not an instantaneous transaction;
because it takes some time to mine the transaction and add it to the
blockchain thus committing the transaction.
Benefits of Proof of Work
1. Unparalleled Security
PoW’s reliance on computational power makes it extremely secure. To manipulate
past transactions, an attacker would need to control over 51% of the network’s total
mining power—a feat that requires enormous financial and hardware resources.

2. Decentralization and Trustlessness


Unlike traditional financial systems where banks and regulators control transactions,
PoW enables a decentralized network where no single entity has control. Anyone
with the necessary computing power can participate in mining, ensuring that
transaction validation remains distributed across the globe.

3. Proven and Tested Mechanism


Bitcoin, the first and most successful cryptocurrency, has relied on PoW since its
inception in 2009. Despite numerous attempts to disrupt it, the network has remained
secure and functional for over a decade, proving PoW’s reliability in real-world
applications.
4. Fair Distribution of Coins

PoW-based mining allows a more democratic way of


distributing cryptocurrency rewards.

5. Protection Against Sybil Attacks

In many decentralized networks, malicious actors can create


multiple fake identities to gain control. PoW prevents this by
making mining resource-intensive, ensuring attackers cannot
generate new identities cheaply or without significant effort.
To address PoW’s inefficiencies, alternative consensus mechanisms have been developed:Proof of Stake (PoS)
Proof of Stake (PoS)
Proof of Stake (PoS) is a type of algorithm that aims to achieve distributed
consensus in a Blockchain.

A stake is value/money we bet on a certain outcome. The process is called staking. A


more particular meaning of stake will be defined later on.

Why Proof-of-Stake: Before proof of stake, the most popular way to achieve
distributed consensus was through Proof-of-Work (implemented in Bitcoin). But
Proof-of-Work is quite energy(electrical energy in mining a bitcoin) intensive.

So, a proof-of-work based consensus mechanism increases an entity's chances of


mining a new block if it has more computation resources. Apart from the upper two
points, there are other weaknesses of a PoW based consensus mechanism which
we will discuss later on.

In such a scenario, a Proof-of-Stake based mechanism holds merit.


What is Proof-of-Stake:

As understandable from the name, nodes on a network stake an amount of


cryptocurrency to become candidates to validate the new block and earn the fee
from it.

Then, an algorithm chooses from the pool of candidates the node which will validate
the new block. This selection algorithm combines the quantity of stake (amount of
cryptocurrency) with other factors (like coin-age based selection, randomization
process) to make the selection fair to everyone on the network.

Coin-age based selection: The algorithm tracks the time every validator
candidate node stays a validator. The older the node becomes, the higher the
chances of it becoming the new validator.

Random Block selection: The validator is chosen with a combination of 'lowest


hash value' and 'highest stake'. The node having the best weighted-combination
of these becomes the new validator.
A typical PoS based mechanism workflow:

1.Nodes make transactions. The PoS algorithm puts all these transactions in
a pool.
2.All the nodes contending to become validator for the next block raise a
stake. This stake is combined with other factors like 'coin-age' or
'randomized block selection' to select the validator.
3.The validator verifies all the transactions and publishes the block. His stake
still remains locked and the forging reward is also not granted yet. This is
so that the nodes on the network can 'OK' the new block.
4.If the block is 'OK'-ed, the validator gets the stake back and the reward
too. If the algorithm is using a coin-age based mechanism to select
validators, the validator for the current block's has its coin-age reset to 0.
This puts him in a low-priority for the next validator election.
5.If the block is not verified by other nodes on the network, the validator
loses its stake and is marked as 'bad' by the algorithm. The process again
starts from step 1 to forge the new block.
Features

Fixed coins in existence: There is only a finite number of coins that always circulate in
the network. There is no existence of bringing new coins into existence(as in by
mining in case of bitcoin and other PoW based systems). Note that the network starts
with a finite number of coins or 'initially starts with PoW, then shifts to PoS' in some
cases. This initiation with PoW is meant to bring coins/cryptocurrency in the network.

Transaction fee as reward to minters/forgers: Every transaction is charged some


amount of fee. This is accumulated and given to the entity who forges the new block.
Note that if the forged block is found fraudulent, the transaction fee is not rewarded.
Moreover, the stake of the validator is also lost(which is also known as slashing).

Impracticality of the 51% attack: To conduct a 51% attack, the attacker will have to
own 51% of the total cryptocurrency in the network which is quite expensive. This
deems doing the attack too tedious, expensive and not so profitable. Also validating
wrong transactions will cause the validator to lose its stake, thereby being reward-
negative.
Advantages of PoS

Energy-efficient: As all the nodes are not competing against each other to
attach a new block to the blockchain, energy is saved. Also, no problem has
to be solved( as in case of Proof-of-Work system) thus saving the energy.

Decentralization: In blockchains like Bitcoin(Proof of Work system to


achieve distributed consensus), an extra incentive of exponential rewards
are in place to join a mining pool leading to a more centralized nature of
blockchain. In the case of a Proof-of-Stake based system(like Peercoin),
rewards are proportional(linear) to the amount of stake. So, it provides
absolutely no extra edge to join a mining pool; thus promoting
decentralization.

Security: A person attempting to attack a network will have to own 51% of


the stakes(pretty expensive). This leads to a secure network.

You might also like