Proof of work Vs Proof of stake

in #blockchain3 years ago
Authored by @RobHive

image.png

Abstract:

This blog will be discussing the proof of work (POW) and proof of stake (POS) consensus algorithms when used in conjunction with Blockchain technology. The factors that differentiate these two algorithms and why are they used. The type of computer hardware that is needed for both POW and POS. Discussing Hash puzzles and the reasons why some blockchains are moving to the POS algorithm.

image.png

Introduction:

Previous blogs have discussed and explained what Blockchain technology is and the basics of how a Blockchain works. The main factors when understanding a Blockchain is that it is a decentralized data source that is open for anyone on the network to view (opensource). Whereby digital information can be written into a blockchain and once that information has been written it cannot be removed or modified due to the cascading domino effect that it would have on all of the other previous blocks. Once a block has been filled with data a new block must be added and chained to the previous old block to carry on the cycle. For a new block to be added to the chain there needs to be a consensus algorithm used, something that the whole community agrees on. That algorithm can either be POW or POS, although other algorithms are currently being investigated to further the use cases of Blockchain technology.

image.png

What is a computer algorithm?

An algorithm can be described as a set of rules or sequences that a computer program reads and carries out to complete a given task. When a computer is reading an algorithm it could read as follows:

• When “X” has been completed, “X” then goes on to complete “Y”.
• Then when “Y” has been completed, “Y” go on to complete “W”.

image.png

Proof of work:

The proof of work (POW) consensus algorithm was discussed within Satoshi Nakamoto’s white paper published in 2008 and was applied to the first-ever Blockchain. Although the first idea for POW algorithms was published in 1993 by Cynthia Dwork (A computer scientist from Harvard University) within her white paper it was only discussed as a potential tool to prevent fraud. Now the POS algorithm has been widely adopted by Blockchains for the purposes of mining cryptocurrency.

When the POW algorithm is applied to a Blockchain it is the process of completing two actions using high-performance computer hardware. The first action is constantly validating and securing a blockchain network by working as a node. A node can be any computer that is tasked with validating the transactions that take place on a Blockchain. The second action is to solve complex computerised math problems known as “hash puzzles” with the intent of creating a new block to add to the chain.

To solve these hash puzzles a huge amount of computer processing power is needed. The type of computer hardware is given the name “a mining rig” and there are currently thousands of these mining rigs located around the world in operation today.

Mining rigs are run and operated by people who refer to themselves as “miners”. Their mining rigs are constantly analysing transactions that take place on a POW Blockchain and are competing with other mining rigs to be the first to create the next block to add to the chain. Once a block is full of transactional data and a new block needs to be added to carry on the process the mining rigs are then tasked with solving the computational hash puzzles.
It is when solving these hash puzzles where the huge amounts of computer processing power come into play as it is using brute force to go through every single possible combination to solve the hash puzzle the quickest, this type of approach is the “proof of work” algorithm because the mining rig has to show evidence that it has completed a form of “work” in solving the hash puzzle. As a reward for their “work”, the miners are given the native token (a cryptocurrency) associated with that particular blockchain that they are mining (a block reward) which holds real-world value.

Advantages of Proof of work:

The main advantage of the POW algorithm is that it makes a Blockchain very secure. Using POW means that it is extremely difficult (but not impossible) for an external hacker to take control of a Blockchain that is using a POW algorithm. The algorithm also prevents the “double-spend” problem whereby a person on the network could spend their holdings more than once as all of the nodes on the network would not allow the same transaction to pass by more than once.

image.png

Disadvantages of proof of work:

Due to these mining rigs having to solve complex maths problems a significant amount of electricity is needed to operate the rigs 24/7. Environmental groups are now expressing their concerns about the large amounts of electricity POW algorithm are utilising. A study conducted by Cambridge University in 2020 found that POW algorithms account for 0.40% of the world’s total electricity consumption and that if this type of algorithm was a country then it would consume the total electricity supply of the Czech Republic or Colombia.
Some Blockchains that still use POW algorithms also go through a process called the “halving process” every 4 years. This means that the block rewards given to the miners get halved in amounts thus increasing the need for more electricity and the need for yet even more high-performance computers to give them the faster hash rates (the speed at which a miner can complete the hash puzzle) to break even with profits.
People who live in countries where the cost of electricity is high or is inaccessible are put at a clear disadvantage as it would not be profitable for them to run their own mining rig.
There is also the possibility of a 51% hack attack on a POW algorithm whereby a hacker takes control of more than 50% of the available nodes which has been responsible for disabling smaller Blockchains in the past and causing the native token associated with that Blockchain to plummet in value.
As more miners upgrade their hardware to compete with the next available block creation it also makes the POW algorithm less and less decentralized and more centralized to whoever has the mining rig with the fastest hash rates which starts to defeat the original purpose of a Blockchain being decentralized.

image.png

Proof of stake:

The proof of stake (POS) algorithm was created in 2012 and is very different to that of the Proof of Work (POW) algorithm. POS was invented to address the current problems facing POW. Instead of having centralized mining rigs that create new blocks and add them to a chain POS works by using a random selection process by selecting the nodes already on the network to become a validator of the next block. This new algorithm means that there is now no need for expensive mining rigs to create and add new blocks.

This random selection process is based on a combination of factors such as:
• The number of native tokens already stored within the node.
• The age of the node and how long have the tokens been held within the node.

Advantages of Proof of stake:

The most notable advantage of POS is how much more energy-efficient it is when compared to POW as there is now no need for energy-demanding mining rigs. Using POS on a modern home computer that is on the network can act as a node that is validating the blockchain. Using this new algorithm makes this Blockchain much more decentralized as mining rigs are now no longer the only ones who can add a new block to the chain.

Disadvantages of proof of stake:

A POS algorithm appears to still favour the rich as one of its selection processes will be to block reward those who already have a lot of native tokens within their node.

image.png

Discussion:

Reviewing the current data there is overwhelming evidence that a POS algorithm is a much better option to use when protecting the environment due to the POW’s huge carbon footprint and realising that the energy consumption could be put to better uses. POW has created an arms race in computer processing power. A POS algorithm promotes fairness to a blockchain so that the ordinary person does not have to invest huge amounts of funds buying and maintaining their own mining rig because anyone with a modern computer can start validating a blockchain and receive block rewards. POS promotes a more decentralized blockchain as it can not be centralized by a POW algorithm (whoever has the fastest rig). The block reward for POS is subjected to how many native tokens are held within a node this could again put people at a disadvantage if they do not have the funds to buy and store native tokens on their node (home computer).

image.png

Conclusion:

A blockchain can be operated and updated via two main consensus algorithms (POW and POS). Although other algorithms are currently being investigated these are the two main algorithms. POW was the first algorithm used in the first-ever Blockchain discussed in Satoshi Nakamoto’s white paper. The main incentive of a POW algorithm is to be rewarded in block rewards that hold real-world value. The POS algorithm encourages a person to buy the native tokens associated with that Blockchain and store them on to a node with the hope of being rewarded more of those native tokens (A block reward). Evidence shows that the POS algorithm is the better algorithm on many factors. In the future, it appears that most algorithms may move to a POS algorithm. Although some older Blockchains will always be POW as they were never designed to be operated by the POS algorithm.

Sort:  

Source of plagiarism

Plagiarism is the copying & pasting of others' work without giving credit to the original author or artist. Plagiarized posts are considered fraud and violate the intellectual property rights of the original creator.

Fraud is discouraged by the community and may result in the account being Blacklisted.

I think Proof of Stake simply creates a blockchain copy of the current financial model which blockchain technology was created to oppose!

Why are you commenting on obvious plagiarism Nathen? 🙄
It took 2 seconds to highlight the first paragraph and right-click "Search Google for".

Capture.PNG

Congratulations @robhive! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You received more than 50 upvotes.
Your next target is to reach 100 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Post is plagiarised.

How is it?? I wrote this myself.

So what is this? Copying and changing a few bits is not original work worthy of rewards.

I gave permission to "Blockchain Collective" to use my work. I am the original write of this article. This is my work and no one else. You are welcome to contact Blockchain Collective if you think that im lying. Here is their email, please contact them:

austin@bccollective.io

Robert Lavington

So why does it say that article is by 'danielle'? I am just curious. If you post something on Hive that has been posted elsewhere then you need to be able to prove it is your own work or we have to assume it is plagiarised. The onus is on you to provide the proof. Is this you on Twitter? With so few followers it is not proving much.

A lot of people do an introductory post that can include photograhic or video proof of who is using the account. A link from another site to Hive is further evidence. If someone was pretending to you then you would not want them to be earning from it.

I do not want to drive people away from Hive, but we have to be vigilant about abuse.

Because Danielle asked me to write for her. She has then given my article to "Blockchain Collective". This is all of my own work, i will now never give out my own work to anyone else.