Cryptocurrency 101: Proof of Work vs. Proof of Stake

proof of work vs proof of stake

Satoshi Nakamoto, the visionary behind the Bitcoin, is viewed by many as the father of cryptocurrencies. The elusive figure unveiled their vision for a completely decentralised digital currency in November of 2008, propitiously following the global financial crisis of the previous year. Whoever the pseudonymous Satoshi Nakamoto was, their research and reference implementation of Bitcoin protocol started a revolution which inspired a rich market economy and culture by the name of “cryptocurrency.”

At the heart of Nakamoto’s revolution was a simple yet ingenious mechanism. Now officially known as “proof of work,” the white paper detailed a consensus scheme which allowed a peer-to-peer network of nodes to manage transactions in a completely decentralised manner. For the first time in history, funds could be transferred from one person to another with no intermediary, delay, or extortionate transaction fees.

Bitcoin’s inception gave rise to numerous alternative cryptocurrencies, collectively referred to by the apt but unimaginative label of “altcoins.” Over the past nine years, blockchain technology has matured significantly, and altcoins are no longer restricted to proof of work to reach network unanimity. Different mechanisms for achieving consensus exist, with their own sets advantages and disadvantages.

In this post, we’re going to look at the two most popular: proof of work (PoW) and proof of stake (PoS).

Proof of Work

Proof of Work (PoW), at its most basic level, is an economic deterrent. In Bitcoin, its purpose is to ensure that the cost of overpowering the network would outweigh its financial benefit. This is achieved by requiring each block to provide some information that proves a significant amount of processing power (and by extension, energy) has been expended to create it.

The original idea for PoW comes from C. Dwork and M. Naor in 1992, but saw its first real-world usage in Adam Back’s “Hashcash,” where the technique was employed to mitigate email spam and denial of service attacks. Under Hashcash, emailers needed to attach a proof of work to their mail. By requiring a proof of work, spammers and malware distributors were economically dissuaded from sending mass emails.

Cryptographic Hash Functions

To understand Bitcoin’s PoW, it is necessary to understand what is meant by a cryptographic hash function. In short, these functions take some data as input, and produce a fixed size output, usually in the form of a hexadecimal string. They are deterministic, meaning that if you feed the same input to the same hash function, it will always produce the same output. Perhaps most importantly, they are known as trapdoor functions: easy to compute in one direction, but very difficult to compute the reverse.

cryptographic hash function
Image courtesy of Wikipedia

It’s computationally efficient to compute a digest given some input. However, the trapdoor nature of these functions means that, given a digest, it is extremely difficult to figure out what the input hashed to produce that digest was. So, if I gave you a digest, there exists no better approach to reverse the hash function than to systematically guess every single possible string until you find the right one.

How Does Proof of Work… Work?

A PoW mechanism states that, for some data object to be considered acceptable, some numeric value must be found such that, when it is combined with the rest of the data and sent through a hash function, a hash below a certain numeric value is produced. That is quite a mouthful, so we’ll break it down using Bitcoin as an example.

The hash function used by Bitcoin to validate blocks is double SHA-256. Miners are contributors to the Bitcoin network who validate transactions by grouping them into discrete “blocks,” each requiring a proof of work to be attached in order to be accepted by the network.

As a simplification, we’ll say that a block consists of a list of transactions. It is the miner’s task to find a number (“nonce”) which, when written at the end of those transactions, produces a hash value that starts with a certain number of zeroes.

As we mentioned earlier, there is no better way to do this than guess random values until you find one which works. As a result, we must expend physical energy – that’s where the name “proof of work” comes from. The nonce alone is proof that we have expended energy and worked hard to create a valid block.

What’s the Point?

Miners secure the ledger of transactions by finding and adding new blocks. If anybody could add blocks, we would see an abundance of competing forks in the ledger, each telling their own story of who transferred money to who, and when.

Using PoW, it means that energy has to be spent to add new blocks. It’s somewhat of a simplification, but this means that somebody who wants to go back and “reverse” a set of transactions by adding a competing block would need to expend tremendous amounts of energy to do so and catch up with the rest of the network, and is only really feasible if they control 51% of the network or more.

What’s In It For the Miners?

Miners are incentivised by a bitcoin reward for finding a valid block. This block reward constitutes the “mint,” and is how new coins are introduced into circulation. Successful miners are also entitled to all transaction fees in that block.

Proof of Stake

Proof of Stake (PoS) is a different way to achieve distributed consensus. In proof of stake, there are no miners. Validators transfer funds into a pool, known as a stake, and the creator of a new block is chosen in a deterministic manner according to the size of their stake. The larger the stake, the better the stakeholder’s chances are of being able to validate the next block.

One important distinction between PoW and PoS is that PoS has no block reward. Validators who create new blocks are rewarded entirely through transaction fees.

Which one is best?

PoS is economically favorable over PoW. When we consider the size of the Bitcoin network, the amount of energy consumed by mining could be a cause for concern.

Optimistic estimates suggest that the total energy expenditure of the network is around that of a few hundred average American households. Looking at the calculation from a different angle, however, it can be estimated that the carbon footprint of the network is almost that of the entire island of Cyprus.

However, relativity comes into play here. Accounting for the carbon footprint of the wider financial system, it is outlandish to suggest that the energy expended in mining new blocks is “wasted.” In a sense, the energy is the price that you pay for a fully decentralised, distributed currency. Many people lean towards a PoW system because it is fundamentally rooted in physics – to mine a block, you absolutely must put the work in. There is no possible way to cheat.

PoS does, however, offer a number of promising characteristics. For one, you don’t need to issue a large block reward since there is no inordinate energy requirement. It is also possible to create a coin whose circulating supply decreases over time by making use of burn addresses.

PoS reduces the risk of centralisation as the economies of scale are “fair.” Having a stake of $10 means you’ll get exactly 10x the returns as if you had a stake of $1. There’s no way to make disproportionate gains with specialist equipment such as ASICs, like you can with PoW. Finally, PoS discourages the formation of centralised cartels who control the network. It can do this by utilising a variety of game-theoretic techniques that aren’t viable with a PoW scheme.

Conclusion

Proof of Work and Proof of Stake offer two vastly different approaches to achieving decentralised, distributed consensus in a network. Both offer their unique advantages and disadvantages, and at this point, it is generally unclear which algorithm is superior. PoW has proven its vigor through years of Bitcoin mining, whereas PoS has seen far less adoption comparatively. However, PoS consensus mechanisms have great potential and an array of commending properties.

Only time will tell the best approach to achieving unity in a cryptocurrency network.

LEAVE A REPLY

Please enter your comment!
Please enter your name here