When the merchant of Section 2.2 ships the goods, the attacker’s private branch is some number of blocks behind the public chain; the attack succeeds if that branch ever overtakes it. This section models the deficit as a random walk (Definition 4.3) and computes the probability of that event as a function of the deficit (Theorem 4.4); the next section derives the distribution of the deficit. Both computations rest on the paper’s two assumptions, stated nearly verbatim (the environment form is ours, Remark 1.1):
The total hashrate of the honest network and the attacker is constant.
Combined they have a hashrate of H , of which p H belongs to the
honest network and q H to the attacker, where
The mining difficulty is constant, and such that with hashrate H the average time to find a block is T 0 .
Under Assumption 4.2 every block carries equal work, so the branch with the most work is the longest, and the race is measured in blocks. The deployed chain departs from both assumptions: difficulty adjusts after every block and hashrate drifts. The formulas are therefore an equal-difficulty baseline, not an exact model of deployment (Section 8.2).
Let z denote the honest chain’s lead in blocks over the attacker’s branch. By Proposition 3.4, each newly found block moves z up by 1 with probability p (honest block) or down by 1 with probability q (attacker block), independently of the past:
| z i + 1 = { z i + 1 with probability p, z i − 1 with probability q . |
The attack succeeds when z reaches − 1 : the private branch is then strictly ahead, and once released it replaces the public chain, removing the payment to the merchant.
Let a z be the probability that the walk of Definition 4.3, started at deficit z , ever reaches − 1 . Then
| a z = min (q / p, 1) max (z + 1, 0) = { 1 if z < 0 or q ≥ p, (q / p) z + 1 if z ≥ 0 and q < p . | (1) |
For
| h N (z) = p h N (z + 1) + q h N (z − 1) (0 ≤ z ≤ N − 1), h N (− 1) = 1, h N (N) = 0, |
a second-order linear recurrence. The trial solution
If
| h N (z) = (q / p) z − (q / p) N (q / p) − 1 − (q / p) N . |
If
Now let
When
When