Proof of Work: The Who, What, How & Why

19 Apr 2023

Blockchain technology secures transactions and maintains permanent integrity with two mechanisms — Proof of Work and Proof of Stake. While Proof of Work requires significant computational power and competition between miners to solve complex mathematical equations, Proof of Stake works by validators staking their own cryptocurrency as collateral. With an ever-increasing number of miners and validators worldwide, optimizing the process is crucial. Here we will learn more about these mechanisms and how they function.

Proof of Work (PoW) and Proof of Stake (PoS) are two consensus mechanisms used by blockchain networks to validate transactions and secure the network.

Blockchains are made up of blocks that contain details about network transactions. Every block is tied rather directly to all of the previous blocks, forming a chain. This ensures permanent integrity, and blockchain technology is envisioned as the best way to permanently and securely store verified transaction information. 

Now, let’s understand a blockchain from the most practical perspective: Every blockchain can be (and is) decentralized, and that’s a beautiful thing; but since the entire ordeal requires certain hardware, this has to be owned by someone. With Bitcoin, for example, miners worldwide have invested heavily in costly hardware capable of high throughputs and network infrastructure upgrades at the physical location(s) where they keep their hardware. For their contribution, miners get to mine and keep some BTC, which will ideally cover the investment and, on top of that, reward them for the hardware capabilities brought to the table for everyone else to enjoy. This is a mutually beneficial relationship for everyone on the network. To validate this contribution (Proof of Work), the mining computers, or “rigs” are involved in solving numerous cryptographic tasks to improve safety and prevent cyber attacks. That’s how mining works in a nutshell.

Since PoW involves solving complex mathematical equations requiring significant computational power, miners will usually compete to solve the equations. The first one to solve it gets to add a block of transactions to the blockchain and receive a reward. That’s their PoW-based credit that they rightfully take. The difficulty of the equations adjusts to ensure a new block is being added every 10 minutes. The PoW consensus mechanism is used by Bitcoin and many other cryptocurrencies.

Proof of Stake, on the other hand, works by participants (also known as validators) staking their own cryptocurrency as collateral. Validators are chosen to validate the next block of transactions based on the amount of cryptocurrency they have staked. The more cryptocurrency they stake, the higher the chances they will be chosen. Validators who are chosen receive a reward in the form of transaction fees. The PoS consensus mechanism is used by blockchins such as Ethereum 2.0 and Solana.

Mining worldwide makes for immutable credibility and security on-chain

Although it’s hard to estimate precisely, data suggests that there are over a million BTC miners, which, based on their IP addresses, are mostly located in:

• USA 37.84% 

• China 21.11%

• Kazakhstan 13.22% 

• Canada 6.48%

• Russia 4.66%

• Germany 3.06%

• All other countries 13.63%

It’s worth noting that this is a dynamic community. Only a few years ago, some ~75% of miners were estimated to originate from China.

Considering these numbers and the way they’re changing all the time, it’s easy to see why optimizing the mining processes and minimizing errors is necessary. Each miner must have the means to prove the quantity and quality of work and the hardware throughput power they can exhibit on the network. This is what creates the trustless validation network known as PoW. 

Reusable Proof of Work – What is it, and how does it function?

While the PoW concept in its wider sense dates back all the way to 1993, we’ll discuss only the idea presented by Hal Finney more than a decade later in 2004, based on the notion that a single PoW can be reused indefinitely, which then found its application for facilitating cryptocurrencies. 

His was the idea of servers designed to enable user-initiated proofing of validity, integrity, and authenticity of data in real-time, along with a proper way to facilitate safe, consensus-based transactions. This was first tested in 2009, during the first-ever Bitcoin transaction between himself and the creator of Bitcoin, Satoshi Nakamoto. PoW instantly became a critical part of the BTC blockchain, remaining as such ever since.

As discussed in a previous 42 Blog article, the nodes on a blockchain, simply put, are links in the chain of consensus. Not only do blockchain nodes secure the network, but they are also responsible for mining new blocks on the chain. Any node can mine blocks as long as they have the computation abilities to solve encrypted or “hash” functions and verify the truth of the transactions on a new block.

Hence, when miners add a new block by solving the cryptographic problems (laid in front of them as a hash function), they inform everyone else on the network about the transaction details. The nodes then double-check the transaction after it’s performed to ensure it’s legitimate, mainly to prevent “double spending.” All miners must compete with thousands of others to earn rewards, and the transactions are credited on a “first come, first served” basis.

Once everyone has identical records, a consensus has been reached through this mechanism.

So, essentially, what’s being proven, and why does crypto need PoW?

All of this is fine until we take software vs. hardware into consideration. The code is definitely the heart and soul of everything, and each blockchain does utilize software code, but nevertheless, it still needs hardware in order to function. Since blockchain is a decentralized technology, the hardware must not be in a single physical location nor controlled by a small number of owners, in fact, anyone can technically mine Bitcoin, all you need is the hardware and computation abilities to validate and create new blocks. The decentralized nature of PoW  prevents exploitation of power   from any one privileged position, and instead contributes to the state of the network being accessible to everyone and anyone by taking upon themselves a part of the responsibilities and a share in the overall workload. We can trust them to do this based on their PoW or, alternatively, PoS.

All of this mitigates the risk of a single user establishing a monopoly over the entire network. Moreover, no one can add any blocks which aren’t valid without at least 51% of network power acknowledging or supporting it. In other words, due to PoW, anyone willing to dishonestly manipulate the network will have to pull an immense effort to only try it, certain to gain literally nothing out of it.

On a consensus level, we can say that what’s being proven is that nobody has succeeded at falsely gaining a credit or attribution of any sort for any of the blocks in the blockchain — so we’re continuously proving and retaining the integrity of the entire blockchain by enforcing the PoW network-wide.

PoW as a consensus mechanism ensures that each newly added block becomes valid only after it’s been verified by the entire network (of miners), making it properly in check, decentralized, credible to transact on, and safe from cyber-attacks. 

This is fundamentally different from banking transactions, where you can’t trace everything in the same manner (a physical check or a loan placement document can be easily tampered with and do not display a “real-time validity proof”; yes, stamps and signatures do exist, but these can also be falsified). These traditional transactions ultimately base their value on trust between the parties involved. 

In order to be in any way, shape, or form better than the traditional methods and currencies, every cryptocurrency needs a consensus mechanism, and this is where PoW finds its best justification to exist.

Where can we see PoW, and what makes it different from PoS?

As we’ve mentioned already, PoW was first used in Bitcoin transactions, which is where it’s still used the most. Apart from BTC, PoW is nowadays mainly used by Litecoin, Dogecoin & Ethereum 1.0. At the same time, the vast majority of the newly created cryptocurrencies have turned to PoS.

PoS stands opposed to PoW: With PoW, hardware capacities are primarily directed towards ensuring safety first and foremost, which implies that not a lot of resources are left to allocate towards other code execution. This is the main reason why every BTC miner prefers very powerful and efficient components in their rigs.

But what if the protocol required less power to ensure safety? It can mean a lot less energy consumed. This is the idea behind PoS. 

PoW, on the one hand, demands that miners invest in hardware, which gives incentives to serve the network honestly. On the other hand, PoS does not require such an investment; hence the quality and credibility of work must be proven by another method. In PoS, this is being ensured by “locking up” a certain amount of their own crypto assets before the newly added blocks become fully verified and attributed to them, or in other words, staking it. The reward they’ll receive will equal the amount of their own crypto being at stake.

This is why PoS ensures that the transactions are as quick as possible and with relatively larger rewards for validators. PoS is mainly used in recently established cryptocurrencies, the most prominent being Ethereum 2.0, Cardano, and Tezos.

ETH now uses 99.98% less electricity after adopting PoS. Apart from tremendous energy efficiency (which contributes to lower maintenance expenses), the main benefits of The Merge include: better scalability, lowered barrier to entry, less new ETH being issued overall (which benefits value), decreased carbon footprint (which is always good for everyone’s reputation these days).

Why is this all important to be understood?

The relevance of both PoW and PoS consensus mechanisms lies in their ability to efficiently ensure the integrity and security of the blockchain network through a dependable, safe, fair, and transparent system that will form a consensus based on the contributions of network participants.

PoW is effective at preventing double-spending attacks and ensures that the network is decentralized. However, it has high energy consumption and requires expensive hardware. According to recent studies, Bitcoin’s energy consumption is more than that of the entire country of Switzerland.

PoS, on the other hand, is practically infinitely more energy-efficient and requires less expensive hardware. It also makes it easier for “small” participants to take part in establishing and running the network, making it more decentralized that way. However, it may be vulnerable to certain attacks, such as the “nothing-at-stake” problem.

To conclude: PoW and PoS have advantages and disadvantages, and their feasibility depends on the blockchain network’s specific use case and goals.

Check out the rest of 42’s blog for more technical articles.

whatsapp white

Let's talk