Abstract

Pay per last N shares (PPLNS) is a popular pool mining reward mechanism on a number of cryptocurrencies, including Bitcoin. In PPLNS pools, miners may stand to benefit by delaying reports of found shares. This attack may entail unfair or inefficient outcomes. We propose a simple but general game theoretical model of delays in PPLNS. We derive conditions for incentive compatible rewards, showing that the power of the most powerful miner determines whether incentives are compatible or not. An efficient algorithm to find Nash equilibria is put forward, and used to show how fairness and efficiency deteriorate with inside-pool inequality. In pools where all players have comparable computational power incentives to deviate from protocol are minor, but gains may be considerable in pools where miner’s resources are unequal. We explore how our findings can be applied to ameliorate delay attacks by fitting real-world parameters to our model.

A Appendix

A.1 Remarks

In the proofs, several aspects related to the concept of incentive compatibility are discussed. For that purpose, it is important to show that:

(1) for the current proofs, we will distinguish only two cases (instead of 3 in Eq. 3) \( 0<x \le N \) and \( x=0 \). That can be explained by the fact that pool mining is either entirely honest or not (incentive compatibility questions only that aspect). The state of incentive compatibility when nobody delays can be derived from Eq. 3, \( x_{i}=0, \forall i \):

The latter notation will be used as it allows to analyse conditions for incentive compatibility using the roots of a system of linear equations.

(2) One should distinguish between two different situations: a miner i may have incentives to delay a positive number of shares even if \( i\notin \mathcal {M} \); or, a miner i is included in \( \mathcal {M} \) and definitely has an incentive to delay. It is assumed that miners in \(\mathcal {M} \) do not have information about other delaying miners from outside \(\mathcal { M}\). As a result of inclusion (or not inclusion) in the group of delaying miners \( \mathcal {M} \), the incentive may be different. That is easy to see on the following example: the amounts of the shares delayed by miners in \(\mathcal {M}\) depend on their information about \(\mathcal {M}\), but, for i-th miner who is not in \(\mathcal {M}\) the amount of delayed shares depends on the information about himself (\(\tau _{i}\)) and the information about the number of shares that are delayed by miners in \(\mathcal {M}\). However, in case i is the only miner in \(\mathcal {M}\), e.g. \(\mathcal {M}=\{ i \} \) the incentive of the miner i is the same as if \(\mathcal {M}= \varnothing \).

According to the definition, incentive compatibility is an equilibrium when \(\mathcal {M}=\varnothing \) and nobody has an incentive to delay. Nonetheless, it is not clear if a pool with incentive compatible conditions can be in a state of another equilibrium when \(\mathcal {M} \ne \varnothing \), \( \vert M \vert >1 \). Information about \(\mathcal {M}\) may be incomplete, and, answer to the question about other (delaying) equilibrium may require certain assumption about \(\mathcal {M}\). In order to resolve that obstacle, we will produce some intermediate results in Lemmas1 and 2.

A.2 Lemmas

Lemma 1

If there is an equilibrium and a set \(\mathcal {M}\) of delaying miners \(\tau _{i}\), \( i \in \mathcal {M} \), delaying positive number of shares, then miner with power \( \tau _{k} \) is also delaying if \( \exists k \notin \mathcal {M},~ \tau _{k} \ge \tau _{i} \).

Proof

Let’s assume that \(l=\mathrm {arg ~ \underset{\mathcal {M}}{min}} \tau _{i} \). Considering ONLY delaying by miners in the system described by set \( \mathcal {M} \), we rewrite (5) and express \( x_{l} \) as

Now, we investigate incentive of a miner with \( \tau _{k} \), \( k\notin \mathcal {M} \), who has information about delaying miners from \( \mathcal {M} \). As previously, we use (5), however, in that case additional components with index k is included:

Lemma 2:

Conditions that support incentive compatibility are inconsistent with any other kind of deviation represented by \(\mathcal {F}\).

Proof

We organize our proof in the following order. First, some \(\mathcal {M}\), \( \vert \mathcal {M} \vert =l \), is considered. That can be expanded by adding index \( l+1 \) which represents a miner who can delay profitably. As a result, \( \mathcal {M} \rightarrow \mathcal {M}^{'} \), \( \vert \mathcal {M} ^ {'} \vert =l\,+\,1 \). Two cases of delay attack will be accounted for a miner with \( \tau _{l\,+\,1} \): attack with \( \mathcal {M} \), attack with \( \mathcal {M}^{'} \). Expressions for the number of delayed shares (\( x_{l+1}^{\mathcal {M}} \) and \( x_{l\,+\,1}^{\mathcal {M}^{'}} \), respectively) will be elaborated for the both cases. It will be demonstrated that if \( x_{l\,+\,1}^{\mathcal {M}} \) is positive, then \( x_{l\,+\,1}^{\mathcal {M}^{'}} \) is positive too, and, vice versa.

Second, we are going show that by reducing \( \mathcal {M} \) we will arrive to \( \mathcal {M}^{1} \), \( \vert \mathcal {M}^{1} \vert =1 \), containing only the most powerful miner of that pool with power \( \tau _{1} \). That would mean that a single deviation from incentive compatibility is profitable, which contradicts with the requirement for equilibrium. This conflicts with our assumption about incentive compatibility.

(2) Further, the following technique will be used. Posit that the same conditions that provide incentive compatibility may be exploited by a set of miners \( \mathcal {M} \), \( \vert \mathcal {M} \vert =l \), to delay profitably. Also, let us assume another case of a set \( \mathcal {M}^{l-1} \), \( \vert \mathcal {M}^{l-1} \vert =l-1 \), and a miner with power \( \tau _{l} \) who has information about \( \mathcal {M}^{l-1} \). In those two cases, miner with power \( \tau _{l} \) delays profitably according to the proof provided above. For the latter case, the configuration for delaying equilibrium can be represented as \( \{ \mathcal {M}^{l-1},~l \} \). According to the results from Lemma1, miner \( \left( l-1 \right) \,\in \,\mathcal {M}^{l-1} \) also delays profitably. Therefore, we may consider another possible configuration \( \{ \mathcal {M}^{l-2},~l-1 \} \) for whom delaying is definitely profitable. Finally, we may arrive to the configuration \( \{ \mathcal {M}^{1},~2 \} \) where \( \mathcal {M}^{1} \) contains only 1-st miner with power \( \tau _{1} \), who can delay profitably. In such case he has an incentive to deviate from honest mining even though the information about actions of others is not taken into account. That clearly contradicts with the assumption that incentive compatibility is an equilibrium. \(\square \)

Lemma 3:

For incentive compatible mining under PPLNS it is sufficient and necessary that \( \tau _{1} \le \frac{N}{N+D} \).

Proof

Condition \( \tau _{1} \le \frac{N}{N+D} \) can be derived from the requirement \( \hat{N} \ge \tau _{1} \left( \hat{D}+N-x_{1} \right) \), \( x_{1}=0 \), for special case when \( \mathcal {M}= \varnothing \) meaning that for the most powerful miner it is not profitable to delay. From the second part of Lemma2 it is easy to see why such condition is necessary for incentive compatibility. In addition, it will be illustrated that it is sufficient. We consider \( \mathcal {M}^{1} \) which includes only the 1-st miner. According to Lemma1, the number of delayed shares for the second powerful miner with power of \( \tau _{2} \) (who is not yet included in \( \mathcal {M}^{1} \)) is not positive either, \( x_{2}^{\mathcal {M}^{1}} \left( 1- \tau _{2} \right) \le x_{1}^{\mathcal {M}^{1}} \le 0 \). If we consider \( \mathcal {M}^{2} \) that includes the 1-st and 2- miners, according to Lemma2, sign of \( x_{2} \) does not change. Hence, neither further expansion of \( \mathcal {M} \) nor considering delay from miners that are not included in \( \mathcal {M} \) can produce roots that are entirely positive. This means that no delaying configuration can be in a state of equilibrium. \(\square \)