top of page
Yanda logo
  • Writer's pictureMatteo Poole

Proof of Work (PoW) vs Proof of Stake (PoS)

Updated: Apr 14, 2023


PoW vs PoS

The importance of consensus - PoW and PoS


Blockchain technology was introduced in 2008 as the distributed ledger behind bitcoin transactions. This peer-to-peer network on the internet allows a virtual currency system to operate by issuing currency, transferring ownership, and confirming transactions.

This technology was revolutionary because it is a public database that doesn’t require third parties to validate transactions. All different blockchains are based on a consensus mechanism. This underlying algorithm ensures decentralized record keeping and the one valid copy that gets broadcasted to all the nodes.


This technology operates with two important premises: decentralization and immutable records. As the network is a distributed database, the different computers operating the network, known as "nodes", maintain a complete ledger, a copy of the entire transaction history of the blockchain. This network can’t be compromised by taking down a central server; due to its features, it’s also called a ‘distributed ledger network’ (DLT).

The transaction records are called “blocks” and are linked via a protocol program, where new blocks can be added, but existing ones can’t be modified or deleted. Adding a new node is the only way to update the chain; this can be done without a central authority. However, if a node disregards the predefined standards and creates a counterfeit block maliciously, the other nodes will ignore it.

When malicious nodes try to overpower the network through ‘distributed denial of service’ (DDoS) attacks, the aim is to trigger false transactions, where they try to double-spend the cryptocurrency. The consensus is in place to protect the network against this.

Bitcoin was launched using the proof of work consensus algorithm, which is still the most widely used one. However, an alternative algorithm known as proof of stake was developed shortly after.


What is PoW?


POW was the first consensus algorithm implemented in 2008 with the launch of Bitcoin. Even though the idea behind this was invented in the 1990s to mitigate email spam, the anonymous creator Satoshi Nakamoto first applied it to a digital money system.

The idea behind it was to use computers to perform a task for the network, in this case, verify the transaction and then reward them for it, guaranteeing the task's authenticity and completion.



How does PoW work?

When a new blockchain is created, the first block is hardcoded into the software known as the genesis block or block0. By default, this block does not have any previous blocks and is used to add subsequent blocks, each containing a full copy of the updated ledger.

This algorithm determines which nodes can adjust the ledger through a competitive race. The participants, known as miners, must devote computational energy to solve and generate new valid blocks that meet the network criteria. The nodes then add the validated transaction to the network, determining which block miner issued it first and preventing double-spending.



How transactions are verified: PoW

On this network, transactions are grouped in a memory pool called “memepool” which is updated every 10 minutes by creating a new block. To create a new block, miners compete against one another by solving a complex mathematical problem that allows them to find the hidden cryptographic hash value of the last recorded block in a process known as hashing. These puzzles are tough to solve and get increasingly complicated every time a new block is issued.

The hash is a string of pseudorandom numbers that, when combined with the other data in the block and processed, gives the specified conditions set out by the protocol. After finding the winning hash of the last recorded block, the miner broadcasts it to the network for other nodes to verify it and creates a new block that includes all transactions in the memepool after the verification. For its efforts, the miner that generated the successful hash gets rewarded with a specified amount of cryptocurrency based on predetermined criteria.

This method allows the network to protect against DDoS attacks. Said attacks would require capturing 51% of the total power of the network, a task that would be too expensive and hard to implement as it would come down to a race against all other nodes, making this technology very secure.



Pros and cons of PoW

The primary advantage of mining is that it provides a reliable mechanism to achieve consensus, preventing malicious entities from abusing it. Additionally, it has other advantages that can mainly be applied to its cryptocurrency use case, such as security, trust and legitimacy, and decentralization.

Although it is possible to breach and tamper with this network, it is set up in a way that would require devoting enormous computer capabilities, making it impractical and uneconomical, to the point that the costs outweigh the benefits.

However, this high security comes with a cost. With new blocks being solved, resulting in greater difficulty and increased computing power, nodes require more electric energy over time. It’s estimated that BTC mining alone consumes more than the energy of entity countries. This is not an ideal environmental solution and has attracted much criticism over the years. Additionally, this type of network requires all nodes to be involved in the validation of a transaction, making the process not ideal in terms of scalability and throughput (speed of transactions).


Proof of Work examples

Some of the most well-known blockchains of this type include Bitcoin (BTC), Ethereum (ETH), Dogecoin (DOGE), Litecoin (LTC), Monero (XMR), and many others. A practical example of how this works can be explained using BTC.

This proof requires a computer to engage in hashing functions until it generates a correct output with the minimum amount of leading zeroes. For example the hash for a random block #660000, mined on the 4th of December 4 2020 looks like : 00000000000000000008eddcaf078f12c69a439dde30dbb5aac3d9d94e9c18f6. After solving the block, based on the current difficulty and rewards, which tend to decrease by half over time, the miner was rewarded with 6.25 BTC.

That specific block contained 745 transactions totaling over 1666 bitcoins, as seen from the previous block. If a malicious agent tried to change that amount by even 0.000001 BTC, the resulting hash would not be recognized by the network and get rejected.



What is PoS?


The main alternative to the POW algorithm is known as proof of stake (POS). This alternative was originally introduced in 2012 to solve the issues surrounding PoWs, such as high energy consumption dependency.

Instead of using computing to solve hashing, this protocol determines that agent participation is based on their ownership of the coin supply. The algorithm randomly selects the node that will propose the next block using random predetermined factors.



How does PoS work?

The mechanism with which this protocol operates is known as staking. It involves a group of nodes, known as ‘stakers’, that stake their cryptocurrencies for the transaction validation process. The longer the duration of the stake and the more significant the amount of cryptocurrency used, the more likely the staker is to get the transaction validation responsibility. Nodes with larger amounts of coins are more likely to validate the transaction. However, additional randomness is added to allow smaller holders to participate. Once a transaction has been verified, the node is rewarded with a predefined amount of the blockchain’s cryptocurrency for its effort.


Additionally, this type of protocol allows for an additional technical solution to be implemented, known as ‘sharding’. This allows different parts of the database to be stored in separate servers for higher efficiency, usually storing portions of the blockchain in different nodes.



How Transactions are verified: PoS

Similarly to mining, the elected node verifies the validity of the transactions within the block, approving them and broadcasting them to the overall network for validation. Blocks are then aligned chronologically based on the transactions and added to the blockchain.

The first block is also known as the genesis block and contains a copy of the whole updated ledger of the blockchain. In this case, the new blocks are generated randomly by one of the stakers and are said to be ‘minted’ or ‘forged’ instead of mined. As all coins/tokens are already created, it removes the need for mining, eliminating hardware and electricity costs. The critical difference is that this process does not need every validator to be involved in validating a transaction, making its method more efficient in improving scalability.



Pros and Cons of PoS

POS provides a more sustainable alternative to POW, creating a more inclusive and decentralized spread of validators. Users can pool their funds together and become validators if they don’t meet the individual criteria for staking. By pooling funds together, the overall protocol becomes more secured, and stakers can own rewards.

Additionally, this method can bring more efficiency, as these networks do not experience congestion as opposed to POW. Networks that tend to be busy with a high amount of transactions require nodes to validate them frequently, and this often cannot be done as there are limits on how many transactions can be validated at once. These types of blockchains solve that issue and can verify transactions faster.

Additionally, costs of transactions are also way lower, as these networks are more efficient and can handle higher volumes. This is ideal as some POWs have grown to have high transaction costs, making them often impossible to use for smaller transfers as the cost outweighs the value of the amount sent.

However, there are also disadvantages to this type of protocol. This protocol has not been tested on a large scale, and questions surrounding it remain. It has to be verified whether networks with this protocol can sustain high amounts of transactions, such as with the BTC or Ethereum blockchains.

Moreover, the type of protocol allows for easier attacks, where holders of large amounts of the coin are more likely to be able to double spend or compromise the network in other ways. It has yet to occur on a large scale, but with this mechanism, it's more likely to occur than with its alternative.



Proof of Stake examples

Some of the most known POS blockchains include EOS (EOS), Tezos (XTZ), Lisk (LSK), Cosmos (ATOM), and Cardano (ADA), all of which have been operating for many years. Ethereum, the second larger POW chain, aims to transition to POS in the following years.

An example of this is Tezos. Stakers need to stake at least 8000 XTZ, known as a roll, to operate a node and earn a proportional share of Tez rewards for validating transactions. Once staked, there is a random possibility that the node will be selected, and the stakers will be rewarded for validating the transaction. The amount can vary depending on the number of transactions occurring and the congestion level.



PoW vs PoS representation

Proof of Work (PoW)

Proof of Stake (PoS)

Security

Hackers need to gain more than 50% of total computational power to perform a 51% attack.

Hackers must own more than 50% of all cryptocurrencies on the same network

Block Validation

Depends on the computational work done by miners

Depends on the size of the stake and randomness

Rewards

Miners receive rewards for solving problems

The validator only receives a portion of the network fees

Scalability

All the nodes are involved for each transaction

Only one or few nodes are involved

Transaction speed

Depending on network congestion

Faster than its alternative

Transaction cost

High if the network is congested

Generally low



Conclusion, Is Proof of Stake better than Proof of Work?


While both protocols have advantages and disadvantages, which one is better than the other might vary depending on the use case of the different blockchains. POW is well tested and makes attacks impossible with its current computing difficulty. However, it raised concerns from its energy consumption point of view and was easier to ban, as it occurred in China. On the other hand, POS is less energy-consuming and more scalable, allowing for higher transaction output. However, not many projects have adopted it, so it's hard to tell how successful it could be. Additionally, it's also possible for stakers to go rogue and start compromising different blockchains, which makes it slightly less secure than its alternative.

In conclusion, both are strong and will establish which one is the best in the next few years with Ethereum transitioning to POS. We will likely see many other cryptocurrencies follow suit if this transition is successful.


Join our Discord channel and be part of the debate.

50 views
bottom of page