# Computational Resource Allocation Strategy in a Public Blockchain Supported by Edge Computing

Authors: Sujie Shao; Weichao Gong; Shaoyong Guo; Xuesong Qiu
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

Blockchain, as an emerging distributed data management technology, has attracted extensive attention in recent years. In particular, a public blockchain network can ensure data security by addressing computationally intensive cryptographic tasks. Therefore, for node devices, sufficient computing power is required. However, mobile devices with limited computing power do not meet the conditions required by public blockchain network applications (OZEX, CoininAsia, BitRewards, etc.). To copy with the mentioned problems, nodes can offload computing tasks to edge computing services with low latency. This paper mainly focuses on the trade between edge computing providers (ECP) and nodes. We build a computational resource market model based on auction. Meanwhile, we propose two strategies to deal with two methods of offloading to achieve higher system profit. We also prove that the proposed strategy has individual rationality, authenticity under resource constraints. The simulation results have significance for administrators of a public blockchain network to improve the efficiency of computing resource allocation.


---

## Body

## 1. Introduction

Since blockchain was first proposed in 2008, it has gradually expanded from cryptographic digital currencies to innovative applications in all walks of life [1]. Blockchain implements a decentralized system that can reach a consensus of trust in the digital space. By reaching a consensus among peers in the peer-to-peer (P2P) network, nodes jointly maintain a data chain that connects data blocks in a chain way in a chronological order [2]. Each block on the data chain is protected from tampering and forgery by digital signature and other data verification methods [3].Proof of work (PoW) is an important consensus mechanism in the public blockchain, which is used to prove that a task is completed and the calculation is paid for [4]. The task is to compute a cryptographic security-related nonce value that leads the hash of the nonce and block data to be less than a given upper limit (depending on the mining difficulty). This calculation process is called mining [5], and the nodes that complete tasks to reach consensus are called miners. Miners broadcast transactions on the network after calculating the nonce value. Other nodes immediately verify the consensus after receiving the block containing transactions. After verification, the block will be added to their local node in the chain of block maintenance [4]. Only data which is packaged by the node that calculates the nonce value fastest can be added to the blockchain. In return, the miners can receive a reward as an incentive of mining. The reward consists of a fixed bonus and a variable transaction fee [6].Unfortunately, solving the PoW puzzle in public blockchain requires sustained high computing power that mobile devices cannot afford [7]. In order to alleviate the problem of insufficient computing power, consensus nodes can offload their mining tasks to edge computing services, supporting applications based on the public blockchain [8]. Edge computing closer to data source is a comprehensive platform that provides network, computing, and storage. It enables data storage and computing power to be deployed closer to the edge of the user, thereby reducing network latency. Edge computing services can support more consensus nodes to mine tasks, which will significantly improve the robustness and security of the public blockchain network, further attracting more developers to join to promote the construction of public blockchain.Further, edge computing matches the distributed model of blockchain on networking, computing, and storage. On the one hand, when blockchain nodes are deployed in edge node devices, edge computing services provide computing resources and storage capacity to a large number of scattered nodes in the blockchain. To copy with the problem of delay transmission in the case of coexistence of a large number of nodes, edge computing with low latency is a good response to the application demands of blockchain on the edge side. On the other hand, blockchain provides a trusted and secure environment for edge services, which ensure the integrity and authenticity of storage, achieving the collaborative management of resources among multiple subjects.In this paper, we divide the nodes into full nodes and light nodes in a public blockchain network. Full nodal participation in the consensus process, i.e., miners, light nodes do not participate in the consensus process, in spite of can be rewarded by performing a portion of the computing tasks for full nodes for collaborative mining [9]. We also call light nodes “sharer.” We consider the trading between the edge compute provider (ECP) and the full node as well as the trading between the full node and the light node. From a system perspective, our goal is to maximize the social welfare of the public blockchain networks. Social welfare can be understood as system efficiency in [10]. In order to achieve the goal, we propose an edge computing resource market model based on auction for a public blockchain network. In addition, we designed an individual and truthful computing resource allocation mechanism.The specific contributions of this paper are summarized as follows:(i)
In the proposed edge computing resource market model, we consider the competitive relationship between miners in the public blockchain and maximize social welfare under appropriate network effect parameters(ii)
Two offloading modes are proposed in a public blockchain network based on edge computing. Miners can offload their mining tasks to ECP or idle nodes, which takes advantage of idle resources in a network and reduces load on an edge server(iii)
Two auction algorithms were used to improve network efficiency. The trade between ECP and miners was conducted through the Vickrey-Clarke-Groves (VCG) auction. The trade between miners and sharers was realized through Continuous Double Auction (CDA). Algorithms are designed to meet resource constraints, individual rationality, and authenticity


## 2. Related Work

There have been many excellent works studying resource allocation problems among the edge providers and miners in a blockchain network. In [11], authors study the interactions among the cloud/edge providers and miners in blockchain using a multileader multifollower game-theoretic approach, in order to support proof-of-work-based blockchain application. In [12], the authors formulate resource allocation between ECPs and computationally constrained devices as a double auction game. Meanwhile, the experience-weighted attraction (EWA) algorithm is introduced to reach Nash equilibrium. The authors in [13] proposed a novel edge computing offloading framework, which applies decentralized resource management strategy based on auction to perform resource allocation to ECPs. In order to intelligently manage decentralized applications in a blockchain network, Edgence (EDGe + intelligENCE) is proposed by [14] to realize self-governing of the edge devices. In [15], dynamic resource allocation by combinatorial auction is mainly concentrated and the CA-PROVISION algorithm is used for providing pricing strategies. In [16], authors present a two-layer computation offloading paradigm that includes an edge computing provider (ECP) and a cloud computing provider (CCP) to jointly maximize the profits of each service provider and the payoffs of individual miners. In [17], a new model-free deep reinforcement learning-based online computation offloading approach was proposed for blockchain-empowered mobile edge computing in which both mining tasks and data processing tasks are considered. In [18], the authors introduced a broker to manage and adjust the trading market. Then, an iterative double-sided auction scheme was proposed for computing resource trading, where the broker solves an allocation problem to achieve the maximum social welfare meanwhile protecting the privacies of the buyers and the sellers. However, the above papers do not make good use of idle computing resources in the network. In this article, we consider the existence of competition among miners in the computing resource market model and propose two offloading models. Our model supports miners to offload tasks to idle nodes, which improves the utilization of computing resources in the network and reduces the load on edge servers. Further, on the basis of the above-mentioned papers, this paper realizes the optimal resource allocation of the public blockchain network through auction competition between miners and ECP.


## 3. System Model

### 3.1. Edge Computing Resources Trade Market Model

As shown in Figure1, we propose a resources trade market model. There are two types of nodes: full nodes N=1,2,⋯,n and light nodes M=1,2,⋯,m in the public blockchain network with PoW as the consensus strategy. We consider an offload model where the full node could choose to offload the mining calculation task to ECP or to a light node for collaborative mining. In the proposed market model, auction strategy is used to guide trading. The miners submit their resource demands d=d1,⋯,di,⋯,dn and corresponding bids b=b1,b2,⋯,bn. After receiving miner’s demands and bids, ECP uses different strategies to determine win miners X=x1,x2,⋯,xn, xi∈0,1, and service prices P=p1,p2,⋯,pn according to different ways of offloading. In the case of task offloaded to edge sever, ECP uses the VCG auction strategy; in the case of task offloaded to light nodes, ECP uses the CDA strategy. This will be covered in detail in Section 3. To be clear, xi=1 means that miner i wins the competition and can be allocated to resources at price pi, while xi=0 means that no resources are allocated and pi=0.Figure 1
The network model of the public blockchain network based on edge computing.


### 3.2. Mining Mechanism Supported by Edge Computing

The efficiency of blockchain is largely determined by network computing power, so how to ensure the availability of computing resources and the participation of devices will be the driving factors. Chang et al. [19] have discussed the incentive mechanism for edge computing-based blockchain in detail, so the focus of this chapter is on the mining mechanism. In order to balance market prices, optimize resource allocation, and minimize marginal loss, auction theory is applied to the computational resource allocation of the edge blockchain.In the article, we assume that both the miner and ESP are rational and will bid the computational resources according to their actual needs. Devicei’s hash capability γi is represented as
(1)γidi,xi=diαxi∑j∈Ndjαxj,i∈N,where ∑i∈Nγi=1, diα is the computational resource unit required by device i, and α is an exponential parameter of hash power function [20].In mining competition, miners need to be the first to find the correct nonce to solve the PoW problem and broadcast the block to reach consensus. The process of generating the new block can be described as a Poisson process with intensity1/λ [21]. Firstly, miners collect unconfirmed transactions represent by S=s1,s2,⋯,sn into their blocks. Secondly, miner i broadcast its block to a blockchain network to reach consensus. The broadcast delay is affected by the size of transactions si. Miner i’s expected reward Ri consists of a fixed bonus T and a variable transaction fee affected by si. Ri can be expressed as equation (2), where Piγi,si is the probability that miner i reaches consensus and gets rewards.
(2)Ri=T+rsiPiγi,si.Through the above mining competition, miners will only be rewarded if they succeed in creating blocks and reaching consensus. However, in the block broadcast process, the block that encapsulates more transactions has a higher latency. So, it may not reach a consensus first because of the high broadcast latency. It has a higher latency that the block encapsulates more transactions. This type of block is called an orphaned block. The mineri’s block broadcast latency τi is linear to the size of the encapsulated transactions, i.e., τi=ξsi, (ξ is a constant) [22]. As mentioned earlier, the generation process of a block is a Poisson process with intensity 1/λ, so miner i’s orphaning probability can be described as Pio=1−e−1/λτi. Furthermore, the probability that miners will be rewarded Pi can be calculated as follows:
(3)Pi=Pim1−Pio=γie−1/λξτi.


## 3.1. Edge Computing Resources Trade Market Model

As shown in Figure1, we propose a resources trade market model. There are two types of nodes: full nodes N=1,2,⋯,n and light nodes M=1,2,⋯,m in the public blockchain network with PoW as the consensus strategy. We consider an offload model where the full node could choose to offload the mining calculation task to ECP or to a light node for collaborative mining. In the proposed market model, auction strategy is used to guide trading. The miners submit their resource demands d=d1,⋯,di,⋯,dn and corresponding bids b=b1,b2,⋯,bn. After receiving miner’s demands and bids, ECP uses different strategies to determine win miners X=x1,x2,⋯,xn, xi∈0,1, and service prices P=p1,p2,⋯,pn according to different ways of offloading. In the case of task offloaded to edge sever, ECP uses the VCG auction strategy; in the case of task offloaded to light nodes, ECP uses the CDA strategy. This will be covered in detail in Section 3. To be clear, xi=1 means that miner i wins the competition and can be allocated to resources at price pi, while xi=0 means that no resources are allocated and pi=0.Figure 1
The network model of the public blockchain network based on edge computing.


## 3.2. Mining Mechanism Supported by Edge Computing

The efficiency of blockchain is largely determined by network computing power, so how to ensure the availability of computing resources and the participation of devices will be the driving factors. Chang et al. [19] have discussed the incentive mechanism for edge computing-based blockchain in detail, so the focus of this chapter is on the mining mechanism. In order to balance market prices, optimize resource allocation, and minimize marginal loss, auction theory is applied to the computational resource allocation of the edge blockchain.In the article, we assume that both the miner and ESP are rational and will bid the computational resources according to their actual needs. Devicei’s hash capability γi is represented as
(1)γidi,xi=diαxi∑j∈Ndjαxj,i∈N,where ∑i∈Nγi=1, diα is the computational resource unit required by device i, and α is an exponential parameter of hash power function [20].In mining competition, miners need to be the first to find the correct nonce to solve the PoW problem and broadcast the block to reach consensus. The process of generating the new block can be described as a Poisson process with intensity1/λ [21]. Firstly, miners collect unconfirmed transactions represent by S=s1,s2,⋯,sn into their blocks. Secondly, miner i broadcast its block to a blockchain network to reach consensus. The broadcast delay is affected by the size of transactions si. Miner i’s expected reward Ri consists of a fixed bonus T and a variable transaction fee affected by si. Ri can be expressed as equation (2), where Piγi,si is the probability that miner i reaches consensus and gets rewards.
(2)Ri=T+rsiPiγi,si.Through the above mining competition, miners will only be rewarded if they succeed in creating blocks and reaching consensus. However, in the block broadcast process, the block that encapsulates more transactions has a higher latency. So, it may not reach a consensus first because of the high broadcast latency. It has a higher latency that the block encapsulates more transactions. This type of block is called an orphaned block. The mineri’s block broadcast latency τi is linear to the size of the encapsulated transactions, i.e., τi=ξsi, (ξ is a constant) [22]. As mentioned earlier, the generation process of a block is a Poisson process with intensity 1/λ, so miner i’s orphaning probability can be described as Pio=1−e−1/λτi. Furthermore, the probability that miners will be rewarded Pi can be calculated as follows:
(3)Pi=Pim1−Pio=γie−1/λξτi.


## 4. Resource Allocation Based on Auction

In this part, we mainly introduce the auction strategy that the system executes when the computing task is offloaded to ECP or light nodes. Regarding how to decide which task is offloaded to ECP and which task is offloaded to light nodes, we have discussed in more detail in the previous study [23]. To rephrase briefly, Lyapunov theory and proposed deviation update decision algorithm (DUDA) are used to solve computation offloading decision-making and offloading update order-making.


### 4.1. Task Are Offloaded to ECP

When the miners’ tasks were offloaded to ECP, the VCG auction strategy was executed to determine winners and trade prices. Assume thatcE is the unit cost of computing services provided by ECP. Moreover, in this offloading scenario, the social welfare of a network is the sum of all the miners’ rewards minus all the ECP’s costs. Therefore, maximizing social welfare can be described as the following optimization problem:
(4)Max∑i∈NT+rsidiαxi∑j∈Ndjαxje−1/λξτi−cEdii∈Ns.t.∑i∈Ndixi≤C,xi∈0,1,∀i∈N,.where∑i∈Ndixi≤C is the constraint that needs to be met, and C is the most computing resource unit that ECP can afford.VCG auction is a method of distribution of goods with the optimization goal of maximizing social welfare. It uses the marginal damage caused by bidders to others as the bidding pricing rule. Therefore, VCG ensures that the best strategy for each bidder is to bid according to actual needs and value.First, consider ECP auctioning a set of computing resourcesd=d1,⋯,di,⋯,dn. Buyers can declare a set of bids b=b1,b2,⋯,bn, and bidders are sealed (only visible to the auction system), so they cannot see other people’s bids at any time. After all bids are completed, the auction will close.Then, the auction system considers all possible bid combinations and reserves the bid combination that maximizes the total amount of bids. It should be noted that the price they payP=p1,p2,⋯,pn is not the price they originally bid, but the marginal damage pi=∑j∈W′tSt−∑j∈Wt\iS′t they cause to other bidders (at most as high as the original bid).At the end of the auction, if the agent is completely rational and there is no collusion, we can assume that the willingness to pay has been truthfully reported, because each participant will only be accused of marginal damage to other bidders.We solved this integer programming problem through a VCG auction using the following algorithm: first, determine the list of winning miners and then determine the final trade price based on marginal damage [24].Algorithm 1: VCG auction algorithm.
Input:d=d1,⋯,di,⋯,dn; b=b1,b2,⋯,bnOutput:P=p1,p2,⋯,pn;X=x1,x2,⋯,xn1.    For eachi∈N2.xi=0;pi=0;3.    End for4.W=∅;Wt=∅;S=0;St=0;5.    WhileS≤S′&W≠N&W≤C;6.j=argmaxj∈N\Wbj/dj;7.W=Wt;Wt=W∪j;S=St;8.st=∑i∈NT+rsidiαxi/∑j∈Ndjαxje−1/λξτi−∑i∈NcEdi9.    End while10.   For eachj∈W;11.xi=1;N−j=N\j;W−j=W\j;12.W′=∅;W′t=∅;S′=0;S′t=0;13.   WhileS′≤S′t&W′t≠N−j&W′≤C;14.k=argmaxk∈N−j\W′bk/dk;15.W′=W′t;W′t=W′∪k;S′=S′t;16.st′=∑i∈wt′T+rsidiαxi/∑j∈Ndjαxje−1/λξτi−∑i∈wt′cEdi17.   End while18.pi=∑j∈W′tSt−∑j∈Wt\iS′t19.   End for


### 4.2. Task Are Offloaded to Light Nodes

In our scenario, there are some light nodes (sharers)M=1,2,⋯,m in the blockchain network that have computing resources cr=cr1,cr2,⋯,crm but do not participate in mining; they only help the full nodes (miners) N=1,2,⋯,n perform computing tasks. When the miners’ tasks were offloaded to light nodes, the Continuous Double Auction (CDA) strategy was executed to determine winners and trade price [25].In the CDA strategy, the miner’s (buyer) resource demand isd=d1,⋯,di,⋯,dn, and corresponding bids are b=b1,b2,⋯,bn, assuming the trade price for the buyer is P=p1,p2,⋯,pn. The sharers (sellers) will also bid for the computing resource asa=a1,a2,⋯,am. Let us define the seller’s trade price as Q=q1,q2,⋯,qm. ECP acts as an auctioneer, and his income φ is that the seller’s trade price subtracted from the buyer’s.
(5)φ=∑i∈Npi−∑j∈Mqj.Then, we discuss the validity of the CDA algorithm. Similar to Zhang et al. [26], we try to prove the validity from the following:
(1)
Individual rationality: both sellers and buyers need to make a profit(6)qj≥aj,j∈M,pi≤bi,i∈N(2)
Resource constraints: if both sellerj and buyer i agree to trade, equations (7) and (8) need to be met(7)di≤crj,i∈N,j∈M,(8)φ=∑i∈Npi−∑j∈Mqj≥0(3)
Truthful: the sellerj’s profit is defined as χjM, and the buyer i’s profit is defined as χiN. In the CDA process, the highest profits occur when participants compete based on the true price of the resource. In other words, the constraints of equations (11) and (12) have to be satisfied:(9)χjM=qj−aj,jsucceededintheCDAauction,0,otherwise,(10)χiN=ai−pi,isucceededintheCDAauction,0,otherwise,(11)χjMaj,M−j≥χjMaj′,M−j,∀aj′≠aj,j∈M,(12)χiNbi,N−i≥χiNbi′,N−i,∀bi′≠bi,i∈NIn the process of CDA in this paper, we setφ=0 and used equation (13) to determine the trade price, with δ=0.5.
(13)pi=qj=δbi+1−δaj,i∈N,j∈M.Algorithm 2: CDA Algorithm.
Input:a1,⋯aj,⋯am;b1,⋯bi,⋯bn;d1,⋯di,⋯dn;cr1,⋯crj,⋯crmOutput: matching relationshipi⟷j; trading price pi1. Sort bids of buyersaj with decreasing value.2. Sort bids of sellersbi with increasing value.3. For eachi∈N;4. If∃i:aj≤bi then pi=bi+aj/2,i∈N,j∈M;5. Outputj⟷i, pi;6. End for


## 4.1. Task Are Offloaded to ECP

When the miners’ tasks were offloaded to ECP, the VCG auction strategy was executed to determine winners and trade prices. Assume thatcE is the unit cost of computing services provided by ECP. Moreover, in this offloading scenario, the social welfare of a network is the sum of all the miners’ rewards minus all the ECP’s costs. Therefore, maximizing social welfare can be described as the following optimization problem:
(4)Max∑i∈NT+rsidiαxi∑j∈Ndjαxje−1/λξτi−cEdii∈Ns.t.∑i∈Ndixi≤C,xi∈0,1,∀i∈N,.where∑i∈Ndixi≤C is the constraint that needs to be met, and C is the most computing resource unit that ECP can afford.VCG auction is a method of distribution of goods with the optimization goal of maximizing social welfare. It uses the marginal damage caused by bidders to others as the bidding pricing rule. Therefore, VCG ensures that the best strategy for each bidder is to bid according to actual needs and value.First, consider ECP auctioning a set of computing resourcesd=d1,⋯,di,⋯,dn. Buyers can declare a set of bids b=b1,b2,⋯,bn, and bidders are sealed (only visible to the auction system), so they cannot see other people’s bids at any time. After all bids are completed, the auction will close.Then, the auction system considers all possible bid combinations and reserves the bid combination that maximizes the total amount of bids. It should be noted that the price they payP=p1,p2,⋯,pn is not the price they originally bid, but the marginal damage pi=∑j∈W′tSt−∑j∈Wt\iS′t they cause to other bidders (at most as high as the original bid).At the end of the auction, if the agent is completely rational and there is no collusion, we can assume that the willingness to pay has been truthfully reported, because each participant will only be accused of marginal damage to other bidders.We solved this integer programming problem through a VCG auction using the following algorithm: first, determine the list of winning miners and then determine the final trade price based on marginal damage [24].Algorithm 1: VCG auction algorithm.
Input:d=d1,⋯,di,⋯,dn; b=b1,b2,⋯,bnOutput:P=p1,p2,⋯,pn;X=x1,x2,⋯,xn1.    For eachi∈N2.xi=0;pi=0;3.    End for4.W=∅;Wt=∅;S=0;St=0;5.    WhileS≤S′&W≠N&W≤C;6.j=argmaxj∈N\Wbj/dj;7.W=Wt;Wt=W∪j;S=St;8.st=∑i∈NT+rsidiαxi/∑j∈Ndjαxje−1/λξτi−∑i∈NcEdi9.    End while10.   For eachj∈W;11.xi=1;N−j=N\j;W−j=W\j;12.W′=∅;W′t=∅;S′=0;S′t=0;13.   WhileS′≤S′t&W′t≠N−j&W′≤C;14.k=argmaxk∈N−j\W′bk/dk;15.W′=W′t;W′t=W′∪k;S′=S′t;16.st′=∑i∈wt′T+rsidiαxi/∑j∈Ndjαxje−1/λξτi−∑i∈wt′cEdi17.   End while18.pi=∑j∈W′tSt−∑j∈Wt\iS′t19.   End for


## 4.2. Task Are Offloaded to Light Nodes

In our scenario, there are some light nodes (sharers)M=1,2,⋯,m in the blockchain network that have computing resources cr=cr1,cr2,⋯,crm but do not participate in mining; they only help the full nodes (miners) N=1,2,⋯,n perform computing tasks. When the miners’ tasks were offloaded to light nodes, the Continuous Double Auction (CDA) strategy was executed to determine winners and trade price [25].In the CDA strategy, the miner’s (buyer) resource demand isd=d1,⋯,di,⋯,dn, and corresponding bids are b=b1,b2,⋯,bn, assuming the trade price for the buyer is P=p1,p2,⋯,pn. The sharers (sellers) will also bid for the computing resource asa=a1,a2,⋯,am. Let us define the seller’s trade price as Q=q1,q2,⋯,qm. ECP acts as an auctioneer, and his income φ is that the seller’s trade price subtracted from the buyer’s.
(5)φ=∑i∈Npi−∑j∈Mqj.Then, we discuss the validity of the CDA algorithm. Similar to Zhang et al. [26], we try to prove the validity from the following:
(1)
Individual rationality: both sellers and buyers need to make a profit(6)qj≥aj,j∈M,pi≤bi,i∈N(2)
Resource constraints: if both sellerj and buyer i agree to trade, equations (7) and (8) need to be met(7)di≤crj,i∈N,j∈M,(8)φ=∑i∈Npi−∑j∈Mqj≥0(3)
Truthful: the sellerj’s profit is defined as χjM, and the buyer i’s profit is defined as χiN. In the CDA process, the highest profits occur when participants compete based on the true price of the resource. In other words, the constraints of equations (11) and (12) have to be satisfied:(9)χjM=qj−aj,jsucceededintheCDAauction,0,otherwise,(10)χiN=ai−pi,isucceededintheCDAauction,0,otherwise,(11)χjMaj,M−j≥χjMaj′,M−j,∀aj′≠aj,j∈M,(12)χiNbi,N−i≥χiNbi′,N−i,∀bi′≠bi,i∈NIn the process of CDA in this paper, we setφ=0 and used equation (13) to determine the trade price, with δ=0.5.
(13)pi=qj=δbi+1−δaj,i∈N,j∈M.Algorithm 2: CDA Algorithm.
Input:a1,⋯aj,⋯am;b1,⋯bi,⋯bn;d1,⋯di,⋯dn;cr1,⋯crj,⋯crmOutput: matching relationshipi⟷j; trading price pi1. Sort bids of buyersaj with decreasing value.2. Sort bids of sellersbi with increasing value.3. For eachi∈N;4. If∃i:aj≤bi then pi=bi+aj/2,i∈N,j∈M;5. Outputj⟷i, pi;6. End for


## 5. Experiment Results and Analysis

In this chapter, the auction strategy we proposed is simulated to verify the effectiveness and rationality. Simulation result proves that the strategy proposed has better system profits.According to Figure2, the value of reward factor also affects the system’s profits. It can be clearly seen that, with increasing of the reward factor in the number of different devices, the system’s profits have increased significantly. This is because the grown of reward factor incentivizes devices to rent computing resources from edge servers at a higher cost, leading to better expected profits.Figure 2
The influence of reward factors on system profits under different equipment quantity.The profits of different network roles are shown in Figure3. Under the same circumstances, device-sharing computing resources have lower profits. Devices acting as a miner can get higher profits. Meanwhile, edge server provider can also get higher profits. It should be noted that as the number of devices increases, the profits to all roles in the system increased.Figure 3
Comparison of profits for different device roles.In Figure4, we analyze the gap between demands and supplies in different cases. It is obvious that as the number of iterations increases, the gap gradually approaches zero. This shows that the strategy we proposed can meet the demand dynamically.Figure 4
Gap between demands and supplies in different cases.We compared the proposed strategy with mode A (offloading all tasks to ECP) and mode B (offloading all tasks to adjacent idle devices) in Figure5. In (a), the convergence performance of the three models is compared. The system profit increases sharply in the first 20 iterations and then reaches a stable state, indicating that our mechanism has a faster convergence than the other two modes. This is because our model can offload mining tasks to idle devices, improving the utilization of computing resources. Moreover, because there are offloading decisions to be made, the plateau is reached relatively late. In (b), we compare the system profit of the three modes. With the increase of time, the system profit of all three modes will increase, but our strategy has higher returns. Offloading all mining tasks to idle devices causes longer delays, so mode B (offloading all tasks to adjacent idle devices) has the lowest return. In (c), we compare the average delay of the three modes. Since the miners who choose mode B are closer to the provider, the average delay is lower. Taken as a whole, our strategy performs better.Figure 5
Comparison of performance of the three modes.
(a)
Comparison of convergence performance of three modes(b)
Comparison of system profit of three modes(c)
Comparison of average delay of three modes


## 6. Conclusions

In this paper, we offload computing tasks to ECP or light nodes to alleviate the PoW problem in a public blockchain network. When miners offload tasks to the ECP, the VCG auction strategy is adopted to maximize the social welfare of resource allocation; when tasks are offloaded to light nodes, the CDA strategy is adopted to realize efficient allocation of computing resources. The authenticity, individual rationality, and effectiveness of the strategy are also proved in this paper. The simulation results prove that the proposed strategy can improve the profits of the system, as well as providing reference significance for the administrators of the public blockchain network.



---

*Source: 8851121-2021-04-15.xml*