Block Race: Nakamoto consensus, animated
⛏️ Bitcoin offers probabilistic finality without a trusted central party. Miners race to extend valid chains; nodes follow the chain with the most accumulated proof of work. To reverse a payment, an attacker must catch and overtake the honest chain, and the modeled success probability decays exponentially in the number of confirmations while the attacker controls less than half the hash power. This animation derives that probability from the ground up: the gambler's ruin, Satoshi's Poisson head-start, and the punchline that "6 confirmations" hides an assumption about who you're racing.
honest chain attacker fork your payment key equation
🧠 What did you just learn?
Consensus is a race, not a vote. Bitcoin has no authority that decides which history is true. Nodes follow the valid chain with the most accumulated proof of work. Each block discovery is modeled as a weighted race whose win probability equals a miner's share of total hashrate, so an attacker with fraction q of the network mines the next block with probability q.
Falling behind is a gambler's ruin. Model the honest chain's lead over the attacker as a biased random walk: +1 when honest mines (probability p), −1 when the attacker mines (probability q = 1−p). The probability an attacker currently z blocks behind ever catches up is the classic ruin result (q/p)z for q<p, exact geometric decay, and certainty (=1) once q ≥ p. Honest majority is not a slogan; it is the condition that makes the series converge.
Satoshi's refinement: the attacker had a head start. While honest miners publish z blocks, the attacker has been mining privately for the same elapsed time. Because hashing is memoryless, their secret block count is taken to be Poisson with mean λ = zq/p. Condition on that count and sum the gambler's-ruin tails to get the whitepaper's closed form, P(z) = 1 − Σ Poisson(k;λ)·(1 − (q/p)z−k). This Poisson step is an approximation, fixing the honest window at its mean, so it slightly understates the true risk (the exact count is Negative-Binomial). The honest framing matters more than a clean number.
The exponent's base is the adversary, not your patience. At z = 6, the reversal probability is 0.024% against a 10% attacker but 13.2% against a 30% attacker, a ~544× jump for a 3× change in adversary size. A 0.1% safety target needs 5 confirmations against a 10% miner and 24 against a 30% one. Security grows exponentially in z, but the base q/p is set by who you're racing, and finality is forever probabilistic, never absolute.
Scientific Context: Nakamoto consensus replaces absolute finality with a tunable, quantifiable probability. For how such blockchain mechanisms secure distributed machine-learning pipelines, see the author's survey: "Blockchain-Enhanced Machine Learning" (IEEE Access 2023).
📐 The math, precisely
Rendered on load. If equations appear as raw text, your browser blocked the math font CDN.
