Bitcoin fee-sniping reorg EV chart

This page models a rational miner considering a private fork to reorganize the last block and claim an unusually large fee. The chart scans hashrate q and plots the number of additional net public-chain blocks the miner would tolerate before the continuation value becomes non-positive.

Model inputs

Economic payoff
Opportunity cost
Fork state and search bounds

Continuation threshold by miner hashrate

Results

q p = 1 − q c used Attack? Start EV Best start give-up lead G* P(win) at G* E[events] at G* Give up when public lead reaches Chart y: additional net public blocks tolerated
Formula notes

The model uses the conservative one-block-ahead success condition: the private fork succeeds when its lead reaches d = -1. It gives up at a public lead boundary G. For each current public lead d, the page scans all G > d and keeps the best positive expected value.

p = 1 − q
ρ = q / p

Pwin(d,G) = (ρ^(d+1) − ρ^(G+1)) / (1 − ρ^(G+1)), when q ≠ p
Pwin(d,G) = (G − d) / (G + 1), when q = p

T(d,G) = { (G+1)[(1 − ρ^(d+1))/(1 − ρ^(G+1))] − (d+1) } / (p − q), when q ≠ p
T(d,G) = (d+1)(G−d), when q = p

EV(d,G) = Pwin(d,G)(F + B·R − Φ) + R·M(d,G) − c·T(d,G)

M(d,G) is the expected number of additional private blocks mined on paths that end in success, weighted by success probability. It is solved in JavaScript from the recurrence:

M(d) = q · [Pwin(d−1,G) + M(d−1)] + p · M(d+1)
M(−1) = 0, M(G) = 0

The plotted y-value is:

y = max(0, giveUpLead − d₀)

So with d₀ = 1, a y-value of 1 means: "try the reorg, but give up if the public chain gets to a 2-block lead." If a point hits the configured max public lead, increase the scan bound to see whether the positive-EV region extends farther.