Proof of Work and Proof of Stake sound very alien to a person who enters the world of Web3. But it’s just a consensus mechanism. Let’s take it back. A consensus is needed when there are many people involved in an activity.
So, what does a consensus mechanism have to do with blockchain? Blockchain consists of three main features: security, scalability, and decentralization.
As far as security is concerned, blockchain is secured with cryptography, and once a block has been hashed or a transaction is added to the chain of blocks with a timestamp, you cannot tamper with the data.
The next feature is scalability, which refers to the capability of the network or the number of transactions it can process per second (TPS).
Finally, decentralization, the most important aspect of this article, means that there is no central authority that controls the networks. For instance, when you do a bank transaction, there is a reputable central authority, like the bank or an exchange, that verifies the data before going ahead with the transaction. These middlemen charge an interest for their service. However, blockchain doesn’t need a central authority to carry out the transaction. This means that there is no service fee, however, the transaction needs to be verified by miners or validators. Once verified, the transaction needs to be added to the blockchain, which is a network that belongs to hundreds and millions of people, so before a transaction is added to a block, the miners or nodes in the network must consent to the transaction
What is Proof of Work?
Imagine kids in a classroom playing a game where you have to guess the secret number to open a box that has candy inside. Whoever guesses the secret number correctly gets the candy inside. Proof of work is very similar to the above example.
Let’s say Bob sends $5 to Tom. This transaction is broadcast to the whole network while the miners compile the pending transaction into a temporary proposal block. Then the race starts. Once the transactions are compiled, the miners start to solve complex mathematical problems. The only way you could solve this problem is through trial and error. The puzzle involves finding a value (called a nonce) that, when hashed with the block data, gives a hash below a certain target.
What is Proof of Stake?
Validators verifying transactions on a blockchain that runs on the PoW consensus mechanism compete to be the first to verify the transaction. However, on the PoS blockchain, the validator is chosen based on the amount of tokens staked in the network. It is like the more you buy lottery tickets, the higher the chances of hitting the jackpot. PoS is much faster than PoW as it doesn’t consume the time that is needed to solve complex mathematical problems on PoW. However, in the event a validator verifies a malicious transaction, the validator’s tokens staked in the system will be confiscated fully or partially.
The amount of tokens staked in the ecosystem is not the only factor that determines who gets to validate a transaction. The platform also takes other factors, such as the length of time the tokens have been locked for. Additionally, the process also uses randomization for selecting the validator. Once a transaction has been verified, the network gives the validator a reward for adding a valid block to the network.