# Mining Pool Selection under Block WithHolding Attack +
Footnote †: This paper is an extended version of our paper presented in the 2020 IEEE International Conference on Blockchain (IEEE Blockchain 2020). Kentaro Fujita  
Graduate School of Science and Technology, Nara Institute of Science and Technology, Takayama-cho, Ikoma, Nara 630-0192, Japan; fujita.kentaro. the blockchain system, whose goal is to find the latest valid block (called full PoW). Valid blocks have hash values satisfying the system-wide _difficulty_ requirement. In a mining competition, only the first participant that finds the latest valid block is the winner and will be rewarded. For example, in Bitcoin, the winner will be given some bitcoins as the reward, which includes a fixed Coinbase reward about 12.5 bitcoins [19] and a varying reward coming from the residual transaction fees. Mining requires a huge amount of hash calculations, because the only way to find the valid hash is guessing and trying. The system-wide _difficulty_ requirement is difficult to meet, which means that miners have to try a huge amount of different hash values until they find a valid one. This is why blockchain is considered tamper-proof, because an extremely huge amount of calculations are needed to alter the blocks, which is computationally impossible. Since mining is computationally expensive, it is difficult for solo miners, especially those with low computation powers, to win the mining competition. Therefore, in practical blockchain systems, like Bitcoin, miners prefer to form groups called mining pools to compete with other miners or pools in the mining competition. In a mining pool, each miner contributes his/her computation power to the pool in exchange for rewards. A pool has a manager, who sets another _pool-wide difficulty_, which is easier to satisfy than the system-wide difficulty. All miners in the pool are required to find the blocks that meet the pool-wide _difficulty_ (called partial PoW) and report them to the manager. The number of partial PoWs (PPoWs) will be used to measure the contributions of the miners. There are several functions to distribute rewards according to miners' contributions, like proportional reward function, Pay-Per-Share (PPS) reward function and Pay-Per-Last-N-Share (PPLNS) reward function [20]. This paper focuses on the proportional reward function, where the rewards of miners are proportional to their contributions. Forming pools shortens the average waiting time of miners for upcoming rewards, leading to steady mining revenues for miners. When multiple mining pools exist, miners face the problem of selecting which pool to join in order to maximize its revenues. We call this problem the _mining pool selection_ of miners. In addition, the existence of multiple mining pools causes another problem, i.e., the _Block WithHolding (BWH)_ attack [21; 22], where pools can inject part of their hash/mining power to other pools to obtain additional revenues while not contributing to the mining process of the attacked pools. Figure 1 illustrates the details of the BWH attack in the case of two pools, where one pool (say Pool 1) attacks the other (say Pool 2). Suppose Pool 1, i.e., the attacking pool, dispatches some of its miners as spies to Pool 2, i.e., the attacked pool. When the spies find full PoWs (FPoWs), they discard them, while they still report PPoWs to the manager of Pool 2. In this way, the spies can obtain revenues/rewards from Pool 2 by reporting PPoWs, while they actually contribute nothing to the mining of Pool 2. The revenues of the spies can be sent back to Pool 1, which will be re-distributed to the miners in Pool 1 including the spies. The study in [23] shows that a pool can obtain more revenues by launching the BWH attack to other pools. Figure 1: Illustration of a Block WithHolding (BWH) attack. Reasoning that the BWH attack will have significant impacts on the pool selection, we therefore aim to investigate the mining pool selection issue in the presence of BWH attack in this paper.