VPT: Privacy Preserving Energy Trading and Block Mining Mechanism for Blockchain based Virtual Power Plants
aa r X i v : . [ c s . CR ] F e b VPT: Privacy Preserving Energy Trading and BlockMining Mechanism for Blockchain based VirtualPower Plants
Muneeb Ul Hassan ∗ , Mubashir Husain Rehmani § , Jinjun Chen ∗∗ Swinburne University of Technology, Hawthorn VIC 3122, Australia § Munster Technological University (MTU), Ireland
Abstract —The desire to overcome reliability issues of dis-tributed energy resources (DERs) lead researchers to develop-ment of a novel concept named as virtual power plant (VPP).VPPs are supposed to carry out intelligent, secure, and smartenergy trading among prosumers, buyers, and generating stationsalong with providing efficient energy management. Therefore, in-tegrating blockchain in decentralized VPP network emerged outas a new paradigm, and recent experiments over this integrationhave shown fruitful results. However, this decentralization alsosuffers with energy management, trust, reliability, and efficiencyissues due to the dynamic nature of DERs. In order to overcomethis, in this paper, we first work over providing efficient energymanagement strategy for VPP to enhance demand response, thenwe propose an energy oriented trading and block mining protocoland named it as proof of energy market (PoEM). To enhance itfurther, we integrate differential privacy in PoEM and proposea Private PoEM (PPoEM) model. Collectively, we propose aprivate decentralized VPP trading model and named it as VirtualPrivate Trading (VPT) model. We further carry out extensivetheoretical analysis and derive step-by-step valuations for marketrace probability, market stability probability, energy tradingexpectation, winning state probability, and prospective leadingtime profit values. Afterwards, we carry out simulation-basedexperiment of our proposed model. The performance evaluationand theoretical analysis of our VPT model make it one of the mostviable model for blockchain based VPP network as compared toother state-of-the-art works.
I. I
NTRODUCTION
In order to efficiently manage the growing number ofdistributed energy resources (DERs) and keep their manage-ment separate from main grid, researchers introduced a novelconcept of virtual power plant (VPP). VPP can be defined asan entity which integrates multiple DERs in order to controlthem in a uniform manner. VPPs are designed to carry outvarious tasks ranging from load monitoring, load control,peak management, energy trading, demand side management,etc [1]. These VPPs efficiently support the integration ofdifferent variable DERs into energy markets such as solarphotovoltaic panels, electric vehicles (EVs), controllable loads,storage batteries, etc. DERs participate in the energy marketsin presence of multiple VPPs and carry out joint energytrading. VPPs are responsible to carry out energy trading ofDERs from the prosumers to grid station. Therefore, they aredeveloped and programmed in such a way that they maximizerevenue and enhance controllability factor in order to manageeverything optimally [2]. The VPP trading model suffers from three major drawbacks in the form of incentive compatibility,trust, and privacy. Regarding first, every trader wants to en-hance their revenues to maximum, similarly, everyone wants toknow the details of their trading in this modern world and wantto ensure that they are getting maximum benefit from theirbusiness. Therefore, the security and trust play an importantfactor in order to attract more buyers towards some specificapplication [3]. In order to enhance trust and security in thenetwork, blockchain technology came up as a rescuer [4].The decentralized and immutable nature of blockchain ensuresthat every buyer is being treated equally and no one is beinggiven unnecessary favour. Blockchain in this scenario ensuresthat every user have control to their data, and they can verifytheir transactions anytime without having any type of risk ofcheating.Furthermore, consensus mechanism in blockchain plays animportant role in validating and approving the transactionbecause every transaction need to pass through verified minersin order to get added inside the block [5]. Similarly, miningin blockchain also ensures that all the blocks being recordedin a ledger are legit and does not contain any anomaloustransaction/information [6]. Traditional blockchain networkswork over proof-of-work (PoW) mining based consensus todetermine winning miner which is not suitable for VPP basedmodels due its computational complexity [7]. Moreover, sinceyet, a blockchain mining mechanism that is purely developedfrom perspective of energy trading of decentralized VPPs hasnot been discussed previously. Therefore, in this article, we de-velop a distributed consensus miner determination mechanismpurely oriented towards energy trading of VPPs and named itas Proof of Energy Market (PoEM).To add it further, we overcome the issues of privacy ofblockchain by integrating differential privacy in PoEM mecha-nism and proposed a Private Proof of Energy Market (PPoEM)mechanism in which the privacy of buyers, sellers, and VPPswill be protected using the concept of differential privacyperturbation. Furthermore, to incentivize all participating pro-sumers and buyers along with management of demand re-sponse, we propose a VPP monitoring based energy tradingmodel that motivates DERs to sell maximum energy during asystem when energy demand is high. Collectively, we proposea complete blockchain based VPP trading model and namedit as virtual private trading (VPT) model.
A. Related Works
DERs is a well-researched domain and plenty of researcheshave been carried out to efficiently manage operations of DERsespecially focusing on energy trading and management. Forexample, authors in [8] work over clustering formation of het-erogeneous on power requirements of VPP smart grid scenario.Similarly, another work targeting risk constrained managementof energy for enhancement of demand response via VPP havebeen carried out by researchers in [9]. Another work thattargets distributed dispatch of VPPs under cyber threats havebeen carried out by researchers in [10]. Nowadays, anothernovel shift in paradigm has happened and researchers areintegrating decentralized blockchain technology with VPPs.In this scenario, a detailed work have been carried out byauthors in [11], which discussed possibilities and future trendsof this integration. However, two major issues of effectiveenergy oriented miner determination for consensus and privacypreservation in blockchain still needs to be addressed. Tothe best of our knowledge, our work is the first pioneeringwork towards integration of a novel and private block miningmechanism from perspective of decentralized energy tradingvia VPPs. For more details regarding privacy issues andintegration of differential privacy in blockchain and otherscenarios, we recommend readers to study [12].
B. Key Contributions
The key contributions of our work are as follows: • We work over integration of blockchain in VPP scenario,and developed a complete three layered VPP modeloperating over permissioned blockchain, we named thecomplete model as virtual private trading (VPT) model. • We propose a VPP system state determination model forefficient energy trading and price determination by VPPs. • We propose PoEM and PPoEM mechanisms via whichparticipants (such as buyers, sellers, and VPPs) can easilytrade electricity without the risk of losing or compromis-ing their private data along with enhancing trust in thenetwork. • We formulate trading and miner selection algorithmsfor PoEM and PPoEM mechanisms and tested it overpermissioned blockchain VPP model. • We carry out extensive theoretical analysis of our VPTmodel from perspective of privacy, security, market state,prospective profit, and market capture and evaluate theseanalysis to show their significance. • We work over enhancing social welfare for both buyersand sellers along with incentivizing VPPs for energytrading task in a private manner.The remainder of paper is organized as follows: Section2 discusses system model and functioning of VPT Model.Section 3 provides discussion about development of PoEM andPPoEM algorithms. Furthermore, Section 4 gives extensivetheoretical analysis for differential privacy, security, marketand profit related probabilities. Afterwards, experimental sim-ulation results, analysis, and behaviour of PoEM and PPoEMis given in section 5. Finally, section 6 provides conclusion ofthe paper. II. S
YSTEM M ODEL AND F UNCTIONING
VPPs are the most critical participant in our proposed VPTstrategy, and all decentralized energy trading functionalitiesrevolve around the efficient functioning of VPPs. In order toprovide a complete picture of VPT scenario to our readers,in this section, we discuss preliminaries such as motivation,problem statement, system model & structure and adversarymodel in detail.
A. Functioning of Virtual Power Plants
The notion of VPP was introduced to stimulate a platform inwhich DERs can be managed efficiently without involvementof traditional centralized grid [13]. The objective of VPPsbased smart grid is to develop such an environment in whichDERs will be given more decision flexibility along withenhancement of demand response of that specific area byimplementing specific policies [14]. VPPs are able to monitor,control, forecast, dispatch, and optimize the consumption andgeneration of DERs in the specified region. To discuss itfurther, in our scenario work over the specific aspect of energytrading via VPPs. As discussed above, VPPs will be able todevelop policies, along with optimization of demand response.Therefore, in our scenarios VPPs will manage energy tradingby carrying out double auction between buyers (homes &buildings) and sellers (DERs). In this trading, VPPs can makepolicies in which they can incentivize prosumers in order tomotivate them to sell electricity at time of high demand hoursin order to enhance demand side management.
B. Differential Privacy
The concept of “Differential Privacy” as a privacy preserva-tion strategy first came into discussion after its successful im-plementation in statistical database in 2006 by C. Dwork [15].Differential privacy was developed to ensure that any queryevaluator will not be able to get exact information of a specificindividual within a dataset [16]. According to an informal def-inition, differential privacy claims that addition, modification,or deletion of a single individual record does not have anysignificant effect over the result of any query analysis [17].In our VPT model, we use both Laplace and Exponentialmechanism of differential privacy to privatize mining andauction process, which is discussed in next sections.
C. Motivation of our Work
The motivation of our VPT strategy and novel miningmechanisms is as follows: • Traditional energy auctions do not incentivize prosumersif they sell energy during peak demand hours [18]. Wedevelop and incentivizing mechanism which will providebenefits to energy traders if they sell during peak hours. • Typical VPP based energy trading mechanisms doesnot incorporate blockchain in their proposed systemmodel [19]. However, in our VPT strategy, we usepermissioned blockchain to enhance trust. • Conventional mining mechanisms used in VPP basedenergy trading are not incentivising VPPs on the basis of
Fig. 1: Blockchain based Virtual Power Plant Scenario for Incentive Compatible Energy Trading.energy they are trading [11], [20]. Mining phenomenonin our PoEM consensus mechanism motivates VPPs tocarry out maximum energy trading by choosing miner onthe basis of energy it is trading. • Traditional block mining and trading mechanisms ofVPPs does not incorporate privacy preservation from per-spective of both; buyers and VPPs. Our proposed PPoEMmining mechanism uses advantages of differential privacyand ensures privacy preservation of VPPs and buyers.
D. System Model & Structure
We divide the complete system model of VPT into threelayers that target and covers a complete VPP based energynetwork (given in Fig. 1). Starting from local area energynetwork, each DER is connected to each VPP in the prescribedarea, e.g., this prescribed area could be a suburb, or combina-tion of few suburbs (depending upon the density). DERs canprovide their available energy to the local VPP (LVPP) of theirchoice for auction, and they will do so depending upon theincentives and rates each VPP is giving. For example, ‘LVPP1’ charges $5 per transaction and ‘LVPP 2’ charges $3 pertransaction, then definitely DERs will tend to go for the onecharging less transaction fee (Here $ is only used to providea generalist point of view, although we are using VPP coin inour VPT model). However, on the other hand ‘LVPP 1’ canprovide some other incentives, etc, in order to attract maximumcustomers. Similarly, these VPPs can also provide incentivesto the buyers and can attract more buyers than others.Similarly, from the figure, it can also be observed that eachsmart home is also connected to all LVPPs of the specifiedarea, which means that they can purchase energy from theLVPP of their choice. All the local regions will be categorizedby keeping in view the perspective of energy internet (EI), adetailed discussion about EI can be found in the work carriedout by Want et al. in [21]. Similarly, in layer 2 of our proposedVPT trading model, LVPPs are connected with MBBs and regional VPPs (RVPP). Here, metropolitan big buyers (MBBs)can request RVPPs if they require large amount of energy fora specific time-slot (e.g., in case of a specific event, etc.). Thistask can further be distributed to multiple LVPPs by RVPPsin order to meet the demand. Here the competition is amongRVPPs, and each RVPP can provide incentives to attract asmuch MBBs as they can. In this layer, RVPPs will be miningnodes and competition will be among them. Moving further tothe layer 3 of our VPT energy trading model, in which theseRVPPs are connected with grid utility databases (GUD), andRVPPs can trade their energy with GUDs as well. Here GUDswill incentivize these RVPPs in order to generate maximumprofit after selling this energy to their consumers, similarly, inthis layer, GUDs will be the mining nodes.
E. Adversary Model
In our proposed VPT model, bidders and sellers submittheir truthful bids and asking prices to VPPs in order tomaximize their social welfare. Similarly, at the time of mining,VPPs report their truthful energy trading details to the miningauthority to enhance trust in the blockchain network. However,if this truthfulness is not maintained due to some adversarialimpact, then the level of trust will decrease in the networkwhich will have a direct impact on the functionality. Inour VPT model, we divide adversaries into two types, oneis from perspective of adversarial objectives during biddingand auction, while second is from perspective of adversarialobjectives during mining process.
1) Adversarial Objectives During Double-Sided Auction:
From the perspective of adversarial objective during auciton,the major information that adversary during auction process isaiming to infer is the private bids of buyers. Alongside privatebids, the adversary is also interested in getting the privateasking price and generation values of energy sellers as well.Leaking these private values not only have effect over the per-sonal privacy of sellers and buyers but it will also have direct htFig. 2: Transition Between System State of Local VPPimpact on the fairness and privacy of auction market. The firstreason behind this impact is that when an adversary will havefine grained data about asks, generation, bids, etc of an auctionmarket, then its easy for the adversary to infer and get morepersonal information of a particular household by learningfrom the data. For instance, just by carrying out learning andcomparison via inference attack on valuations and usages, anadversary can infer into more private data such as generationper hour, living habits, environmental factors, trading agenda,environmental factors, etc [22]. Secondly, adversary is alsoconsidered curious about the processes involved in auction inorder to play strategically. E.g., getting accurate informationabout valuations, asks, availability, and other similar valueswhich are used by VPPs to determine hammer/threshold priceof the auction. This inference of threshold price can be ofstrategic advantage to an adversary, because an adversary canthen participate in auction to gain high profit, which in turnwill reduce profit of other participants.
2) Adversarial Objectives During Blockchain Mining:
From perspective of mining in blockchain mining, it is impor-tant to understand that majority of times, VPPs do not wantothers VPPs to know their exact trading information becauseof the competition among them. In an energy oriented miningmechanism, the major objective of an adversary is to find outthe highest trading VPP in order to study the trading strategiesof that VPP. An adversarial node can try to infer into privacy ofhigh trading VPP in order to get deeper insights about the typeof advertising, marketing, and trading strategies the specificVPP is opting out. So, every VPP (especially if its high tradingVPP) want to keep these strategies private. Therefore, if onegets to know that a specific VPP won the mining election justbecause of the reason that he was among some high tradingVPPs, then the adversarial competitors will focus to infer intothat specific VPP because this inference can be of strategicadvantage to adversary. Contrarily, if its not clear and there arechances that a VPP with low trading score can also becomewinner due to differential privacy, then this adversarial riskreduces to minimum.
F. Motivation to Use Permissioned Blockchain
Our VPT model works over the phenomenon of permis-sioned decentralized blockchain technology. The motivation touse permissioned blockchain instead of a traditional databasearises due to the need of trust in the network. Becausecontrary to traditional distributed database, our permissionedVPT blockchain networks enhances trust by providing anappend-only copy of decentralized ledger to all its nodes. Theledger is an append-only structure and data inside cannot bechanged once it got stored because even VPPs do not have the
Algorithm 1
System State Determination by VPP
Input: G E , S l , B p , M c Output: S s Call:
EnergyDetection( G E , S l , B p , M c ) FUNCTION ← EnergyDetection( G E , S l , B p , M c ) G E ← Real-Time Demand From Grid Utility if ( ≤ G E ≤ S l ) then RT tx = RT m = 10% S s ← Stable State else if ( S l < G E ≤ B p ) then RT tx = RT m = 7% S s ← Warning State else if ( B p < G E ≤ M c ) then RT tx = RT m = 3% S s ← Breakdown State else if ( M c < G E ) then RT tx = RT m = 1% S s ← Shutdown State end if return S s permission to modify this data. VPPs can only append a newblock in the chain but cannot change the previous content ofblocks which was possible in traditional distributed databases.Moreover, the reason behind using permissioned blockchaininstead of a permissionless blockchain is because energy andsmart grid is a sensitive domain and it is important to controlwho can join the network. In our VPT model, only thedesignated nodes which have a smart meter and are capableto trade/purchase energy can join the network. In order tocarry out all these permissioned operations, a permissionedblockchain is required instead of a permissionless blockchain.Furthermore, the permissioned nature is also used to controlmalicious behavior of nodes as well, such as over provisioningof energy, etc. Detailed security analysis of our work ispresented in Section IV-B.III. D EVELOPMENT OF
VPT E
NERGY T RADING AND C ONSENSUS M INING M ODEL
In this section, first we discuss our VPT model fromperspective of system state determination and then we discussthe development and functioning of our PoEM and PPoEMtrading and consensus miner determination algorithms.
A. System State Determination by VPPs
To incentivize selling prosumers, VPPs can make policiesthat encourage more prosumers to sell their stored energy atthe time of high demand [23]. In order to do so, we workover integration of feature of system state determination andincentivization at the level of LVPPs. A detailed formulationof state determination has been provided in Algorithm 1 andFig. 2. In the given algorithm, firstly, the values of stablestate, breakdown state, and shutdown state are fed to LVPP.Afterwards, VPP regularly, monitor the grid energy that isbeing used in the specified area. If the energy usage is understable region, VPPs charge 10% fee for mining and transactionreward. However, in case of need when the system is inwarning, breakdown, or shutdown state, VPP can reduce thefee to 7%, 3%, and 1% respective to encourage maximummicrogrid prosumers to sell their energy. Extensive evaluationof this approach on real datasets have been provided inSection V.
Algorithm 2
Proof of Energy Market (PoEM) Algorithm
Input: b, m, N, E, a, MR, VPP, RT tx , RT m Output: W V PP , SW b , SW s , W b , W s (1) Carrying out Double Auction max bid ( s ) ← argmax [ sort ( b )] for each seller j ← S max do for each buyer k ← N max do if (b ≥ a & b == max bid ( j ) ) then Calculate j th energy slot winner ( W j ) w.r.t rule of allocation W j ( x ) = argmax b P k ∈ N X k ( b ) // W j ( x ) is the selected winner for slot E ( j ) else return ’bid did not match the ask’ break; end if Calculate
Price (F p ) of k th buyer w.r.t payment rule I p = b ( k ) end for Append winner ID, price, energy slot
Append W s [ I d , F pi , S id ] end for (2) Compute Social Welfare, Transaction Fee & Mining Fee RT tx , RT m ← via S s from Algorithm 1 for j ← W s ( max ) do Compute
Transaction Fee via RT tx T xf = F p ( j ) ∗ RT tx Compute
Mining Fee via RT m M xf = F p ( j ) ∗ RT m Compute
Social Welfare of Seller P fj = F p ( j ) − [T xf + M xf ] SW s ( i ) = P fj − a j end for (3) Selecting Miner and Computing Reward Collect M xf Values from Mining Pool
Collect
Energy Trading Values for Each VPP P rv = [] //Making an empty string S sum = P VNi =1 ( S i ) for k ← V N do V pp PR ( k ) = (cid:16) S k S sum (cid:17) ∗ P rv ( append ) = V pp PR ( k ) end for D V pp ( append ) = D V pp & P rV pp // Select
Winning Miner W V pp ← random[D V pp ] w.r.t Probability Distribution//
Select nd Miner for Courtesy Reward S V pp ← random [ D V pp , ∄ ( W V pp )] w.r.t Probability Distribution// Select rd Miner for Courtesy Reward T V pp ← random [ D V pp , ∄ ( W V pp & T V pp )] w.r.t Probability Distribution Get
Mining Rewards as Input MR ← Mining Reward M sum = P Mxf ( m ) i =0 (cid:0) M xf ( i ) (cid:1) RW V pp = MR + [ (cid:0) (cid:1) * M sum ] SW V pp = (cid:0) (cid:1) * M sum TW V pp = (cid:0) (cid:1) * M sum Mine the Block in the Network return W V PP , SW
V PP , TW
V PP , RW
V PP , RS
V PP , RT
V PP , return SW b , SW s , W b , W s B. Proof of Energy Market (PoEM)
Proof of Energy Market mechanism can be defined as adistributed trading and miner selection protocol for energyblockchain which can be used to carry out energy trading ina decentralized environment, where VPPs act as authoritativenodes. PoEM mechanism can be divided into three major parts:( i ) Carrying out Double Auction, ( ii ) Computing transactionfee for each microgrid transaction, and ( iii ) Selecting winningminer with respect to traded energy and computing miningreward.In the first step, a double auction is carried out among all theparticipating nodes, in this step, microgrids and energy buyershave choice via which they can link themselves with the VPPof their choice, however, they can do it within a specific range specified by the network. In this step, asks ‘ a ’ are fetched fromenergy sellers and buyers submit their corresponding bids ‘ b ’for the slot ( i ). Auction in PoEM works similar to standarddouble sided auction where the highest bidder ‘ W i ’ wins theslot ‘ S id ’ and pays the price ‘ P pi ’ accordingly. A theoreticalanalysis about allocation and payment rule of PoEM algorithmis given below in this section.The second step revolves around computation of transactionfee (T x fee ), mining fee (M x f ), and social welfare ( SW s )for each microgrid transaction. These values are calculatedaccording to the prescribed procedures in a way that it benefitsall participating parties to certain extent. The ratio for trans-action fee (RT tx ) and mining fee (RT m ) is decided via mutualagreement between buyers, sellers, and the VPPs. Transactionfee is sent directly to corresponding VPP and mining fee isstored to be send to winning miner.In third step, mechanism first accumulates all energy valuesfor every individual VPP in order to make a data string forall VPPs. These values are appended in a probability vector( P r v ) and a complete database which have information abouteach VPP and the energy they traded in a specific round(e.g., hourly) is formed. Afterwards, the winner VPP is chosenon the basis of energy it has traded. For example, a VPPhas traded 70% of total energy of the system, then it has70% chances of getting selected as a mining VPP in orderto get a reward. After selection of winning VPP, second andthird winner are chosen for courtesy reward of 20% and 10%accordingly. Afterwards, the block is mined and disseminatedto every blockchain node for verification and storage.
1) Allocation Rule:
We use the core concepts of doublesided auction in our VPP energy trading model [24]. Forexample, the allocation rule signifies that the highest bidderwins the specific energy slot if an only if, the highest bid isgreater than ask of the seller for that specific slot [25]. A basicformula for single item double auction can be demonstratedas follows: X i ( E ) = " argmax b ∈ b ( n ) n X j =1 b j ( E ) ⇐⇒ ∃ [ a i ( E ) ≤ b i ( E )] (1) In the above equation b j is the bid for j th buyer, and a i is the ask for i th seller. The equation states that j th biddercan win the bid if and only if , his bid is larger than all otherbids along with being more than ask of buyer. Similarly, formultiple energy sellers in a VPP environment, Eqn. 1 can bepresented as: S max X i =1 X i ( E ) = S max X i =0 argmax b ∈ b ( n ) X j ∈ n b j ( E ) ⇐⇒ ∃ [ a i ( E ) ≤ b i ( E )] (2)
2) Pricing Rule:
In PPoEM, final payment is decided usingdifferentially private privacy protection mechanism. However,in PoEM, buyer will be paying the amount equal to the bid,so the payment rule is as follows: P j ( E ) = ( b j ( E ) , if b j ( E ) ≥ a i ( E )0 , otherwise (3) In the above equation, b j ( E ) is the bid of j th buyer and a i is the ask for i th seller in a condition that ask is alwaysgreater than the bid.
3) Miner Choosing Phenomenon:
In our PoEM algorithm,miner is chosen on the basis of energy it has traded in theprevious round. A miner is chosen with respect to the ratio ofenergy it has traded. First of all, the data of all traded energyin a specific round is collected and a parameter of energysum ‘ S sum = P V N j =1 P ni =1 ( E V i ( i ))) ’ is calculated by accu-mulating energy values from all VPP miners. Afterwards, anintermediary vector ‘ ~P rv ’ is used to calculate final distribution‘D vpp ’ as follows: ~P rv = ~P rv ⌢ V N X k =1 (cid:20) S k S sum ∗ (cid:21) (4) D vpp = D vpp ⌢ ~P rv (5)From the above distribution, first, second, and third winningVPP is computed via random selection phenomenon. FirstVPP will mine the block and gets the major reward, however,the second and third VPP gets courtesy reward accordingly. W vpp = Rand [ D vpp ] , Winning VPP S vpp = Rand [ D vpp , ∄ W vpp ] , Second winner T vpp = Rand [ D vpp , ∄ W vpp & S vpp ] , Third winner (6)
4) Mining Reward Calculation:
Mining reward in ourPoEM mechanism mainly depend upon two factors, one isfixed mining reward (
M R ) which is given by the governingauthority and has a fixed value, and second factor is miningfee ( M x f ). This mining fee is deducted at every energy tradingtransaction of microgrids carried out via VPPs. The amountis accumulated as mining sum ( M sum ) at the mining pool inthe form of VPP coin and is distributed at the end of miningprocess. The formula for calculation of mining reward is asfollows: RW vpp = MR + (0 . ∗ M sum ) , Winning Reward RS vpp = (0 . ∗ M sum ) , nd Courtesy Reward RT vpp = (0 . ∗ M sum ) , rd Courtesy Reward (7)
These ratios can be varied and can be decided after discussionbetween VPPs and the controlling nodes. However, just forthe sake of simplicity, we fixed these ratios in our algorithm.
5) Social Welfare:
In a sealed bid double auction, socialwelfare can be termed as the utility of participants with respectto their bids and asks [26], [27]. In PoEM algorithm, onlysocial welfare of sellers is computed because buyers will bepaying the amount they bid for a specific slot. The formula tocalculate social welfare of i th seller in presence of j th buyeris as follows: SW s ( i ) = P f i – a j (8) C. Private Proof of Energy Market (PPoEM)
In order to develop PPoEM mechanism from PoEM,we integrate differential privacy at two places in PoEMmechanism. Firstly, both Laplace and Exponential mechanismof differential privacy are used to carry out differentially
Algorithm 3
Private Proof of Energy Market (PPoEM) Algo-rithm
Input: b, a, ε , ε , ε E, S, µ , S v , S C Output: W V PP , SW b , SW s , W b , W s (1) Carrying out Private Double Auction max bid ( s ) ← argmax [ sort ( b )] for each seller j ← S max do for each buyer k ← N max do if (b ≥ a & b == max bid ( j ) ) then Calculate j th energy slot winner ( W j ) w.r.t rule of allocation W j ( x ) = argmax b P k ∈ N X k ( b ) // W j ( x ) is the selected winner for slot E ( j ) else return ’bid did not match the ask’ break; end ifCalculating Differentially Private Price From Here W bid ( j ) ← Winning bid from j th buyer a ( j ) ← Seller Ask for that Specific Slot dif = W bid ( j ) - a ( j ) Laplace Mean = dif Compute
DP Price String via Lap( W bid ( j ) , F i , ε ) Store in P v Select
Differentially Private Price via Exponential Mechanism P w ← Winner Probability Distribution ∆ q ← S v P w ( F ( P v , q , O p ) = o p ) ← exp( ε .q Pv,op )2∆ q ) P op ′∈ Op exp( ε .q Pv,op ′ )2∆ q ) Pick
Final Random Price (F p ( j ) ) from P w Probability Distribution F p ( j ) ← random(P w ) end for Append
Winner ID, price, asks for that slot, energy slot
Append W b [I d , F p ( j ) , a ( j ) , E s ] end for (2) Compute Social Welfare, Transaction Fee & Mining Fee RT tx , RT m ← via S s from Algorithm 1 for j ← W s ( max ) do Compute
Transaction Fee via RT tx T xf = F p ( j ) ∗ RT tx Compute
Mining Fee via RT m M xf = F p ( j ) ∗ RT m Compute
Social Welfare of Seller SW s ( i ) = F p ( j ) − [T xf + M xf ] − a j SW b ( i ) = b ( i ) − F p ( j ) end for (3) Selecting Miner and Computing Reward Get
List & Energies of all Participating VPPs
Generate
Probability Distribution of all Energies w.r.t ε differential privacy for j ← V N do VPP pr ← Prob distribution of V pp Energy ∆ q ← M s VPP pr ( F ( L v , q , D vpp ) = d vpp ) ← exp( ε .q Lv,dvpp )2∆ q ) P dvpp ′∈ Dvpp exp( ε .q Lv,dvpp ′ )2∆ q ) P RV ( Append ) = VPP pr ( i ) end for D vpp ( Append ) = D vpp & P RV Select
Mining Node w.r.t Probability Distribution in D vpp // Select
Winning Miner W V pp ← random[ D vpp ] w.r.t Differential Privacy Distribution// Select nd Miner for Courtesy Reward S V pp ← random [ D vpp , ∄ ( W V pp )] w.r.t Differential Privacy Distribution// Select rd Miner for Courtesy Reward T V pp ← random [ D vpp , ∄ ( W V pp & T V pp )] w.r.t Differential Privacy Distribu-tion Get
Mining Rewards as Input MR ← Mining Reward M sum = P Mxf ( m ) i =0 (cid:0) M xf ( i ) (cid:1) Pick
Random Number R R ← random (0 to M sum ) // This is Winner Reward R o = M sum - R R RW V pp = MR + R R SW V pp = (cid:0) (cid:1) * R o TW V pp = (cid:0) (cid:1) * R o Mine the Block in the Network return W V PP , SW
V PP , TW
V PP , RW
V PP , RS
V PP , RT
V PP , return SW b , SW s , W b , W s , T Ksum private price selection in double auction process, whichpreserves bid privacy in a sealed bid auction. Afterwards,Exponential mechanism of differential privacy is used carryout differentially private mining selection, which is thecore part of our private mining algorithm. In the followingsubsection, we discuss the above mentioned differences inPPoEM algorithm from technical perspective.
1) Differentially Private Pricing Rule:
The allocation ruleof PPoEM algorithm is same as that of PoEM algorithm,therefore, we only discuss the pricing rule in here. In PPoEMalgorithm, the final price is calculated from the winning bidin a differentially private manner by keeping in view thesocial welfare of both the buyer and seller. First of all,difference between the winning bid and ask is calculated( dif = W bid ( j ) – a ( j ) ) in order to determine the price stringlimitations. Afterwards, Laplace differential privacy mecha-nism is used to determine the price string in between theask and the final price. The length of string ( l ) can beadjusted according to the requirement and privacy condition.The random pricing values are calculated and appended in avector called ~P v as follows: ~P v = ~P v ⌢ l X i =1 Lap ( W bid ( j ) , F i , ε ) (9)Afterwards, a differently private price is selected usingExponential mechanism as follows: (10) P w ( F ( P v , q , O p ) = o p ) ← exp( ε .q ( P v ,o p )2∆ q ) P o p ′ ∈ O p exp( ε .q ( P v ,o p ′ )2∆ q ) In the above equation, ∆ q is the sensitivity value, whichcan be varied according the requirement. After successfullycalculation and appending of pricing values in the distribution.A random value is picked from P w , which serves the purposeof final price. It in ensured that the price is always greaterthan the ask and less than the bidding value.
2) Differentially Private Miner Selection:
Miner selectionin our PPoEM mechanism is carried out using Exponentialmechanism of differential privacy [28]. Different from PoEM,instead of calculating energy ratios, we calculate energyprobabilities in an exponentially private manner, and then wechose the winning miner from that probability distribution.First of all, energy values of all VPPs are fed as an inputto Exponential mechanism, which calculate probability ofselection for each VPP according to the chosen sensitivityand privacy parameter. Higher the value of ε , higher is thechances of selection of VPP with maximum energy trading.The formula for differentially private miner section is givenas follows: (11)VPP pr ( F ( M ) = d vpp ) ← exp( ε .q Lv,dvpp )2∆ q ) P dvpp ′∈ Dvpp exp( ε .q Lv,dvpp ′ )2∆ q ) In the above equation, M = ( L v , q , D vpp ) and q is thesensitivity value, which can be varied according the require-ment. We carry out experiments at different ε values in orderto demonstrate the functioning from technical perspective. A detailed discussion about implementation and evaluation isprovided in the Section V. After the successful calculationof mining distribution, first, second, and third miner is chosensimilar to PoEM mechanism as mentioned in Eqn. 6.
3) Private Miner Reward:
In order to make miner rewardmore confidential, we picked a random reward value between to M sum and named it as R R . After calculation of ( R R ),a parameter called as remaining reward ( R o ) is calculated bysubtracting the value from mining sum ( R o = M sum − R R ).This value of R o is used to calculate the courtesy reward forsecond and third VPP as follows: RW vpp = MR + R R , Winning Reward RS vpp = (0 . ∗ R o ) , nd Courtesy Reward RT vpp = (0 . ∗ R o ) , rd Courtesy Reward (12)
4) Social Welfare Maximization:
In PPoEM mechanism,the social welfare is maximized for both participants in orderto motivate them to participate in the auction. The formulasfor calculation of social welfare of i th seller and j th buyer areas follows: SW s ( i ) = P f i – a j (13) SW b ( j ) = b ( i ) − P f i (14) D. Functioning, Operation, & Integration Details in VPP
This section discusses the functioning of VPT energy trad-ing blockchain network in detail from point of view of blockgeneration, validation, and VPP coin.
1) Block Generation:
In our VPT model, block generationis carried out right after choosing winning miner. The selectedleader/winning miner performs this step in order to win themining reward. Furthermore, in the leading time-period, theleader/winning VPP can pick transactions from invalidatedportion of mining pool and can validate the transactions to getextra reward. For example, from each transaction validation,he gets some percentage from the transaction fee of tradingVPP.
2) Block Validation:
Firstly, all transactions and completeblock is validated by the leader VPP, and afterwards it isdisseminated to all VPPs for further validation. Afterwards,all VPPs acts as validators and validate the block in orderto confirm its integrity. VPPs generate block hash via SHA-256 algorithm and compare the newly generated hash withthe received hash. If both hash values match, then the blockis considered as a legal block and is then forwarded forthe updating of ledger. Microgrids and other participatingblockchain nodes only act as a viewer and cannot validatethe block, rather they can just view the contents of the blockafter successful dissemination and approval.
3) VPP Coin:
In order to carry out efficient and timelytrading, and in order to reduce intermediary banks from ournetwork, we introduce the concept of VPP coin. The aimof our VPT mechanism is to enhance energy trading ratherthan carrying out crypto-trading, therefore, participating nodes(such as microgrids) cannot trade/exchange VPP coins witheach other. There are only three use cases for participants;firstly, they can only earn coins by selling their energy,secondly, they can only spend the VPP coin by purchasing energy. Finally, if they want to purchase or sale VPP coin inreturn of local currency, they can only do it via authoritativenodes.IV. S
ECURITY , P
RIVACY , AND F UNCTIONALITY A NALYSIS
In this section, we carry out analysis of our VPT model forvarious functionalities such as privacy, security, VPP marketcapture, market race, market expectations, etc., along withdiscussing complexity analysis and other theoretical aspects.
A. Differential Privacy Analysis
Our proposed PPoEM algorithm uses the concept of dif-ferential privacy to protect buyers bidding values and energytrading values of VPP. In order to prove that PPoEM algorithmfollows differential privacy guarantees, we provide extensivetheoretical analysis of it given in the following discussion.
Lemma Consider X ( q ) and X ( q ) be two differentiallyprivate algorithms with privacy budgets ε and ε respectively.Then, X ( q ) = ( X ( q ) , X q )) satisfies ( ε + ε )-differentialprivacy according to composition theorem [29]. Theorem
1: Laplace Mechanism in Price Selection ofPPoEM Algorithm is ε -differentially private. Proof:
See Appendix for Proof
Theorem
2: Exponential price selection and miner selec-tion phenomenon of our PPoEM mechanism provides ε -differential privacy and ε -differential privacy respectively. Proof:
See Appendix for Proof
Theorem
3: Differentially private auction of PPoEM satis-fies ε -differential privacy. Proof:
See Appendix for Proof
B. Security Analysis
Our proposed VPT model has an ability to carry out de-fence against various traditional security attacks due to usageof basic primitives of cryptography in the blockchain (e.g.,symmetric and asymmetric encryption via keys). Similarly,an adversary will not be able to carry out various attackssuch as inference, replication, forgery, etc due to added digitalsignature and differential privacy in it. In this analysis, wecarry out analysis from the perspective of certain securityrequirements in blockchain based energy trading systems.
Theorem
4: Our proposed VPT model ensures wallet se-curity, transaction authenticity, block confidentiality, blockintegrity, blockchain data availability, over provisioning re-silience, and efficient fork resolution.
Proof:
See Appendix for Proof
Theorem
5: Our proposed VPT model provides effectiveresillience to sybil and inference attacks.
Proof:
See Appendix for Proof
C. Market Capture Probability
We divide market capturing into two different probabilitiesnamed as market race and steady market probability, whichare given in the further sections.
1) Market Race Probability:
Consider a VPP network with V N number of VPPs participating in energy trading processwith different amount of traded energy till reported time i .Consider a VPP x , which traded maximum amount of energytill the end of election time-out time (e.g., one hour for hourlymining). The probability that this VPP x was always ahead ofsecond highest VPP y is given in the following theorem. Theorem
6: The probability that winning VPP ( x ) wasalways ahead of second highest VPP is given by P S x , S y = S x ( S x − E v ( i )) − S y ( S y + E v ( i )) S x ( S x − E v ( i )) + S y ( S y − E v ( i )) + 2 S x S y (15) Proof:
See Appendix for Proof
2) Steady Market Probability:
Similarly, when VPPs attractselling prosumers by providing them incentives based upontheir energy, timing, power factor, etc. Then transition ofcustomers occur between VPPs in a way that some microgridsfrom one VPP x move to other VPPs to better incentives,and similarly, some prosumers from other VPPs move to x VPP for better incentives. This complete system form an n state aperiodic Markov chain, similar to the one that can beanalysed in Fig. 3(a). The model given in the figure can furtherbe reduced to form a two state Markov model for a VPP x and other VPPs x ′ , which describe the transition of customersamong one VPP and all other VPPs (as given in Fig. 3(b)).This further leads to a Markovian problem of VPP x capturingthe certain proportion of market at certain time interval inpresence of some specific transition probabilities, which isevaluated in the Theorem 7. Theorem
7: The steady state market capture probability fora VPP x is given by C x = P x ′ x P x ′ x + P xx ′ (16) Proof:
See Appendix for proofTABLE IS
TATE T RANSITION P ROBABILITIES FOR
VPP S T ILL N EXT M INING E LECTION . State P E k (x)Space 0-10 % 10-20% 20-100%T1 T3 T2 T1 T2 T3 T2 T1 T3 T3 T2 T1
D. Winning State Probability
In order to model the behaviour of winning miners,we divide the total energy traded into three states T = T , T , & T , with T being the miners having high probabil-ity of winning the next election. The transition of VPPs amongthese states can be modelled as irreducible aperiodic Marko-vian chain because of dynamic transitions, given in Fig. 3(c).Transition among these VPPs is carried out according to therules given in Table I.
1) VPP Winning State Probability:
For a VPP, it is impor-tant to be in highest winning probability state T for most of (a) (b) (c) Fig. 3: M
ARKOVIAN S TATE P ROBABILITIES FOR
VPT (a) Market Capture Probability Containing ’ n ’ VPPs(b) Market Capture Containing two VPPs ( x and x ′ ) (c) State transition diagram for VPPs till next mining electiontime during trading period in order to maximize its chance ofwinning. The chances of a VPP winning miner election whilebeing in state T & T is fairly less as compared to one beingin T . Therefore, we consider these state as low winning states.From now onwards, we will derive the rate of transition andstay from high winning state T as compared to that of lowprobability states T & T . Theorem
8: The average time length in which a VPPremains in high probability winning state T is: ~W T = P j ∈ T ( π j ) P l ∈ T P k ∈ T P j ∈ T π j ( P jk + P jl ) (17) Proof:
See Appendix
E. Prospective Profit During Leading Time
When a VPP wins an election, he becomes an elected leadertill the next election. During this time period, it can pick theinvalidated transactions from mining pool and validate themfor the next block. In this way, it can earn extra profit duringits leading time. In order to monitor the prospective profit thata VPP can make during its reign, we model it with a queuingapproach discussed in the next theorem.
Theorem
9: The prospective profit that a VPP can makeduring his leading period is:
T otalP rof it = T p = R A M (cid:20) − (cid:16) R A R s (cid:17) T L (cid:21) − (cid:16) R A R s (cid:17) T L +1 – CR s (18) Proof:
See Appendix
F. Complexity Analysis
Our proposed VPT energy trading and mining model iscomputationally efficient from perspective of time and power.This is because of the reasons that lower possible number ofiterations are considered to carry out double auction and minerselection processes.
1) Computational Complexity:
From the perspective ofcomputational complexity, PoEM comprises of three majorparts that can be executed independently by providing required inputs depending upon the requirement. It is also important tonote that the complexity of PPoEM algorithm (Algorithm 3)does not have significant difference as compared to complexityanalysis of PoEM except for integration of exponential differ-ential privacy steps. Therefore, to provide a broader pictureof our proposed mining mechanism, we only calculate thecomplexity of PoEM algorithm, which can easily be linkedwith PPoEM in case of need.
Theorem
10: The computational complexity of auction partin our PoEM algorithm is upper bounded by O ( maxN log( N ) , SN ) . Proof:
See Appendix for proof.
Theorem
11: The upper bound computational complexity ofSocial welfare computation, transaction fee calculation, andmining fee determination is O ( S ) . Proof:
See Appendix for proof.
Theorem
12: Miner selection and reward computation partof PoEM has an upper bound computational complexity of O ( W s max ) . Proof:
See Appendix for proof.Keeping in view the complete analysis, the computationalcomplexity of all three parts of PoEM algorithm can be sum-marised as O ( max ( N log( N ) , SN ) + O ( S ) + O ( W s max )) .In which the most dominant part is carrying out double auctionhaving the worst computational complexity of O ( SN ) ≈O ( n ) in case when S ≈ N and O ( SN ) ≫ O ( N log( N )) after break-even point.
2) Power Consumption:
The proposed VPT model canbe deployed at any VPP without having the trouble aboutpower consumption. Firstly, the trading will take place at leastafter one hour, therefore, the possibility of bottleneck is nearto minimum. Secondly, the proposed VPT model have lowmemory and computational complexity as compared to othertraditional consensus variants that use mining difficulty forchoosing miner. Finally, VPPs are also equipped with stronginfrastructure to carry out various tasks such as blockchainmanagement [11], infrastructure load management [30], andcommunication via IEC61850 [31]. Fig. 4: Accumulated Residential Energy Usage of 100 SmartHomes at Different Management LevelsFig. 5: Social Welfare of Auction Mechanisms of VPT Modelat Various ParametersV. P
ERFORMANCE E VALUATION OF V IRTUAL P RIVATE E NERGY T RADING
To implement VPT model, we develop the functionalitiesof traditional and differentially private double sided auctionat each VPP via Python. Moreover, to determine systemstate, we use real-time data of 100 smart homes from theAusGrid dataset of residential profiles [32]. We further developa decentralized blockchain based model to evaluate PoEMand PPoEM mining functionalities. After successful miningelection, a block is formed and this block containing allinformation regarding the future leader, etc, is then minedto blockchain and is also send to other validating nodes forvalidation.
A. PoEM & PPoEM Double Auction
In order to evaluate our VPT trading model, we first evaluateAlgorithm 1 and determine system state on basis of residentialload profiles given in [32]. The decision of system state istaken on the basis of accumulated load usage by smart homes.Afterwards, the mining fee and transaction fee percentage isdetermined on the basis of system state. A graphical evaluationof system state determination has been provided in Fig. 4.After determination of system state, the transaction fee andmining fee is determined for PoEM and PPoEM election.This step is carried out to encourage microgrids to sell theirstored energy at the time of energy shortfall. After that,PoEM and PPoEM auction has been carried out and socialwelfare is evaluated for each participating buyer and seller. Theevaluation of social welfare on basis of system state has beenprovided in Fig. 5. The given figure shows the trend of increase in social welfare of sellers and buyers with respect to increasein buyers. For example, the social welfare is minimum forPoEM and PPoEM when minimum buyers are participating,and it increases with the increase in number of buyers.For instance, in PoEM, when the number of buyers are 10,the social welfare of sellers gets around 500, and this valueincreases with increase in number of sellers. Similarly, thesocial welfare of buyers do also increases with the increase innumber of sellers as shown in the given figure. It is importantto note that the social welfare of buyers is only applicable toPPoEM algorithm, as in case of PoEM algorithm the final priceis the ask of seller, therefore, buyers social welfare is not takeninto account in PoEM auction. Furthermore, the auction valueat three privacy budgets of ( ε = 0.1, 0.01, & 0.001) is evaluatedfor different sellers and it can be seen from the output graphsthat PPoEM provides a similar social welfare for sellers alongwith providing differentially private protection for buyers bidsand sellers asks.TABLE II C OMPARATIVE A NALYSIS OF P O EM AND PP O EM WITH P O A AND P O E. Consensus/Mining IncentivzingHighTrader Incentive Type LedgerStoragePrivacy ComplexityPoA [33]–[35]
No Mining Reward No O ( n ) PoE [11]
Partially Mining Reward No O ( n ) PoEM(proposed)
Complete Mining Reward + TxFee + Mining Fee No O ( n ) PPoEM(proposed)
Complete Mining Reward + TxFee + Mining Fee Yes O ( n ) B. PoEM & PPoEM Mining Election
We divide the VPT mining election evaluation section intotwo parts, firstly, we discuss mining winner selection and thenwe discuss incentive determination for PoEM and PPoEM.In order to evaluate the proposed mechanism, we use 100prosumers data from AusGrid data [32], and allocated aspecified number of prosumers under management of eachVPP. This allocation can be varied according to the need,however, for the sake of evaluation and analysis we allocateda prosumers under each VPP according to division as follows: { VPP 1 = VPP 2 = 3, VPP 3 = 4, VPP 4 = VPP 5 = 5, VPP6 = VPP 7 = VPP 8 = 10, VPP 9 = 20, and VPP 10 = 30prosumers } .
1) Mining Leader Determination:
One of the most signifi-cant aspect of blockchain consensus mechanism is selection ofwinner miner after election time-out period [36]. In order todo so, our proposed PoEM and PPoEM propose two differentstrategies. PoEM selects the miner according to the percentageof energy it has traded till the election time-out. However, inPPoEM, the energy traded distribution is further categorizedand developed according to the privacy budget. The combinedgraph for energy mining election outcome is given in Fig. 6. Inthe graph, each VPP is arranged according to ascending orderof number of prosumers under it. Similarly, when number ofprosumers increases, the energy traded via that VPP increases.So, it can be determined that VPP 1 is the VPP with leastenergy trading and VPP 10 being the highest trader amongthe lot of VPPs. In order to evaluate the mining process, we (a)(b)(c) Fig. 6: Performance Comparison of PoEM and PPoEM withPoA [33]–[35] and PoE [11](a) Leader Selection (b) Second Winner Selection (c) ThirdWinner Selectioncarry out 10,000 elections on our decentralized blockchainnetwork and in each mining election, the picked energies ofVPPs is selected to form a probability distribution for selectionof winning miner.The mining election is further divided into three steps, inwhich, first, second, and third winner determination is carriedout. In Fig. 6(a), the winner determination of PoEM, PPoEMis given, it can be visualized that in both PoEM and PPoEM( ε = 0 . ), VPP 10 wins maximum elections on the basis thatit has traded maximum energy, and after that VPP 9 wonsecond highest elections of mining leader. However, the trendequalizes in case of PPoEM ( ε = 0.01 & 0.001), becauseof the increase in privacy preservation, all energy miningvalues are treated approximately equal to others. Furthermore,we compare the work with Proof of Authority (PoA) [33]– Fig. 7: Mining Reward/Incentive Comparison of PoEM andPPoEM Mechanism with PoA and PoE after 10,000 Elections.[35] (in which all authority nodes are equal likely to bechosen as miner) and Proof of Energy (PoE) [11] (in whichthe prosumer maintaining production-consumption ratio isincentivized). From the experimental evaluation graphs, it canbe seen that miner chosen in PoA is equally random and allVPPs are selected equally without any discrimination on basisof energy. Similarly, in PoE [11], the prosumer/VPP whichmaintains production-consumption ratio near to zero has thehighest chances of winning the election and the VPP whichtrade maximum energy is not incentivized at all. In our case,VPP 1 has the least amount of houses under its control andtherefore, it trade minimum energy and has maximum chancesof maintaining its ratio, so it wins maximum election via PoE.Contrary to this, the VPP 10, which traded maximum energywon the least elections in PoE because chances of variation aremaximum. Therefore, our PoEM incentivizes the VPP tradingmaximum energy and encourage VPPs to provide incentivesto prosumers to trade maximum energy to enhance this trend.Moreover, our proposed PoEM and PPoEM also choosessecond and third winner for courtesy reward and providessome proportion of mining fee sum to them in order toencourage maximum VPPs participate in the mining electionby trading maximum energy. Contrary to this, PoA and PoEmechanism do not provide such features and only providefunctionality of leader selection. A comparative analysis of ourPoEM and PPoEM with other mining mechanisms is providedin Table. II.
2) Mining Incentive Determination:
Another important as-pect of a mining mechanism is incentivizing the participants.In order to incentivize participants, we provide three factorincentivization in our PoEM and PPoEM mechanisms. Firstly,if a VPP node is selected as winner VPP, it gets incentivizedwith miner reward (500 VPP coins) and selected percentageof mining sum (this percentage is 70% in case of PoEMand in PPoEM its selected randomly). Extensive evaluationof accumulated reward won by each VPP after 10,000 miningelections is given in Fig. 7. Since VPP No. 10 traded maximumamount of energy it won the highest accumulated reward inboth PoEM and PPoEM strategy as given in the graphicalfigure. We further compare our PoEM and PPoEM with PoAand PoE mining strategies, which provide miners with thepre-determined miner reward and does not provide any extra Fig. 8: Evaluation of Market Race Probability at MultipleEnergy Trading Values of VPP ’X’ and ’Y’Fig. 9: Experimental Evaluation of Market Capture Probabilityfor VPP ’X’ at Multiple Trading Stepsincentives to second and third miner or to the miner whichtraded maximum energy.
Considering all the discussion, it can be concluded that ourproposed PoEM and PPoEM strategies outperform PoA andPoE mechanisms from perspective of encouraging miners totrade maximum energy.C. Market Capture Probabilities
The given probabilities help VPPs determine their domi-nance and predict that whether a specific VPP can becomeone of the leading VPP till the next election time-out.
1) Market Race Probability:
Market race probability (eval-uated in Fig. 8) can be used to determine that at what energytrading value the winning VPP will always remain aheadof other VPPs in order to maximize its chance of winningthe mining election. In order to analyse it up, we evaluatethe probability value at different energy values of VPP ‘X’and ‘Y’, with VPP ‘X’ being the leading VPP throughoutthe time till election time-out. In the graph, ‘Y’ representthe accumulative energy “ P x ” and “ E i ” represents the lasttransmitted energy to the mining pool, which is also writtenas E v ( i ) in the above sections. It can be visualized from thegraph that when the value of accumulated energy of ‘Y’ isminimum (e.g., Y = 500), the chances of ‘X’ VPP leading theelection remains maximum. Contrary to this, when the valueof ‘Y’ VPP is increases to 1250, with E i = 125, the probabilityof ‘X’ leading till the election time-out is nearly equal to zerowhen it has only traded 1500Wh of energy. However, this Fig. 10: Evaluation of Profit Value that a VPP can earn duringits Leader Time Period at different Service Rate ( R s )probability increases with the increase in energy traded valueof ‘X’.
2) Market Capture Steady State Probability:
This proba-bility is used to determine the last state of Markovian Marketmodel, in which each VPP wants to find the final distributionof microgrids at their end in case of transition of participantsbetween these VPPs. We evaluate this for a specific VPP ‘X’,considering the factor that each VPP will be interested infinding out its final share of market. To evaluate, we consider9 different transition probability values for Equation 7, andevaluate it in the Fig. 9. From the figure, it can be visualizedthat when the transition probability from VPP X to other VPPsX ′ is equal, then the market reached its stable state in fewersteps as compared to any other probability. This graph can beused by VPPs to visualize that how much market they cancapture till the next election time-out and what will be thesteady state participant distribution for VPPs. D. VPP Profit During Leading Time
A significant parameter that VPPs are usually interested in isthe profit they can earn during their leading time. For example,a VPP wins a mining election, then the next step for it is tovalidate the transactions and add them in the validated sideof mining pool. As a reward of this validation, VPP gets apercentage of transaction fee, which is directly linked withthe profit a VPP will be making during its leading time. It isimportant to consider that VPPs have limited transaction limitand can also validate the transaction at a specific service rate.Moreover, the running cost of system is also considered whilecalculating this profit as given in Eq. 48. We calculate theprospective profit of leader VPP at different service rate valuesand provide the results in Fig. 10. In the given figure, multiplelines show the calculated profit at different gain (profit pertransaction) values. For example, the profit remains minimumwhen the gain value is 10, however, the profit rises to amaximum peak when the gain value is increase to 35. Thesevalues can be used by VPPs to determine a prospective amountof profit they can earn during their leading time with respectto various service rates.
After carefully analysing all experimental results given ingraphs, we believe that VPT is the most suitable energy tradingmodel for any decentralized VPP application. VI. C
ONCLUSION
In this paper, we work over providing a decentralizeddemand response enhancing strategy along with proposing anenergy oriented consensus miner selection mechanism namedas proof of energy market (PoEM). We further extend thismechanism and integrate differential privacy to protect privacyof participating DERs, buyers, and VPPs, and named it asprivate proof of energy market (PPoEM). Afterwards, wecarry out detailed theoretical analysis for differential privacy,security, complexity, and various probabilities such as marketrace, market stability, prospective profit, which can be usedto determine and predict the behaviour and functioning ofcomplete model. Overall, we propose a virtual private trading(VPT) model, via which VPPs, DERs, and energy buyerscan form a complete system and carry out energy tradingin the most efficient manner. The performance evaluation ofVPT model shows that our proposed model is one of themost suitable choice for a decentralized blockchain based VPPnetwork as compared to other state-of-the-art works.R
EFERENCES[1] M. Jadidbonab, B. Mohammadi-Ivatloo, M. Marzband, and P. Siano,“Short-term self-scheduling of virtual energy hub plant within thermalenergy market,”
IEEE Transactions on Industrial Electronics, in Print ,pp. 1–1, 2020.[2] Z. Yi, Y. Xu, W. Gu, and W. Wu, “A multi-time-scale economicscheduling strategy for virtual power plant based on deferrable loadsaggregation and disaggregation,”
IEEE Transactions on SustainableEnergy , vol. 11, no. 3, pp. 1332–1346, 2020.[3] M. U. Hassan, M. H. Rehmani, and J. Chen, “Deal: Differentiallyprivate auction for blockchain-based microgrids energy trading,”
IEEETransactions on Services Computing , vol. 13, no. 2, pp. 263–275, 2020.[4] G. Malavolta, P. Moreno-Sanchez, C. Schneidewind, A. Kate, andM. Maffei, “Anonymous multi-hop locks for blockchain scalability andinteroperability.” in
NDSS , 2019.[5] H. Yu, I. Nikoli´c, R. Hou, and P. Saxena, “Ohie: Blockchain scalingmade simple,” in
IEEE Symposium on Security and Privacy (SP) , 2020,pp. 90–105.[6] H. Kalodner, M. M¨oser, K. Lee, S. Goldfeder, M. Plattner, A. Chator,and A. Narayanan, “Blocksci: Design and applications of a blockchainanalysis platform,” in , 2020, pp.2721–2738.[7] R. Zhang and B. Preneel, “Lay down the common metrics: Evaluatingproof-of-work consensus protocols’ security,” in
IEEE Symposium onSecurity and Privacy (SP) , 2019, pp. 175–192.[8] R. Zhang and B. Hredzak, “Distributed dynamic clustering algorithmfor formation of heterogeneous virtual power plants based on powerrequirements,”
IEEE Transactions on Smart Grid, in Print , pp. 1–1,2020.[9] Z. Liang, Q. Alsafasfeh, T. Jin, H. Pourbabak, and W. Su, “Risk-constrained optimal energy management for virtual power plants consid-ering correlated demand response,”
IEEE Transactions on Smart Grid ,vol. 10, no. 2, pp. 1577–1587, 2019.[10] P. Li, Y. Liu, H. Xin, and X. Jiang, “A robust distributed economicdispatch strategy of virtual power plant under cyber-attacks,”
IEEETransactions on Industrial Informatics , vol. 14, no. 10, pp. 4343–4352,2018.[11] P. Siano, G. De Marco, A. Rol´an, and V. Loia, “A Survey and Evaluationof the Potentials of Distributed Ledger Technology for Peer-to-PeerTransactive Energy Exchanges in Local Energy Markets,”
IEEE SystemsJournal, in Print , 2019.[12] M. U. Hassan, M. H. Rehmani, and J. Chen, “Differential privacytechniques for cyber physical systems: A survey,”
IEEE CommunicationsSurveys Tutorials , vol. 22, no. 1, pp. 746–789, 2020.[13] A. Baringo, L. Baringo, and J. M. Arroyo, “Day-ahead self-schedulingof a virtual power plant in energy and reserve electricity markets underuncertainty,”
IEEE Transactions on Power Systems , vol. 34, no. 3, pp.1881–1894, 2018. [14] D. Koraki and K. Strunz, “Wind and solar power integration in electricitymarkets and distribution networks through service-centric virtual powerplants,”
IEEE Transactions on Power Systems , vol. 33, no. 1, pp. 473–485, 2018.[15] C. Dwork, “Differential privacy,” in
Automata, Languages and Program-ming . Berlin, Heidelberg: Springer Berlin Heidelberg, 2006, pp. 1–12.[16] F.-Y. Rao, J. Cao, E. Bertino, and M. Kantarcioglu, “Hybrid privaterecord linkage: Separating differentially private synopses from matchingrecords,”
ACM Transactions on Privacy and Security (TOPS) , vol. 22,no. 3, pp. 1–36, 2019.[17] Z. Ding, Y. Wang, G. Wang, D. Zhang, and D. Kifer, “Detectingviolations of differential privacy,” in
Proceedings of the ACM SIGSACConference on Computer and Communications Security , 2018, pp. 475–489.[18] M. N. Faqiry and S. Das, “Double auction with hidden user information:Application to energy transaction in microgrid,”
IEEE Transactions onSystems, Man, and Cybernetics: Systems , vol. 49, no. 11, pp. 2326–2339,2019.[19] N. Pourghaderi, M. Fotuhi-Firuzabad, M. Moeini-Aghtaie, and M. Kabir-ifar, “Commercial demand response programs in bidding of a technicalvirtual power plant,”
IEEE Transactions on Industrial Informatics ,vol. 14, no. 11, pp. 5100–5111, 2018.[20] R. Zhang and B. Preneel, “Lay down the common metrics: Evaluatingproof-of-work consensus protocols’ security,” in
IEEE Symposium onSecurity and Privacy (SP) , 2019, pp. 175–192.[21] K. Wang, J. Yu, Y. Yu, Y. Qian, D. Zeng, S. Guo, Y. Xiang, and J. Wu,“A survey on energy internet: Architecture, approach, and emergingtechnologies,”
IEEE Systems Journal , vol. 12, no. 3, pp. 2403–2416,2018.[22] D. Li, Q. Yang, W. Yu, D. An, Y. Zhang, and W. Zhao, “Towardsdifferential privacy-based online double auction for smart grid,”
IEEETransactions on Information Forensics and Security , vol. 15, pp. 971–986, 2020.[23] H. Zhao, B. Wang, Z. Pan, H. Sun, Q. Guo, and Y. Xue, “Aggregatingadditional flexibility from quick-start devices for multi-energy virtualpower plants,”
IEEE Transactions on Sustainable Energy, in Print , pp.1–1, 2020.[24] Y. Jiao, P. Wang, D. Niyato, and K. Suankaewmanee, “Auction mecha-nisms in cloud/fog computing resource allocation for public blockchainnetworks,”
IEEE Transactions on Parallel and Distributed Systems ,vol. 30, no. 9, pp. 1975–1989, 2019.[25] U. Habiba and E. Hossain, “Auction mechanisms for virtualizationin 5g cellular networks: Basics, trends, and open challenges,”
IEEECommunications Surveys & Tutorials , vol. 20, no. 3, pp. 2264–2293,2018.[26] Z. Chen, T. Ni, H. Zhong, S. Zhang, and J. Cui, “Differentially privatedouble spectrum auction with approximate social welfare maximization,”
IEEE Transactions on Information Forensics and Security , vol. 14,no. 11, pp. 2805–2818, 2019.[27] Y. Wang, Z. Cai, Z. Zhan, Y. Gong, and X. Tong, “An optimizationand auction-based incentive mechanism to maximize social welfare formobile crowdsourcing,”
IEEE Transactions on Computational SocialSystems , vol. 6, no. 3, pp. 414–429, 2019.[28] M. Maruseac and G. Ghinita, “Precision-enhanced differentially-privatemining of high-confidence association rules,”
IEEE Transactions onDependable and Secure Computing , pp. 1–1, 2018.[29] C. Dwork, A. Roth et al. , “The algorithmic foundations of differentialprivacy.”
Foundations and Trends in Theoretical Computer Science ,vol. 9, no. 3-4, pp. 211–407, 2014.[30] Z. Su, Y. Wang, Q. Xu, and N. Zhang, “Lvbs: Lightweight vehicularblockchain for secure data sharing in disaster rescue,”
IEEE Transactionson Dependable and Secure Computing, in Print , pp. 1–1, 2020.[31] N. Etherden, V. Vyatkin, and M. H. Bollen, “Virtual power plant for gridservices using IEC 61850,”
IEEE Transactions on Industrial Informatics ,vol. 12, no. 1, pp. 437–447, 2015.[32] SolarHomes, .[33] J. Eberhardt, M. Peise, D.-H. Kim, and S. Tai, “Privacy-PreservingNetting in Local Energy Grids,”
IEEE International Conference onBlockchain and Cryptocurrency , 2020.[34] M. Foti and M. Vavalis, “Blockchain based uniform price doubleauctions for energy markets,”
Applied Energy , vol. 254, p. 113604, 2019.[35] EnergyChain, . [36] P. Szalachowski, D. Reijsbergen, I. Homoliak, and S. Sun, “Strongchain:Transparent and collaborative proof-of-work consensus,” in , 2019, pp. 819–836.[37] M. Ye and A. Barg, “Optimal schemes for discrete distribution estima-tion under locally differential privacy,” IEEE Transactions on Informa-tion Theory , vol. 64, no. 8, pp. 5662–5676, 2018.[38] B. Pinkas, T. Schneider, and M. Zohner, “Scalable private set intersectionbased on ot extension,”
ACM Transactions on Privacy and Security(TOPS) , vol. 21, no. 2, pp. 1–35, 2018.[39] C. Chen, X. Chen, J. Yu, W. Wu, and D. Wu, “Impact of temporaryfork on the evolution of mining pools in blockchain networks: Anevolutionary game analysis,”
IEEE Transactions on Network Scienceand Engineering, in Print , pp. 1–1, 2020. A PPENDIX
Proof of Theorem 1:
Consider W bid & W ′ bid ∈ N | X | in a way that || W bid − W ′ bid ||≤
1. The arbitrary length of stringup to ‘ l ′ for W bid & W ′ bid will be W b = { W b , W b , ...W b l } .Provided, Lap( W bid , F i , ε ) and Lap( W ′ bid , F i , ε ) have prob-ability functions P W bid and P W ′ bid accordingly. The values canbe compared as follows: (19) P W bid [ W b = { W b , W b , ...W b l } ] P W ′ bid [ W b = { W b , W b , ...W b l } ]= l Y k =1 exp (cid:16) − ε | F i ( W bid ) k − W bk | ∆ F i (cid:17) exp (cid:16) − ε | F i ( W ′ bid ) k − W bk | ∆ F i (cid:17) The above equation can be rounded to ≤ exp( ε ) consid-ering the Theorem 3.6 in [29]. Thus, it can be concludedthat Laplace mechanism in price selection of PPoEM is ε -differentially private. Proof of Theorem 2:
Consider O p is the output rangefor exponential price selection for two neighboring inputs P v and P ′ v . The evaluation can be written as: (20) P w ( F ( P v , q , O p ) = o p ) P w ( F ( P ′ v , q , O p ) = o p ) = exp( ε .q Pv,op )2∆ q ) P op ′∈ Op exp( ε .q Pv,op ′ )2∆ q )exp( ε .q P ′ v,op )2∆ q ) P op ′∈ Op exp( ε .q P ′ v,op ′ )2∆ q ) The privacy budget used in above equation remains ε irrespective of input P v and P ′ v . So, Eqn. 20 can be roundedto exp( ε ) by using Theorem 3.10 in [29]. Therefore, itcan be concluded that exponential price selection follows ε -differential privacy.Similarly, the exponential miner selection of PPoEM havefixed ε privacy budget and follows the same principle ofEqn. 20. Therefore, considering the factors it can be concludedthat it obeys ε -differential privacy. Proof of Theorem 3:
In PPoEM algorithm, sequen-tial privacy of Laplace and Exponential have been applied stepby step in data with privacy parameters ε and ε respectively.Then, according to Lemma 1, if sequential privacy steps areperformed on same data and it satisfy ε i -differential privacyon individual privacy level, then it also satisfy a collective ( P i ε i ) -differential privacy. This phenomenon in our PPoEMauction is written as ( ε + ε )-differential privacy. Since,only two privacy parameters ε & ε participate in auction.So, according to the definition ( P i ε i = ε + ε ) , the above statement can be generalized as ε -differential privacy. Thus,the given theorem is proved. Proof of Theorem 4:
Wallet Security:
The wallet accounts in our VPT modelare protected by certificates and security keys via blockchaincryptographic encryption. So, no one can open or steal thecryptographically protected wallet in our VPT model withoutthe matching certificates and keys.
Transaction Authenticity:
The data in our VPT model isverified at multiple steps in order to maintain its authenticity.Firstly, the winning miner verifies each transaction value indi-vidually and add that to mining pool during its winning time.After that, the winning miner picks all verified transactions andform the block using SHA-256 hashing. The formed block isthen sent to all other nodes for validation, and in case if thereis any fraudulent activity, then the specific VPP rejects theblock and launch a request for reconsideration of the block.In this way, all the data inside the blocks of our VPT modelis ensured to be authentic.
Block Confidentiality
In order to protect confidentiality,we integrate two aspects. Firstly, our VPT energy tradingruns over a permissioned blockchain network in which onlyapproved nodes can join and view the blockchain ledger.Secondly, we integrate differential privacy as a mean to protecttransaction and mining data from internal intruders [37].
Block Integrity
In our permissioned blockchain network, eachblock integrity is maintained using SHA-256 cryptographichashing algorithm, which guarantees that all the data insidethe block is tamper-proof and is in its original form [38].Furthermore, in our VPT mechanism, only VPP have theright to mine block in the network, which ensures that onlyapproved data will get mined. And in case if any VPP behavesmaliciously, then it can be penalized because of its actions.
Data Availability
Since we are running a system that supportsdistributed decentralized ledger at each participating node,therefore, the data is always available for viewing on thatledger. Any participating nodes can download the ledger inorder to analyse its trading values in order to make sure thatthe data is tamper-proof.
Resilience to Over-provisioning:
Since our proposed modelworks over permissioned blockchain, therefore, the risk of ma-licious activity from energy trading nodes is minimal becausemalicious nodes can be penalized afterwards. E.g., firstly, dueto smart metering protocol, none of the energy trading nodecan show/trade more energy than the stored energy. Secondly,in case if some node behaves maliciously, then it can bepenalized by giving him a penalty of a specific VPP coin. Inworst case scenarios, the membership of a node to join VPTnetwork can also be cancelled and that node cannot re-join thenetwork.
Fork Resolution:
Formation of forks in the blockchain net-work have become a worrisome issue due to recent devel-opment of blockchain models, because modern blockchainshave more computational power as compared to previousblockchain, so they can solve puzzle a bit quicker com-paratively [39]. However, our proposed VPT model is notvulnerable to the issue of fork formation, because in ourmodel, a block is only generated by the winning miner selected via PoEM or PPoEM mechanism. Therefore, there is only oneblock per hour and the chances of fork formation are near tozero. Proof of Theorem 5:
We develop an energy tradingmodel which is resilient to certain security and privacy attacksdue to its private and secure nature. In this section, we discussthese attacks and their resilience in detail.
Sybil Attacks:
In order to enhance trustworthiness in thenetwork, it important to ensure that none of the participant canmake malicious IDs to carry out sybil attack. Our proposedVPT model is secure from such attacks because in order to jointhe proposed blockchain network, one must first build a profileand then get approval from authoritative nodes. The approvalis given after careful analysis of profile of participant, andsince an important factor in the profile building is smart meterID, which is always unique as each smart meter can only beused to create a single account. Therefore, these measures inour VPT model eradicate the possibility of sybil attack in thenetwork.
Inference Attacks
Since our VPT mechanism works overblockchain functionality in which every node has a copyof ledger, therefore, the standard blockchain is vulnerableto inference attack. However, in order to overcome thisvulnerability, we integrate the notion of differential privacyin our auction and miner winner selection. Considering thestrong theoretical privacy guarantees of our PPoEM proved inSection IV-A, it can be claimed that our model provides strongresilience to inference attacks.
Proof of Theorem 6 :
We divide the energy tradingtime-out till every miner election into equal reporting slots i ,at which every VPP reports its traded energy to mining poolfor the sake of record. However, it is important to note that thefunctionality of reading mining pool for formation of block isonly available at the time of mining election. Let S x be theenergy traded by x VPP during trading hour and S y be theenergy traded by second highest VPP at that particulat i th time during trading period, which means S x = P i E v x ( i ) and S y = max (cid:20) D vppi ∄ E v ( i ) (cid:21) .Let P S x , S y describe the required probability of x VPP beingahead of average. Let x traded the last reported energy dealat i th time, we done it as E v ( i ) . The desired probability is asfollows: (21) P S x , S y = (cid:20) P{ x always ahead | x traded last energy } ∗ S x S x + S y (cid:21) + (cid:20) P{ x always ahead | y traded lastenergy } ∗ S y S x + S y (cid:21) Given that x traded the last energy, we can visualize thatprobability value of x being ahead than average is same asthat of S x – E v ( i ) . Similarly, when y traded the last energy,then reduction of probability will be according to S y − E v ( i ) .Then the Eqn. 21 can be written as: (22) P S x , S y = (cid:20) S x S x + S y ∗ P ([ S x − E v ( i )] , S y ) (cid:21) + (cid:20) S y S x + S y ∗ P ( S x , [ S y − E v ( i )]) (cid:21) As it is true that when only a single trade E v ( i ) happened,then according to induction hypothesis S x + S u = 1 and S x + S u = k to S x + S u = k + 1 , Eqn. 22 can be written as: (23) P S x , S y = (cid:20) S x S x + S y ∗ S x – E v ( i ) − S y S x – E v ( i ) + S y (cid:21) + (cid:20) S y S x + S y ∗ S x − S y + E v ( i ) S x + S y − E v ( i ) (cid:21) = S x − S x E v ( i ) − S x S y + S x S y − S y + S y E v ( i )( S x + S y )( S x + S y – E v ( i ))= S x − S y − S x E v ( i ) − S y E v ( i ) S x E v ( i ) − S y E v ( i ) + S x + S y + 2 S x S y The final equation will be written as: P S x , S y = S x ( S x − E v ( i )) − S y ( S y + E v ( i )) S x ( S x − E v ( i )) + S y ( S y − E v ( i )) + 2 S x S y (24)Hence the theorem is proved. Proof of Theorem 7:
The transition probabilities forVPP x and VPP x ′ can be derived from the state diagramgiven in Fig. 3(b). The state matrix will be as follows: P r = (cid:20) − P xx ′ P xx ′ P x ′ x − P x ′ x (cid:21) Current VPP probability distribution ( Υ d = [ C x C x ′ ] )demonstrate the microgrids served by VPP x and VPPs x ′ .So, the steady state distribution can be calculated as follows: Υ d ∗ P m r = Υ d (25) (cid:2) C x C x ′ (cid:3) (cid:20) − P xx ′ P xx ′ P x ′ x − P x ′ x (cid:21) = (cid:2) C x C x ′ (cid:3) Υ md ∗ P r = Υ md Υ md P r − Υ md = 0Υ md ( P r − I ) = 0 (26)Furthermore, Eqn. 25 and Eqn. 26 can be combined asfollows: (27) (cid:2) C x C x ′ (cid:3) (cid:20)(cid:18) − P xx ′ P xx ′ P x ′ x − P x ′ x (cid:19) − (cid:18) (cid:19)(cid:21) = 0 (28) (cid:2) C x C x ′ (cid:3) (cid:20)(cid:18) P xx ′ P xx ′ P x ′ x −P x ′ x (cid:19)(cid:21) = 0 (29) (cid:2) − C x P xx ′ + C x ′ P x ′ x C x P xx ′ − C x ′ P x ′ x (cid:3) = (cid:2) (cid:3) We can now derive two equations accordingly: − C x P xx ′ + C x ′ P x ′ x = 0 (30) C x P xx ′ − C x ′ P x ′ x = 0 (31)According to Markov probability distribution rules forFig. 3(a), the sum of all probabilities should be 1, which isderived as follows: V N X i =1 C ( i ) = C x + C y + C y + .... + C V N = 1 (32)The above equation can further be reduced for Fig. 3(b) asfollows: C ( i ) = C x + C x ′ = 1 (33)Eqn 30 can be reduced using Eqn. 33 as follows: − C x P xx ′ + C x ′ P x ′ x + P xx ′ C x + P xx ′ C x ′ = P xx ′ (34) C x ′ ( P x ′ x + P xx ′ ) = 1 C x ′ = P xx ′ P x ′ x + P xx ′ (35)The value of Eq. 33 can be substituted in Eq. 35 as follows: C x + P xx ′ P x ′ x + P xx ′ = 1 C x = 1 − P xx ′ P x ′ x + P xx ′ C x = P x ′ x + P xx ′ − P xx ′ P x ′ x + P xx ′ Thus final equation can be derived as follows: C x = P x ′ x P x ′ x + P xx ′ (36)From results of Proof the required theorem is proved.
Proof of Theorem 8:
Let π α (where α =
1, 2, ..... n )denote proportions of long-run for VPPs. Therefore, j ∈ T , k ∈ T & l ∈ T at which VPP enters state of T after fulfillinginitial condition according to Table. I.The probability value P E k ( x ) ≥ means that: (37) P E k ( x ) ≥
20% = (cid:20) S x S sum ∗ (cid:21) ≥ " P ni E V x ( i ) P V N j P ni E V j ( i ) ∗ ≥ The above probability can further be defined as follows:
F or j to k : Rate of entering k f rom j = π i P jk Rate of entering k f rom T = X j ∈ T π j P jk F or j to l : Rate of entering l f rom j = π j P jl Rate of entering l f rom T = X j ∈ T π j P jl The combined probability can be derived as: (38)
Accumulative rate of entering l & k from T = X j ∈ T π j P jk + X j ∈ T π j P jl = X j ∈ T π j ( P jk + P il ) Similarly, rate at which low winning VPP state occur whichis also known as occurrence rate of low winning state (ORLS)is derived as follows: (39)
ORLS = X l ∈ T X k ∈ T X j ∈ T π j ( P jk + P jl We further denote high probability winning average timeand low probability time as ~W T and ~LT respectively. More-over, a single transition occur when a VPP transit from highstate ~W T to low state ~LT in ( ~W T + ~LT ) unit as average. So,it can further be modelled as: (40) ORLS = 1 ~W T + ~LT So, Eq. 39 and Eq. 40 can be equated as: (41) ~W T + ~LT = X l ∈ T X k ∈ T X j ∈ T π j ( P jk + P jl The probability via which a VPP is in winning state is P j ∈ T π j . Although, the average time at which VPP remainsin winning state ( ~W T ) is averaged with respect to totalduration ( ~W T + ~LT ). Therefore, it is formally representedas: W inning T ime Relative P roportion = ~W T~W T + ~LT This can further be formulated to: ~W T~W T + ~LT = X j ∈ T π j ~W T = X j ∈ T π j ( ~W T + ~LT ) (42) ~W T = P j ∈ T ( π j ) ~W T + ~LT The value of Eq. 41 can be substituted in Eq. 42 to get thefinal results to prove the theorem as follows: (43) ~W T = P j ∈ T ( π j ) P l ∈ T P k ∈ T P j ∈ T π j ( P jk + P jl ) Proof of Theorem 9:
Let R A be the rate of arrivalof transactions from a follower VPP and R s be the rate of service of leader VPP. Similarly, at a given time, the selectedVPP can deal with a maximum T L number of transactions.Moreover, the amount that a VPP spend during its validationperiod will be determined via CR s . Taking into consideration,the transaction arrival, one can compute leader profit via R a (1 − P T L ) M . To calculate P T L , the initial single VPPqueueing model assumptions is used by considering arrivaland service rate as follows: P T L = (cid:18) R A R s (cid:19) TL .P o T = { , , ...T L } (44)The value of P O can be solved from above equation asfollows: T l X T =0 (cid:18) R A R s (cid:19) T P o P o = 1 − R A R s − (cid:16) − R A R s (cid:17) T L +1 (45)The value of above equation can be substituted in basicformula as follows: P T L = (cid:16) R A R s (cid:17) T L (cid:16) − R A R s (cid:17) − (cid:16) R A R s (cid:17) T L +1 (46)The above equation can further be substituted in the basicprofit formula as: T P = R A .M − (cid:16) R A R s (cid:17) T L (cid:16) − R A R s (cid:17) − (cid:16) R A R s (cid:17) T L +1 − CR s (47) T P = R A .M (cid:20) − (cid:16) R A R s (cid:17) T L +1 − (cid:16) R A R s (cid:17) T L + (cid:16) R A R s (cid:17) T L +1 (cid:21) − (cid:16) R A R s (cid:17) T L +1 − CR s So, the final equation can be written as: T p = R A M (cid:20) − (cid:16) R A R s (cid:17) T L (cid:21) − (cid:16) R A R s (cid:17) T L +1 – CR s (48)Hence, the prospective profit theorem is proved. Proof of Theorem 10:
The computational com-plexity of first part mainly depends upon the complexityof sorting mechanism and double auction buyer and priceselection. Line 1 of PoEM algorithm sorts all ‘N’ numberof buyers, whose complexity according to big O notationis O ( N log( N )) . Afterwards the ‘nested for’ loops are startedoff, whom complexity totally depends upon the number ofbuyers and sellers. For instance, the complexity of outer ‘for’loop by keeping into consideration all assignment operationswill be O (3 ∗ ( S + 2)) , which is further rounded to O ( S ) .Similarly, the complexity of inner ‘for’ loop after rounding to big O notation is O ( SN ) . The further statements fromLine 4 – 11 have constant time complexity of O (1) , becausethey are executed only once. However, in the presence oftwo ‘nested for’ loops, this constant complexity of the state-ments is will depend upon the complexity of loops which is O ( SN ) . An important thing to notice over here is that the‘ argmax () ’ function on Line 5 actually depicts the completeauction process of part 1 of PoEM that is also presented inrespective section, this function is just used here hypotheticallyto demonstrate the process. Moving further to Line 13 & 14,these are just append function having constant computationalcomplexity. So, it can be said that the complexity highlydepends upon two factors, ‘ N log( N ) ’ & ‘ SN ’. Therefore,upper bound complexity of auction part of PoEM can bewritten as O ( maxN log( N ) , SN ) .Hence, the theorem is proved. Proof of Theorem 11:
The second part of PoEMalgorithm mainly consists of computation of transactionand mining fee along with social welfare, which arecomputationally constant O (1) command. However, due tothe presence of ‘for’ loop, the computational complexity ofthis complete process is O ( W s ) . W s is the list of winningsellers from the part 1 of PoEM, whose value can be amaximum of number of sellers ‘ S ’. The upper bound of W s can be according to total number of sellers S , which canformally be equated as O ( W s ) ∼ = O ( S ) . Proof of Theorem 12:
The third part of PoEMalgorithm comprises of selection and rewarding mining fortheir participation in mining process. In this process, basissingle step statements from Line 25 – 27, and then from Line40 – 44 have constant time complexity of O (1) . However, themajor computational complexity of this part is caused due tosummation and loops, firstly, the summation at Line 28 has acomplexity of O ( V N ) , which depend upon the total numberof VPPs participating in the mining process. Afterwards, the‘for’ loop also has similar computational complexity becauseall the statements inside the loop are computationally constantand totally depend upon the iterations by loop, which is O ( V N ) . The complexity from Line 34 – 36 is dependentupon the random selection algorithm, which has maximumcomplexity of O ( n ) [in our case O ( V N ) . The complexityfor Line 34 will be O ( V N ) , while in Line 35 and Line 36,one VPP is reduced step by step, so the complexity will be O ( V N − ) and O ( V N − ) respectively. Calculating mining sumat Line 39 also contribute in overall computational complexityof this part having a value of O ( M x f ) , which is equivalentto O ( W s max ) . So, the complexity of third part of PoEMalgorithm can be combined as O (max { V pp n , W s max } ) .Keeping in view the fact that number of participating sellersis much larger than number of VPPs ( W s max ≫ V pp n ), thecomplexity can be simplified as O ( W s max ))