# Mining Pool Selection under Block WithHolding Attack +
## 3 Evolutionary Game for Mining Pool Selection
### Expected Payoff
#### 3.2.1. Revenue Density  
Next, we consider the revenue density \(r_{i}\), which is calculated as the total revenue of pool \(i\) divided by the total hash power _seen by_ pool \(i\). As pools can not detect the existence of infiltrated hash power, the total hash power _seen by_ pool \(i\) includes the hash power of pool \(i\) and those from other pools that attack pool \(i\). Letting \(R_{i}\) be the total revenue of pool \(i\) and \(H_{i}\) be the total hash power of pool \(i\), we can formulate the revenue density of pool \(i\) as  
\[r_{i}(\mathbf{x},\mathbf{\omega},s_{i},\mathbf{a})=\frac{R_{i}(\mathbf{x},\mathbf{\omega},s_{i}, \mathbf{a})}{H_{i}(\mathbf{x},\mathbf{\omega},\mathbf{a})}. \tag{2}\]  
The total revenue of pool \(i\) consists of the revenue obtained from honest mining (i.e., winning the mining competition) and that obtained by attacking other pools. We call the former mining revenue and the latter attacking revenue. The mining revenue consists of the residual transaction fees and a fixed amount of revenue from the coinbase of the new block. Let \(C\) denote the fixed revenue from the coinbase and \(\rho\) denote the transaction fee \begin{table}
\begin{tabular}{c l} \hline \hline
**Parameters** & **Meaning** \\ \hline \(\mathcal{N}\) & The set of miners with \(|\mathcal{N}|=N\), where \(N\) is the number of miners. \\ \(\mathcal{M}\) & The set of mining pools. \(\mathcal{M}=\{1,2,\dots,M\}\), where \(M\) is the number of mining pools. \\ \(x_{i}\) & The population fraction of miners in pool \(i\). \\ \(\mathbf{x}\) & The population state, \(\mathbf{x}=[x_{1},x_{2},\dots,x_{M}]\). \\ \(\omega_{i}\) & The minimum hash power required to join pool \(i\). \\ \(\mathbf{\omega}\) & The hash power requirement profile, \(\mathbf{\omega}=[\omega_{1},\omega_{2},\dots,\omega_{M}]\). \\ \(s_{i}\) & The size of blocks to be mined by pool \(i\). \\ \(a_{ij}\) & Attack size, i.e., the fraction of hash power used by pool \(i\) to attack/infiltrate pool \(j\). \\ \(\mathbf{a}_{i}\) & The attack profile of pool \(i\), \(\mathbf{a}_{i}=[a_{1},a_{i2},\dots,a_{iM}]\). \\ \(\mathbf{a}\) & The total attack profile of all pools, \(\mathbf{a}=[\mathbf{a}_{1},\mathbf{a}_{2},\dots,\mathbf{a}_{M}]\). \\ \(y_{i}(\mathbf{x},\mathbf{\omega},s_{i},\mathbf{a})\) & The expected payoff of miners in pool \(i\). \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Game parameters. per unit block size. The mining revenue is thus given by \(C+\rho s_{i}\). Since pool \(i\) can obtain the mining revenue only when it wins the mining competition, we need to consider the winning probability. Defining the winning probability by \(P_{i}^{min}\), we obtain the expected mining revenue of pool \(i\) as \((C+\rho s_{i})P_{i}^{win}\). Attacking revenues are the revenues obtained from attacking other pools. Suppose pool \(i\) attacks pool \(j\) with an attack size \(a_{ij}\), i.e., pool \(i\) injects a fraction \(a_{ij}\) of its own hash power into pool \(j\) for launching the BWH attack. The attacking revenue from pool \(j\) is the product of attacking hash power and the revenue density of pool \(j\), which is given by \(Nx_{i}\omega_{i}a_{ij}r_{j}\), where \(Nx_{i}\omega_{i}\) is the hash power of pool \(i\) and \(r_{j}\) is the revenue density of pool \(j\). Summing up the attacking revenues from all the attacked pools gives the total attacking revenue of pool \(i\), which is \(Nx_{i}\omega_{i}\sum_{j=1,j\
eq i}^{M}a_{ij}r_{j}\). Finally, combining the expected mining revenue and the total attacking revenue yields the following expression of the total revenue of pool \(i\):  
\[R_{i}(\mathbf{x},\mathbf{\omega},s_{i},\mathbf{a})=(C+\rho s_{i})P_{i}^{win}+Nx_{i}\omega_{ j}\sum_{j=1,j\
eq i}^{M}a_{ij}r_{j}. \tag{3}\]  
For the case without considering the attacking revenue as in [25], we can simplify the total revenue of pool \(i\) to  
\[R_{i}(\mathbf{x},\mathbf{\omega},s_{i},\mathbf{a})=(C+\rho s_{i})P_{i}^{win}, \tag{4}\]  
by simply ignoring the second term in the right-hand side of (3).