Skip to content

What Is Proof of Work? How Blockchain Mining Works

How mining secures Bitcoin, what a 51% attack would take, and why the halving shapes what miners earn from every block.

Akane T.H.Updated 8 min read

Proof of work is the rule that decides who gets to add the next block to a blockchain, and it works by making that right expensive. Participants called miners spend electricity and computer hardware searching for a number that satisfies a mathematical condition. The first to find one publishes the block and collects the reward.

The cost is the point. Because adding a block consumes real resources, rewriting the history of past blocks would mean spending those resources again, on every block since, faster than the rest of the network can extend the honest chain.

How Proof of Work Works

Every miner on the network works on the same problem, and the problem is hashing. Take the data in a block of transactions, add a number called a nonce, run the result through a cryptographic hash function, and check whether the output — a fixed-length string of numbers and letters — falls under the network's difficulty target. In practice that means the hash has to start with a required number of zeroes.

There is no shortcut. The only method is to change the nonce and hash again, which mining hardware does trillions of times a second. That trial and error is the "work."

Finding a valid hash is hard. Checking one is not. Any other node takes the block and the winning nonce, hashes them once, and knows immediately whether the answer is good. That asymmetry — expensive to produce, cheap to verify — is what lets strangers agree on a single ledger with no bank or central authority in the middle.

A five-stage strip showing the mining loop: assemble the block's transactions and add a nonce, hash the result, check whether the hash falls under the difficulty target, change the nonce and hash again trillions of times a second until it does, then publish the block for other nodes to verify with a single hash.

Core Components of Proof of Work

Component Role in the System Analogy
Miners Network participants who use powerful computers to solve the cryptographic puzzle. Competitors in a global race to find a winning lottery ticket.
Hashing The process of converting input data into a unique, fixed-size string of characters. Creating a unique digital fingerprint for a block of transactions.
Block Rewards The incentive (new cryptocurrency and transaction fees) given to the winning miner. The prize money and trophy awarded for winning the race.

Most of these terms turn up across the rest of Web3 as well; the Web3 dictionary defines them.

Where Proof of Work Came From

The idea predates Bitcoin by 16 years, and it had nothing to do with money. It was an answer to spam.

Sending email costs the sender almost nothing, which is exactly what makes mass junk mail worth sending. In 1992, at the CRYPTO conference, Cynthia Dwork and Moni Naor proposed charging for it in computation instead: before a message went out, the sender's computer would have to work through a function that is deliberately slow but still finishes. For one email the delay is a fraction of a second. For a million emails it is a million fractions of a second, plus the hardware to do them in parallel.

In 1997 the cryptographer Adam Back turned that idea into a working scheme, Hashcash, using a cryptographic hash function as the puzzle. An email header carried a stamp proving that the sender's machine had burned CPU time to create it.

The Bitcoin whitepaper cites Hashcash directly. Satoshi Nakamoto kept the mechanism and changed its job: instead of rationing access to an inbox, the work would decide who writes the next page of a shared ledger, and make rewriting earlier pages expensive.

How Proof of Work Secures the Blockchain

The security model is not passwords or firewalls. It is cost.

Each new block contains the hash of the block before it. That single detail turns a pile of blocks into a chain: every block commits to the entire history behind it, back to the first one.

Why the Chain Is Hard to Rewrite

Suppose someone wants to reverse a payment made a few blocks ago. They cannot simply edit it.

  • The hash changes. Altering any data in a past block changes that block's hash completely.
  • The link breaks. The new hash no longer matches the hash stored in the block that follows, and every node can see it.
  • The work has to be redone. To hide the break, the attacker has to find a valid nonce again for the altered block and for every block after it — while honest miners keep extending the real chain, which the attacker now has to catch and overtake.

On a network the size of Bitcoin's, that means out-hashing everyone else for as long as the attack takes.

The 51% Attack

The main theoretical threat is a single entity, or a coordinated group, controlling more than half of the network's total hash rate. With that much power they could:

  • stop chosen transactions from being confirmed
  • delay confirmations generally
  • reverse their own recent transactions and spend the same coins twice

They still could not create coins outside the issuance rules or move coins out of wallets whose keys they do not hold. Those limits are enforced by every node's validation rules, which hash power does not override.

What keeps this theoretical on large chains is the price of entry: out-hashing the rest of the mining industry means buying and powering hardware on the scale of that entire industry, and doing it to devalue the coin the attack pays out in. On a small chain with little hash rate behind it, the same arithmetic is far less reassuring.

The Economics of Mining

Nobody contributes hashing power out of goodwill. Miners buy specialized machines and pay large electricity bills because mining pays, and the network's security is a side effect of that business being more profitable run honestly than run against the rules.

Where Miner Revenue Comes From

There are two sources. The block reward is new cryptocurrency that the protocol allows the winning miner to create; for Bitcoin, this is how new BTC come into existence. Transaction fees are paid by the senders whose transactions go into the block, and the winning miner keeps all of them. Fees are usually the smaller share today, and are designed to become the larger one as block rewards shrink.

The Halving

Bitcoin's block reward halves every 210,000 blocks, which works out at roughly four years. After the halving in April 2024 the reward is 3.125 BTC per block, and the next one is due around 2028. The schedule caps total supply and makes issuance predictable, which is the point of it.

It also puts steady pressure on miners: the same hardware earns half as much in coin terms overnight, so cheap power and efficient machines decide who survives each cycle.

Costs and the Difficulty Adjustment

The main expenses are:

  • Hardware. Bitcoin mining runs on ASICs (application-specific integrated circuits), machines built to compute one hash function and nothing else.
  • Electricity. Running them around the clock is usually the largest ongoing cost.
  • Infrastructure. Cooling, the building, connectivity and maintenance.

When the coin price falls or the difficulty rises, the least efficient miners switch off. The network corrects for this on its own: Bitcoin recalculates its difficulty every 2,016 blocks, about once every two weeks, so when hash power leaves, the target gets easier and block times drift back toward ten minutes. The same loop runs in reverse when miners join.

A single large figure: Bitcoin recalculates its mining difficulty every 2,016 blocks, roughly once every two weeks, which pulls block times back toward ten minutes.

Proof of Work in the Real World

Bitcoin

Bitcoin is the original proof of work chain and still the largest. It uses SHA-256, a hash function standardised by the US National Institute of Standards and Technology in August 2002 (FIPS 180-2, after a 2001 draft), and it has been producing blocks since the first one in January 2009.

Roles building and running this kind of infrastructure sit under blockchain jobs.

Other Major Proof of Work Coins

Bitcoin is not the only chain using the model, and the others mostly differ in which hash function they picked. Choosing something other than SHA-256 kept them off the hardware built for Bitcoin, at least at first.

  • Litecoin (LTC): uses Scrypt, designed to be memory-intensive so that ordinary CPUs and GPUs stayed competitive for longer. Purpose-built Scrypt ASICs arrived in 2014 and dominate it now too.
  • Dogecoin (DOGE): also runs on Scrypt, and since 2014 it has been merge-mined with Litecoin, so the same work can secure both chains at once. It has a faster block time than Litecoin and no supply cap.

Comparison of Major Proof of Work Cryptocurrencies

Cryptocurrency Hashing Algorithm Average Block Time Primary Use Case
Bitcoin (BTC) SHA-256 ~10 minutes Digital Gold, Store of Value
Litecoin (LTC) Scrypt ~2.5 minutes Faster Digital Payments
Dogecoin (DOGE) Scrypt ~1 minute Tipping, Microtransactions

Proof of Work vs Proof of Stake

Proof of work is a race anyone with hardware can enter: spend energy, win blocks. Proof of stake replaces the race with collateral. Participants called validators lock up a quantity of the network's own cryptocurrency, the protocol picks who proposes the next block with odds weighted by how much is staked, and a validator caught signing invalid blocks loses part of that stake in a process called slashing.

Security and Decentralization

Proof of work anchors security to something physical. Hardware and electricity are bought in the real economy at real prices, so the cost of attacking the chain is a number anyone can estimate.

Proof of stake anchors it to the asset itself. Attacking the chain means risking the coins that had to be bought in order to attack it. Critics argue this concentrates influence with whoever already holds the most; supporters point out that joining requires no warehouse, only the currency.

A two-column table comparing proof of work with proof of stake: miners racing with hardware versus validators locking up coins; electricity spent to win blocks versus coins staked as collateral; the first valid hash wins versus odds weighted by the amount staked; security anchored in physical cost versus in the asset itself; attack cost paid in energy versus paid in capital at risk.

Energy Use

Proof of work is deliberately energy-hungry, because the expense is the security. For Bitcoin, the Cambridge Centre for Alternative Finance publishes a running estimate of the network's electricity use in its Bitcoin Electricity Consumption Index.

Proof of stake removes the race, and the electricity with it. Ethereum switched from proof of work to proof of stake on 15 September 2022; an estimate by the Crypto Carbon Ratings Institute, cited by ethereum.org, put the fall in the network's annualized electricity use at more than 99.9%. Most chains launched since then use proof of stake.

A single large figure: more than 99.9 percent, the estimated fall in Ethereum's annualized electricity use after it switched from proof of work to proof of stake on 15 September 2022.

Neither model is simply better. Proof of work buys attack cost with energy; proof of stake buys it with capital at risk.

Common Questions

Why Does Proof of Work Use So Much Energy?

Because the energy is the security. The whole model rests on making a block expensive to produce, and that expense is paid in electricity and hardware. A version of proof of work that used little power would be cheap to attack.

Can a Proof of Work Chain Be Attacked?

Yes, in principle — through the 51% attack described above. Whether it is realistic depends entirely on the size of the chain. Attacking Bitcoin means assembling more hash power than the rest of the global mining industry; attacking a chain with a fraction of that hash rate is a much smaller undertaking.

Is Proof of Work Still Used?

Yes. Bitcoin, Litecoin and Dogecoin all run on it. Newer chains generally choose proof of stake for its efficiency. The two are a trade: a long track record and a physical cost of attack on one side, far lower energy use on the other.


Find Web3 lists Web3 roles in engineering, design, marketing and operations. See what is open now on jobs, and what those roles pay on salaries.