Edge Computing Resource Management and Pricing for Mobile Blockchain

Edge Computing Resource Management and Pricing for Mobile Blockchain


The mining process in blockchain requires solving a proof-of-work puzzle, which is resource expensive to implement in mobile devices due to the high computing power and energy needed. In this paper, we, for the first time, consider edge computing as an enabler for mobile blockchain. In particular, we study edge computing resource management and pricing to support mobile blockchain applications in which the mining process of miners can be offloaded to an edge computing service provider. We formulate a two-stage Stackelberg game to jointly maximize the profit of the edge computing service provider and the individual utilities of the miners. In the first stage, the service provider sets the price of edge computing nodes. In the second stage, the miners decide on the service demand to purchase based on the observed prices. We apply the backward induction to analyze the sub-game perfect equilibrium in each stage for both uniform and discriminatory pricing schemes. For the uniform pricing where the same price is applied to all miners, the existence and uniqueness of Stackelberg equilibrium are validated by identifying the best response strategies of the miners. For the discriminatory pricing where the different prices are applied to different miners, the Stackelberg equilibrium is proved to exist and be unique by capitalizing on the Variational Inequality theory. Further, the real experimental results are employed to justify our proposed model.

edge computing, offloading, mobile blockchain, proof-of-work puzzle, pricing, mining, game theory, Variational Inequality.

I Introduction

Electronic trading with digital transactions is becoming popular than ever in e-commerce society, where the consensus is reached through trusted centralized authorities. The introduction of centralized authorities incurs additional cost, i.e., nominal fees which become more excessive when the number of digital transactions becomes large. In 2008, a new peer-to-peer electronic payment system called “Bitcoin” was introduced that avoids this additional cost caused by digital transactions [1]. As one popular digital cryptocurrency, Bitcoin can record and store all digital transactions in a decentralized append-only public ledger called “blockchain”. The Bitcoin is the first application of blockchain technologies. Subsequently, the blockchain technologies have generated remarkable public interests via a distributed network with independence from central authorities. With blockchain, a transaction can take place in a decentralized fashion, which greatly save the cost and improve the efficiency. Since its launch in 2009, Bitcoin economy has experienced an exponential growth, and its capital market now has reached over 70 billion dollars [2]. After the success of Bitcoin, blockchain has been applied in many applications, such as access control systems [3], smart contracts [4, 5], content delivery networks [6], cognitive radio networks [7], and smart grid powered systems [8, 9].

The core issue of the blockchain is a computational process called mining, where the transaction records are added into the blockchain via the solution of computational difficult problem, i.e., the proof-of-work puzzle. Confirming and securing the integrity and validity of transactions are processed by a set of participants called “miners”. The security of blockchain directly relies on the distributed consensus mechanism maintained by these miners [10]. The typical consensus mechanism is introduced as follows. First, the miners consider and bundle a number of transactions that are processed to form a single “block”. The miner propagates its mined block to the rest of the blockchain network as soon as it solves the puzzle in order to claim the mining reward. Then, this block is verified by the majority of miners in this network, i.e., trying to reach consensus. After the propagated block reaches the consensus, it is successfully added into the globally-accessible distributed public ledger, i.e., blockchain. The miner which mines a block receives the mining reward when the mined block is successfully added to the blockchain. This consensus mechanism guarantees the security and dependability of blockchain systems [11, 12].

However, blockchain has not been adopted widely in mobile applications [13]. This is because blockchain mining needs to solve a proof-of-work puzzle, which is expensive to implement in mobile devices due to the high computing power needed. Thus, deploying blockchain in a mobile environment is truly challenging. In this paper, we consider the edge computing as a network enabler for the mobile blockchain. In particular, we consider the price-based resource management in mobile blockchain, in which an Edge computing Service Provider (ESP) is introduced to support proof-of-work puzzle offloading [14] by using its edge computing nodes. Further, we propose a two-stage game model, i.e., the Stackelberg game. In the first stage, the edge computing service provider sets the price and obtains the revenue from charging the miners for offloading the mining task. In the second stage, the miners decide on the service demand to purchase from edge computing service provider. Specifically, we analyze two pricing schemes, i.e., uniform pricing in which a uniform unit price is applied to all the miners and discriminatory pricing in which different unit prices are assigned to different miners. The uniform pricing is easier to be implemented as the ESP does not need to keep track of information of all miners, and charging same prices which is fair to all miners. However, it may not yield the highest profit compared with discriminatory pricing in which the price can be adjusted for an individual miner [15].

To the best of our knowledge, this is the first work to investigate the mobile blockchain with resource management and pricing using game theory. The main contributions of this work are summarized as follows.

  1. We formulate a pricing and service demand problem to analyze the interactions among the ESP and miners. In particular, we adopt the two-stage Stackelberg game to model their interactions to maximize the profit of the ESP and the individual utilities of miners jointly for mobile blockchain applications.

  2. Through backward induction, we derive a unique Nash equilibrium point among the miners in the second stage, and investigate the uniform pricing as well as discriminatory pricing for profit maximization of the ESP in the first stage. The Stackelberg equilibrium is derived analytically for both the pricing schemes.

  3. In particular, the existence and uniqueness of Stackelberg equilibrium are validated by identifying the best response strategies of the miners under the uniform pricing scheme. Likewise, the Stackelberg equilibrium is proved to exist and be unique by capitalizing on the Variational Inequality theory under discriminatory pricing scheme.

  4. We conduct extensive numerical simulations to evaluate the performance of the proposed price-based resource management for mobile blockchain. The results show that the discriminatory pricing helps the ESP to encourage more service demand from the miners and achieve greater profit. Moreover, under uniform pricing, the service provider has an incentive to set the maximum price for the profit maximization.

  5. Our work helps to achieve the proof-of-work puzzle offloading and guide the ESP to extract the surplus through charging miners strategically. Further, we perform the real experiment on mobile blockchain mining to validate the proposed analytical model.

The rest of the paper is organized as follows. Section II presents a review of the related work. We describe the system model and formulate the two-stage Stackelberg game in Section III. In Section IV, we analyze the optimal service demand of miners as well as the profit maximization of the ESP using backward induction for both uniform and discriminatory pricing schemes. We present the performance evaluations in Section V. Section VI concludes the paper with summary and future directions.

Ii Related Work

Recently, there have been several studies on mining schemes management for blockchain network. In [16], the authors designed a noncooperative game among the miners, i.e., the players. The miner’s strategy is to choose the number of transactions to be included in a block. In the model, solving the proof-of-work puzzle for mining is modeled as a Poisson process. The solution of the game is the Nash equilibrium which was derived only for two miners in [16]. Then, the authors in [17] modeled the mining process as a sequential game where the miners compete for mining reward in sequentially among them. In the game model, the miners are assumed to be rational, and they have to choose whether or not to propagate their solution, i.e., the mined block. It is proved in [17] that there exists a multiplicity of Nash equilibrium. Further, it is found that not propagating is an optimal strategy under certain conditions. Similar to that in [17], the authors in [18] formulated the stochastic game for modeling the mining process, where miners decide on which blocks to extend and whether to propagate the mined block. In particular, two game models in which miners play a complete information stochastic game are studied. In the first model, each miner propagates immediately the mined block that it mines. The strategy of each miner is to select an appropriate block to mine. In the second model, the miner selects which block to mine, but it may not propagate its mined block immediately. For both models, it is proved in [18] that when the number of miners is sufficiently small, the Nash equilibrium with respect to mining behaviors exists.

Traditionally, miners mine blocks individually, which we call the solo mining. The advantage of solo mining is that the miner obtains all the reward when it successfully mines the block. Recently, the pool mining is introduced as a alternative way for miners to pool their resources together for mining the block, in order to obtain steady reward [19]. The authors in [20] proposed the cooperative game based blockchain mining scheme, in which the pool mining was examined. In particular, the cooperative game theoretic tools are used to study which pools that the miners want to join and how the miners in the same pool share their reward. The interactions of miners and pool are modeled as a coalitional game. It is proved that there is no stable way to divide the payoff among the miners, i.e., the coalition structure has an empty core. Further, the proposed scheme is applied to the real-world Bitcoin network environment. It is found in [20] that under any reward allocation schemes, some miners always have the incentive to switch to other pools for higher expected reward. Inspired by [20], the authors in [21] further studied optimal pool mining mechanisms, in which the utility model and social welfare of miners are considered. It is demonstrated that the geometric pay pooling strategy [22] achieves the optimal steady-state utility for miners. The results in [21] can also be applied to other forms of mining systems.

In [23], the authors defined a novel model, in which the pools use some of their miners to infiltrate other pools and perform such an attack. The attacked pool shares its reward with the attacker, and so each of its miners in the pool earns less reward. It is proved that the decision to attack or not is the miner’s dilemma and an instance of iterative prisoner’s dilemma [24]. In [25], the authors developed a novel incentive payment mechanism for pool mining, in which the group bargaining solution is adopted by considering peer-to-peer relationship of miners. In the proposed scheme, miners are grouped as a miner pool based on contribution levels. Therefore, multiple groups with different computing contributions, i.e., mining pools are formulated. As such, the bargaining occurs within individual miners in each mining pool and across multiple pools simultaneously. It is proved in [25] that the unique Nash bargaining solution [26] exists in the proposed scheme. The authors in [27] proposed a new computational power splitting game for the blockchain mining. This game model includes multiple incentivized miners to compete in solving proof-of-work puzzle in exchange for mining reward. Based on the game model, the miner with computation power play a game of solving the puzzle through distributing its computing power into different pools such that its expected reward is maximum. However, it is shown that this game has no pure Nash equilibrium with pure strategies. Some findings in [27] are consistent with those in [23].

Nevertheless, all of the above works studied the mining management problem by using dedicated nodes, without considering the operation of blockchain with mobile devices, i.e., mobile blockchain. Therefore, this motivates us to take a step further to reconsider the mining strategies as well as resource management in mobile environment, thereby opening new opportunities for the development of blockchain in mobile services and applications.

Iii System Model and Game Formulation

Symbol Definition
, Set of miners, and the total number of miners, respectively
Edge computing service demand of miner
The minimum service requirement for all the miners
The maximum service demand for all the miners
The service demand profile of all the miners
The service demand profile of all other miners except
The size of block mined by miner , i.e., the number
of transactions in its block
The relative computing or hash power of miner
The utility of miner
The unit price set by the edge computing service
provider for all the miners under uniform pricing
The unit price set by the edge computing service
provider for miner under discriminatory pricing
The maximum price constriant
Fixed reward of successfully mining a block
Variable reward factor
The profit of edge computing service provider
The average time taken to mine a block,
The service cost factor
The block propagation time
The probability of miner successfully mining a block
or winning the mining reward
The probability that the block is orphaned
The propagation delay factor
Table I: Notations

In this section, we first propose the system model of the mobile blockchain network under our consideration. Then, we present the Stackelberg game formulation for the price-based edge computing resource management for mobile blockchain applications.

Iii-a Mobile Blockchain

Blockchain can be employed for mobile applications to support peer-to-peer (P2P) secure data services, e.g., P2P file transfer and P2P direct payment [28, 29]. To create a chain of blocks, the mining needs to be done. The mining process is used to confirm and secure transactions to be stored in a block. This mining process is organized as a speed game among the miners with different computing powers. The problem is a proof-of-work puzzle, which is expensive to solve and takes high computing power, time, and energy. In brief, this proof-of-work puzzle includes considering a set of transactions that are present in the network, solving a mathematical problem1 that depends on this set and propagating the result to the blockchain network for this solution to be checked and reach consensus. Once all these steps are done successfully, the set of transactions proposed by the miner forms a block that is appended to the current blockchain. The first miner which successfully obtains the solution of the puzzle and reach the consensus is considered to be the winner to which a certain reward2 is given. This is referred to as the speed game among the miners. The earlier studies, e.g., in [29], have found that the puzzle cannot be handled efficiently using mobile devices. In the following, we introduce using the edge computing concept for offloading the mobile blockchain processing, e.g., mining process. The more details of blockchain networks and the mining process can be found in [12].

Figure 1: System model.

Iii-B Chain Mining with Edge Computing

We consider a mobile blockchain application, e.g., as presented in [29]. There is a group of mobile users, i.e., the miners, the set of which is denoted by . Each mobile user runs mobile blockchain applications to record the transactions performed in the group. There is an Edge computing Service Provider (ESP) deploying the edge computing units/nodes for the miners. The aforementioned proof-of-work puzzle can be offloaded to a nearby edge computing unit. In particular, the edge computing units offer computing resources to mobile users, i.e., the miners which will be priced by the ESP. Figure. 1. shows the system model of the mobile blockchain network under our consideration. Note that we assume the link between the mobile nodes and edge computing units are always secured which can be achieved by some security solutions.

The ESP, i.e., the seller, sells the edge computing services, and the miner, i.e., the buyers, access and consume this service from the nearby edge computing unit. Each miner  determines their individual service demand, denoted by . Additionally, we consider , in which is the minimum service demand, e.g., for blockchain data synchronization, and is the maximum service demand governed by the ESP. Note that each miner has no incentive to unboundedly increase its service demand due to its financial burden. Then, let and represent the service demand profile of all the miners and all other miners except miner , respectively. As such, the miner with the service demand has a relative computing power (hash power) with respect to the total hash power of the network, which is defined as follows:


such that .

In the mobile blockchain network, miners compete against each other in order to be the first one to solve the proof-of-work puzzle and receive the reward from the speed game accordingly. The occurrence of solving the puzzle can be modeled as a random variable following a Poisson process with mean  [16]. Note that our model is general that can be applied with other values of easily. The set of transactions to be included in a block chosen by miner is denoted as . Once the miner successfully solves the puzzle, the miner needs to propagate its solution to the whole mobile blockchain network and its solution needs to reach consensus. Because there is no centralized authority to verify the validate a newly mined block, a mechanism for reaching network consensus must be employed. In this mechanism, the verification needs to be processed by other miners before the new mined block is appended to the current blockchain.

The first miner to successfully mine a block that reaches consensus earns the reward. The reward consists of a fixed reward denoted by , and a variable reward which is defined as , where denotes a given variable reward factor and denotes the number of transactions included in the block mined by miner  [16, 31]. Additionally, the process of solving the puzzle incurs an associated cost, i.e., the payment from miner to the ESP, . The objective of the miners is to maximize their individual expected utility, and for miner , it is defined as follows:


where is the probability that miner successfully mines the block and its solutions reach consensus, i.e., miner wins the mining reward.

The process of successfully mining a block consists of two steps, i.e., the mining step and the propagation step. In the mining step, the probability that miner mines the block is directly proportional to its relative computing power . Furthermore, there are diminishing chances of wining if one miner chooses to propagate a block that propagates slowly to other miners in the propagation step. In other words, even though one miner may find the first valid block, if its mined block is large, then this block will be likely to be discarded because of long latency, which is called orphaning [16]. Considering this fact, the probability of successful mining by miner is discounted by the chances that the block is orphaned, , which is expressed by


Using the fact that block mining times follow the Poisson distribution aforementioned, the orphaning probability is approximated as [32, 33]:


where is the block propagation time, which is a function of the block size. In other words, the propagation time needed for a block to reach consensus is dependent on its size , i.e., the number of transactions in it [16, 34]. Thus, the bigger the block is, the more time needed to propagate the block to the whole mobile blockchain network [35]. Same as [16], we assume this time function is linear, i.e., with represents a given delay factor. Note that this linear approximation is acceptable according to the numerical results from [16, 36]. Additionally, it would be more appropriate to add a constant term in this function [35], but apparently this constant term has no effect on our subsequent analytical results. Thus, the probability that the miner successfully mines a block and its solution reaches consensus is expressed as follows:


where is given in (1).

Iii-C Two-Stage Stackelberg Game Formulation

Figure 2: Two-stage Stackelberg game model of the interactions among the ESP and miners in the mobile blockchain.

The interaction between the ESP and miners can be modeled as a two-stage Stackelberg game, as illustrated in Fig. 2. The ESP, i.e., the leader, sets the price in the upper Stage I. The miners, i.e., the followers, decide on their optimal computing service demand for offloading in the lower Stage II, being aware of the price set by the ESP. By using backward induction, we formulate the optimization problems for the leader and followers as follows.

Miners’ mining strategies in Stage II

Given the pricing of the ESP and other miners’ strategies, the miner determines its computing service demand for its hash power maximizing the expected utility which is given as:


where is the price per unit for service demand of miner . The miner sub-game problem can be written as follows:

Problem 1. (Miner sub-game):

subject to

ESP’s pricing strategies in Stage I

The profit of the ESP is the revenue obtained from charging the miners for computing service minus the service cost. The service cost is directly related to the time that the miner takes to mine a block, the cost of electricity, , and the other cost that is a function of the service demand . Therefore, the ESP decides the pricing within the strategy space to maximize its profit which is represented as:


Note that practically the price is bounded by maximum price constraint that is denoted by . Then, the profit maximization problem of the ESP is formulated as follows.

Problem 2. (ESP sub-game):

subject to

Problem 1 and Problem 2 together form the Stackelberg game, and the objective of this game is to find the Stackelberg equilibrium. The Stackelberg equilibrium is a point where the payoff of the leader is maximized given that the followers adopt their best responses, i.e., the Nash eqilibrium [37]. In our problem, the Stackelberg equilibrium can be written as follows.

Definition 1.

Let and denote the optimal service demand vector of all the miners and optimal unit price vector of edge computing service, respectively. Then, the point is the Stackelberg equilibrium if the following conditions,




are satisfied, where is the best response service demand vector for all the miners except miner .


Note that the same or different prices can be applied to the miners, which we refer to them as the uniform and discriminatory pricing schemes, respectively. In the following, we investigate these two pricing schemes for resource management in mobile blockchain.

Iv Equilibrium Analysis for Edge Computing Resource Management

In this section, we propose the uniform pricing and discriminatory pricing schemes for resource management in mobile blockchain. We then analyze the optimal service demand of miners as well as the profit maximization of the ESP under both pricing schemes.

Iv-a Uniform Pricing Scheme

We first consider the uniform pricing scheme, in which the ESP charges all the miners the same unit price for their computing service demand, i.e., . Given the payoff functions defined in Section III, we use backward induction to analyze the Stackelberg game.

Stage II: Miners’ Demand Game

Given the price decided by the ESP, in Stage II, the miners compete with each other to maximize their own utility by choosing their individual service demand, which forms the noncooperative Miners’ Demand Game (MDG) , where is the set of miners, is the strategy set, and is the utility, i.e., payoff, function of miner . Specifically, each miner selects its strategy to maximize its utility function . We next analyze the existence and uniqueness of the Nash equilibrium in the MDG.

Definition 2.

A demand vector is the Nash equilibrium of the MDG , if, for every miner , for all , where is the resulting utility of the miner , given the other miners’ demand .

Theorem 1.

A Nash equilibrium exists in MDG .


Firstly, the strategy space for each miner is defined to be , which is a non-empty, convex, compact subset of the Euclidean space. From (6), is apparently continuous in . Then, we take the first order and second order derivatives of (6) with respect to to prove its concavity, which can be written as follows:








Therefore, we have proved that is strictly concave with respect to . Accordingly, the Nash equilibrium exists in this noncooperative MDG  [37]. The proof is now completed.

Further, based on the first order derivative condition, we have


and we obtain the best response function of miner by solving (17), as shown in (12).

Theorem 2.

The uniqueness of the Nash equilibrium in the noncooperative MDG is guaranteed given the following condition


is satisfied.


Let denote the Nash equilibrium of the MDG. By definition, the Nash equilibrium needs to satisfy , in which . In particular, is the best response function of miner , given the demand strategies of other miners. The uniqueness of the Nash equilibrium can be proved by showing that the best response function of miner , i.e., as given in (12), is the standard function [37].

Definition 3.

A function is a standard function when the following properties are guaranteed [37]:
Positivity: ;
Monotonicity: If , then ;
Scalability: For all , .

Firstly, for the positivity, under the condition in (18), we have (from Lemma 1)


then we can conclude that


Thus, we can prove that


which is the positivity condition.


Secondly, we prove the monotonicity of (12). Let , we can further simplify the expression of , which is shown in (22). In particular, we have , and we can easily verify that


Under the condition in (32), we can prove that


Thus, the best response function of miner in (12) is always positive.

At last, as for scalability, we need to prove that , for . The steps of proving the positivity of are shown in (23). Therefore, is always satisfied for . Until now, we have proved that the best response function in (12) satisfies three properties described in Definition 2. Therefore, the Nash equilibrium of MDG  is unique. The proof is now completed. ∎

Theorem 3.

The unique Nash equilibrium for miner in the MDG is given by


provided that the condition in (18) holds.


According to (13), for each miner , we have the mathematical expression


Then, we calculate the summation of this expression for all the miners as follows:


which means . Thus, we have


Recall from (12), according to the first order derivative condition, we have


By substituting (30) into (29), we have


After squaring both sides, we have . With simple transformations, we obtain the Nash equilibrium for miner as shown in (26). ∎

Lemma 1.



the following condition


is satisfied.


According to (26) and (29), we can obtain


After substituting (32) into (34), we have


which means that the condition in (32) needs to be ensured. On the contrary, if the condition in (32) holds, then, the condition in (34) is satisfied. The proof is now completed. ∎

Generally, we can use the best-response dynamics for obtaining the Nash equilibrium of the N-player noncooperative game in Stage II [37]. In the following, we analyze the profit maximization of the ESP in Stage I under uniform pricing.

Stage I: ESP’s Profit Maximization

Based on the Nash equilibrium of the computing service demand in the MDG  in Stage II, the leader of the Stackelberg game, i.e., the ESP, can optimize its pricing strategy in Stage I to maximize its profit defined in (8). Thus, the optimal pricing can be formulated as an optimization problem. By substituting (26) into (8), the profit maximization of the ESP is simplified as follows:

subject to
Theorem 4.

Under uniform pricing, the ESP achieves the globally optimal profit, i.e., profit maximization, under the unique optimal price.


From (36), we have


The first and second derivatives of profit with respect to price are given as follows:




Due to the negativity of (39), the strict concavity of the objective function is ensured. Thus, the ESP is able to achieve the maximum profit with the unique optimal price. The proof is now completed. ∎

Note that the profit maximization defined in (36) is a convex optimization problem, and thus it can be solved by standard convex optimization algorithms, e.g., gradient assisted binary search. Under uniform pricing, we have proved that the Nash equilibrium in Stage II is unique and the optimal price in Stage I is also unique. Thus, we can conclude that the Stackelberg equilibrium is unique and accordingly the best-response dynamics algorithm can achieve this unique Stackelberg equilibrium [37].

Iv-B Discriminatory Pricing Scheme

Then, we consider the discriminatory pricing scheme, in which the ESP is able to set different unit prices of service demand for different miners. Again, we use the backward induction to analyze the optimal service demand of miners and the profit maximization of the ESP.

Stage II: Miners’ Demand Game

Under discriminatory pricing scheme, the strategy space of the ESP becomes . Recall that we prove the existence and uniqueness of MDG , given the fixed price from the ESP. Thus, under discriminatory pricing, the existence and uniqueness of the MDG can be still guaranteed. With minor change from Theorem 3, we have the following theorem immediately.

Theorem 5.

Under uniform pricing, the unique Nash equilibrium demand of miner can be obtained as follows:


if the following condition




The steps of proof are similar to those in the case of uniform pricing as shown in Section IV-A1, and thus we omit them for brevity. ∎

We next analyze the profit maximization of the ESP in Stage I under discriminatory pricing to further investigate the Stackelberg equilibrium.

Stage I: ESP’s Profit Maximization

Similar to that in Section IV-A2, we analyze the profit maximization with the analytical result from Theorem 5, i.e., the Nash equilibrium of the computing service demand in Stage II. After substituting (40) into (8), we have the following optimization,

subject to
Theorem 6.

is concave on each , when , and decreasing on each when , provided that the following condition


is satisfied, where .


We firstly decompose the objective function in (42) into two parts, namely, and . Then, we analyze the properties of each part. We define


Let , and we have . Then, we obtain the first and the second partial derivatives of (46) with respect to as follows.


Further, we have


Thus, we can obtain the Hessian matrix of , which is expressed as:


For each , we have . Thus, the diagonal elements of the Hessian matrix are all larger than zero, and the principle minors are equal to zero. Therefore, the Hessian matrix of is semi-negative definite.

Then, we analyze the properties of . We first define


By substituting (40) into (51), we can obtain the final expression for , which can be rewritten as in (43). Then, we derive the first order and the second partial derivatives of (43) with respect to as shown in (44) and (53). Since we have ,