In our previous article  we gave a rigorous foundation for the profitability of alternative mining strategies in the Bitcoin network . As for games with repetition, it depends on the proper analysis of the revenue and the duration over attack cycles. More precisely, the expected revenue and expected duration over an attack cycle give the “Revenue Ratio”
This is the correct benchmark for the profitability of the strategy.
This analysis was also carried out previously by the authors in  to the “Selfish Mining” (SM) strategy from  and in  to “Lead-Stubborn Mining” (LSM) and “Equal Fork Stubborn Mining” (EFSM) strategies from . In these articles we found for these strategies the exact mathematical formula for the revenue ratios and we compared its profitability in parameter space.
The main technique for these derivations is the application of martingale techniques introduced in  that yield, using Doob’s Stopping Time Theorem, the expected duration of the attack cycles. We assume in the computation of the Revenue Ratio that there is no difficulty adjustment inside the attack cycles, or that is much shorter than the period of difficulty adjustment so that its effect in the cycles can be neglected. But, as we proved in , the effect of these attacks is to slow down the network, and it is only after a difficulty adjustment that these “block withholding strategies” can become profitable. Then the profitability can also be read on the apparent hashrate. So these rogue strategies are an exploit on the difficulty adjustment formula and we gave in  an improvement proposal of the Bitcoin protocol to fix the difficulty adjustment formula.
In this article we apply again these new techniques to another block withholding strategy: The “Trail-Stubborn Mining” strategy from . In this strategy, the block withholder miner does not give up when the honest chain takes over some block advantage, but instead keeps mining on top of his secret chain and only gives up if the advantage of the honest chain reaches blocks. We talk about “-Trail-Stubborn Mining” strategy or in short.
We denote by be the block reward, and the average inter-block validation time for the total network (around minutes for the Bitcoin network). We denote by (resp. ) the relative hashing power of the attacker (resp. honest miners) and . Let be the fraction of the honest network that the attacker attracts to mine on top of his fork. For a miner that after a difficulty adjustment has a Revenue Ratio we define his apparent hashrate by
The apparent hashrate of a miner can also be defined after a difficulty adjustment as the average proportion of blocks mined by the miner in the official blockchain. Our main Theorem is:
Theorem 1 (-Trail-Stubborn mining).
Let . The revenue ratio of the “-Trail-Stubborn mining” strategy is
where for , and .
After a difficulty adjustment, the apparent hashrate of the stubborn miner is
The polynomial vanish at , as well as its two first derivatives, hence is a polynomial in . Making in Theorem 1 we get Theorem 1 of  as a particular case. Indeed, we have , i.e. -Trail-Stubborn Mining and Lead-Stubborn Mining strategies are the same. Before proving Theorem 1 we need to study a classical refinement of the Gambler’s Ruin Problem: The hiker problem.
2. The hiker problem.
We consider a hiker on with , . His position is denoted by the random process
. The transition probability fromto are
for . It is independent of . We make the assumption that and are absorbing boundaries: . The problem is studied in  where it is proved that with probability the hiker exits . We need more precise information.
For and , let be the stopping time defined by
We denote , i.e. is the stopping time for exiting starting from . From , we have almost surely. The condition is equivalent to the realization of the event “the hiker exits at ”.
The first two equations are well known classical results that can be found in  p. and p.. The last equation is from  and is not so classical and, to be self-contained, we give another proof in Appendix B.
We have .
We denote by (resp. ) the number of steps to the left (resp. right) realized by the hiker between and .
In other terms, and for
Note that for .
If the hiker exits at 1 (resp. ), then (resp. ). So we have
and the result follows from Theorem 2.2. ∎
In particular, for this gives:
3. Expected duration of the Trail-Stubborn Mining Strategy
3.1. Notations and previous results.
We set, and . We note and the two independent Poisson processes with parameters and representing the number of blocks validated by the honest miners and the rogue miner. We denote by (resp. ) the inter-block validation time for the honest miners (resp. attackers).
We use some notations from . In particular, for the stopping times:
We proved in  that
More precisely, for , we have
where denotes the -th Catalan number, whose generating series is .
At the end of an attack cycle, the revenue of a miner following the Lead Stubborn Mining strategy is denoted by .
3.2. Description of the -Trail-Stubborn mining strategy
At the beginning of an attack cycle both, the rogue miner and the honest miners start mining on top of the same common block. Then, either the first block is discovered by the honest miners, and the attack cycle ends, or the attacker is the first one validating a block. Then, he keeps mining secretly until he is being caught up by the honest miners. During this period, each time the honest miners publish a new block, the rogue miner broadcasts the part of his fork sharing the same height. Once he has been caught up, there is a “decisive competition” to decide which fork prevails. In this competition, the rogue miner does not withold his block. There are two cases depending on who the winner is. Either the new block is mined on top of a block validated by the rogue miner (by himself or by a fraction of the honest miners) and then the attack cycle ends immediatly. Otherwise, the attacker has a fork which is one block behind the official blockchain. We call this event . His delay is defined as the difference between the height of the official blockchain and his fork. Then, he keeps mining until his delay exceeds a fixed threeshold , or ends up leading the official blockchain by one block. Then, in both cases, the cycle attack ends. The trailing mining strategy is a repetition of these attack cycles.
3.3. Stopping time
We denote by the stopping time of an attack cycle corresponding to the Trail-Stubborn mining strategy (TSM). At the end of an attack cycle the revenue of a rogue miner following TSM is denoted by . Note that when , there is a “decisive round” which starts at and ends at . So, and from to the two strategies and are the same.
3.4. Blocks of the rogue miner in the official blockchain
For , we denote by the number of blocks mined by a miner following the Trail-Stubborn Mining strategy at -time and present in the official blockchain. We have that is non-decreasing. Before , the two strategies “Trail-Stubborn Mining Strategy” and“Lead Stubborn Mining Strategy” are the same. So, by  we know that
The following conditions are equivalent to :
(the -th honest block is found on top of a block mined by a honest miner).
If one of these conditions is satisfied then , and . We have that is -measurable and .
If (i) holds then otherwise . Moreover, at , at least one block mined by the rogue miner has not been recognized by the official blockchain (otherwise, the cycle ends at and ). So, . If (ii) is true then . So, the miner has at least mined a block during the attack cycle. So, (otherwise as before and )). Moreover, the rogue miner has lost the “decisive competition”. Otherwise, we have . Also, by the same argument, the block found by the honest miners during this round cannot have been validated on top of a block mined by the rogue miner. So, we get (iii). Finally, if (iii) holds, then the rogue miner has lost the “decisive competition”. Hence, by definition of an attack cycle and so (i), (ii) and (iii) are equivalent. Also, if one of these conditions is satisfied, then the rogue miner did not mine a block during the period whereas the honest miner has found exactly one. So, and . Moreover the block found by the honest miners has been found on top of an honest block by (iii). So we have, . By (ii), is -measurable. Moreover, the condition occurs with probability and the two last conditions of (iii) occur with probability . Therefore, we have . ∎
We consider that after a possible second phase of the attack cycle (after ), the rogue miner following will give up if his delay exceeds with . Note that at the beginning of this second phase, the delay of the miner is . So, . Note also that in order to win, it is not enough for the miner to catch-up the official blockchain. He needs to lead it by block. So, his delay is in between and . Therefore, he behaves as the hiker studied in Section 2 with delay and .
where is the stopping time defined by
with and .
In particular, we have that and are two independent Poisson processes with respective parameters and , and is independent with .
The stopping time of the Trail-Stubborn Mining Strategy is the same as the stopping time of the Lead Stubborn Mining strategy studied in  except when the stubborn miner has been first mining a block, then has been caught-up by the honest miners, and at has lost the final “competition” (when a fraction of the honest miners finds a new block on top of a honest block). We have called this event. If it occurs, then the stubborn miner keeps on mining until he catches up the honest miners or his delay becomes too big. In this case, he needs to catch-up the honest miners and also lead the official blockchain by . The start time of this possible second round is with and the miner will stop at with or . The first equality is equivalent to and the second is equivalent to . Moreover, by the strong Markov property is independent with . So, by Lemma 3.1, it is also independent with . ∎
Note that the condition is equivalent to with . So we have that the miner is a hiker on as studied in section 2 starting from with . In Appendix A we prove the following Proposition:
4. Revenue ratio of the Trail-Stubborn Mining Strategy
In this Proposition is the number of blocks validated by the rogue miner during the second phase of the strategy. The event (resp. ) means that the cycle is made of two distinct phases: in the first one the rogue miner looses the first phase of the attack, and in the second one he wins (resp. looses) the second phase.
If , then the miner tries to catch-up the official blockchain. He is in the position of a hiker starting from and winning when . Each move to the left (towards ) corresponds to a new block mined by the stubborn miner. So, if he succeeds (case ), then he earns a reward . If he fails (case ) then he earns only and the attack cycle ends. Otherwise, the strategy ends at and . The result then follows from Lemma 3.1. ∎
Now we compute the expected revenue of the -Trail-Stubborn Mining Strategy in an attack cycle.
and for ,
Note also that
If occurs then .
If occurs (with ) then with probability and with probability .
If occurs then .
If occurs then .
Moreover for , we have
and we get the result using (1). ∎
5. Difficulty adjustment
The parameter updating the difficulty of the -trail stubborn mining strategy is given by
From  we have that . ∎
We denote by the long-term apparent hashrate of the -Trail-Stubborn-mining strategy. As we have already observed, the lead-stubborn mining strategy LSM is a particular case of the -Trail-Stubborn-mining strategy with (in tis case, there is no possible second phase of the attack after ). We note that Theorem 1 yields one of the results of : if we choose in Theorem 1, we get Theorem 1 of . In Figure 1 below, we compare (the long-term apparent hashrate of the strategy LSM) with . Depending on , this shows when a second phase of the attack increases the efficiency of the strategy LSM. In general, when is small, TSM is an amelioration of LSM.
For greater than , TSM with dominates all other trailing strategies whatever is. See Figure 2.
Also, if , then
On the other hand, when , the apparent hashrate after a difficulty adjustment for the selfish mining strategy is . It turns out that for ,
Hence, when and , SM dominates all TSM strategies.
6. Mixed strategies.
6.1. Weight of a mining strategy
We consider a miner mining according to a strategy .
The weight of a mining strategy is the average number of official blocks mined during an attack cycle. It is denoted by the greek letter .
Note that if the strategy leads to a difficulty adjustment , then we have: .
6.2. Apparent hashrate of a mixed strategy
We consider now a miner implementing a mixed strategy. He starts mining according to strategy 1, then at the end of an attack cycle, he decides to follow another strategy 2, and so on until he comes back to strategy 1 after implementing of different strategies. Thus the attack cycle is a given pattern of attack cycles of different strategies.
We denote by the revenue ratio, revenue, duration time, long-term apparent hashrate, difficulty adjustment and weight over an attack cycle of strategy . We denote by and , the revenue ratio, revenue, duration time, long-term apparent hashrate, difficulty adjustment and weight after an attack cycle of the mixed strategy.
We have that is barycenter of weighted by .
The number of official blocks mined after a whole attack cycle of the mixed strategy is . Moreover, . Therefore,
Similarly, we have
We have with equality if and only if the strategy is not mixed.
Therefore, there is no advantage in implementing mixed strategies.
7. Comparison with other strategies
We compare Trailing-Stubborn Mining strategies with and other strategies HM, SM, LSM and EFSM studied in . We observe that LSM is the dominant strategy in a very thin region between SM, EFSM and TSM2. Below to the right (but for not too small), the dominant strategy is TSM3. The strategy TSM4 is dominant in a very little domain with and %. For less than 5% and large (but less than ), SM is the dominant strategy confirming the observation at the end of section 5.
Appendix A Poisson processes and random walk.
Let and be two independent Poisson processes with parameters and starting at : . For , with , let