{'fraction_non_alphanumeric': 0.03603321699362137, 'fraction_numerical': 0.008544951257672403, 'mean_word_length': 4.349040813698982, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Hopping-Proof and Fee-Free Pooled Mining in Blockchain

The pool-hopping attack casts down the expected profits of both the mining pool and honest miners in Blockchain. The mainstream countermeasures, namely PPS (pay-per-share) and PPLNS (pay-per-last-N-share), can hedge pool hopping, but pose a risk to the pool as well as the cost to miners. In this study, we apply the zero-determinant (ZD) theory to design a novel pooled mining which offers an incentive mechanism for motivating non-memorial and memorial evolutionary miners not to switch in pools strategically. In short, our hopping-proof pooled mining has three unique features: 1) fee-free. No fee is charged if the miner does not hop. 2) wide applicability. It can be employed in both prepaid and postpaid mechanisms. 3) fairness. Even the pool can dominate the game with any miner, he has to cooperate when the miner does not hop among pools. The fairness of our scheme makes it have long-term sustainability. To the best of our knowledge, we are the first to propose a hopping-proof pooled mining with the above three natures simultaneously. Both theoretical and experimental analyses demonstrate the effectiveness of our scheme.


INTRODUCTION
B LOCKCHAIN is the underlying fabric of mainstream cryptocurrency systems such as Bitcoin [1] and Ethereum [2]. These cryptocurrencies have obtained a phenomenal success, recognized as the wave of future [3] with a total market capitalization around 179.6B dollars at present. To realize a distributed and trustable consensus, a data structure called blockchain 1 is introduced in Blockchain system. It is a public ledger including a sequence of chained blocks, with each recording a set of digital transactions. Since anyone can participate in creating and verifying blocks, Blockchain system is open, leading to its vulnerability.
To deter attacks incurred by the openness of Blockchain system which essentially originates from its decentralized nature, a Proof-of-Work (PoW) [1] mechanism is employed, which allows network participants, i.e., miners, can approve new transactions only after mining a block successfully, implying that they need to solve cryptographic puzzles in the form of a hash computation with success. PoW undoubtedly increases the cost of malicious behavior, making many security attacks such as Sybil attack financially unaffordable. This is because 1) mining is actually a race where only the winner who solves the PoW task first can verify digital transactions, which needs a sufficient amount of computational power; 2) solving cryptographic puzzles is a probabilistic process, implying that no one would win the race with certainty even though it is computationally powerful.
In return for mining blocks successfully, miners are rewarded in proportion to the computational powers they invested. However, due to significant computational resources needed and probabilistic factors involved in the mining process, a solo miner has low expected revenue as well as volatility in the reward. For example, Bitcoin system now sets the difficulty of mining such that one block is generated every 10 minutes. Hence, a solo miner often has to wait 687 days in expectation to mine a block [4].
To tackle the above issue, solo miners join coalitions in the form of mining pools, gathering their computational powers to seek the solution of PoW puzzles and sharing the rewards proportionally to their contributions. This undoubtedly increases the chance of solving cryptographic puzzles successfully and makes the mining process more predictable. Hence, pooled mining can benefit miners from high payoffs and low variance in rewards. At present, nearly 80% of the computing power in Bitcoin and 60% of that in Ethereum belong to less than 8 and 3 mining pools, respectively.
The dominant position of pooled mining leads it to become a valuable target to be attacked. Many pools have an open trait, allowing any miner to join them through public Internet interfaces [5], which makes matters worse. Such a nature of openness makes pooled mining susceptible to attacks. There are mainly three kinds of security attacks in pooled mining: the selfish mining attack [6], [7], [8], the block withholding attack [5], [9], [10] and the pool-hopping attack [11]. The first two attacks can be well solved through the state-of-the-art approaches [7], [8], [9], [10], [12], and hence, we focus on the last one.
The pool-hopping attack was first proposed by Rosenfeld [11], in which the malicious miners strategically switch among the pools to obtain a higher payoff. This attack is cost-efficient and straightforward because of no more extra operations (e.g., keeping the block secret, dropping full proof of work or forking) needed. Studies have proved that the miner has no incentive to stay in a pool without pool hopping or redistributing the computing power [4], [9], [12]. This kind of greedy and opportunistic manner definitely casts down the mining power of a pool, resulting in its declined expected revenue. In addition, the pool-hopping attack also jeopardizes the interests of honest miners, who join in a pool continuously without switching to other pools. According to [11], the honest miners in the attacked pool will receive 43% less payoff in the worst-case theoretically, which is unfair for them.
However, little research has studied the pool-hopping attack. PPS and PPLNS [11] are pioneer countermeasures. Considering that the unbalanced distribution of reward over time makes room for miners' strategic hopping, the key idea of PPS and PPLNS is reducing the variance of reward in time series. Typically, in a PPS pool, a miner will be rewarded as long as she 2 submits a share (her contribution) to the pool, regardless of whether a block is mined successfully or not. PPLNS, one of the most prevailing reward mechanisms [13], drops the concept of "round", focusing on N shares submitted to the pool recently and distributing rewards according to the shares in proportion.
Essentially, the difference between PPS and PPLNS lies in that the former is driven by events while the latter is triggered by time. In detail, PPS rewards a miner once the event of receiving her share happens; PPLNS evaluates whether a miner should be awarded when the paying time arrives. The common feature of PPS and PPLNS is that they pay miners proportionally to their contribution, regardless of whether a block is mined successfully or not. Due to the uncertainty of mining results, the pool takes the full risk when no block is mined. Therefore, both PPS and PPLNS charge miners some fees to alleviate such a risk, which is critical to both of the pool and its members. The higher the fee, the higher the cost of the miner joining in the pool, and the smaller the motivation to mine and vice versa.
In a nutshell, the mainstream countermeasures to the pool-hopping attack, namely PPS and PPLNS, pose a risk to the pool as well as the cost to miners. Therefore, we propose a hopping-proof pooled mining with free fee in this paper, which can hedge pool hopping without any fee charged if the miner does not switch in pools strategically. The proposed pooled mining strategy has a wide scope of application since it can be employed in both prepaid and postpaid mechanisms. The former rewards once share is submitted, no matter whether there is a success mining 2. In this paper, we denote the pool as "he" and the miner as "she" for easy differentiation. or not; the latter awards only when the full cryptographic puzzle is solved.
It is challenging to realize the hopping-proof pooled mining without fee charged. The reasons behind the fact are: a) the strategic transferring among different pools is the instinctive demand of a miner. Especially when no fee is charged, costless hopping easily arouses miners to switch among pools; b) in the postpaid mode, mining risk is completely transferred from the pool to miners. In this situation, it is non-trivial to motivate miners to still work without hopping.
To tackle these challenges, we take advantage of the zerodeterminant (ZD) theory to design an incentive mechanism for pooled mining, where cooperation (i.e., mining without hopping) is the dominant strategy of a rational miner in all situations. The ZD theory was first developed in [14] by Press and Dyson, in which the player who adopts the ZD strategy (i.e., the ZD adopter) can unilaterally set its adversary's utility no matter what strategy the adversary takes. The power of the ZD strategy endows the pool to dominate the game with any miner, rewarding her cooperation and punishing the defection, to lure the cooperation of the miner.
The main contributions of this paper can be summarized as follows: • The interaction between the pool and any miner is formulated as an iterated prisoner's dilemma (IPD) game and the corresponding conditions are also identified. The generality of our model empowers the proposed pooled mining to have a wide scope of application, implying that it is suitable to both prepaid and postpaid mechanisms. When applied in a postpaid mechanism, the proposed pooled mining can incentivize miners to work without hopping while keeping the pool away from the risk of no block mined successfully. • We investigate in detail whether the pool can be a ZD adopter and how he plays the ZD strategy. We draw a conclusion that the pool can unilaterally control the miner's payoff rather than his own one. The specific expected payoff of a miner that the pool can set is characterized.
• An incentive mechanism based on the ZD theory is proposed for motivating the non-memorial and memorial evolutionary miners to work without hopping. Specifically, the proposed mechanism empowers the pool to encourage the miner to behave cooperatively by increasing her short-term payoff without any additional payment in the long run.
• Both theoretical and experimental analyses demonstrate the effectiveness of the proposed incentive mechanism. More importantly, we find the proposed pooled mining is fair, implying that even the pool can dominate the game with any miner, he has to cooperate when the miner works collaboratively. The fairness of our scheme makes it have long-term sustainability.
The rest of the paper is organized as follows. Section 2 describes the formulation of our problem. The ZD strategy for the pool in an iterated prisoner's game is deduced in Section 3. Based on which, we propose an incentive mechanism in light of the ZD theory in Section 4. We evaluate the mechanism both theoretically in Section 5 and experimentally in Section 6. The related literatures are listed in Section 7. Section 8 concludes our paper finally.

GAME FORMULATION
In this section, we introduce our game model to formulate the interaction between the pool and the miner. Generally, we define the strategy space of each player as a dichotomous space, namely cooperation (c) and defection (d). In the PoW mining scenario, the pool is considered as a cooperator if he decides to pay the highest payoff to the miner; otherwise, he is regarded as a defector. On the other hand, the miner can devote herself wholeheartedly to the current pool by providing her total computational power to the pool without hopping, defined as cooperation, or contribute herself halfheartedly through offering partial computing ability or switching to other pools strategically, denoted by defection. We denote the actions of the pool and the miner as x, y ∈ {c, d}, respectively. Therefore, there are four possibilities of states in each round between the pool and the miner, i.e., XY = (cc, cd, dc, dd), where X and Y denote the state of the pool and that of the miner, respectively. It is worth to note that the terminal of a mining round mentioned in our model can be defined as the time a block is mined successfully or the paying time similar to that in PPLNS. Hence, the proposed scheme can be applied in both prepaid and postpaid mechanisms.
Each state will correspond to specific payoffs for both players, which can be derived as follows: • if both the pool and the miner are collaborative with the pool providing the highest payoff and the miner offering her entire computing power to the current pool, the payoffs of them are represented as K p and K m , respectively; • when the miner defects while the pool cooperates, the miner will get an increase of σ > 0 based on her original payoff K m , while the pool may obtain a decrease of π > 0 on K p ; • in the case that the defective pool plays against a cooperative miner, the payoff of the pool increases by µ > 0, while the miner receives a loss of ρ > 0; • when both players behave maliciously, the payoffs of the pool and the miner are K p −π+µ and K m +σ−ρ, respectively.
Subsequently, the payoff vectors of the pool, denoted as S p = (S xy p ), and the miner, denoted as S m = (S xy m ), x, y ∈ {c, d}, can be presented as follows which are also shown in Table 1.
Next, some insightful theorems are introduced to characterize the game in the following. Theorem 2.1. If π > µ, ρ > σ, µ < ρ, σ < π, a prisoner's dilemma (PD) game can be modeled to depict the confrontation between the pool and the miner. Proof: To become a PD game, two fundamental conditions should be satisfied. In detail, 1) the stable state occurs when both players defect, i.e., XY = dd is the Nash equilibrium; 2) mutual cooperation is the best outcome with respect to the social welfare, which means XY = cc outperforms other states from an overall perspective.
The game between the pool and the miner satisfies the first condition. To be specific, if the miner is friendly, the pool will get a lower payoff as K p when he cooperates than his payoff of K p + µ when he defects; besides, if the pool challenges with a malicious miner, the payoff when he defects, i.e., K p − π + µ, is also larger than that of his cooperation, i.e., K p − π. Thus, as a rational decision maker, the pool will always choose to defect rather than cooperation when facing an adversary with uncertain actions. With similar analysis, we can find the only feasible option for a rational miner is also to behave viciously. Accordingly, both the pool and the miner will select defection as the stable state. Therefore, the Nash equilibrium of this game comes to be XY = dd.
In order to investigate the second condition clearly, we denote the social welfare in each state as W cc , W cd , W dc and W dd . Thus, we have Then the second condition is satisfied when W cc > W cd , W cc > W dc , W cc > W dd hold. It is obvious that when π > µ, ρ > σ, µ < ρ, σ < π, the above inequalities can be satisfied. Based on the analyses above, as self-regarding players, the pool and the miner will choose malicious behavior to maximize their payoffs, leading to mutual defection as the stable state in the game consequently. However, the most favorable outcome of the confrontation turns out to be mutual cooperation. Therefore, a PD game is formed when π > µ, ρ > σ, µ < ρ, σ < π.
Notably, the miner may stay in the current pool for a long time without hopping to others. Hence, in this case, the PD game mentioned above can become an iterated one if some conditions are satisfied, which are summarized in the following theorem.
Proof: A PD game becomes an iterated one when the payoff of any player's persistence on cooperation is larger than hopping between cooperation and defection. In other words, the inequalities below should hold Hence, when π > µ, ρ > σ, µ < ρ and σ < π, the game between the pool and the miner can be modeled as an IPD one.
In light of the above analyses, we can find that the miner and the pool may be trapped into the iterated prisoner's dilemma, where the Nash equilibrium is far away from mutual cooperation, leading to low efficiency and distrust for Blockchain system in the long run. To tackle this problem, we employ the powerful ZD strategy to drive the players to cooperate so as to reach the win-win situation. As introduced in Section 1, the ZD adopter can unilaterally set its adversary's payoff no matter what strategy the adversary takes.
Aware of such an effective strategy, the pool is attracted to use the ZD strategy to resist a hopping miner. In this case, however, we are facing the following problems: is the pool capable of being a ZD adopter? if yes, how does the ZD strategy work? To address these questions, we conduct the following analyses.

ZD STRATEGY FOR THE POOL
In this section, we examine whether the pool can play the ZD strategy, and if yes, how to achieve that. Firstly, a Markov game is established between the pool and the miner. As mentioned in Section 2, there are four possible game results, i.e., XY = (cc, cd, dc, dd), in each round. We define the pool's mixed strategy as p = (p 1 , p 2 , p 3 , p 4 ), where p 1 represents the probability of choosing cooperation in this round based on the previous outcome cc. Similarly, when the previous outcome is cd, dc or dd, the probability of the pool to cooperate in this round is p 2 , p 3 or p 4 . Accordingly, the probability of the pool being defective in each round is (1 − p 1 , 1 − p 2 , 1 − p 3 , 1 − p 4 ) corresponding to different game results in last round. Comparably, in the cases that the miner chooses to cooperate when cc, cd, dc or dd happens previously, her strategy can be denoted as q = (q 1 , q 2 , q 3 , q 4 ), while the probability of defecting is With the above-defined strategies of the pool and the miner, the Markov matrix in each round can be derived as follow, where each element denotes the probability of state transition. For example, if the previous outcome is cc, combining the cooperation probabilities of the pool and the miner, i.e., p 1 and q 1 , the probability of XY = cc in this round is p 1 q 1 , so do other elements in A.
Denote v as the stationary vector of matrix A, then It is evident that the second column of the above determinant is only related to the pool's strategy. Based on this, the expected payoffs of the pool (S p ) and the miner (S m ) can be derived as Hence, the linear relationship between the pool and the miner's expected payoffs holds as follows where α, β, γ are coefficients. Therefore, if the pool sets his strategy the same as αS p + βS m + γ1, the determinant in the numerator equals 0, because there exists two identical columns. In this case, αS p + βS m + γ = 0, implying that a linear relation is established between the expected payoffs S p and S m , where the corresponding strategy is therefore called Zero-Determinant Strategy, denoted asp below.
Specifically, when the pool setsp = βS m + γ1 (i.e., α = 0), the pool can control the miner's expected payoff independently as S m = − γ β ; while when he exerts his strategy asp = αS p + γ1 by setting β = 0, he can set his own expected payoff at S p = − γ α . The following theorem demonstrates the effectiveness of the ZD strategy adopted by the pool. Proof: Firstly, if the pool wants to control his adversary's expected payoff as S m = − γ β by setting α = 0, the specific ZD strategy of the pool should satisfyp = βS m + γ1, according to which, we can deduce p 2 and p 3 with respect to p 1 and p 4 , It is evident that p 2 and p 3 are meaningful as they belong to [0, 1]. Therefore, it is clear that being a ZD player, the pool can set the miner's expected payoff unilaterally. And the miner's expected payoff comes to be As (5) consisting of a weighted average of S cc m and S dd m with weights p 4 and 1 − p 1 , we can conclude that the expected payoff of the miner can be set in the range of [S dd m , S cc m ] by the pool's ZD strategy. Secondly, when it comes to the case that the pool sets his own expected payoff, the ZD adopter's strategy should meetp = αS p + γ1 (β = 0). Using p 1 and p 4 to represent α and γ, we have And we can use p 1 and p 4 to describe p 2 and p 3 as which indicates p 2 ≥ 1 and p 3 ≤ 0. Under this condition, the pool's strategy is feasible in only one case, i.e.,p = (1, 1, 0, 0), resulting in α = 0 and γ = 0 according to (6). Thus, as a ZD player, the pool cannot control his payoff.

INCENTIVE MECHANISM BASED ON THE ZD STRATEGY
In this section, we propose a ZD-based incentive mechanism for the pooled mining to hinder pool-hopping attacks. Theorem 3.1 reveals the capability of the pool as a ZD player to set the miner's expected payoff unilaterally. However, whether the pool can take advantage of such a capability to regulate the miner depends on her strategy. If the miner's strategy is irrelevant to her payoff, such as allcooperation (ALLC, q = (1, 1, 1, 1)), all-defection (ALLD, q = (0, 0, 0, 0)), tit-for-tat (TFT, q = (1, 1, 0, 0)), the pool cannot employ the ZD strategy to motivate the cooperative behavior of the miner. Hence, the proposed ZD-based incentive mechanism is suitable for the case that the strategy is laid down by the miner in light of her payoff. Win-stay-loseshift (WSLS, q = (1, 0, 0, 1)) and evolutionary strategies are typical payoff-driven examples.
A WSLS player will keep the same strategy as the previous round in which the outcome is good, that is so called "win-stay". Otherwise, it will adopt the strategy opposite to the one in the previous round, which is therefore named as "lose-shift". Hence, WSLS can be regarded as a particular case of the evolutionary strategy. In this work, we take the evolutionary strategy as the representative for further analysis, which can be categorized into two kinds: non-memorial and memorial. We introduce them in detail as follows.

Evolutionary strategies
The non-memorial evolutionary (E) strategy is featured by the fact that an E player may develop the strategy only based on its expected payoff. Specifically, as a rational player, if the cooperative behavior brings about a higher payoff than the defective one, the E player will choose to collaborate and vice versa. A typical non-memorial evolutionary strategy can be formulated as follow [15], where q t (c|p) denotes the non-memorial E player's cooperation probability in round t based on the pool's strategy p and > 0 is a scaling parameter. Besides, E t m (c|p) and E t m (d|p) represent the expected payoffs of the miner who acts cooperatively and defectively.
Different from the non-memorial evolutionary strategy, the memorial evolutionary strategy is associated with not only the expected payoff but also its strategy in the previous round, which we call it memory. That is to say, informed of the previous strategy and the expected payoff, the memorial E player may adjust its strategy more rationally.
Inspired by [16], we present the memorial evolutionary strategy as following: if the cooperation probabilities of the pool and the miner are denoted as p t and q t in round t, then the miner's cooperation probability q t+1 in the next round evolves as where W t c indicates the expected payoff of the miner when she cooperates and E t m implies the expected payoff of the miner in round t. Accordingly, W t c and E t m can be calculated by where W t d = p t · S cd m + (1 − p t ) · S dd m is the miner's expected payoff when she defects.

ZD incentive mechanism
From equations (8) and (9), it is clear that if the miner obtains more payoff as a cooperative player, her cooperation probability will increase. That is to say, the miner is more likely to devote her computing power entirely to the pool without hopping if such an action brings about a higher payoff. Therefore, as a ZD player, the pool may reward the cooperation of a miner with a higher payoff while punishing her defection with the lower one. Based on this, we propose a ZD-based incentive mechanism for the pool to coerce the miner's collaborative action, thereby deterring the hopping behavior of the miner, which is detailed in the following.
As shown in Algorithm 1, in the first round, we offer the reward to each miner i (i = 1, 2, ..., N ) proportionally to her contribution to the pool. The historical best computing power B i is recorded as the initial computation power of each miner i, namely m 1 i (Lines 1-4). In practice, whether a miner behaves cooperatively or defectively can not be deduced without any side information, since it is the private information of the miner. Hence, the pool has to differentiate a collaborate or defective miner based on the observation of the difference of computational powers between two continuous rounds. This requires the pool to record the computation power m j i of any miner i at the end of each round j (Line 7), so that the pool can obtain the difference of the devoted computational power of miner i between

Require:
The total number of iterations, M ; The number of miners, N ; The initial computation power of miner i, m 1 i ; The minimum and maximum payoffs that the pool can offer, L and H; 1: for i = 1 to N do 2: Calculate the initial reward according to When ∆m j i < 0, the miner splits her computing power into other pools 3 , implying she is a pool-hopping attacker. Her payoff is therefore needed to be reduced in order to hinder such an attack. Under this situation, the pool will exert the ZD strategy, setting the attacker's payoff as the minimum one, i.e., L (Lines 9-10). If ∆m j i = 0, the pool provides the same payoff to the miner as that in the last round (Lines 11-12). When ∆m j i > 0, the pool would update B i if needed (Lines 14-16). Since this case indicates the miner behaves more cooperatively, the pool will increase her payoff as E j i = H * e ζ·y 1+e ζ·y , where y = ( and ζ > 0 represents a scaling parameter (Line 17-18). It is worth to note that the more increment of computational power relative to B i is, the higher reward the miner can obtain, which is up to the maximum payoff that the pool can offer, namely H.

THEORETICAL ANALYSIS
In this section, we analyze the proposed incentive mechanism theoretically. 3. The situation where the miner is unavailable due to some reasons such as lacking of electricity is out of our consideration in this paper. Theorem 5.1. For any non-memorial evolutionary miner who is motivated by the ZD incentive mechanism, it is conceivable that the miner's cooperation probability will be maximized.
Proof: To maximize q t (c|p) according to (8), we turn to prove that E t m (c|p) − E t m (d|p) rises with the increase of game round t if the miner is a cooperative one. According to Algorithm 1, if any miner i behaves more cooperatively than the previous round, we have Since ( becomes to one at last, leading E t m (c|p) − E t m (d|p) equals to H − L consequently. Hence, driven by the proposed ZD incentive mechanism, q t (c|p) can evolve to the maximum.

Theorem 5.2.
For any memorial evolutionary miner who is motivated by the ZD incentive mechanism, her cooperation probability tends to 1 gradually.
Proof: In light of (9), a memorial evolutionary miner can calculate her cooperation probability according to W t c and E t m , which can be deduced by (10). In practice, we use the cooperative frequencies f t p and f t m to approximate p t and q t . Specifically, f t p indicates the number of rounds the pool cooperates divided by the total number of rounds, while f t m denotes that of a miner. Based on the ZD incentive mechanism, we consider the following two cases, where the miner chooses to cooperate or defect [17]. a) if the miner is considered as cooperative, the pool may reward her, resulting in E t+1 m ≥ E t m . In this case, with the increase of E t+1 m and f t+1 m , W t+1 c turns to In light of (14), we can conclude that q t+1 = q t W t c E t m → 1 with the increase of game round t. That is to say, the memorial evolutionary miner will gradually increase the cooperation probability to one eventually.
Conclusively, the non-memorial and memorial evolutionary miner will be encouraged to behave cooperatively by the proposed ZD incentive mechanism in the end.
Another essential nature of the proposed incentive mechanism is that it can be employed into the prepaid mechanism as well as the postpaid mechanism, with the former rewards the miner when a share is submitted and the latter defines the terminal of a mining round as the time a block is mined successfully. Noteworthily, the ZD incentive mechanism is free-fee charged for miners in both prepaid and postpaid cases due to their wholehearted devotions. More importantly, in the postpaid mechanism, the proposed incentive mechanism can hinder pool hopping attackers without putting any risk on the pools since our mechanism enables the miners to mine wholeheartedly until a block is generated successfully. Now that such a powerful strategy the pool can employ, he has an overwhelmingly dominant position compared with the miner, then is the pool capable of getting a higher payoff greedily through defecting when the miner collaborates? We use the following theorem as a response to the above concern. Theorem 5.3. When the miner chooses to cooperate, the only rational strategy of the pool who employs the ZD incentive mechanism is to collaborate.
Proof: As demonstrated in Theorems 5.1 and 5.2, the miner will choose to contribute her maximum computational power into the pool because of the effectiveness of the proposed ZD incentive mechanism. In this case, the pool will provide the miner with the maximal payoff. Therefore, we will discuss what the ZD strategy is when the pool sets the expected payoff of the miner as the optimal value in the following.
According to Section 3, the miner's expected payoff can be set as S m = ∂Sm ∂p1 > 0 and ∂Sm ∂p4 > 0 because of ρ > σ as indicated in Theorem 2.2, implying a monotonically increasing relationship between S m and p 1 , p 4 . Hence, when p 1 = 1, p 4 = 1, the pool can maximize the miner's expected payoff. Furthermore, according to (4), if p 1 and p 4 are equivalent to 1, the only possible value of p 2 is 1 because p 2 should lie in [0, 1] to be a probability, so as for p 3 . That is to say, the pool can set p = (1, 1, 1, 1) to maximize the payoff of a miner.
In light of the above analysis, once the miner cooperates, the pool will set his ZD strategy as p = (1, 1, 1, 1) to maximize a collaborative miner's expected payoff. That is to say, whenever the miner cooperates, the pool will collaborate subsequently.
In summary, the pool will be collaborative in return if the miner offers her maximum computing power. Thus, the proposed ZD incentive mechanism is fair to both sides, which makes it be long-term sustainable. Such an aim is achieved via controlling the miner's short-term expected payoff by the pool. Then, what are the players' actual payoffs over the long run? This question can be answered by the following two theorems.
Theorem 5.4. In the long run, the miner's actual payoff equals to K m based on our proposed ZD incentive mechanism.
Proof: a) For a non-memorial evolutionary miner, ∃τ ∈ Z + , such that ∀t ≥ τ , q t can be maximaized. That is to say, when t ≥ τ , the expected payoff of the miner is identical to K m , which is the maximum payoff for a cooperative miner. In light of this, the actual payoff of the miner P A m can be derived as the average of the expected payoff E i m in each round i, where i < τ and the expected payoff K m after round τ . Therefore, P A m can be written as: b) The actual payoff of a memorial evolutionary miner is By inspecting Theorem 5.4, the miner will receive the actual payoff P A m as K m over the long run. Then, is it possible for the pool to own more payoff by greedy behavior? This question can be resolved by the following theorem.
Theorem 5.5. In the long run, the pool's actual payoff P A p is equivalent to K p based on our proposed ZD incentive mechanism.
Proof: According to Theorem 5.3, the pool will behave cooperatively to reward a collaborative miner, implying that XY = cc is the stable state for the game. In such a case, P A p = K p holds according to Table 1. In light of Theorems 5.4 and 5.5, the pool and miner will obtain the actual payoffs as K m and K p , respectively. That is to say, neither the pool nor the miner can receive higher reward by noncooperative manner over the long run, which is quite fair for both sides.

PERFORMANCE EVALUATION
To testify the effectiveness of the ZD incentive mechanism proposed in Section 4, we conduct experimental simulations in this section. To be specific, we set the payoff vectors of the pool and the miner as S p = (3, 0, 5, 2) and S m = (3, 5, 0, 2), which is a typical example of the prisoner's dilemma. We also carry out the simulations with other parameter settings and derive the comparable results. So we omit to present those results to avoid redundancy. Note that each simulation is repeated 100 times to get the average value for statistical confidence.
In detail, if the pool is a ZD adopter competing with a miner who employs four classical strategies, i.e., ALLC, ALLD, TFT and WSLS, the miner's expected payoffs can be set at a fixed value as shown in Fig. 1. Taking the specific ZD strategy of the pool p = (0.9, 0.3, 0.8, 0.2) as an example, no matter what strategies the miner employs, her expected payoff will finally become to a constant. That is to say, the adversary's outcome can be controlled unilaterally by the ZD adopter because of his effective strategy.
As mentioned in Section 4, the classical strategies ALLC, ALLD and TFT are out of our consideration because the strategies are irrelevant to the payoff of the player. Moreover, WSLS is regarded as a special evolutionary strategy. Hence, only the simulations of the evolutionary miners who compete with a ZD pool are included in this work, which are demonstrated as follows.
In our simulation, we assume there are four miners in a pool, whose initial computational powers are respectively Through further observation of Figs. 2 and 3, we can conclude that the CPs of the non-memorial evolutionary miners converge to one with different speeds, which is mainly because of different initial computational investments and the scaling parameter . To be specific, a miner with a larger initial computing investment would be more inclined to accelerate the cooperation process due to the higher growth of payoff. Intuitively, a higher brings about a faster convergence speed of the CP according to (8). Fig. 4 plots the CPs of a memorial evolutionary miner driven by the ZD-based incentive mechanism, where the CPs go up to 1 gradually with the initial values as p 0 = q 0 = 0.01, 0.1, 0.5, and 0.8. In detail, each subfigure shows that the CP of the miner with a small initial input converges slowly compared with other miners, even though they share the same initial cooperation probability. The reason may lie in that the miner with a smaller initial computing investment may get a relatively lower payoff in the beginning, leading a slow growth of the expected payoff. Thus, her CP would rise slower comparably. Moreover, considering the CPs of a miner with the same initial investment but having 4. The cases in which more miners exist in a ZD pool share the same conclusion, so we omit it for reducing repetition. 5. is set to be big enough here so that the maximum cooperation probability of a non-memorial evolutionary player (calculated by (8)), can approach to 1.  different initial cooperation probabilities, for example, the blue lines in subfigures (a)-(d), the result is that the higher the initial CP is, the faster it is converged to one, which is mainly caused by the memory we mentioned above in light of (9).

RELATED WORK
At present, the researchers mainly focus on three kinds of security attacks in pooled mining: the selfish mining attack, the block withholding (BWH) attack and the pool-hopping attack.
In detail, a selfish mining attacker [18] keeps its mined block secret and intentionally forks the main blockchain. Specifically, the selfish miner mines on its private branch instead of working on the public chain as the honest miners. When the public ledger approaches it's private chain, the selfish miner advertises its concealed chain to the public, leading to wasting resources of the honest miners on resolving cryptopuzzles which ends up gaining no rewards. Several defense mechanisms have been proposed to block this selfish manner as well as its variants. For example, Saad et al. [7] developed a defense mechanism in the networkwide scope to detect and deter selfish miners; Zhang et al. [8] proposed a backward-compatible mechanism to defend selfish attacks. The BWH attackers pretend to devote their computational capabilities into the target pool and then obtain payoffs. However, they send only partial proof of work, not full proof of work, resulting in reward reduction to other miners in the pool. This kind of attack was first proposed in [11], after which, Courtois et al. [19] summarized its concept and Eyal modeled the confrontation between the pools as a prisoner's dilemma in [5]. Specifically, in [5], a Nash equilibrium was established, where the rational pools would attack each other, resulting in a lose-lose situation. Besides, the pools are trapped into an iterative prisoner's dilemma, in which the pool chooses to attack or not is the so called miner's dilemma. Ongoing researches on avoiding this attack have proposed some efficient and cheap defense mechanisms. For example, Bag et al. in [9] proposed a generic scheme to counter BWH attacks via employing cryptographic commitment schemes, based on which, an implementation using hash function was presented as an alternative. Besides, Luu et al. [12] put forward a power splitting game for the miners so as to find a solution to fight back the BWH attacks. Additionally, Hu et al. [10] took advantages of the Zerodeterminant theory to analyze the BHW attacks between two pools. Based on which, different conditions for the pools playing the ZD strategy individually and simultaneously have been demonstrated comprehensively.
We focus on the pool-hopping attack in this work. Pioneer countermeasures are PPS, PPLNS and their variants, including the Slush's method, maximum pay-per-share (MPPS), and pay-once-PPLNS. Detailedly, the pool manager can calculate the score of each share based on the exponential score function s = e T c , in which s represents the score of the share given in time T and c denotes the scaling parameter. Due to the share's score, the pool hopping behavior can be alleviated in mining pools by reducing the score of shares at the earlier stage of the round while increasing the score of shares later on. Such kind of score-based method is recognized as the Slush's method and has been applied in the mining pools such as Slushpool [20]. Besides, in the maximum pay-per-share method, two balances are kept for each miner, that is, a PPS balance and a proportional balance [11]. To be specific, if the miner offers a share, her PPS share balance is increased as if the pool is a PPS pool. When the pool generates a block, the proportional balances of the miners are increased as if they have joined a proportional pool. Based on which, the reward paid for each miner is the minimum between the PPS balance and the proportional balance. In pay-once-PPLNS, every share is rewarded at most once [11]. In other words, the share is deleted after it is paid, leading a higher probability to the elder shares to be paid for future blocks. If a share is partially paid, it will be deleted partially. However, theoretical analysis on the above mechanisms are lacking and their effectiveness in preventing pool-hopping attacks still remain an open issue [21].

CONCLUSION
In this paper, we propose a hopping-proof pooled mining with fee-free in Blockchain. To that aim, we formulate the interaction between the pool and any miner as an IPD game and identify the corresponding conditions. The generality of our model capacitates the proposed pooled mining to have wide applicability. Based on the model, we take advantage of the ZD theory to empower the pool can unilaterally control the miner's payoff, which can be used to motivate the cooperation of the non-memorial and memorial evolutionary miners through the proposed ZD incentive mechanism. Both theoretical and experimental analyses demonstrate the effectiveness of the ZD incentive mechanism. To the best of our knowledge, we are the first to propose a hopping-proof pooled mining with the natures of fee-free, wide applicability and fairness at the same time.
Hongwei Shi received her B.S. degree in Computer Science from Beijing Normal University in 2018. Now she is pursuing her M.S. degree in Computer Science from Beijing Normal University. Her research interests include blockchain, game theory and combinatorial optimization.
Shengling Wang is a full professor in the School of Artificial Intelligence, Beijing Normal University. She received her Ph.D. in 2008 from Xian Jiaotong University. After that, she did her postdoctoral research in the Department of Computer Science and Technology, Tsinghua University. Then she worked as an assistant and associate professor from 2010 to 2013 in the Institute of Computing Technology of the Chinese Academy of Sciences. Her research interests include mobile/wireless networks, game theory, crowdsourcing. His research interests fall in the general field of information networks and its intersections with power networks and social networks. His current research focuses on fundamental problems in information networks and energy networks, including modeling and optimization for smart grids, optimization/control of mobile social networks and cognitive radio networks, and privacy/security in information networks.