What Is Proof of Work (PoW)?

Proof of work (PoW) describes a system that requires a not-insignificant but feasible amount of effort in order to deter frivolous or malicious uses of computing power, such as sending spam emails or launching denial of service attacks. The concept was subsequently adapted to securing digital money by Hal Finney in 2004 through the idea of "reusable proof of work" using the SHA-256 hashing algorithm.

Following its introduction in 2009, Bitcoin became the first widely adopted application of Finney's PoW idea (Finney was also the recipient of the first bitcoin transaction). Proof of work forms the basis of many other cryptocurrencies as well, allowing for secure, decentralized consensus.

Key Takeaways

  • Proof of work (PoW) is a decentralized consensus mechanism that requires members of a network to expend effort solving an arbitrary mathematical puzzle to prevent anybody from gaming the system.
  • Proof of work is used widely in cryptocurrency mining, for validating transactions and mining new tokens.
  • Due to proof of work, Bitcoin and other cryptocurrency transactions can be processed peer-to-peer in a secure manner without the need for a trusted third party.
  • Proof of work at scale requires huge amounts of energy, which only increases as more miners join the network.
  • Proof of Stake (POS) was one of several novel consensus mechanisms created as an alternative to proof of work.

Understanding Proof of Work

This explanation will focus on proof of work as it functions in the bitcoin network. Bitcoin is a digital currency that is underpinned by a kind of distributed ledger known as a "blockchain." This ledger contains a record of all bitcoin transactions, arranged in sequential "blocks," so that no user is allowed to spend any of their holdings twice. In order to prevent tampering, the ledger is public, or "distributed"; an altered version would quickly be rejected by other users.

The way that users detect tampering in practice is through hashes, long strings of numbers that serve as proof of work. Put a given set of data through a hash function (bitcoin uses SHA-256), and it will only ever generate one hash. Due to the "avalanche effect," however, even a tiny change to any portion of the original data will result in a totally unrecognizable hash. Whatever the size of the original data set, the hash generated by a given function will be the same length. The hash is a one-way function: it cannot be used to obtain the original data, only to check that the data that generated the hash matches the original data.

Generating just any hash for a set of bitcoin transactions would be trivial for a modern computer, so in order to turn the process into "work," the bitcoin network sets a certain level of "difficulty." This setting is adjusted so that a new block is "mined" – added to the blockchain by generating a valid hash – approximately every 10 minutes. Setting difficulty is accomplished by establishing a "target" for the hash: the lower the target, the smaller the set of valid hashes, and the harder it is to generate one. In practice, this means a hash that starts with a very long string of zeros.

Proof of work was initially created as a proposed solution to the growing problem of spam email.

Special Considerations

Since a given set of data can only generate one hash, how do miners make sure they generate a hash below the target? They alter the input by adding an integer, called a nonce ("number used once"). Once a valid hash is found, it is broadcast to the network, and the block is added to the blockchain.

Mining is a competitive process, but it is more of a lottery than a race. On average, someone will generate acceptable proof of work every ten minutes, but who it will be is anyone's guess. Miners pool together to increase their chances of mining blocks, which generates transaction fees and, for a limited time, a reward of newly-created bitcoins.

Proof of work makes it extremely difficult to alter any aspect of the blockchain, since such an alteration would require re-mining all subsequent blocks. It also makes it difficult for a user or pool of users to monopolize the network's computing power, since the machinery and power required to complete the hash functions are expensive.

If part of a mining network begins accepting an alternative proof of work, it is known as a hard fork.

Example of Proof of Work

Proof of work requires a computer to randomly engage in hashing functions until it arrives at an output with the correct minimum amount of leading zeroes. For example, the hash for block #429818, mined on September 14, 2016, for example, is 000000000000000004dd3426129639082239efd583b5273b1bd75e8d78ff2e8d. The block reward for that successful hash was 12.5 BTC.

That block will always contain 2,012 transactions involving just over 1,000 bitcoin, as well as the header of the previous block. If somebody tried to change a transaction amount by even 0.000001 bitcoin, the resultant hash would be unrecognizable, and the network would reject the fraud attempt.

Proof of Work FAQs

What Does Proof of Work Mean?

PoW requires nodes on a network to provide evidence that they have expended computational power (i.e. work) in order to achieve consensus in a decentralized manner and to prevent bad actors from overtaking the network.

How Does Proof of Work Validate a Crypto Transaction?

The work itself is arbitrary. For Bitcoin, it involves iterations of SHA-256 hashing algorithms. The "winner" of a round of hashing, however, aggregates and records transactions from the mempool into the next block. Because the "winner" is randomly-chosen proportional to the work done, it incentivizes everybody on the network to act honestly and record only true transactions.

Why Do Cryptocurrencies Need Proof of Work?

Because they are decentralized and peer-to-peer by design, blockchains such as cryptocurrency networks require some way of achieving both consensus and security. Proof of work is one such method that makes it too resource-intensive to try to overtake the network. Other proof mechanisms also exist that are less resource-intensive, but which have other drawbacks or flaws, such as proof of stake (PoS) and proof of burn. Without a proof mechanism, the network and the data stored within it would be vulnerable to attack or theft.

Does Bitcoin Use Proof of Work?

Yes. It uses a PoW algorithm based on the SHA-256 hashing function in order to validate and confirm transactions as well as to issue new bitcoins into circulation.

How Does Proof of Stake (PoS) Differ from PoW?

PoS is a consensus mechanism that randomly assigns the node that will mine or validate block transactions according to how many coins that node holds. The more tokens held in a wallet, the more mining power is effectively granted to it. While PoS is far less resource-intensive, it has several other flaws including a greater chance of a 51% attack in smaller altcoins and incentives to hoard tokens and not use them.