Lecture 17 · Tuesday 18 November 2025

Mining pools and attacks

The lecture first gives Bitcoin its money mechanics: transactions, unspent transaction outputs (UTXOs), signatures and fees. It then turns to the industrial side, mining pools and their reward systems, and to the attacks that the incentive model admits, ending with selfish mining, where a minority of hash power (computing power spent on mining) earns more than its fair share.

Deck: 06_Bitcoin.pdf Chapter 6

Before ThisWhere Lecture 16 Left Off

Lecture 16 built the ledger: the double-spending problem (stopping the same coins being spent twice), consensus by majority of hash power, hash-linked blocks with Merkle trees (a tree of hashes that summarizes a block's transactions), difficulty retargeting (adjusting how hard the mining puzzle is) every 2016 blocks, the strongest-chain rule and the halving schedule (the mining reward halves at fixed intervals) that caps the supply at 21 million BTC. The ledger exists and pays its writers. This lecture asks what the writers write, and how they organize.

This LectureWhat It Adds

The first half is the money mechanics: transactions that consume unspent outputs and create new ones, signed by the owners of the inputs, with the fee as the difference between input and output sums. The second half is mining as a business. A single Antminer S9 (a dedicated Bitcoin mining machine) waits 54 years in expectation for one block, so miners join pools; the design problem is measuring each member's work. The answer is shares (near-solutions that prove how much each member worked). Proportional rewards, pool hopping (switching pools mid-round to chase higher payouts), Slush's scoring (the Slush pool's time-weighted share score) and pay-per-share (a fixed payout for every submitted share) follow.

The last part is attacks. A 51% adversary (one holding over half the mining power) can double spend (spend the same coins twice) and censor, and cannot forge signatures or inflate the supply. Implementation bugs produced the 184 billion BTC overflow and the manual fork at block 225430. The Elliptic Curve Digital Signature Algorithm (ECDSA) malleability changes transaction identifiers without changing payments. The pool attacks are sabotage and lie-in-wait. The lecture ends with selfish mining: withholding blocks makes honest work stale, and the Markov-chain (a step-by-step probability model) threshold $\alpha > (1 - \gamma)/(3 - 2\gamma)$ shows the attack paying off below majority power.

Study PlanWhat to Read, in Lecture Order

All sections are on the Chapter 6 page.

  1. Chapter 6 §7: Transactions and unspent transaction outputs (UTXOs). The transaction graph, splitting and merging value, signatures, timelocks (conditions that delay when coins can be spent) and the checks a full node (one that verifies every transaction itself) runs. The stage animates the deck's 25-BTC money graph; the lab validates a transaction against the UTXO set.
  2. §8: Mining pools. The solo variance problem, shares (near-solutions that prove a member's work) with $n' \ll n$, proportional rewards, pool hopping (switching pools to chase payouts), Slush's method (the Slush pool's time-weighted share score), pay-per-share (a fixed payout per share) and peer-to-peer mining (a pool with no central operator).
  3. §9: Attacks. The 51% attack (grabbing over half the mining power), integer overflow and manual forks, malleability, pseudonymity, Application-Specific Integrated Circuit (ASIC) centralization, Ghash.io (a large mining pool), sabotage and lie-in-wait, whale and flood attacks.
  4. §10: Selfish mining. Withholding, the Markov chain (a step-by-step probability model) on the adversary's lead, the revenue threshold and the uniform-tie-breaking fix (pick randomly between tied chains). The stage shows the private chain orphaning an honest block.

PracticeExercises for This Lecture