I Introduction
Online payment has become an indispensable way of payment in people’s life. In order to ensure the security of payment, online payment is achieved through an authoritative agent. However, the cost of establishing an authority is enormous, which increases the cost of payment. Blockchain technology can realize P2P payment[1]. Blockchain is a distributed ledger that is copied synchronously across multiple users, which differs from the traditional centralized ledger, and Bitcoin is used to solve the dual payment problem[2]. Blockchain has surpassed its original design and become the basic technology to realize decentralized control. Compared with centralized control, the blockchain system has the advantages of distributed high redundancy storage, time sequence data, tamperresistant and forgery, decentralized credit, automatic execution of smart contracts, security and privacy protection.
The key process of blockchain is a calculation process to solve the hash puzzle, which requires high computing power. However, the mobile devices in IOT have insufficient computing power. Therefore, edge computing has been paid more and more attention of scholars[3][4]. The target of edge computing is to enable a large number of devices to run applications on IOT, which enables these devices to provide their computing power for mining[5]. Therefore, it is a trend that edge computing is used to solve the hash puzzle in blockchain[6]. By combining blockchain with edge computing, edge servers can organize a large number of devices to provide computing power, storage resources, etc. It can greatly improve the transmission efficiency of the system and ensure data integrity and computing effectiveness. With the participation of edge computing, the blockchain system obtains a large number of computing power on IOT, which reduces the burden of computing power limited devices for mining. It enables out of chain storage and out of chain computing of edge computing to be realized, and satisfies scalable storage and computing on the blockchain[7].
However, blockchain is not widely used in mobile environment. Due to the limited computing power of mobile devices, it costs too much to solve the POW puzzle. Therefore, we need to further research the mining strategy in the mobile environment to promote the application of blockchain in IOT. The incentive mechanism based on edge computing is considered to overcome the lack of computing power in mobile devices and satisfies the requirement of mining. Edge servers act as miner, but the number is small, while the number of mobile devices is large. Therefore, the system encourages the edge server to actively recruit mobile devices to provide computing power to complete the mining task. When the mining is successful, the edge server and the mobile device share the rewards. The contributions of this work are mainly shown as follows.

We discuss the challenges of mobile blockchain in mining. In order to address the challenge for high cost of mining by mobile devices alone, the edge server recruit mobile devices to provide computing power to mine and share the profit with them. In order to make them obtain the maximum profit, this paper formulates a twostage Stackelberg game model to set the profit distribution of mining.

We adopt backward induction to prove that the uniqueness Nash equilibrium solution exists in this game under the same expected fee and different expected fee.

We show the result curve of the profit for the edge server with the different ratio between the computing power from the edge server and mobile devices. The results show that the contribution of the computing power from the edge server to its profit is more than that of it recruited mobile devices under the same condition.
The rest of this paper is organized as follows. Related work is briefly reviewed in Section II. In Section III, we give out the detail of system model and problem formulation. In Section IV, Game Equilibrium is analyzed. Performance evaluation and analysis are given in Section V. The last Section is conclusion.
Ii Related work
In recent years, the technology of integrating blockchain into edge computing has gradually attracted the attention of scholars. In [8], the authors designed an architecture to combine blockchain technology with edge computing. It achieves the fine management of different department data. They implement the synchronization of data storage and processing by deploying regional blockchain, and reach an agreement through sharing. In [9], the author overcomes the constraints of the Internet of things by combining edge computing and blockchain. It can ensure the security and privacy of Internet of things devices when it translates sensitive personal data. Therefore, it can make IOT devices get rid of the dependence on storage devices and improve the overall performance. In [10], the author designs an architecture combining edge intelligence with blockchain authorization to achieve efficient edge service management. For edge resource sharing, they designed a cross domain scheduling mechanism, and used the credit approval mechanism to ensure security, which can reduce service costs and improve service capabilities.
Many researches have been carried out on the mining scheme of blockchain by formulating game model. Houy [11]
proposed a noncooperative game model in the mining process. In this model, the events of POW puzzle follow Poisson distribution. When the equilibrium point of Nash is reached, the optimal solution of both sides is obtained, but only the equilibrium solution between two miners is obtained. Kiayias et al
[12]considered the mining of miners as a competitive game process. Assuming that the miners are rational, they compete for mining and choose whether to broadcast their solutions based on their profit. It is found that under some conditions, the optimal solution is not to propagate. In addition, the authors proved that there is multiplicity of Nash equilibrium in this model. Similar to [12], L.Wang and Y. Liu [13]considered the mining of miners as a random game model. The miners decide whether to propagate the block according to the estimation of reward.
The traditional mining of miners in the blockchain is carried out individually. The advantage of mining by miners alone is that when miners successfully calculate the hash value that meets the conditions, they can obtain all rewards. However, this mining scheme is inefficient and has unstable earnings. In order to obtain stable rewards, researchers have introduced mine pools, which is another way to concentrate resources to mining blocks[14]. Lewenberg et al [15] proposed the mining scheme of blockchain based on cooperative game. They use the theoretical tool of cooperative game to research the mining pool that miners would like to join and reasonably shared their rewards. The interaction between the miner and the mining pool is simulated as a joint game. In order to the data processing in the Internet of things authorized by the blockchain, [16] proposed a multihop cooperative distributed algorithm to achieve the mining tasks. They set the competition among devices as a game problem to reduce the computing cost of Internet of things devices. Each device can decide its own computing power to obtain the maximum benefit. The researchers found that when the scheme is applied to bitcoin network, some miners always turn to other mines for higher expected rewards under any incentive allocation scheme
However, the above research works are to use dedicated nodes to mine, without considering the application of mobile environment. In the mobile Internet environment, the computing power of a single mobile smart device is often limited, but the number of these devices is large. Therefore, it is a new opportunity for blockchain application that edge servers organize a large number of mobile devices, and make use of their idle computing power to contribute computing power to mining.
Iii System Model and Problem Formulation
Iiia System Model
The process of consensus management contains these steps as following: Block broadcast, Mining, Progagation, Verification, Confirm and Add new block. The data block that contains transaction records is periodically broadcasted in blockchain network. These transaction records are the issued transactions. The miners will solve a cryptopuzzle by theirs computing power according to given parameters of the blockchain [17]. If the miner successfully solves the given puzzle, it propagates the result and block to other miners in the blockchain system to verify. The fastest miner who solves the puzzle and passes the verification will obtain the reward R of blockchain system. To finish the computation and propagation as soon as possible, the edge servers recruit the mobile devices to compute beside theirselves. The verification tasks are completely handed over to the mobile devices. Each mobile device is assigned the computation and verification task according to its computing power by edge servers and then get reward from the edge server that recruited it. Each edge server should share the given reward from the blockchain to mobile devices based on their contributions. In addition, the calculation and verification of blocks will generate communication overhead.
IiiB Problem Formulation
Let represents a group of edge servers. Each edge server recruits mobile devices(denoted by ) to provide computation and verification services. The miners compete with each other to mine. The fastest miner who solves the puzzle and passes the verification will obtain the reward of blockchain system. The reward consists of fixed reward and variable transaction reward . For miner
, the probability of success in mining is determined by its computing power, which is represented by
[11], where is factor about the computing power.(1) 
and . The process of solving puzzle follows Poisson distribution, and is Poisson parameter[18]. represents a delay factor in transmission, and represents the number of transactions in one block.
The profit of the edge server contain the three parts as follow: 1) The fixed reward from mining; 2)the cost for mobile device charging; 3)electricity and other costs. The utility function of edge servers is formulated as follow:
(2) 
The profit of mobile devices contain the three parts as follow: 1)The expected fee provided by edge server; 2)mined block verification; 3)electricity and other costs. The profit function of mobile devices is formulated as follow:
(3) 
is the reward from edge server depend on its computing power. is the resource about computing power, memory and so on.
The process of mining block between the edge server and mobile devices is designed as a twostage Stackelberg game. The edge server acts as leader. It sets the expected fee for mobile devices in Stage I. The mobile devices act as follower. They provide their computing power for the leader in Stage II. Obviously, for followers, if the expected fee is less than their own consumption, they will not accept the recruitment of leaders. The minimum consumption of a mobile miner is defined as . Therefore, the expected fee given by leader to each mobile miner must be greater than the consumption value of follower. Then the objective functions of leaders and followers can be expressed as follows:
(4) 
Iv Game Equilibrium Analysis
In our model, we consider two situations for mobile devices as follow: the same computer power for each miner and the different computer power for each miner. The traditional backward induction[18] will be adoped to analyze this game.
Iva The same computer power for each miner
1) Stage II: Miner’s Game: we first analyze the simple situation that is the same computing power for each miner. These miners can be considered as a entirety, and their total computer power is . The computing power from the edge server is . Then, the miners compete with the edge server to maximize their profit by providing their computer power, which forms the Edge Miner Game(EMG) . is the edge server, is the group of mobile miners recruited by the edge server, represents the utility function of mobile miners. Therefore, the profit function of mobile miners, in Stage II, is represented as:
(5) 
where is expected fee of miners from edge server.
Theorem 1. There is a Nash equilibrium in
The computer power space of each miner is a continuous and nonempty value range. is obviously continuous with respect to . Let . Then, we prove the concavity of . will be concave if it satisfy the two condition: the first derivative of with respect to is positive and the second derivative of with respect to is negative. The process is as following.
(6) 
and
(7) 
where
(8) 
and
(9) 
Therefore, satisfies the concave condition with respect to . According to [19], the Nash equilibrium is in the EMG .
Let (6)=0, we can get the best function of miners as following,
(10) 
(11) 
Theorem 2.There is a unique Nash equilibrium in EMG if the following condition is satisfied
(12) 
Let represent the Nash equilibrium of the EMG. If is the standard function, then the EMG exists the unique Nash equilibrium[19].
Definition 1. A funciton is a standard function if the following three conditions are satisfied[19]:
(1) is positive.
(2) is monotonous. It is formulated as: if , then ;
(3) is scalable. It is formulated as: for all , then ;
Firstly, for , from (11), we have
(13) 
Under the condition in (12), we can obtain
(14) 
(13) 
(14) 
Secondly, Let , we calculate the formula of , which is shown in (13). Obviously, . In addition,
(15) 
Finally, for condition(3) of Definition 1. We prove the formula of with respect to . The process of calculation is shown in (14).
Therefore, the three conditions shown in Definition 1 have been proved for the response function in (11). The process of proof has done..
From above, we can obtain that the uniqueness Nash equilibrium for miners is true in EMG when . And now, we need to analyze the optimal profit of the edge server in the first stage.
2) Stage I: Edge server’s optimal profit: According to the Nash equilibrium of the computer power provided by mobile miners in EMG , the Edge Server is as leader that can optimize its computer power to achieve its optimal profit represented in (2). For the edge server, the computer power belongs to itself. The revenue generated by this part of computing power belongs to the edge server. What we need to analyze is the additional benefits of the computing power from the edge server recruiting mobile miners. The total computer power provided by miners is . Therefore, the additional benefits for the edge server represented as:
(17) 
Thus, by substituting (11) into (17), and let , the additional profit maximization of the edge server is simplified as:
(18) 
Theorem 3. Under the same computer power of miners, the Edge Server can achieve the optimal profit.
From (18), We proof that the first derivative of with respect to the expected fee of miners P is positive and the second derivative of with respect to P is negative as following.
(19) 
and
(20) 
IvB the different computer power for each miner
1) Stage II: Miner’s Game: in this situation, the edge server and mobile devices are the miners for mining. The additional benefits for the edge server is represented as:
(21) 
and the utility function of miner is represented as:
(22) 
Theorem 4. There is a Nash equilibrium in
For computer power space of each miner , it is a continuous and nonempty value range. In order to proof the concavity of in (22), we calculate the first derivative of and the second derivative of with respect to . The process is as following:
(23) 
and
(24) 
where
(25) 
and
(26) 
Therefore, satisfies the concave condition with respect to . According to [19], the Nash equilibrium is in the EMG . Let (22)=0, we can get the best response function of miners as following.
(27) 
(28) 
Theorem 5. There is a unique Nash equilibrium in EMG if the following condition is satisfied
(29) 
Let represent the Nash equilibrium of the EMG. If satisfies the three condition of the standard function shown in Definition 1, then the EMG exists a unique Nash equilibrium [19].
Under the condition of (29), we have
(31) 
It is easily to obtain . Thus, it satisfies the positivity.
Secondly, for the Monotonicity, we calculate under the condition . It is similar with (13). We have (32).
(32) 
(33) 
Obiously, , and we have
(34) 
From (31), we can obtian . Thus, it is obviously exist the condition that satisfies . The proof is now completed.
Finally, for condition(3) of Definition 1. We prove the formula of in the condition as . From (33), we can obtain it.
Theorem 6. In EMG , the unique Nash equilibrium solution of computing power for a miner is shown by
(35) 
From (27), we obtain
(36) 
Then, for all the miners, we calculate the sum of the above formula as following:
(37) 
Thus, we can get
(38) 
From (28), we have
(39) 
which means
(40) 
(41) 
We will get the Nash equilibrium solution of computing power for miner with mathematical operation. The process of proof has done.
Therefore, we can adopt the solution for obtaining the Nash equilibrium for the edge server. We will analyze the optimal profit in Stage I.
2) Stage I: Edge Server’s optimal profit: It is similar to IVA. What we need to analyze is the additional benefits of the computing power from the edge server recruiting mobile miner . The computer power provided by miner is . Therefore, the additional benefits for the edge server represented as:
(42) 
Thus, by substituting (35) and (38) into (42), and let , the additional profit maximization of the edge server is simplified as:
(43) 
Theorem 7. Under the different computer power of each miner , the Edge Server can achieve the optimal profit.
From (43), we can calculate the first derivative of with respect to the expected fee of miner is positive and that of the second derivative of is negative as following:
(44) 
and
(45) 
V Simulation Results
We will evaluate the performance of the incentivizing mechanism in EMG proposed in this paper. We consider an edge server that recruits a set of mobile devices to mine in mobile blockchain system. We adopt algorithm I to achieve the unique Stackelberg Equilibrium solution for miners. Then the edge server maximizes its profit by substituting the expected fee of miners. For a given expected fee imposed by EMG, the following sub game is solved first. The optimal response of follower game is substituted into leader game, and the optimal price is obtained. Similar algorithms can also be used for the situation of different fee provided by the edge server. We set 1000 blocks adopting Node.js[20]. To simplify the experiment, the size of block is the same and there are 10 transactions exist in each block to mine.
Firstly, we evaluate the probability of successful mining versus the computing power of edge server. The computing power from the edge server is the critical factor that decides the probability of successfully mining block, as shown in Fig 1.
We secondly investigate the optimal expected fee for mobile devices under the same computing power versus the fixed reward R by blockchain system.
The Fig 2 shows that the optimal expected fee for mobile devices increase with the increasing of the fixed reward R. The fixed reward is higher, the expected fee of the edge server is higher. Miners are more willing to respond to the recruitment of edge servers to provide higher computing power to mine. Therefore, the edge server can provide a higher expected fee to recruit mobile devices and obtain higher computing power to improve the probability of mining success, and thus obtain greater profit. Thus, with the increase of fixed rewards provided by blockchain system, the individual computing power provided by each miner also increases.
We next evaluate two situations for the profit of Edge Server versus the different computing power of recruited miners and the different computing power provided by edge server under the same total computing power for them. The first one is that the computing power from edge server is set to 50 constantly, and when the computing power of this recruited mobile devices increases, the reward curve of the edge server changes. Another is that the total computing power of mobile miners is set to 50, and when the computing power from edge server increases, the reward curve of the edge server changes accordingly. From Fig 3, we find that the profit of the edge server increase rapidly with the increase of recruited mobile devices in the initial stage. That’s because, in the initial stage, with the mobile devices recruited by the edge server, the computing power is increased rapidly, and the probability of mining success is increased, so the reward is increased. However, with the addition of more mobile devices, the increasing probability of mining success is not obvious, but the edge server still has to pay the corresponding remuneration, so the cost increases sharply, and the total income increases slowly. In addition, under the different computing power for each mobile device, the profit of the edge server increases with the increase of total computing power compared with that under the same computing power of mobile devices. However, Fig 4 shows that when the computing power from edge server accounts for a larger proportion of the total computing power, there is little difference between the benefits of the edge server under the two situations. That’s because the edge server is dominant in that case, and the computing power from mobile device is little and makes little contribution to mining.
Finally, we compare the profit of edge server in EMG with MDG[21]. For the EMG, we consider that the computing power of the edge server accounts for 10%, 50% and 90% of the total computing power respectively. In addition, the total computing power that provided by all miners in two schemes is the same. We investigate the profit of the edge server versus the total computing power. From Fig 5 and Fig 6, we can find that the profit of the edge server in both schemes increases with the increase of the total computing power. However, the profit of the scheme proposed in this because the edge server itself participates in mining, reducing the information transmission delay and improving the efficiency. In the EMG method, the edge server does not participate in mining, and all mining tasks are assigned to the mobile device, which will generate a large communication cost and a large delay, so it reduces the probability of mining success and reduces the profit of the edge server
Vi Conclusion
In this paper, we discuss the challenges of mobile blockchain in mining. In order to address the challenges of high mining cost for mobile devices, this paper proposes an incentive mechanism based on edge computing. We developed a twostage Stackelberg Game model to jointly optimize the reward of edge servers and recruited mobile devices. The edge server recruits mobile devices to compete with it in mining. The edge server sets the expected fee according to the computing power of the mobile device, and the mobile device provides the computing power for the edge server. We prove that there is a unique Nash Equilibrium solution in this game under the same expected fee or different expected fee. In addition, we show the result curve of the profit for the edge server with the different ratio between the computing power from edge server and mobile devices. The results show that the contribution of the computing power from the edge server to its profit is more than that of it recruited mobile devices under the same condition. In addition, the proposed scheme has been compared with the MDG scheme for the profit of the edge server. The results show that the profit of the proposed scheme is more than that of the MDG scheme under the same conditions.
Acknowledgment
This work is supported by the National Science Foundation of China(No.61662039), Science and technology project of Jiangxi Provincial Department of Education (No. GJJ170967), Jiangxi Key Natural Science Foundation (No. 20192ACBL20031), Project of Teaching Reform in Jiujiang University(No. XJJGYB1947).
References
 [1] Tomaso Aste, Paolo Tasca, and Tiziana Di Matteo. Blockchain technologies: The foreseeable impact on society and industry. computer, 50(9):18–28, 2017.
 [2] Florian Tschorsch and Björn Scheuermann. Bitcoin and beyond: A technical survey on decentralized digital currencies. IEEE Communications Surveys & Tutorials, 18(3):2084–2123, 2016.
 [3] Mahadev Satyanarayanan. The emergence of edge computing. Computer, 50(1):30–39, 2017.
 [4] Chuanwen Luo, Liya Xu, Deying Li, and Weili Wu. Edge computing integrated with blockchain technologies. In Complexity and Approximation, pages 268–288. Springer, 2020.
 [5] Wei Yu, Fan Liang, Xiaofei He, William Grant Hatcher, Chao Lu, Jie Lin, and Xinyu Yang. A survey on the edge computing for the internet of things. IEEE access, 6:6900–6919, 2017.
 [6] Kimchai Yeow, Abdullah Gani, Raja Wasim Ahmad, Joel JPC Rodrigues, and Kwangman Ko. Decentralized consensus for edgecentric internet of things: A review, taxonomy, and research issues. IEEE Access, 6:1513–1524, 2017.
 [7] Bin Liu, Xiao Liang Yu, Shiping Chen, Xiwei Xu, and Liming Zhu. Blockchain based data integrity service framework for iot data. In 2017 IEEE International Conference on Web Services (ICWS), pages 468–475. IEEE, 2017.
 [8] Zaheer Khan, Abdul Ghafoor Abbasi, and Zeeshan Pervez. Blockchain and edge computing–based architecture for participatory smart city applications. Concurrency and Computation: Practice and Experience, page e5566, 2019.
 [9] Amalia Damianou, Constantinos Marios Angelopoulos, and Vasilis Katos. An architecture for blockchain over edgeenabled iot for smart circular cities. In 2019 15th International Conference on Distributed Computing in Sensor Systems (DCOSS), pages 465–472. IEEE, 2019.
 [10] Ke Zhang, Yongxu Zhu, Sabita Maharjan, and Yan Zhang. Edge intelligence and blockchain empowered 5g beyond for the industrial internet of things. IEEE Network, 33(5):12–19, 2019.
 [11] Nicolas Houy. The bitcoin mining game. Available at SSRN 2407834, 2014.
 [12] Aggelos Kiayias, Elias Koutsoupias, Maria Kyropoulou, and Yiannis Tselekounis. Blockchain mining games. In Proceedings of the 2016 ACM Conference on Economics and Computation, pages 365–382, 2016.
 [13] Luqin Wang and Yong Liu. Exploring miner evolution in bitcoin network. In International Conference on Passive and Active Network Measurement, pages 290–302. Springer, 2015.
 [14] Juan Beccuti, Christian Jaag, et al. The bitcoin mining game: On the optimality of honesty in proofofwork consensus mechanism. Swiss Economics Working Paper 0060, 2017.
 [15] Yoad Lewenberg, Yoram Bachrach, Yonatan Sompolinsky, Aviv Zohar, and Jeffrey S Rosenschein. Bitcoin mining pools: A cooperative game theoretic analysis. In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems, pages 919–927. Citeseer, 2015.
 [16] Wuhui Chen, Zhen Zhang, Zicong Hong, Chuan Chen, Jiajing Wu, Sabita Maharjan, Zibin Zheng, and Yan Zhang. Cooperative and distributed computation offloading for blockchainempowered industrial internet of things. IEEE Internet of Things Journal, 6(5):8433–8446, 2019.
 [17] Wenting Li, Sébastien Andreina, JensMatthias Bohli, and Ghassan Karame. Securing proofofstake blockchain protocols. In Data Privacy Management, Cryptocurrencies and Blockchain Technology, pages 297–315. Springer, 2017.
 [18] Zehui Xiong, Shaohan Feng, Dusit Niyato, Ping Wang, and Zhu Han. Edge computing resource management and pricing for mobile blockchain. arXiv preprint arXiv:1710.01567, 2017.
 [19] Zhu Han, Dusit Niyato, Walid Saad, Tamer Başar, and Are Hjørungnes. Game theory in wireless and communication networks: theory, models, and applications. Cambridge university press, 2012.
 [20] Node. js. https://nodejs.org/en/.
 [21] Zehui Xiong, Shaohan Feng, Dusit Niyato, Ping Wang, and Zhu Han. Optimal pricingbased edge computing resource management in mobile blockchain. In 2018 IEEE International Conference on Communications (ICC), pages 1–6. IEEE, 2018.
Comments
There are no comments yet.