Skip to content

Instantly share code, notes, and snippets.

@PierreRochard
Created October 22, 2025 19:53
Show Gist options
  • Select an option

  • Save PierreRochard/1759da76a448fe8d3992fc96b45233ba to your computer and use it in GitHub Desktop.

Select an option

Save PierreRochard/1759da76a448fe8d3992fc96b45233ba to your computer and use it in GitHub Desktop.
The object we are estimating is the probability that a just-found honest
block is orphaned immediately when the attacker has no private lead. In the
Nakamoto Poisson race, a minority attacker must find two blocks before the
honest side finds one. The chance of "attacker then attacker" is p^2, where
p is the attacker's hash share. That is the baseline result from the
whitepaper-style catch-up analysis and the backbone literature. It is a
timing statement about who finds the next two blocks, not about fee levels
or miner opinions.
If you want to model miners who sometimes follow the attacker in a tie, the
standard parameter is gamma: the fraction of honest hash that, in a
one-block tie, mines on the attacker's block. With this tie advantage, the
immediate orphan probability becomes
p * [ p + gamma * (1 - p) ] = p^2 + gamma * p * (1 - p).
That is the canonical correction term. Writing "p * q" with an undefined
"q" is not the right object. You need the probability that, conditional on
a tie, honest miners side with the attacker, which is exactly what gamma
encodes.
Bitcoin's default rule is first-seen for tie breaking: nodes follow
most-work, and on equal work they prefer the tip they saw first. That
corresponds to gamma near zero absent unusual propagation advantages.
Raising gamma is therefore a deviation from the default that must be
justified by network asymmetries or by miners explicitly choosing to ignore
first-seen.
The right way to price a miner's choice is expected value, not allegiance.
Let S be the subsidy, F_parent the fees on the parent-confirming tip, and
F_attacker the fees on the attacker tip. Using the immediate window above,
the survival probability of the honest block is
1 - [ p^2 + gamma * p * (1 - p) ],
and the immediate orphan probability is
p^2 + gamma * p * (1 - p).
A miner should extend the parent when
[ 1 - p^2 - gamma * p * (1 - p) ] * ( S + F_parent )
>
[ p^2 + gamma * p * (1 - p) ] * ( S + F_attacker ).
This inequality is the crux. The attacker's payoff is probability-discounted,
so a modest fee edge on the parent side can outweigh a larger raw reward on
the attacker side. Any increase in gamma raises the attacker's odds but also
raises the fee bounty that rational miners demand to compensate for the extra
orphan risk.
Fee mechanics push in the right direction. RBF lets a sender reprice a stuck
transaction upward. CPFP lets a receiver attach a high-fee child that only
pays if the parent is confirmed. Bitcoin Core's block builder sorts by
ancestor-inclusive feerate, so a high-fee child boosts the entire package,
and mempool eviction protects high-fee packages by dropping lowest descendant
feerate first. The effect is to concentrate the richest fees on the
parent-confirming chain. If a miner "breaks the tie against the censor" they
are taking compensated risk because F_parent is visibly larger, and the
compensation scales up the longer the stalemate lasts.
The suggestion to side with the censor because "kicking transactions back to
the mempool" gives you a chance to mine them later ignores two facts. First,
those transactions do not sit at the same price: RBF and CPFP raise their
fees, and package mining makes them collectible only by confirming their
parents. Second, the opportunity cost is immediate: the first pool that
defects takes the entire fee pot now. Waiting is a negative-EV strategy if
any competitor is willing to defect. Cartels that leave money on the table
are brittle.
Finally, note the direction as the subsidy halves. Rearranging the EV
inequality gives a fee threshold for honest mining to dominate:
F_parent >
[ ( S + F_attacker ) * ( p^2 + gamma * p * (1 - p) ) ] /
[ 1 - p^2 - gamma * p * (1 - p) ].
As S declines, the threshold falls. In the fee-only limit it is enough that
F_parent modestly exceeds F_attacker. Even if total rewards shrink, the
marginal fee needed to make "defect to the parent tip" the rational choice
becomes smaller, not larger. That is the opposite of the "p * q, so follow
the censor" intuition.
In short: p^2 is the correct baseline for immediate orphaning from no lead;
gamma is the standard way to account for tie-break deviations; and once you
price miner EV under real fee mechanics, siding with a censor to "wait and
hope" loses to defect-now in expectation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment