What is proof of work?

A consensus mechanism in which participants compete to solve a computational puzzle for the right to add the next block, and are paid in newly issued coins for doing so.

Not yet verifiedHow we verify

3 min read

In this entry

A consensus mechanism in which participants compete to solve a computational puzzle for the right to add the next block, and are paid in newly issued coins for doing so.

Bitcoin uses proof of work. It is durable but energy-intensive, which is why several networks have moved to proof of stake.

The insight the design rests on is that agreement is expensive to fake if writing history costs real resources. There is no committee and no vote. Whoever spends the most work extends the chain, and everyone else follows the chain with the most work behind it, which is why the rule is sometimes described as the longest chain rather than the most recent one.

How it works

  1. Assemble a candidate block. A miner collects pending transactions from the mempool and builds a block header.
  2. Search for a valid hash. The miner changes a nonce and hashes the header repeatedly, looking for an output below a target value. There is no shortcut; it is trial and error at enormous scale. See hash and hash rate.
  3. Broadcast and verify. A valid solution is published. Every node checks it instantly, because verifying one hash is trivial while finding it was not. That asymmetry is the whole mechanism.
  4. Collect the reward. The miner receives the block subsidy of newly issued coins plus the transaction fees in the block. See block reward and coinbase transaction.
  5. Adjust the difficulty. The protocol periodically retargets the difficulty so blocks keep arriving at the intended pace regardless of how much hardware joins or leaves. See difficulty adjustment.

Rewriting history means redoing the work for every block since the point of change, while the honest chain keeps extending. That is why confirmation count matters: each additional block multiplies the cost of reversal.

Example

Why confirmations matter, illustratively. Bitcoin aims for a block roughly every ten minutes, maintained by difficulty adjustment (source: the Bitcoin white paper). A payment in the latest block has one confirmation, and an attacker who controls a large share of hash power could plausibly produce a competing block.

Wait for six blocks, about an hour on average, and the attacker must out-produce the entire honest network across six blocks to reverse it. Exchanges pick their own confirmation thresholds for this reason, which is why a deposit may show as pending for an hour even though the transaction was broadcast immediately.

Why it matters when you buy

Proof of work is why a Bitcoin deposit takes confirmations rather than seconds, and why withdrawal fees are quoted as a rate per transaction size rather than a percentage of value. Both catch people out on their first transfer. The chain pages compare settlement and fees across networks, and moving crypto off an exchange covers what to expect on the way out.

mining — performing the work for reward; hash rate — total computing power securing the chain; difficulty adjustment — keeps block timing steady; confirmation — blocks stacked on top of yours; block subsidy — newly issued coins per block; proof of stake — the capital-based alternative.

Questions

Why does proof of work use so much electricity?

The energy is the security. Making history expensive to write is what makes it expensive to rewrite, so the cost is not a side effect of the design but the mechanism itself.

Can someone with enough hardware rewrite the chain?

An attacker with a majority of hash power could reorder or censor recent transactions, at enormous ongoing cost, and would still not be able to spend coins they do not hold keys for. Deep history is protected by the accumulated work behind it.

Why do exchanges wait for several confirmations?

Each confirmation multiplies the cost of reversing a transaction. Thresholds are a risk decision by the exchange, which is why the same deposit clears faster on one venue than another.