What is pos and pow?
Proof_of-Work (POW) and Proof-of_Stake (POS) are consensus mechanisms used on the blockchain for cryptocurrencies like Bitcoin and Ethereum. Consensus mechanisms are a crucial part of Blockchain technology. One of the main features of blockchain technology is the distributed ledger. The distributed ledger stores records of all previous transactions on a network of computers (nodes) in different parts of the world hence the term distributed ledger.
For the ledger to operate correctly, all nodes on the network have to agree with its contents. The consensus mechanism does precisely this by verifying that all information added to the ledger is valid, which keeps the entire network in agreement with its contents. This ensures, all new blocks added to the network represent only recent transactions and not old ones, eliminating the possibility of double-spending.
Different types of consensus mechanism's
There are many different types of consensus mechanisms; however, currently, the most popular consensus mechanisms are Proof-of-Work (PoW) and Proof-of-Stake (PoS) protocols. The main differences between these two can be seen by how they reward the verification of transactions on the network.
POW Consensus Mechanism
Satoshi Nakamoto (The creator of Bitcoin) popularized the concept of POW when it was first implemented in the Bitcoin blockchain.
POW miners compete against each other in a race to solve complex mathematical cryptographic puzzles to validate a transaction on the network known as hashing.
Every time a miner validates a transaction via a hash, it sends a message to the other computers on the network for verification, and the miner is rewarded with a fraction of the native cryptocurrency. However, to validate the transaction via a hash, the miner must use a massive amount of computational power.
Understanding POW mining
A great way to understand this is to imagine a group of ten people being handed a large number of keys and one padlock. The first person to find the key that opens the padlock will be paid for their work. Everyone will be racing against each other to test each key until the correct one is found to collect the reward. Once the correct key is found, the person who found it will notify everyone else so that they can check it is the correct one.
The critical thing to understand here is that only the person that finds the correct key first will get the reward, and that's because it is very difficult to find the correct key but very easy for everyone to verify it is the correct key.
While POW is considered one of the best consensus mechanisms, it's not a fair system because only those with the most powerful and expensive hardware devices will be able to verify the transactions first. You can understand this by imagining one of the ten people in the group checking keys have two extra hands, and so have a much greater chance of finding the correct key first.
POS Consensus Mechanism
The POS consensus mechanism, like the POW system, uses a cryptographic puzzle to verify transactions and reach a consensus but is still slightly different.
Instead of miners racing against others solving complex equations to validate transactions, POS uses a selection process that chooses the person to create the next block. This works by making a decision based on how many coins they have "staked".
For example, if one person stakes ten coins and another stakes fifty coins, the guy with a stake of fifty coins is five times more likely to validate the next block.
Forging instead of mining
Instead of mining the new coins like POW, POS uses forging. This occurs by a validator who processes and forges the next block onto the blockchain and awards those who contribute to the network by allowing them to earn a transaction fee.
All you need is a standard computer to validate transactions as there is no real need for lots of computational power. However, you must have some of the native coins in a specific wallet that will freeze your coins so that the coins are being used to stake on the network.
There's usually a minimum requirement of coins that must be staked before you can start to validate transactions but, as long as you meet those requirements, you stand a chance of being selected as the next validator of a new block and earning those transactions frees.
Which consensus mechanism is better?
So, how do these protocols compare in terms of cost, energy consumption, security, and centralization/decentralization?
Cost & energy
Generally speaking, POS is a more efficient alternative when comparing the cost and energy required to operate a POW or POS system. The computational power needed to run a POW system is energy-intensive and expensive, and this is primarily due to the competitive nature of mining in a POW system and the growing need for computational power.
POS systems are relatively new compared to the POW system and haven't yet attracted the same level of adoption as POW systems. Due to this, the POS protocol hasn't undergone the same level of testing. However, some potential risks are already visible in the algorithm.
When a POW system goes through a hard fork, miners have to decide whether to move to the new blockchain or continue supporting the original. Supporting both sides is not economical or efficient as miners would have to split their computational power. Technically, with the way they work, POW systems discourage constant forking of the network.
POS systems do not have an incentive to discourage forking because, in the event of a blockchain fork, the chosen validator will receive a duplicate copy of their stake on the blockchain and can decide to sign off on both blockchain branches meaning they can earn double the frees and even proceed to double-spend without the requirement of increasing their stake.
Note: Forking is a term that describes the splitting of a blockchain into two branches due to a change in the consensus mechanism.
One of the biggest concerns with blockchain technology regarding the POW system is centralization. Currently, the role of mining on the network is slowly becoming reserved for those who have enough funds to invest in high-end computers and large mining pools. With this model, the control of blockchain networks is gradually moving away from communities to fewer hands.
On the other hand, POS systems tend to provide a fairer solution to this because the amount of network control one can gain on a POS network is directly correlated to how much they invest into the system. If an individual invests ten times more than everyone else, they will have ten times more network control. However, if the same individual invests ten times more into the equipment used for mining on a POW system, they will gain much more control than ten times the rewords. As a result, mining is becoming less profitable and more challenging to compete against guys with powerful rigs.