Consensus Mechanisms: PoW & PoS

in OCD3 years ago
Hello guys i trust you're doing well. It's a privilege, always, write to you and today I'll be writing on Pow and pos as types of Consensus Mechanisms.

Introduction


Source

We all know that the blockchain runs on a distributed ledger, where there are different and several people which all have the same amount of authority over what happens on the blockchain, this is referred to as **decentralization**. Now all these people/computers/nodes will have to make a decision on what happens, but all of them can not all make the decision so there has to be a means by which that decision making process will be made and made faster. Here comes Consensus.

I looked up the word Consensus in the dictionary and found out the definition;

A process of decision making that seeks widespread agreement among group members.

Applying this idea to the blockchain, it can be said that an agreement has to be reached by all nodes of the Blockchain on who and how a block is validated.

Speaking of 'how', there are different types of consensus mechanism adopted, which includes the following:

•PoW
•PoS

qjrE4yyfw5pEPvDbJDzhdNXM7mjt1tbr2kM3X28F6SraZkmLfaYtvR7fi6r5TCE9BdE9dCVTBPEz1w7iacpJSfWQdxwpQ5vG5MeL692DxjttyVWdh7LgSyft (1).png

PoW


Source

This stands for Proof of work. As the name implies, this Consensus mechanism invloves a lot of work, computing power which is need to solve a string of complex equations from the transactions of the block chain. The first node to solve the equation gets the nod and mines the next block of the blockchain which of course has its benefits as the nodes gets the transaction fees of all the transaction on that block.


This term *PoW* has been in use since 1993, where it was originally used to combat spam emails, but became very popular when Satoshi Nakatomo thought it could be used as a consensus mechanism in the then newly invented Bitcoin in 2009.

Advantages

  • This allows for a common objective, which is to mine the coins. All the participating nodes know this and needs no further action or command to do its duty.

Disadvantages

  • Energy consuming
    In the early days of BTC, the equations could be solve with just a single laptop or a PC but that's no longer the case. There are several machines built just for the purpose of solving these equations for example, we have the Graphics card ,the ASICs( Application Specific Integrated Circuit) and also Mining farms. To accommodate all these numerous nodes the equations has become more and more complex. Of course only one of all these nodes gets to solve the equation so this essentially means that all the other nodes which didn't solve the equation has wasted electricity/power/energy.

According to digiconimist, BTC miners alone makes use of about 54TWh(Tera watts hours) of electricity, which is enough to power the whole country of new Zealand or Hungary.

  • Distribution; Risk of 51% Attack
    There something known as mining pool where different miners (nodes) can come together and mine collectively so as to increase their chances of solving the equation and therefore chosen to mine the next block.

This 51% attack has to do with a person or a group of persons having more than 51% control of the system, in this case the nodes. This can pose a big threat to the Blockchain as that person has significant amount of power and control over the system. In the case of pow, there are 2 ways this can be achieved,

Firstly is by purchasing a lot of computing power to more than 51% of the total computing power and secondly by merging or the top 3 mining pools which will be well over 51% of the total mining farm.

Sopposing a bad node is able to achieve this feat, then its bad news for the Blockchain. This could be

  • The computers may not have any other incentive other than earning rewards of the block, they may not really care about the particular coin in question and may switch over to mine another coin which they deem more profitable.

qjrE4yyfw5pEPvDbJDzhdNXM7mjt1tbr2kM3X28F6SraZkmLfaYtvR7fi6r5TCE9BdE9dCVTBPEz1w7iacpJSfWQdxwpQ5vG5MeL692DxjttyVWdh7LgSyft (1).png

PoS


Source

This is short for proof of stake. This is somewhat similar to PoW but in this case, the validators are chosen on the basis of the amount of the coin they stake, the higher the amount of coin staked, the greater the chances of being chosen as the validator. This can also be seen as an upgrade to the PoW consensus mechanism.


The major advantage of this consensus mechanism is that you can trust the validators to effectively and correctly do their jobs as they may loose a part( if not the whole) of their staked coins if they are found defaulting the system. Mind you, be watchful of the amount of coins staked, if the amount staked is greater than the rewards of that block, then you can well trust the validator as such a person won't want to loose more than he/she gains.

Disadvantages of PoS

  • The most glaring disadvantage is that the method of chosing a validator may not be entirely randomized as the amount of staked coins has to be considered and factored in. If person A stakes coins worth of $100 and person B stakes coins worth of $1000, then person B definitely has the greater chance of being picked. This can lead to a circle effect because person B now has the rewards and therefore more coins to stake which ultimately increases the likelihood of being chosen.

This can be looked as as the Rich getting Richer and the Poor getting Poorer kind of stuff. Those who get in first or stakes more, has a higher chance.

  • Then there's also the 51% attack
    This is unlikely to occur here than in PoW especially in a situation where the coin is not a new one. The node which attempts this will have to buy more than half of the total coins in the circulation. Doing so will drive up the prices thereby making it too costly to acquire. Although this seems highly unlikely, its not impossible.

qjrE4yyfw5pEPvDbJDzhdNXM7mjt1tbr2kM3X28F6SraZkmLfaYtvR7fi6r5TCE9BdE9dCVTBPEz1w7iacpJSfWQdxwpQ5vG5MeL692DxjttyVWdh7LgSyft (1).png

Differences between PoW and PoS


Source

PoWPoS
Energy consuming: requires a lot of computer power in order to solve the equations and mine blocksEnergy efficient; doesn't require computer power but some staked amount of coins in order to choose it's validators
Everyone can mineSelects a few validators
Its more expensive to set up thereby decreasing scaling capacity.Requires a less expensive setup and which is an advantage for the scaling capacity
Here the nodes are referred to as miners.Nodes are referred to as validators
The coins are mined hereThe coins are minted or Forged
Examples of some coins using this method includes: BTC, Ethereum, litecoin etc.Examples of coins using this method includes; Binance, Algorand, Cardano etc.

Thanks for reading through, this has been an awesome experience.

Peace.

Sort:  

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

You received more than 800 upvotes.
Your next target is to reach 900 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

Check out the last post from @hivebuzz:

The new HiveFest⁶ attendee badge is waiting for you
Feedback from the November 1st Hive Power Up Day
Support the HiveBuzz project. Vote for our proposal!

Yay! 🤗
Your content has been boosted with Ecency Points, by @justice007.
Use Ecency daily to boost your growth on platform!

Support Ecency
Vote for Proposal
Delegate HP and earn more