Skip to content
BlockchainBeginner

How proof of work secures a blockchain

Proof of work secures a blockchain by making miners spend computing effort, so changing old blocks means redoing every later block and network agreement.

Vahe HakobyanVahe HakobyanEditor-in-chief Updated Oct 6, 20263 min readFact-checked
A dark navy background with steel cubes linked by glowing cyan lines and a padlock.
Illustration: World-Crypt
On this page
Key takeaways
  • Miners race to solve a puzzle for each new block.
  • Blocks link through hashes, so old changes break later links.
  • Nodes follow the longest chain, which carries the most work.
  • Difficulty adjusts to keep new blocks steady.

Short answer

Proof of work secures a blockchain by making miners spend computational effort to add each block. A change to an old block then requires redoing that effort for it and every later block.

Miners compete to add the next block, and the winner earns new coins for the work. The network checks that work and links each block to the ones before it.

Before you start: blocks and hashes

A hash is a short code that changes if the data changes. Each block carries a fingerprint of the block before it, and that fingerprint is a cryptographic hash.

  • Each block carries a fingerprint of the block before it.
  • The fingerprint is a hash, and the links form a chain.
  • Change an old block, and a miner must redo its proof and every later block's proof.

Step by step: securing a new block

When a miner finds a valid proof, other nodes check it before adding the block. The protocol also adjusts the puzzle so blocks keep arriving at a steady rate.

  1. 1Solve the puzzleMiners guess values until one finds a hash that meets the target. The first miner to find a valid proof adds the next block.
  2. 2Verify the proofNodes check that the hash meets the target and that each transaction is valid.
  3. 3Follow the longest chainIf two valid blocks appear, nodes follow the longest chain, which is the chain with the most accumulated work.
  4. 4Adjust the difficultyThe protocol changes the puzzle target so new blocks keep a steady pace. More mining power makes the puzzle harder.

After: why tampering fails

Tampering becomes too costly because an attacker must outmine honest miners. To change an old block, the attacker must redo its proof and every later block's proof faster than the rest of the network adds new blocks.

Frequently asked questions

A double spend tries to pay the same coins twice. Once a transaction is in a block with proof of work behind it, changing it means redoing that block and every later block.

A majority attack is when one group controls more mining power than the rest of the network combined. That group can sometimes reverse its own recent transactions or block others, but it usually cannot steal coins from wallets.

Proof of work uses computational effort and energy, while proof of stake uses locked coins as the stake. In proof of stake, validators are chosen based on the amount they stake and can lose part of it if they cheat.

Mining uses energy because the puzzle is designed to be hard to solve and easy to check. Miners run specialized hardware that guesses solutions, and the energy cost is part of what makes tampering expensive.

Was this guide helpful?
Written byVahe HakobyanVahe Hakobyan is the editor-in-chief of World-Crypt. He covers bitcoin, markets and regulation, and leads the newsroom that fact-checks every story before it goes live.

Related guides

All Blockchain guides