ArticlePDF Available

A Secure Blockchain-based Demurrage Mechanism for Energy Trading in Smart Communities

Authors:
  • Edo State University Iyamho

Abstract and Figures

This paper combines additive homomorphic encryption and consortium blockchain technology to provide privacy and trust. Additionally, a dynamic energy pricing model is formulated based on the demand response ratio (DRR) of the load demand of prosumers to address fixed energy pricing problems. The proposed dynamic pricing model includes demurrage fees, which is a monetary penalty imposed on a prosumer, if it failed to deliver energy within the agreed duration. Furthermore, this paper also designs and analyzes a threat model of the proposed system. Experimental evaluations show the effectiveness of the proposed model with regards to low transaction cost, the minimum execution time for block creation, the privacy of prosumers and dispute resolution of demurrage fees. Moreover, the proposed scheme reduces the average system overhead cost up to 66.67% as compared to 33.43% for an existing scheme. Additionally, the proposed blockchain proof-of-authority (PoA) consensus average hash power is minimized up to 82.75% as compared to 60.34% for proof-of-stake (PoS) and 56.89% for proof-of-work (PoW) consensus mechanisms.
Content may be subject to copyright.
Received: Added at production Revised: Added at production Accepted: Added at production
DOI: xxx/xxxx
ARTICLE TYPE
A Secure Blockchain-based Demurrage Mechanism for Energy
Trading in Smart Communities
Omaji Samuel | Nadeem Javaid
Department of Computer Science,
COMSATS University Islamabad, Islamabad
44000, Pakistan
Correspondence
Email: nadeemjavaidqau@gmail.com
Web: www.njavaid.com
Summary
This paper combines additive homomorphic encryption and consortium blockchain
technology to provide privacy and trust. Additionally, a dynamic energy pricing
model is formulated based on the demand response ratio (DRR) of the load demand of
prosumers to address fixed energy pricing problems. The proposed dynamic pricing
model includes demurrage fees, which is a monetary penalty imposed on a pro-
sumer, if it failed to deliver energy within the agreed duration. Furthermore, this
paper also designs and analyzes a threat model of the proposed system. Experimen-
tal evaluations show the effectiveness of the proposed model with regards to low
transaction cost, the minimum execution time for block creation, the privacy of pro-
sumers and dispute resolution of demurrage fees. Moreover, the proposed scheme
reduces the average system overhead cost up to 66.67% as compared to 33.43% for
an existing scheme. Additionally, the proposed blockchain proof-of-authority (PoA)
consensus average hash power is minimized up to 82.75% as compared to 60.34% for
proof-of-stake (PoS) and 56.89% for proof-of-work (PoW) consensus mechanisms.
KEYWORDS:
Blockchain, demand response ratio, demurrage, energy trading, paillier encryption, privacy preservation
1 INTRODUCTION
In smart communities, smart grid (SG) emerges as a new paradigm to overcome energy generation and transmission challenges
of the energy systems1,2. Distributed energy resources (DERs) and prosumers’ participation in SG are the two most fundamen-
tal trends. DER is a network of renewable energy resources (RES), energy storage systems, and flexible demand loads. On the
other hand, prosumers’ participation involves communication that is controlled by smart meters3. Driven by these trends, inac-
tive prosumers can become active or proactive prosumers; therefore, prosumers are entities that generate, consume and store
energy. A recent review of energy management in SG has been reported by the authors of4. The key issues mentioned are the
RES’ high cost of maintenance, intermittency and operational complexity. These problems prevent small-scale prosumers from
participating directly with wholesale energy trading and transmission level3. Whereas, large-scale prosumers are regional util-
ities with small-scale energy deployment5. Additionally, unstable market prices also make it difficult for energy investors to
participate in the trading of energy. To avoid energy wastage and generation overhead cost in SG, prosumers use their on-site
energy generations, but rely on the main grid for extra services. Besides this, prosumers can further take benefit from the market
through load shifting. Load shifting means moving loads of customers to the time slots when the prices of energy are low. In
the case of prosumers with insufficient energy, localized energy trading with other prosumers is encouraged with incentives.
2Samuel and Javaid
In a centralized energy trading platform, high energy storage, untimely response due to high traffic of energy requests and
local accountability may raise concerns. The plausible solutions to such concerns are via decentralization and peer-to-peer
(P2P) energy trading. P2P energy trading allows small-scale prosumers to trade their energy directly with other prosumers.
Although, it depends on the amount of energy generated, time and location3. However, pricing regulations have hindered the
smooth implementation of P2P energy trading. Fixed price mechanisms in P2P energy trading are inefficient, as energy trading
participants need to set energy prices based on market approaches such as negotiation and auction. Nevertheless, these market
approaches are used to solve the issues of pricing regulations. The market auction approach allows buyers and sellers to bid
energy price based on their financial strength6. Also, an auction can be two-sided if it involves both sellers and buyers and one-
sided if only buyers bid7. However, the entire auction processes can become inefficient if only one auctioneer participates in the
bidding every hour in a day. Additionally, it becomes rigorous as it takes a longer time for matching bidders to emerge. Market
negotiation approach is another type of energy exchange, where buyers and sellers negotiate prices of energy. Besides, there
is no order matching in this type of market, but buyers and sellers can actively bargain the prices of energy. Nevertheless, the
negotiation processes are either finalized directly or through an arbitrator. However, there are transparency and trust problems;
also, it is time-consuming and cumbersome as the number of participants increases.
Based on transparency and trust, employing blockchain to design a distributed ledger is one of the series of options to over-
come the vulnerability of market negotiation approaches and centralized energy trading9. Besides the advantages of employing
blockchain to establish trust and secure system, privacy concerns have hindered its implementation. However, the concerns orig-
inated from privacy-related attacks, such as linking attacks. Linking attacks occur when privacy is obtained by linking record in
blocks with other datasets8. Besides, linking attacks can be exploited via data mining algorithms, particularly when the datasets
are not encrypted. Therefore, it raises the concern of designing an efficient privacy-preserving mechanism for blockchain-based
energy trading system.
The problems addressed in this paper are described as follows: the first problem is that energy trading operations need to
be efficient, transparent and reliable while protecting privacy of user. The second problem is that the author of 10 proposed
non-monetary rewards as a high priority ranking for users who used more energy, which in effect enable users with a high
priority ranking to hoard energy. However, the hoarding of energy by high priority users raises the issue of resentment among
lower priority users. In addition, the factor that restricts supply chain, such as demurrage fees need to be transparent. However,
demurrage can be a source of revenue, while suppliers need to reduce the cost of demurrage by avoiding the fees. The third
problem is that the fixed pricing scheme proposed by11 becomes inefficient in a decentralized and P2P trading environment.
It is because of the intermittency of RES and users’ dynamic behavior. Another problem is that the authors of12 proposed a
blockchain based energy trading using multi-signatures for the anonymous message stream. However, an adversary can exploit
the vulnerability of the blockchain system to disclose the privacy of users. Authors in8used differential privacy (DP) is an
approach to protect the privacy of users. However, the approach is inefficient as noise added to the record in blocks may degrade
transactions of the ledger. Nevertheless, the adversary needs background knowledge to compromise the privacy of users without
the need for accurate data.
To address the above problems, this paper extends the work of13 that combines permissionless blockchain and DP in deregu-
lated smart grids. Additionally, a proof-of-authority (PoA) consensus mechanism was enhanced using the PageRank mechanism
to formulate the reputation scores. Furthermore, DP is used to protect users’ privacy, which encourages more participation of
users. Security was provided by defeating double-spending and similarity attacks of blockchain-based SG users. The main goal
of this paper is to provide a secure energy trading environment using consortium blockchain and homomorphic encryption. The
novelty of the proposed system is that a dispute resolution process for demurrage payments is being introduced using blockchain
in SG. Also, a dynamic pricing mechanism is proposed for the P2P localized energy trading using prosumers’ load consumption,
which includes demurrage fees. The objectives of this paper are listed below.
1. To propose a consortium blockchain and additive homomorphic cryptosystem that protect the privacy of prosumers’ data.
Also, security analysis of the proposed system in terms of passive and malleability attacks is presented. Furthermore, a
new threat scenario is designed, and the security analysis based on the threat scenario is provided.
2. To design an efficient energy trading using a dynamic pricing mechanism based on the demand response ratio (DRR) of
prosumers’ loads. The proposed pricing scheme addresses the drawbacks of fixed pricing, negotiation and auction-based
market approaches.
Samuel and Javaid 3
3. To propose a blockchain-based demurrage mechanism that increases transparency and information flow between pro-
sumers. It also resolves the cause of disputes in the supply chain of prosumers. With demurrage fees, there will be no
hoarding but investing.
The organization of the paper is as follows: Section 2 presents the related work. Section 3 discusses the proposed system
model as well as problem formulations. Experimental results are discussed in Section 4 and Section 5 provides the conclusion
and future work.
2 RELATED WORK
Today, blockchain is a technological option that is used to construct a secure energy trading system. However, some challenges
do exist. The first challenge is the problem of insufficient scalability and low processing efficiency. Authors in14 proposed
a blockchain-based energy model to achieve privacy protection in the industrial internet of things (IoT). Also, a credibility
based equity proof mechanism is proposed to improve system availability. Authors in15 proposed an automated and decen-
tralized energy system in the IoT environment to achieve high scalability and efficient energy management. In16, the authors
used off-chain payment method in the energy trading system to increase trading efficiency. Another work in17 used blockchain
technology to store the energy loss allocation, timing of the transactions and data of power losses. Christidis et al.18 proposed
sharing of service and resource mechanism for P2P communication between IoT devices using blockchain technology. Due to
the ever-rising usage of IoT devices, there is a tendency of poor quality of service (QoS) from the deteriorated bandwidth and
connectivity. To address this problem, a survey presented by19 provides a decentralized consensus mechanism that compensates
all participants who share their edge resources. Additionally, Pradip et al.20 addressed the latency, bandwidth, security and scal-
ability problems using software-defined network (SDN) and blockchain technology for IoT devices. To enhance the QoS of IoT
devices, the interactions between IoT devices are linked to the cloud. In this regard, Dario et al.21 presented two years #SmartMe
project. The project enables heterogeneous IoT devices to interact with one another via the cloud. Due to the data storage issue
of IoT devices, a hypergraph-based blockchain is proposed by22 to reduce the number of data from synchronized nodes in the
blockchain network. Today, secure service provision network for the lightweight IoT devices using blockchain technologyis pro-
posed in23. The proposed system uses a secure incentive mechanism for fair settlement of payments between IoT users. Secure
data exchange mechanisms are introduced in24,25 for IoT applications using the blockchain technology. Interplanetary file sys-
tem and access control mechanism are used in their proposed systems to solve storage problems and to restrict unauthorized
access to blockchain data. In26 , the authors used blockchain technology to provide IoT users with a secure service provisioning
system. In the proposed system, cloud nodes are integrated that store incentive values, maintain and validate the state of edge
service providers. Review papers that analyzed the state of art implementations, limitations and solutions of blockchain in IoT
are reported in27,28,29. Other applications of the blockchain in IoT are given in30,31,32 to synchronize the network-wide view of
several SDNs; access management; and autonomous settlement system.
Other challenges are trust, privacy and security. Authors in33 designed conceptually secure and friendly protocols for billing
and local trading. A bidding mechanism is applied based on secure multiparty computation to trade excess of energy among the
users. Authors in12 proposed a proof-of-concept for decentralized energy trading. Also, they used multi-signature and anony-
mous encrypted message stream to achieve a secure energy transaction. Esther et al.34 proposed a technical Brooklyn microgrid
energy solution, which highlights the seven components of the energy market. The solution confirms that blockchain can provide
a secure and decentralized energy market. Kang et al. 6proposed a double auction mechanism via closed order book with dis-
crete closing time. Here, the blockchain provides a secure local energy market with minimal transaction cost. Blockchain-based
secure energy trading systems are proposed to minimize the fluctuation level in the battery storage and maximize the operator’s
utility10 and35 . Authors in36 addressed the lack of trust and data transaction privacy problem of users using the blockchain tech-
nology. The authors used zero-knowledge proof encryption to enhance contractive interaction between users. Additionally, three
types of transactional privacy analyses were presented, such as independent privacy, posterior privacy and financial fairness.
The authors of37 applied blockchain to promote distribution of RES that ensures openness, trust and transparency. However,
privacy is not considered. Also, none of the above works considers demurrage fees in their proposed mechanisms.
From the perceptive of an algorithm, the authors in38 integrated both edge and cloud computing to secure trading environment
for electric vehicles. In addition, they used data frequency and energy contributions to achieve proof-of-work (PoW). Authors
in39 proposed a model to achieve controllable data management in the cloud. In their proposed model, trustworthy node allows
users to end action, while protecting the system. In40 , the authors used homomorphic encryption-based position hidden method to
4Samuel and Javaid
protect users’ privacy from the adversary. Similar work in41 focused on the malicious nodes by proposing a payment framework
using blockchain technology. This framework enables secure and fair payment of outsourcing services in a cloud without relying
on a trusted third party (TTP).
3 PROPOSED SYSTEM MODEL
This paper derives its motivations from the works of7,8,42 and43 to design the system model and problem formulations. However,
Table 1 shows the comparison of the proposed scheme with the above mentioned works using the following parameters: energy
trading, data sharing, blockchain, price response, technique, consensus mechanism, privacy preserving, demurrage, security,
trust and adaptability. The proposed scheme makes use of PoA to reach consensus in SG. The contractual agreement is signed
between nodes using the smart contract of the blockchain, in which consensus is reached between mining nodes. The proposed
scheme offers adaptability, which it is not influenced by any modifications or alterations to the data of prosumers. Using homo-
morphic cryptosystem and hash mechanism, prosumers are guaranteed both privacy protection and security. Besides, blockchain
technology provides trust by removing the need for a third party to manage all transactions.
TABLE 1 Comparisons with Existing Schemes.
References 1 2 3 4 5 6 7 8 9 10 11
7- - Analytic Stochastic pro-
gramming
- - - - - -
8-Direct Bound
detection
algorithm
Mapping token - - - -
42 - - Analytic SDR - - - - - -
43 -Analytic Mixed comple-
mentarity
- - --
Proposed scheme ✓ ✓ ✓ Analytic DRR PoA ✓ ✓ ✓ ✓
1: Energy trading, 2: Data sharing, 3: Blockchain, 4: Price response, 5: Technique, 6: Consensus, 7: Privacy-
preserving, 8: Demurrage, 9: Security, 10: Trust, 11: Adaptability, : Considered, -: Non-considered, SDR:
Supply and demand ratio, and DRR: Demand response ratio.
3.1 System Overview
Figure 1 depicts the proposed system model. From the figure, the system is modeled into two distinct parts. The first part describes
the privacy negotiation between prosumers and a service provider before data are shared. For details of this part, interested
readers should read our prior work13. In SG, each prosumer can get energy directly from the main grid via the consortium
blockchain network. Although, it is assumed that each prosumer has rooftop solar panels installed to sell the harvested energy
using electric vehicle. The electric vehicle transports energy to other prosumers within the consortium blockchain network.
In addition, prosumers act as energy sellers, known as selling prosumers (SPs), if they have excess of energy generations.
Alternatively, prosumers act as energy buyers, if they have a deficit of energy, known as buying prosumers (BPs). The second
part provides P2P energy trading between prosumers in a consortium blockchain network [see description in Figure 2].
In the proposed system, consortium blockchain technology is used as the platform to implement the smart contract. A smart
contract is a computer script that controls digital currencies and assets among entities under certain conditions. Also, an energy
trading module is used to construct the smart contract, which is called the brainchild module (BCM). The proposed BCM
enables consistent operations of energy trading transactions while exploring the smart contract to execute demurrage and laytime
(LY). The principle behind BCM is to ensure that BP receives energy within the specified LY. An important part of BCM is
the aggregator module (AGM), where transaction records and accounts are processed and configured. When energy is supplied
from SP to BP, an equivalent token value is required, which is equal to the amount of energy. This token is then added to the
Samuel and Javaid 5
FIGURE 1 Proposed System Model.
concerned SP’s account at the AGM. Both BP and SP can either redeem or purchase tokens with the aggregator. To achieve
privacy protection, each prosumer remotely encrypts his data using additive homomorphic encryption (AHE).
To describe the procedure of energy trading, the system comprises of three phases, which are 1) BP, 2) AGM and 3) SP.
Blocks are created in phase I and II on the consortium blockchain; hence, detail of each phase is illustrated in Figure 2.
3.1.1 Phase I (Buying Prosumer)
In this phase, four steps are considered [steps (1), (4), (6) and (9), see Figure 2] to fulfill a purchasing request made by BP.
Important executions require the following actions; firstly, a BP makes a buying request to AGM [see step (1) in Figure 2] by
uploading its location and quantity of energy required. On the other hand, AGM verifies BP’s identity, and creates a shared
wallet and keys. The BP is required to redeem a specific amount of token before buying operations can be processed. Secondly,
AGM uses a priority algorithm to search for SPs with closest geographical locations to BPs and notifies all mining nodes of
the trading request. Finally, before energy transfer, a consensus is required over the consortium blockchain network, i.e., a new
block will be created based on the agreement of all SPs and other miners. Subsequently, after completion of energy transfer to
the BP, a token update is initiated [see step (9) in Figure 2].
3.1.2 Phase II (Aggregator Module)
In this phase, all important activities of BCM are performed, which are the core components for executing the demurrage of
the system. Demurrage is a charge imposed by a shipper from a carrier, when it failed to deliver a shipment on time44. It is the
monetary penalty forced on the transporting company when it failed to deliver cargo either in hours or days. Additionally, it is
the charges that the owner of the ship pays to the charterer, when it failed to unload or load within the agreed time. BCM also
includes activities, such as token acquisition and allocation of accounts as well as block creation for each energy transaction.
Steps (2) and (3) perform token verification and requirement for SPs. A new block is created in step (8) [see Figure 2]. It shows
that aggregator is the most trusted entity in the system. It also has the authority to broadcast ledger, update information and
queries. Since each prosumer has a copy of the ledger, all transactions involving energy trading are bond by consensus of other
prosumers. Every prosumer has a token account that records all token transactions in the account pool (AP) and a wallet address
that stores all token in the memory pool (MP). Note that the MP is mapped to the AP. Because of the advantages of consortium
blockchain, all transactions are secure, traceable, validated and tamper-resistant. Also, transaction’s distribution and trends are
protected.
6Samuel and Javaid
FIGURE 2 Proposed BCM for Energy Trading.
3.1.3 Phase III (Selling Prosumer)
There are three steps in this phase [step (5), (7) and (8), see Figure 2]. In step (5), each SP provides AGM with the amount
of energy it wishes to sell and its location. In step (7), AGM confirms token information of SP based on the given amount of
energy. While in step (8), SP confirms the last block from AGM’s MP to ensure a BP redeems a token. Furthermore, SP carries
out digital signing of trade transactions.
FIGURE 3 Mechanism of BCM for Energy Trading using Demurrage.
Figure 3 presents the important components in the creation of BCM, which aim to construct a mechanism for demurrage. The
aim is to ensure that every BP receives the said energy at the desired LY. Note that SPs acquire tokens from AGM, rather than
interacting directly with BPs. As shown in the figure, aggregator performs peering of prosumers with energy matching. It also
sets prosumers’ priority based on the amount of excess energy output from the on-site RES and locations. Furthermore, it sets
the arrival time (AR), LY, and berth waiting time (BT). AR is the estimated time for SPs to deliver energy at BPs’ locations. LY
is the amount of time required to discharge the energy from SPs. Although BT is the amount of time BPs must wait, while they
are ready to be charged with electricity.
Samuel and Javaid 7
If a SP stays longer in energy discharge or arrives later than the accepted period, then there is a contract violation that triggered
a delay event. Therefore, the SP is asked to pay the demurrage fees, which is payable at a fixed rate per hour. In principle, the
existence of BP’s location enables peering over time by way of an algorithm (i.e., clustering) into a matching set. Matching of
SP with BP defines its AR. Besides, to execute the smart contract, both BP and SP must validate the triggered event. The benefit
of the process of blockchain-based demurrage is that it facilitates a cordial relationship between BP and SP. It also makes the
trade transaction and demurrage fees transparent. Remember that, with blockchain, it is possible to track and verify all events,
such as payment and energy prices, which exclude erroneous events.
Algorithm 1 presents the step-by-step procedure for carrying out blockchain-based energy trading, and each procedure is
discussed below.
3.1.4 Verify Energy
To protect the privacy of prosumers, each prosumer receives a private 𝑠𝑘 and public 𝑝𝑘 pair of keys from the AHE. SP uses
𝑡𝑥𝐴𝑑𝑑 𝑟𝑆 𝑃 to perform energy transaction and 𝑀 𝑠𝑔𝐴𝑑𝑑 𝑟𝑆 𝑃 to send private message stream over the blockchain network. Sim-
ilarly, BP uses 𝑡𝑥𝐴𝑑𝑑 𝑟𝐵𝑃 to perform buying transaction and 𝑀 𝑠𝑔𝐴𝑑𝑑 𝑟𝐵𝑃 to send private message stream over the blockchain
network. It is assumed that each prosumer has smart meters that provide automated records of energy demand 𝐷𝑖and gener-
ation 𝐸𝑖, which are transmitted from the transaction pairs (𝑡𝑥𝐴𝑑𝑑 𝑟𝐵𝑃 , 𝑡𝑥𝐴𝑑𝑑 𝑟𝑆𝑃 ). AGM performs updates by creating new
blocks with 𝑡𝑥𝐴𝑑𝑑 𝑟𝑆𝑃 , 𝑀 𝑠𝑔𝐴𝑑 𝑑𝑟𝑆𝑃 , 𝐸𝑖and 𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 using 𝑣1and 𝑣2, respectively (see detail in Algorithm 2). AGM has
its own transaction address 𝑡𝑥𝐴𝑑𝑑𝑟𝐴 and message address 𝑀𝑠𝑔𝐴𝑑 𝑑𝑟𝐴 that are required to send a private 𝑀𝑠𝑔 message to
SP’s 𝑀𝑠𝑔 𝐴𝑑𝑑𝑟𝑆 𝑃 . The message contains two unique hashes 𝑣1and 𝑣2, where 𝑣1verifies SP’s ownership over 𝐸𝑖and 𝑣2is
used to prevent double-spending. It implies that SP does not sell the same amount of 𝐸𝑖to other BPs. As SP decides to sell the
𝐸𝑖, it will broadcast an anonymous message 𝑀𝑠𝑔 𝐴𝑑𝑑𝑟𝑆 𝑃 , which contains 𝐸𝑖, location 𝐿𝑜𝑐𝐴𝑑𝑑 𝑟𝑆 𝑃 and 𝑡𝑥𝐴𝑑 𝑑𝑟𝑆𝑃 in the
blockchain. Additionally, the SP will perform 𝑣1to sell 𝐸𝑖locked by its 𝑠𝑘, and 𝑣2to verify its identity, which is then sent as a
message stream over the blockchain network.
Algorithm 1 Blockchain-based Energy Trading Algorithm.
1: 𝑡𝑥𝑀𝑠𝑔𝐴𝑑 𝑑𝑟 ℎ𝑎𝑠ℎ(𝑝𝑘)hash: hash function
2: 𝑀𝑠𝑔𝐴𝑑 𝑑𝑟 ℎ𝑎𝑠ℎ(𝑝𝑘, 𝑠𝑘)
3: 𝑀𝑃 𝑡𝑥𝑀 𝑠𝑔𝐴𝑑𝑑 𝑟, 𝑀𝑠𝑔𝐴𝑑 𝑑𝑟
4: if 𝐸𝑖> 𝐷𝑖𝐴𝑁𝐷 𝐸𝑖> 𝐸𝑇then ⊳ 𝐸𝑖: generated energy; 𝐷1: energy demand; 𝐸𝑇: generated energy threshold
5: 𝑆𝑃 𝑡𝑥𝑡𝐴𝑑 𝑑𝑟𝑆 𝑃 , 𝑀𝑠𝑔 𝐴𝑑𝑑 𝑟𝑆𝑃 , 𝐸𝑖
6: else
7: 𝐵𝑃 𝑡𝑥𝑡𝐴𝑑 𝑑𝑟𝐵𝑃 , 𝑀 𝑠𝑔𝐴𝑑 𝑑𝑟𝐵𝑃 , 𝑇 𝑜𝑘 𝑇 𝑜𝑘: energy token
8: end if
9: Aggregator txAddrA, MsgAddrA
10: Loc LocAddrSP, LocAddrBP ⊳ 𝐿𝑜𝑐: location of prosumers
11: VerifyEnergy(𝐸𝑖)verify energy information of SP
12: EnergyMatch(𝐸𝑖, 𝑃 , 𝐿𝑜𝑐)perform matching of prosumers
13: PrepareDemurrage(𝐿𝑌 , 𝐵 𝑇 , 𝐴𝑅)calculate demurrage fees, if any
14: ValidateTx(𝑡𝑥𝐴𝑑𝑑 𝑟𝑆𝑃 , 𝐸𝑖)validate transaction 𝑇 𝑥
15: GenerateTx() generate transaction
3.1.5 Energy Matching and Prepare Demurrage Fees
BP masks its identity by generating a pair of new addresses, such as 𝑡𝑥𝐴𝑑𝑑𝑟𝐵𝑃 and 𝑀𝑠𝑔𝐴𝑑 𝑑 𝑟𝐵𝑃 to be actively engaged in
energy trading. Each node in the blockchain will receive broadcast messages from either BP or SP. AGM carries out the energy
matching procedure (see Algorithm 3) and gives high priority to a SP based on the amount of 𝐸𝑖and 𝐿𝑜𝑐, as there may be
many SPs. Also, it conducts a validation test to decide if the request was received or not. This validation test is done by using
the provided addresses and transaction timestamp 𝑡𝑥𝑇 𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝 to search the last block that has the recent transactions. BP
8Samuel and Javaid
Algorithm 2 Verify Energy Algorithm.
1: procedure VERIFYENERGY(𝐸𝑖)P: is the price obtained from Equation (14); 𝐿𝑜𝑐: location of prosumers, 𝐸𝑖: is the
query of energy
2: 𝑣1𝑆𝐻 𝐴256(𝑡𝑥𝑡𝐴𝑑𝑑𝑟𝑆 𝑃 , 𝐸𝑖, 𝑡𝑖𝑚𝑒𝑠𝑡𝑎𝑚𝑝)
3: 𝑣2𝑆𝐻 𝐴256(𝑣1||𝑛𝑜𝑢𝑛𝑐𝑒)
4: 𝑀𝑠𝑔𝐴𝑑 𝑑𝑟𝐴.𝑀 𝑠𝑔(𝑣1, 𝑣2)𝑀𝑠𝑔𝐴𝑑 𝑑𝑟𝑆𝑃
5: 𝑀 𝑠𝑔𝐴𝑑𝑑 𝑟𝑆𝑃 .𝐵𝑟𝑜𝑎𝑑 𝑐𝑎𝑠𝑡(𝐸𝑖, 𝑡𝑥𝐴𝑑 𝑑𝑟𝑆 𝑃 , 𝑃 , 𝑀𝑠𝑔 𝐴𝑑𝑑𝑟𝑆 𝑃 )it will appear on viewing board of BP
6: end procedure
obtains the lists of active SPs with their locations and 𝐸𝑖, and selects its preferred SP by issuing a private query to the AGM. It
implies that the BP is ready to occupy the BT. AGM sets AR and LY parameters using the prepare demurrage procedure (see
Algorithm 4). It also checks BP records to ensure it has enough energy tokens to perform energy trading.
Algorithm 3 Energy Match Algorithm.
1: procedure ENERGYMATCH(𝐸𝑖, 𝑃 , 𝐿𝑜𝑐 )
2: if tx blockchain: 𝑣1then
3: return true
4: else
5: return false
6: end if
7: if 𝑆𝑃𝐿𝐿𝑜𝑐 then ⊳ 𝑆 𝑃𝐿: location of each SP
8: return true
9: else
10: return false
11: end if
12: end procedure
Algorithm 4 Prepare Demurrage Algorithm.
1: procedure PREPAREDEMURRAGE(𝐿𝑌 , 𝐵 𝑇 , 𝐴𝑅)
2: if 𝐵𝑇 is available then
3: Occupy 𝐵𝑇
4: return true
5: else
6: return false
7: end if
8: if 𝐴𝑅 𝐿𝑌 then
9: return true
10: else
11: Calculate demurrage fees using Equation (20)
12: 𝑀𝑠𝑔 =‘Delay Event’
13: 𝑀𝑠𝑔𝐴𝑑 𝑑𝑟𝐴.𝐵𝑟𝑜𝑎𝑑 𝑐𝑎𝑠𝑡(𝑀 𝑠𝑔)
14: end if
15: end procedure
Samuel and Javaid 9
3.1.6 Validate and Generate Transactions
To prevent double-spending, AGM performs validation of transactions, here, all transaction addresses 𝑡𝑥𝐴𝑑𝑑𝑟 are recorded in
the MP. If 𝑡𝑥𝐴𝑑𝑑 𝑟 already exists in MP, then it implies that the transaction will no longer be processed (see Algorithm 5).
Additionally, AGM generates transaction by performing address catching, which locks current 𝐸𝑖from other transactions. A
catch message is sent by SP to AGM, which contains 𝑣2that validates the identity of SP (see Algorithm 6). SP digitally signs
transactions that contain 𝑡𝑥𝐴𝑑𝑑𝑟𝐴, 𝑡𝑥𝐴𝑑 𝑑𝑟𝑆𝑃 and 𝑡𝑥𝐴𝑑𝑑 𝑟𝐵𝑃 with its 𝑠𝑘. Before a token payment will be made, SP send its
digitally signed message to BP, while BP verifies the signature and sends a private message to AGM about its payment. If there
are no disputes among SP and BP, AGM broadcasts the creation of a new block on the blockchain network, which implies that
the token payment has been completed. Otherwise, an event will be triggered that informs all nodes of the invalid transaction.
Algorithm 5 Validate Transaction Algorithm.
1: procedure VALIDATETX(𝑡𝑥𝐴𝑑 𝑑𝑟𝑆 𝑃 , 𝐸𝑖)validate energy information of SP
2: if 𝑡𝑥𝐴𝑑𝑑 𝑟 𝑀 𝑃 , 𝑣1|𝐸𝑣1𝐸𝑖then
3: return true
4: else
5: return false
6: end if
7: end procedure
Algorithm 6 Generate Transaction Algorithm.
1: procedure GENERATETX
2: if 𝑡𝑥𝐴𝑑𝑑 𝑟𝐵𝑃 .𝐸𝑛𝑒𝑟𝑔 𝑦𝑀𝑎𝑡𝑐 ℎ.𝑉 𝑎𝑙𝑖𝑑 𝑎𝑡𝑒𝑇 𝑥(𝑡𝑥𝐴𝑑𝑑 𝑟𝑆𝑃 , 𝐸𝑖)then
3: 𝑀𝑠𝑔𝐴𝑑 𝑑𝑟𝐴 𝑆ℎ𝑎𝑟𝑒(𝑀 𝑠𝑔𝐴𝑑𝑑 𝑟𝐵𝑃 , 𝑀 𝑠𝑔𝐴𝑑𝑑 𝑟𝑆𝑃 )share addresses of SP and BP
4: end if
5: 𝑀𝑠𝑔𝐴𝑑 𝑑𝑟𝐴.𝐶𝑎𝑡𝑐(𝑆ℎ𝑎𝑟𝑒)lock address to prevent double spending
6: 𝑀𝑠𝑔𝐴𝑑 𝑑𝑟𝑆𝑃 𝑀 𝑠𝑔𝐴𝑑𝑑 𝑟𝑆𝑃 .𝑆 𝑖𝑔(𝑠𝑘, 𝑡𝑥𝐴𝑑𝑑 𝑟𝐴)||𝑡𝑥𝐴𝑑𝑑𝑟𝑆 𝑃 ||𝑡𝑥𝐴𝑑𝑑 𝑟𝐵𝑃 sign message with private key
7: 𝑀 𝑠𝑔𝐴𝑑𝑑 𝑟𝑆𝑃 .𝑀 𝑠𝑔(𝑆𝑖𝑔 )𝑀𝑠𝑔𝐴𝑑𝑑𝑟𝐵𝑃 send sign message to BP
8: 𝑡𝑥𝐴𝑑𝑑 𝑟𝐵𝑃 .𝑃 𝑎𝑦(𝑇)add energy token to AP
9: if 𝑛𝑜𝑃 𝑟𝑜𝑏𝑙𝑒𝑚 then
10: 𝑡𝑥𝐴𝑑𝑑 𝑟𝐴.𝐵𝑟𝑜𝑎𝑑𝑐 𝑎𝑠𝑡(𝑡𝑥𝐴𝑑 𝑑𝑟𝑆 𝑃 )token payment has been completed
11: else
12: 𝑀𝑠𝑔= ‘Payment not made’
13: 𝑀𝑠𝑔𝐼 𝑛𝑣𝑎𝑙𝑖𝑑 =𝑡𝑥𝐴𝑑𝑑 𝑟𝑆𝑃 .𝑆 𝑖𝑔(𝑀𝑠𝑔)
14: 𝑀 𝑠𝑔𝐴𝑑𝑑 𝑟𝑆𝑃 .𝑀 𝑠𝑔(𝑀𝑠𝑔𝐼 𝑛𝑣𝑎𝑙𝑖𝑑)𝑀𝑠𝑔𝐴𝑑 𝑑𝑟𝐴 SP forwards private message to AGM
15: 𝑀𝑠𝑔𝐴𝑑 𝑑𝑟𝐴.𝑀 𝑠𝑔(𝑀𝑠𝑔𝐼 𝑛𝑣𝑎𝑙𝑖𝑑)𝑀𝑠𝑔𝐴𝑑 𝑑𝑟𝐵𝑃 AGM forwards private message to BP
16: 𝑀𝑠𝑔𝐴𝑑 𝑑𝑟𝐴.𝐵𝑟𝑜𝑎𝑑 𝑐𝑎𝑠𝑡(𝑀 𝑠𝑔𝐴𝑑𝑑 𝑟𝐵𝑃 ⊕ 𝑀 𝑠𝑔𝐴𝑑𝑑 𝑟𝑆𝑃 )messages are broadcasted to all nodes
17: end if
18: end procedure
3.2 Design Goals
This paper aims to design a blockchain-based energy trading system to achieve transparency, trust and privacy of the data of
prosumers. The data of each prosumer is first encrypted by AHE at the off-chain level and then recorded in a blockchain at
the back-end level. Prosumer who wants to access his encrypted data will communicate with the corresponding aggregator and
decrypts the encrypted data off-chain. Based on the proposed model, the aggregator cannot obtain any plaintext of prosumers’
10 Samuel and Javaid
data in the blockchain network without the approval of miners. Also, aggregator serves as a broker to ensure fair energy trading
between prosumers. Thus, the model aims to achieve three objectives, which include: privacy preservation, effectiveness and
security.
1. Privacy preservation: Each transaction is encrypted using AHE that protects the privacy of prosumers. Also, it can resist
a chosen ciphertext attack45 .
2. Effectiveness: The enhanced PoA mechanism ensures the system runs efficiently. Low computing devices, such as smart
meters can therefore participate in the minimum response time.
3. Security: Based on the inherent advantages of blockchain technology, transactions are tamper-resistant and immutable.
It eliminates the need of a centralized control; besides, all transactions are decentralized and validated by mining nodes.
Furthermore, for the system to be compromised, 51% of mining nodes must be controlled by the adversary. Encryption
public keys can reveal the identity of a node; however, the message cannot be forged or revealed without the private key
of the node.
3.3 Homomorphic Cryptosystem
Homomorphic cryptosystem comprises of three algorithms, such as key generation 𝐾𝑒𝑦𝐺𝑒𝑛, encryption 𝐸 𝑛𝑐𝑟𝑦 and decryption
𝐷𝑒𝑐𝑟𝑦 46. A public-key cryptosystem is used to derive the pair of keys (𝑠𝑘, 𝑝𝑘), where 𝑠𝑘 is used for decryption and 𝑝𝑘 is used
for encryption. Homomorphic encryption (HE) enables certain algebraic operations on the plaintext to be applied directly on the
ciphertext, such as a secure addition and secure multiplication. HE is used efficiently in data aggregation while protecting the
privacy of users, and in this paper, paillier cryptosystem is used46. In paillier cryptosystem, E(.) is denoted as HE and 𝑚𝑁
are the messages. Paillier cryptosystem relies on the assumption related to the difficulty of prime factorization.
𝐾𝑒𝑦𝐺𝑒𝑛 47 :
1. Pick two prime numbers p and q and calculate 𝑁=𝑝𝑞.
2. Calculate the least common multiple 𝜆= (𝑝− 1, 𝑞 − 1).
3. Select a random 𝑘, where 𝑘
𝑁2.
4. Select a function 𝐹(𝑢) = 𝑢−1
𝑁.
5. Make sure 𝑁divides the order of 𝑘:
check if 𝐹(𝑘𝜆mod 𝑁2)such that 𝑔𝑐𝑑(𝐹(𝑘𝜆mod 𝑁2), 𝑁 )=1.
6. 𝑝𝑘(𝑁, 𝑘)is the public key.
7. 𝑠𝑘(𝑝, 𝑞)is the private key.
𝐸𝑛𝑐 𝑟𝑦 47 :
1. Pick 𝑚𝑁.
2. Select a random 𝑟
𝑁.
3. Encrypt 𝑚using 𝑐=𝐸(𝑚) = 𝑘𝑚𝑟𝑁mod 𝑁2.
𝐷𝑒𝑐𝑟𝑦 47:
1. Pick the ciphertext 𝑐
𝑁.
2. Decrypt using 𝑚=𝐷(𝑐) = 𝐹(𝑐𝜆mod 𝑁2)
𝐹(𝑘𝜆mod 𝑁2)mod 𝑁.
It is observed that the paillier cryptosystem has additive homomorphism, which is proven as:
𝐸(𝑚1) × 𝐸(𝑚2)=(𝑘𝑚1𝑟𝑁
1mod 𝑁2)(𝑘𝑚2𝑟𝑁
2mod 𝑁2) = 𝑘𝑚1+𝑚2(𝑟1𝑟2)𝑁mod 𝑁2,(1)
𝐸(𝑚1+𝑚2) = 𝑘𝑚1+𝑚2𝑟𝑁mod 𝑁2,(2)
if 𝑟=𝑟1+𝑟2, then 𝐸(𝑚1) + 𝐸(𝑚2) = 𝐸(𝑚1) × 𝐸(𝑚2)are satisfied.
Samuel and Javaid 11
3.4 Performance Analyses
To ensure the privacy of the message from prosumers, the message that requires encryption is broken down into several roughly
equal parts based on the parity of each plaintext. Therefore, an additive homomorphism of paillier algorithm is defined to encrypt
the message 𝑚as:
𝐸(𝑚) = 𝐸(𝑚1+𝑚2) = 𝐸(𝑚1) + 𝐸(𝑚2),(3)
where, 𝑚=𝑚1+𝑚2. To secure the system, the public key 𝑝𝑘 is set to 256 bits, which is equal to the length of plaintext 𝐿𝑃 , and
it is measured in Megabytes (MB). Thus, the number of packets is calculated as48:
𝑛𝑃 =𝐿𝑃 ×𝑘×𝑁
256 =𝐿𝑃 × 16 × 220
256 =𝐿𝑃 × 220
16 .(4)
For each packet, plaintext is converted into BigInteger48 . It is assumed that the overall encryption time 𝑇𝐸for the AHE involves
two steps, i.e., 𝑇𝐾𝑒𝑦𝐺𝑒𝑛 and 𝑇𝐸 𝑛𝑐𝑟𝑦 . Hence, 𝑇𝐸is defined as:
𝑇𝐸=𝑇𝐾𝑒𝑦𝐺𝑒𝑛 +𝑇𝐸 𝑛𝑐𝑟𝑦 ,(5)
where, 𝑇𝐾𝑒𝑦𝐺𝑒𝑛 is the execution time of key generation, and 𝑇𝐸𝑛𝑐𝑟𝑦 is the execution time of encryption. Note that the cost of
encryption is twice the cost of a single modular exponential 𝑇𝑒𝑥𝑝 48. The time taken for plaintext encryption is estimated as48:
𝑇𝐸𝑛𝑐 𝑟𝑦 = 2 × 𝑛𝑃 ×𝑇𝑒𝑥𝑝 ,(6)
In the consortium blockchain, it is assumed that there are 𝑤total number of block sizes (𝑤 > 1), and the 𝑞𝑡ℎ size of each block
𝑏𝑠(𝑞)should be (𝑞𝑤). If the size of the encryption key is 256 bits, then the plaintext size is an integral multiple of 16 bits.
Thus, the size of each data block is defined as48:
𝑏𝑠(𝑞) =
𝐿𝑃 ×220
16×𝑤,𝑖𝑓 𝑞 < 𝑤,
𝐿𝑃 × 220 − (𝑤 1) 𝐿𝑃 ×220
16×𝑤× 16,𝑖𝑓 𝑞 =𝑤,
(7)
If the plaintext size is large, then 𝑇𝐾𝑒𝑦𝐺𝑒𝑛 is ignored. Therefore, 𝑇𝐸will display a linear trend, and 𝑇𝑠𝑦𝑠 is the overall system
execution time, which is defined as:
𝑇𝑠𝑦𝑠 =𝑇𝐾𝑒𝑦𝐺𝑒𝑛 +𝑇𝐸 𝑛𝑐𝑟𝑦 +𝑇𝐷+𝑇𝑏𝑐 ,(8)
where, 𝑇𝐷is the execution time for calculating the energy cost and demurrage, while 𝑇𝑏𝑐 is the execution time for block creation.
3.5 Privacy Trust Model
In this paper, it is assumed that the prosumers are trusted, honest-but-curious or malicious. Therefore, it is also expected that all
prosumers behave correctly.
3.5.1 Security Goal
The proposed scheme should achieve privacy preservation of the data of prosumers.
3.5.2 Security Analysis
In the security analysis, this paper provides definitions in terms of passive and malleability attacks. Let 𝑔=𝑓(𝑔𝑎)be a polynomial
function and the protocol Θfor calculating 𝑓. Where, 𝑎is the input of prosumer and the prosumer decides to compute 𝑔(𝑎)
privately.
Definition 3.1 (Passive attack).At a polynomial time, honest-but-curious prosumer who can intercept the communication cannot
obtain significant information about the plaintext from the ciphertext and public key.
Proposition 3.1. A real protocol Θis secure under passive attack.
Proof 3.1. Given a random number 𝑘, prosumer calls a real protocol Θ, calculates 𝑔privately and gets a result, which cannot
decrypt same data 𝑘number of times. For each decryption with k, the prosumer gets a different plaintext. Hence the protocol Θ
is secure under passive attack.
12 Samuel and Javaid
Definition 3.2 (Malleability attack).An attacker obtains the ciphertext and the public key. Using the public key, it generates
another ciphertext that can be decrypted to another plaintext, which is similar to the original plaintext.
Proposition 3.2. A real protocol Θis secure under malleability attack.
Proof 3.2. Honest-but-curious prosumer gets ciphertext and public key, calls a real protocol Θand computes 𝑔privately. Since
the public key is known, it is possible to generate a different ciphertext that can be decrypted into another plaintext. However,
it is impossible to get the original plaintext from the public key without the private key. Hence, the protocol Θis secure under
malleability attack.
3.6 Threat Scenario
Let 𝑄1,𝑄2,𝑄3and 𝑄4be the data of prosumers that is shared on the blockchain network. Let us assume that the scheme is
secure against internal and external threats. However, it is insecure under honest-but-curious aggregator. Note that the aggregator
denotes authorized node. Aggregator 𝐴𝐺1adds 𝑄1,𝑄2and 𝑄3to the blockchain; after subsequent reputation score ratings,
another aggregator 𝐴𝐺2adds 𝑄2,𝑄3and 𝑄4to the blockchain. Let us assume that 𝐴𝐺1and 𝐴𝐺2are honest-but-curious and can
collude with each other to disclose private information of 𝑄1and 𝑄4, respectively. The following assumptions are considered
in this paper.
Proposition 3.6.1. In the threat scenario, there is no risk of centralization with the proposed PoA.
Proof 3.6.1. At any given independent polynomial time 𝑡, based on the proposed PoA, 𝐴𝐺1is selected as the authorized node to
create and add transactions into a block at 𝑡1. In subsequent polynomial time 𝑡2, another node 𝐴𝐺2emerges as a new authorized
node to create and add transactions to a new block. The probability of 𝐴𝐺1retaining its position at 𝑡2is 1
𝑛; where, 𝑛is the number
of authorized nodes. Hence, 𝐴𝐺1has slim chances of being selected at 𝑡2, making the proposed PoA a decentralized system.
Proposition 3.6.2. The threat scenario is not secure under honest-but-curious aggregator.
Proof 3.6.2. Let 𝑔=𝑓(𝑄𝑖)be a polynomial function and the protocol Θfor calculating 𝑓. Let 𝑄1,𝑄2and 𝑄3be input of 𝐴𝐺1
and 𝑄2,𝑄3and 𝑄4be input of 𝐴𝐺2, respectively. 𝐴𝐺1and 𝐴𝐺2decide to compute 𝑔(𝑄𝑖, 𝑄𝑗)privately, and 𝑖=𝑗= 1,2,, 𝑁;
where, 𝑁is the number of aggregators. If 𝐴𝐺1and 𝐴𝐺2run the protocol Θcalling a real function 𝑔, compute 𝑔by sending
their inputs to a TTP. Thus, 𝐴𝐺1and 𝐴𝐺2are aware of each other inputs as well as TTP. Hence the model is not secure under
honest-but-curious aggregators.
Proposition 3.6.3. The threat scenario is secure under AHE.
Proof 3.6.3. Let =𝑓(𝑄𝑛)be a function that computes AHE and the protocol Θfor calculating 𝑓.𝑄𝑛is the 𝑛𝑡ℎ input of
prosumers. The prosumers compute (𝑄𝑛)and send their encrypted (𝑄𝑛)to the blockchain. It is assumed that aggregators
exploit Proposition. 3.6.2. Everything aggregators and TTP receive become imprecise, and it is much more difficult to breach
the privacy of any prosumer.
3.7 Energy Trading Model
This subsection discusses energy trading in a deregulated market system. Here, the dynamism of electricity price between
prosumers is considered. The proposed price formulation involves demurrage fees that encourage SP to supply energy within
the agreed period. It will also affect the energy trade equilibrium prices. According to our understanding, prosumers want to
buy their energy either directly at a bargained price from other prosumers or at a fixed price from the utilities. Each prosumer,
however, chooses when to buy and consume energy. Based on this fact, prosumers must have a smart system participating on
their behalf in the marketplace. Let us assume that an internal selling price for a given quota of electric energy hoard can be
introduced, and the internal selling price values decrease linearly according to the demurrage fees.
Samuel and Javaid 13
3.7.1 Basic Formulations
In the proposed system model shown in Figure 1, all the prosumers have different rooftop PVs and loads. The formulation of
the total power generation of all prosumers 𝑖during the operating time 𝑇is given as42:
𝑇 𝑃 𝑠
𝑖() =
𝑇
=1
𝑁
𝑖=1
𝑞𝑠
𝑖().(9)
In this paper, 𝑇is considered to be 48 hours, 𝑁is the number of the prosumers. 𝑞𝑠
𝑖()is the 𝑖𝑡ℎ PV power output of prosumer
during the time . The net generation is calculated as43:
𝑁𝐺𝑖() = 𝑞𝑠,𝑚𝑎𝑥
𝑖() − 𝑞𝑏,𝑚𝑎𝑥
𝑖(),(10)
where, 𝑞𝑠,𝑚𝑎𝑥
𝑖()and 𝑞𝑏,𝑚𝑎𝑥
𝑖()are the maximum power and load, respectively. Since all prosumers have different capacities of
energy generation, they may serve as buyers or sellers, respectively. Those differences require prosumers to define their load
consumption. Therefore, let us define the load consumption 𝑄𝑖(), the prosumer is willing to decrease or increase during the
time slot as:
𝑄𝑖() =
𝑞𝑏,𝑙
𝑖(),𝑖𝑓 𝑞𝑏
𝑖()< 𝜌
𝑞𝑏,𝑢
𝑖(),𝑖𝑓 𝑞𝑏
𝑖()𝜌,
(11)
where, 𝑞𝑏
𝑖()is the 𝑖𝑡ℎ load consumption of prosumer during the time .
𝐷𝑅() = 𝑞𝑏,𝑢
𝑖() − 𝑞𝑏,𝑙
𝑖(),(12)
where, 𝐷𝑅()is the total demand response at time . This paper formulates the demand response ratio 𝐷𝑅𝑅()from
Equation (11) during the time , which is given in Equation (13) as:
𝐷𝑅𝑅() = 𝑞𝑏,𝑙
𝑖()
𝑞𝑏,𝑢
𝑖(),(13)
where, 𝑞𝑏,𝑢
𝑖()is the quantity of load consumption to be increased and 𝑞𝑏,𝑙
𝑖()is the quantity of load consumption to be decreased,
respectively. While 𝜌is a threshold value. The DRR plays an important role in energy trading, in which the internal price is
bounded between the feed-in tariff and the grid prices42 . In reality, there should be a balance between demand and supply, which
formed the fundamental principle in economics. Energy demand refers to the amount of energy the BP needs. Energy supply,
on the other hand, refers to the amount of energy the SP can offer42 . In this paper, P2P energy trading is established, where
SP and BP decide the internal selling and buying prices by an analytical approach. In the subsection below, the formulations
of internal selling and buying prices are described. Furthermore, the equilibrium price 𝐸 𝑞𝑝()is derived from an analytical
approach, which means that the problem is broken down into elements needed to solve it.
3.7.2 Formulation of the Internal Price
Due to the unpredictable nature of the PV energy output from a prosumer. DRR has a different value for all time duration. This
fluctuation can be resolved by examining the internal price based on buying and selling. Prosumers may decide to purchase
energy from the main grid over a certain period of the day to meet their current energy demands, that is when their internal
generations of energy are inadequate within the blockchain network. Thus, the grid unit buying and selling price are represented
as 𝑝𝑏
𝑔()and 𝑝𝑠
𝑔(), respectively. In Equation (14)42 , when 𝐷𝑅𝑅()0, it implies that the prosumers need to sell their energy.
While 𝐷𝑅𝑅()>0, prosumers need to buy their energy with the cost of 𝐸𝑞 𝑝()𝐷𝑅𝑅(). From Equation (14), the BP price is
denoted as 𝑝𝑏()and SP price is denoted as 𝑝𝑠().
𝐸𝑞𝑝() =
𝑝𝑠
𝑖(),𝑖𝑓 𝐷𝑅𝑅()0,
𝑝𝑏
𝑖(),𝑖𝑓 𝐷𝑅𝑅()>0.
(14)
14 Samuel and Javaid
The internal prices are based on DRR. The reason for adopting DRR instead of the supply and demand ratio (SDR) proposed in
42, is that this paper focuses strictly on the demand for load and not on the supply of energy. Thus, 𝑝𝑠
𝑖()is calculated as:
𝑝𝑠
𝑖() =
𝑝𝑠
𝑔()𝑝𝑏
𝑔()
𝑝𝑏
𝑔()−𝑝𝑠
𝑔()𝐷𝑅𝑅()+𝑝𝑠
𝑔(),𝑖𝑓 𝐷𝑅𝑅()0,
𝑝𝑚𝑖𝑑
𝑔(),𝑖𝑓 𝐷𝑅𝑅()>0,
(15)
such that:
{𝑝𝑏
𝑖(), 𝑝𝑠
𝑖()} ∈ {𝑝𝑏
𝑔(), 𝑝𝑠
𝑔()},(16)
where, 𝑝𝑚𝑖𝑑
𝑔()is the average of grid selling and buying prices, and it is defined as:
𝑝𝑚𝑖𝑑
𝑔() = 𝑝𝑠
𝑔() + 𝑝𝑏
𝑔()
2.(17)
The constraint in Equation (16) ensures that the internal prices lie within the grid prices. In this paper, internal selling price
formulation is the modification of42 by considering the internal prices as a quadratic cost function of the total energy cost. From
Equation (15), it is assumed that an inverse-proportional relationship exists between the price and demurrage 𝐷(). This formed
a piece-wise function of DRR with respect to the constraint of feed-in tariff, internal selling price 𝑝𝑠()and 𝐷(). However, from
Equation (15), when 𝐷𝑅𝑅()>0, it implies that the prosumers have satisfied their load demands. Also, they need to sell their
energy to other prosumers at the average grid price to minimize their energy generation costs. Conversely, when 𝐷𝑅𝑅()0,
prosumers sell their energy to maximize profits. To show the effect of demurrage, Equation (15) is rewritten and it is given in
Equation (18).
𝑝𝑠
𝑖() =
𝐷() − 𝑝𝑠
𝑖(),𝑖𝑓 𝐴𝑅()> 𝐿𝑌 (),
𝑝𝑠
𝑖(), otherwise,
(18)
From Equation (18), the prosumers sell their energy at a price below either the actual selling price or the grid selling price, if
𝐴𝑅 > 𝐿𝑌 .
𝑝𝑏
𝑖() =
𝑝𝑠
𝑖()𝐷𝑅𝑅() + 𝑝𝑏
𝑔()(1 − 𝐷𝑅𝑅()),𝑖𝑓 𝐷𝑅𝑅()0
𝑝𝑚𝑖𝑑
𝑔(),𝑖𝑓 𝐷𝑅𝑅()>0.
(19)
The internal buying price 𝑝𝑏
𝑖()is adjusted by 𝑝𝑠
𝑖(), grid prices and 𝐷(). From Equation (19), when 𝐷𝑅𝑅()0, prosumers
have to buy their energy with the same grid price. Likewise, when 𝐷𝑅𝑅()>0, prosumers have to buy their energy from
other prosumers to minimize their costs. Note that the internal selling price is regulated by 𝐷()in a manner that reduces the
transactive time linearly until the energy is delivered to the BPs43. Thus, 𝐷()is defined as:
𝐷() =
𝐴𝑅() − 𝐿𝑌 () + 𝐵𝑇 ()𝐹(),𝑖𝑓 𝐴𝑅()> 𝐿𝑌 ()
0, otherwise,
(20)
Equation (20) is calculated as the number of hours the AR of SP exceed their LY, added to the BT and multiplied by charging rate
(F) per hour 49. However, DRR may be modified as the supplied energy within LY. The energy trading transaction process with
DRR and the internal prices shows that the whole mechanism follows a closed-loop relationship. Since it is difficult to extract the
closed form of the equilibrium prices as given in Equation (14), which cannot be solved using the KarushâĂŞKuhnâĂŞTucker
condition42. Therefore, an iterative method is used in this paper, where the internal prices affect each optimal trading of SP.
Every trading process is continually changing the net energy of SPs, and the aggregator records the outcome. The process goes
on until no further changes are found in the adjusted energy. The final result of the internal prices is thus recorded as the optimum
value for all iterations.
Note that the iterative method presented in Algorithm 7 is used by the proposed model. Although in our case, the iterative
solution converges to a fixed point, the reverse is not always true for all situations. Besides this, if the solution converges within
a finite number of iterations to a fixed point, then all prosumers will benefit from the optimal solutions that arise from this
Samuel and Javaid 15
convergence. Conversely, the solutions can diverge, suggesting that the problems cannot be solved. Therefore, the BPs can buy
the required energy directly from the main grid42.
Algorithm 7 Iterative Algorithm.
1: Set all simulation parameters
2: 𝑛𝑢𝑚𝑒𝑝𝑜𝑐ℎ𝑠 = 100 Number of Iterations
3: 𝑇= 48;Total time slots
4: 𝑁= 5;Number of prosumers
5: 𝜌= 0.2Threshold to get the DRR
6: for 𝐼𝑡𝑒𝑟 = 1 𝑡𝑜 𝑛𝑢𝑚𝑒𝑝𝑜𝑐ℎ𝑠 do
7: for = 1 𝑡𝑜 𝑇 do
8: for 𝑖= 1 𝑡𝑜 𝑁 do
9: Compute load consumption the prosumers are willing to increase or decrease by Equation (11)
10: Compute the demurrage fees by Equation(20)
11: Compute the DRR using Equation (13)
12: Compute the internal prices by Equation (15) and Equation (19)
13: Obtain the equilibrium 𝐸𝑞𝑝()price by Equation (14)
14: if (𝐸𝑞𝑝,𝑜𝑙𝑑 () − 𝐸𝑞𝑝,𝑛𝑒𝑤 ()) > 𝜖 then
15: Terminate iterations
16: end if
17: end for
18: end for
19: end for
20: if (𝐸𝑞𝑝,𝑜𝑙𝑑 () − 𝐸𝑞𝑝,𝑛𝑒𝑤 ()) > 𝜖 then
21: There is no feasible solution for this problem
22: else
23: There is a feasible solution and then make energy transaction payment via blockchain
24: end if
4 EXPERIMENTAL RESULTS
The experimental settings are presented in this section in Table 2, then the results from the experiment are described.
4.1 Experimental Environment
Every prosumer gathers all pieces of data from smart meters in the proposed scheme and conducts off-chain encryption based
on AHE. Also, the proposed dynamic pricing scheme is performed off-chain by the aggregator using Matlab, and the consor-
tium blockchain system is implemented using Python. In this paper, it is assumed that all prosumers have sufficient computing
resources, the implementations are performed on a personal computer equipped with Intel i5 (i5-8250U) 4-core processor speed
of 1.60 GHz with 8 GB RAM, serving all prosumers simultaneously.
4.2 Simulation Data
Five residential prosumers with PV power generations are considered in the numerical analysis, and the PV dataset is taken from
the solar radiation research laboratory (SRRL)50. The five residential loads that this paper uses are taken from the51. See table 2
for other parameters used in this paper42 . Remember that the proposed scheme is not limited to the scenario presented; however,
it can be applied to any number of prosumers. The real data sets for solar energy and reference loads for the five residential
homes are taken from50 and51, respectively.
16 Samuel and Javaid
TABLE 2 Simulation Parameters.
Parameter Value Parameter Value
𝑝𝑠
𝑔,ℎ 0.4 (Cents) BT 1 hour
𝑝𝑏
𝑔,ℎ 1 (Cent) F 0.4 (Cents)
T 48 hours 𝛽0.1
𝜌0.2 𝜖0.001
LY 1 hour 𝑛𝑢𝑚𝑒𝑝𝑜𝑐ℎ𝑠 100
4.3 Internal Price Analysis
The internal buying and selling prices from Figure 4 are derived from the proposed formulations in Equation (15) and
Equation (19), respectively. Internal selling prices are adjusted according to the demurrage fees. The demurrage fees for all time
slots are also solved to be 0.8 cents. The LY and BT are respectively assumed to be one hour, which implies that each prosumer
must wait a maximum of an hour before trading in energy. From the figure, the price of internal selling falls below the selling
price of the grid. It implies that SPs with greater AR than LY will be selling at a lower price. That will eventually deter SPs from
hoarding resources. Note that the time slots during 9:00-10:00, 19:00-24:00 and 43:00-48:00, the internal selling price 𝑝𝑠
𝑖()is
above the selling price of the grid. The explanation for this is that 𝐴𝑅()< 𝐿𝑌 (), if 𝐷()is 0.
0 5 10 15 20 25 30 35 40 45 50
Time (hours)
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Price (Cents)
pb
ps
pb
g
ps
g
FIGURE 4 Internal Prices versus Grid Prices.
Demurrage fees in Figure 5 influence the equilibrium price 𝐸𝑞𝑝()as the demands of BPs increase. It implies that demurrage
fees will eventually alter energy consumption of BPs and energy generations of SPs. From the figure, it is observed that 𝐸𝑞𝑝()
is 0.32 cents during time slots 1:00-5:00, which imply that prosumers are not aware of the demurrage fees. The same effect
can be seen within the 25:00-30:00 time slots. Note that 𝐸𝑞𝑝()lies within the trading prices of the grid. It indicates better
performance in the pricing formulation.
Figure 6 shows the internal price deviation versus the number of iterations. The results show that at 20th iteration, 𝑝𝑏
𝑖()and
𝑝𝑠
𝑖()converge, which confirms the effectiveness of the proposed price formulation. The converged prices at the 20th iteration
imply that the solution within the convergence criterion is approximately the same. The convergence of the internal prices also
indicates that all prosumers accept it. However, the acceptable offered price 𝐸𝑞𝑝()remains the same regardless of the number
of loads, which the prosumers intend to either increase or decrease at any given time slot.
Samuel and Javaid 17
0 5 10 15 20 25 30 35 40 45 50
Time (hours)
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Price (Cents)
FIGURE 5 Equilibrium Price.
0 10 20 30 40 50 60 70 80 90 100
Iterations
2
4
6
8
10
12
14
16
Deviation
ps
pb
FIGURE 6 Internal Price Deviation versus Number of Iterations.
4.4 Performance Evaluations
The aggregator can incur costs in the proposed system based on the following computations: encryption and the dynamic pricing
scheme being implemented. The complexity of AHE includes the cost of modular exponentiation, which leads to high computing,
particularly when pre-computing on the server-side. Computing cost bottlenecks can be minimized by shipping part of the
encrypted data to a trusted prosumer.
TABLE 3 Packet and block sizes in MB
Packet size 256 512 768 1024 1280 2048 2072 2096 2120 2144
Block size 4 8 12 16 20 24 28 32 36 40
18 Samuel and Javaid
In this experiment, as shown in Table 3, the block and packet sizes are broken down into smaller parts. The total block creation
time is 𝑇𝑏𝑐 = 2.5162 s while 𝑇𝐷= 5.3149 s is the execution time of implementing the energy trading.
4.4.1 Evaluation of Execution Time
The execution time for encryption and decryption is shown in Figure 7. The time it takes for a plaintext to be converted into
ciphertext is known as encryption time. While the time taken to translate ciphertext to plaintext is called the decryption time.
From Figure 7, it is observed that as compared to the decryption process, the encryption process requires more execution time.
The reason for this is that it requires high computation to calculate the fixed modular exponential during the encryption process.
200 400 600 800 1000 1200 1400 1600 1800 2000 2200
Key size (Bits)
0
5
10
15
20
25
30
35
40
45
Execution time (s)
Encryption
Decryption
FIGURE 7 Encryption versus Decryption.
Figure 8 shows the comparison of different key sizes of the AHE and Rivest-Shamir-Adleman (RSA) encryption mechanism.
RSA is specified to encrypt 2048-bit message using the public-key cryptosystem. The maximum size of the plaintext that RSA
is to encrypt is 245 bytes52. However, RSA is an asymmetric cypher, which handles a secure data exchange across an unsafe
environment. RSA needs fewer data to get better performance and slows down on large data. From Figure 8 it is shown that,
for different key sizes, the AHE outperforms RSA in terms of encryption and decryption. The results confirm that computing
devices, such as low capacity smart meters can operate efficiently using the AHE.
Figure 9 shows the time of execution versus the size of the blocks. From the figure, the block sizes are observed to increase
linearly with the time of execution. This implies that each block is generated when all other nodes agreed on it. Before a block
is created, the aggregator must determine whether demurrage fees are applicable for each SP based on their LY and AR or not.
Nevertheless, the cost of calculating the demurrage increases the execution time, and for each quota of the supplied energy, a
new block is generated.
Under normal circumstances, the time required for each packet to be encrypted is proportional to the packet size. Furthermore,
note that the sizes of packets increase with the time of execution. When 𝑞 < 𝑤, the time required for encryption increases as
𝑞approaches 𝑤. Therefore, the gap between encryption time and decryption time is closed. Contrary to this, when 𝑞𝑤, the
time required for encryption increases with the size of packets.
4.4.2 Evaluation of System Overhead
Figure 10 provides a comparison of overhead system costs for different packet sizes between the proposed system and an existing
system in the literature14. The proposed system performs the following tasks: block creation, demurrage fees calculation and
consensus computation. Note that the aggregator generates all transactions based on the consensus of the mining nodes. It is
observed from Figure 10 that the proposed system minimizes the overhead system cost up to 66.67% as compared to 33.43%
for the existing system14. The difference between the two systems is the different tasks which each aggregator performs. A
Samuel and Javaid 19
256 512 768 1024 1280 2048 2072 2096 2120 2144
Key size (Bits)
0
10
20
30
40
50
60
70
80
Execution time (s)
Paillier-Encryption
RSA-Encryption
Paillier-Decryption
RSA-Decryption
FIGURE 8 Encryption versus Decryption for Two Cryptosystems.
0 5 10 15 20 25 30 35 40
Blocksize (MB)
0
1
2
3
4
5
6
Execution time (s)
Block
FIGURE 9 Blocksize versus Execution Time.
blockchain energy trading system (BC-ETS), which uses a reputation based PoS mechanism is proposed in14 . The credibility
score is influenced by arbitration success that is calculated using a technique for order preference by similarity to an ideal solution
(TOPSIS). However, the technique contributes to the overhead cost of the system. Contrarily, in the proposed system, the main
system cost, is the costs of encryption and block creation. Besides, in the proposed system achieves minimal block creation time
of 2:5162 s.
4.4.3 Evaluation of the Hash Power
In the blockchain, hash power 𝐻𝑝is a process of obtaining hash of a block per second. The amount of time a miner takes to
mine a block is known as block time 𝐵𝑡, which is used to adjust the difficulty level 𝐿𝐷. While 𝐿𝐷is a block initial hash value.
Figure 11 shows how the hash power of various consensus mechanisms is compared. Consensus mechanisms are protocols
that ensure that all nodes in a blockchain maintain decorum by agreeing on which transactions are either valid or invalid. Note
20 Samuel and Javaid
200 400 600 800 1000 1200 1400 1600 1800 2000 2200
Packetsize (MB)
0
1
2
3
4
5
6
7
8
9
10
System overhead (s)
109
Our proposed system
BC-ETS
FIGURE 10 System Overhead Cost.
that blockchain is vulnerable to various attacks without an effective consensus mechanism. There are many methods to reach
consensus in a blockchain network like PoW, which is the first consensus protocol used by Bitcoin.
In PoW, miners perform PoW process (mining) by solving complex mathematical puzzles, which require high computing
resources and equipment6. The first node to solve the puzzle is declared as the winner, which creates a block and receives a
reward for creating the block. Due to the high computing requirement of PoW, proof-of-stake (PoS) was introduced14. PoS
functions by considering the nodes with the most coins, and it uses a randomized process to determine who get and generate the
next block14 . From Figure 11, it is observed that the proposed PoA achieves the least hash power as compared to PoS and PoW,
respectively. It implies that PoA average hash power is minimized up to 82.75% as compared to 60.34% for PoS and 56.89%
for PoW. Nevertheless, as 𝐵𝑡decreases, 𝐿𝐷increases and vice versa; on the other hand, 𝐻𝑝will be increased. Therefore, 𝐻𝑝is
calculated as the ratio of 𝐿𝐷and 𝐵𝑡.
0 10 20 30 40 50 60 70 80 90
Block time (s)
0
2
4
6
8
10
12
Hash power (h/s)
105
Proposed PoA
PoS
PoW
FIGURE 11 Hash Power of the Network.
Samuel and Javaid 21
4.5 Limitations
In the proposed system, prosumers are susceptible to privacy-location based threats, for example, the previous, present and future
location of prosumers are exposed during payment and energy discharging processes as all nodes in the blockchain have the same
copy of the ledger. Moreover, the proposed PoA consensus mechanism that uses the PageRank algorithm becomes inefficient as
the network links grow in infinite link cycles. Also, there are tendencies that some nodes may intentionally not participate in the
ranking process, which leads to a dead end. The proposed AHE can be compromised if the aggregator is malicious; therefore, a
reputation management system needs to be considered.
5 CONCLUSION AND FUTURE WORK
This paper proposes a solution that provides trustful and secure energy trading system. The solution includes a combination of
AHE and consortium blockchain technology. Also, a DRR is formulated based on load demand of prosumers, which is used
to determine the energy pricing model. Note that during energy trading, a factor that restricts supply chain, such as demurrage
fees need to be transparent. The approach uses consortium blockchain technology to provide transparency and information flow
that resolve the demurrage fee dispute between prosumers. Additionally, demurrage fees are included in the proposed energy
pricing model to regulate the internal selling price. With demurrage fees, SP will sell its energy at a price lower than either
the actual internal selling price or grid selling price. Thus, there will be no hoarding, but investing. Simulation results show
the superiority of the proposed model in terms of reducing system overhead cost as compared to the existing models. From the
simulation results, the proposed scheme reduces the average system overhead cost up to 66.67% as compared to 33.43% for BC-
ETS. The proposed PoA consensus average hash power is minimized up to 82.75% as compared to 60.34% for PoS and 56.89%
for PoW consensus mechanisms. Also, this paper achieves minimum execution time when performing encryption, energy trading
and block creation. Furthermore, the energy pricing solution converges at the 20th iteration, which indicates that all prosumers
accept the energy buying and selling prices. It also implies that the solution has fulfilled convergence criterion; thus, achieving
computational cost as low as possible. By privacy and security analyses, the proposed scheme is secure and efficient.
In future, this paper intends to integrate the approach with the Internet of vehicles. The potential privacy risks of vehicles
involved during energy trading, such as location-related privacy will be tackled. Also, reputation-based consensus mechanism
will be considered to address the issue of malicious blockchain nodes.
References
1. Luo F, Dong ZY, Liang G, Murata J, Xu Z. A distributed electricity trading system in active distribution networks based
on multi-agent coalition and blockchain. IEEE Transactions on Power Systems. 2018; 34(5):4097–4108. https://doi.org/10.
1109/TPWRS.2018.2876612
2. Lowitzsch J. Financing Renewables while Implementing Energy Efficiency Measures through Consumer Stock Ownership
Plans (CSOPs)-The H2020 Project SCORE. InIOP Conference Series: Earth and Environmental Science 2019; Jun, IOP
Publishing, 290, 1, 1–10. https://iopscience.iop.org/article/10.1088/1755-1315/290/1/012051/meta
3. Morstyn T, Farrell N, Darby SJ, McCulloch MD. Using peer-to-peer energy-trading platforms to incentivize prosumers to
form federated power plants. Nature Energy. 2018; 3(2):94–101. https://doi.org/10.1038/s41560-017-0075-y
4. Rathor SK, Saxena D. Energy management system for smart grid: An overview and key issues. International Journal of
Energy Research. 2020; 1(1):1–43. https://doi.org/10.1002/er.4883
5. Nazari MH, Costello Z, Feizollahi MJ, Grijalva S, Egerstedt M. Distributed frequency control of prosumer-based elec-
tric energy systems. IEEE Transactions on Power Systems. 2014; 29(6):2934–2942. https://doi.org/10.1109/TPWRS.2014.
2310176
6. Kang J, Yu R, Huang X, Maharjan S, Zhang Y, Hossain E. Enabling localized peer-to-peer electricity trading among plug-in
hybrid electric vehicles using consortium blockchains. IEEE Transactions on Industrial Informatics. 2017; 13(6):3154–
3164. https://doi.org/10.1109/TII.2017.2709784
22 Samuel and Javaid
7. Liu N, Cheng M, Yu X, Zhong J, Lei J. Energy-sharing provider for PV prosumer clusters: A hybrid approach using
stochastic programming and stackelberg game. IEEE Transactions on Industrial Electronics. 2018; 65(8):6740–6750.
https://doi.org/10.1109/TIE.2018.2793181
8. Gai K, Wu Y, Zhu L, Qiu M, Shen M. Privacy-preserving energy trading using consortium blockchain in smart grid. IEEE
Transactions on Industrial Informatics. 2019; 15(6):3548–3558. https://doi.org/10.1109/TII.2019.2893433
9. Li Z, Kang J, Yu R, Ye D, Deng Q, Zhang Y. Consortium blockchain for secure energy trading in industrial internet of
things. IEEE transactions on industrial informatics. 2017;14(8):3690–3700. https://doi.org/10.1109/TII.2017.2786307
10. Zhang T, Pota H, Chu CC, Gadh R. Real-time renewable energy incentive system for electric vehicles using prioritization
and cryptocurrency. Applied energy. 2018; 226:582–594. https://doi.org/10.1016/j.apenergy.2018.06.025
11. Tao L, Gao Y. Real-time pricing for smart grid with distributed energy and storage: A noncooperative game method con-
sidering spatially and temporally coupled constraints. International Journal of Electrical Power & Energy Systems. 2020;
115:105487. https://doi.org/10.1016/j.ijepes.2019.105487
12. Aitzhan NZ, Svetinovic D. Security and privacy in decentralized energy trading through multi-signatures, blockchain and
anonymous messaging streams. IEEE Transactions on Dependable and Secure Computing. 2016; 15(5):840–852. https:
//doi.org/10.1109/TDSC.2016.2616861
13. Samuel O, Javaid N, Awais M, Ahmed Z, Imran M, Guizani M. A blockchain model for fair data sharing in deregulated
smart grids. In IEEE Global Communications Conference (GLOBCOM 2019), 2019 Jul. Waikoloa, HI, USA, 1–7. https:
//doi.org/10.1109/GLOBECOM38437.2019.9013372
14. Guan Z, Lu X, Wang N, Wu J, Du X, Guizani M. Towards secure and efficient energy trading in IIoT-enabled energy internet:
A blockchain approach. Future Generation Computer Systems. 2019; 1(99), 1–10. https://doi.org/10.1016/j.future.2019.09.
027
15. Zhang Y, Wen J. The IoT electric business model: Using blockchain technology for the internet of things. Peer-to-Peer
Networking and Applications. 2017; 10(4):983–994. https://doi.org/10.1007/s12083-016-0456-1
16. Erdin E, Cebe M, Akkaya K, Solak S, Bulut E, Uluagac S. Building a private bitcoin-based payment network among electric
vehicles and charging stations. In2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green
Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart
Data (SmartData) 2018 Jul 30; Halifax, NS, Canada, 1609–1615. https://doi.org/10.1109/Cybermatics_2018.2018.00269
17. Di Silvestre ML, Gallo P, Ippolito MG, Sanseverino ER, Zizzo G. A technical approach to the energy blockchain
in microgrids. IEEE Transactions on Industrial Informatics. 2018; 14(11):4792–4803. https://doi.org/10.1109/TII.2018.
2806357
18. Christidis K, Devetsikiotis M. Blockchains and smart contracts for the internet of things. IEEE Access. 2016; 4:2292-2303.
https://doi.org/10.1109/ACCESS.2016.2566339
19. Yeow K, Gani A, Ahmad RW, Rodrigues JJ, Ko K. Decentralized consensus for edge-centric internet of things: A review,
taxonomy, and research issues. IEEE Access. 2017; 6:1513–1524. https://doi.org/10.1109/ACCESS.2017.2779263
20. Sharma PK, Park JH. Blockchain based hybrid network architecture for the smart city. Future Generation Computer Systems.
2018; 86:650–655. https://doi.org/10.1016/j.future.2018.04.060
21. Bruneo D, Distefano S, Giacobbe M, Minnolo AL, Longo F, Merlino G, Mulfari D, Panarello A, PatanÃĺ G, Puliafito A,
Puliafito C. An iot service ecosystem for smart cities: The# smartme project. Internet of Things. 2019; 5:12–33. https:
//doi.org/10.1016/j.iot.2018.11.004
22. Qu C, Tao M, Yuan R. A hypergraph-based blockchain model and application in Internet of Things-enabled smart homes.
Sensors. 2018; 18(9):1–18. https://doi.org/10.3390/s18092784
Samuel and Javaid 23
23. Alghamdi TA, Ali I, Javaid N, Shafiq M. Secure Service Provisioning Scheme for Lightweight IoT Devices with a Fair
Payment System and an Incentive Mechanism based on Blockchain. IEEE Access. 2019; 8, 1048–1061. https://doi.org/10.
1109/ACCESS.2019.2961612
24. Naz M, Al-zahrani FA, Khalid R, Javaid N, Qamar AM, Afzal MK, Shafiq M. A Secure Data Sharing Platform Using
Blockchain and Interplanetary File System. Sustainability. 2019; 11(24):1–24. https://doi.org/10.3390/su11247054
25. Sultana T, Almogren A, Akbar M, Zuair M, Ullah I, Javaid N. Data Sharing System Integrating Access Control Mechanism
using Blockchain-Based Smart Contracts for IoT Devices. Applied Sciences. 2020; 10(2):1–21. https://doi.org/10.3390/
app10020488
26. Rehman M, Javaid N, Awais M, Imran M, Naseer N. Cloud based secure service providing for IoTs using blockchain. In
IEEE Global Communications Conference (GLOBCOM 2019), 2019 Dec, Waikoloa, HI, USA, 1–7. https://doi.org/10.
1109/GLOBECOM38437.2019.9013413
27. FernÃąndez-CaramÃľs TM, Fraga-Lamas P. A Review on the Use of Blockchain for the Internet of Things. IEEE Access.
2018; 6:32979–3001. https://doi.org/10.1109/ACCESS.2018.2842685
28. Panarello A, Tapas N, Merlino G, Longo F, Puliafito A. Blockchain and iot integration: A systematic survey. Sensors. 2018;
18(8):1–37. https://doi.org/10.3390/s18082575
29. Park JS, Youn TY, Kim HB, Rhee KH, Shin SU. Smart contract-based review system for an IoT data marketplace. Sensors.
2018; 18(10):1–16. https://doi.org/10.3390/s18103577
30. Qiu C, Yu FR, Yao H, Jiang C, Xu F, Zhao C. Blockchain-based software-defined industrial Internet of Things: A dueling
deep 𝑄-learning approach. IEEE Internet of Things Journal. 2018; 6(3):4627–4639. https://doi.org/10.1109/JIOT.2018.
2871394
31. Novo O. Blockchain meets IoT: An architecture for scalable access management in IoT. IEEE Internet of Things Journal.
2018; 5(2):1184–1195. https://doi.org/10.1109/JIOT.2018.2812239
32. Liu C, Xiao Y, Javangula V, Hu Q, Wang S, Cheng X. NormaChain: A blockchain-based normalized autonomous transaction
settlement system for IoT-based E-commerce. IEEE Internet of Things Journal. 2018; 6(3):4680–4693. https://doi.org/10.
1109/JIOT.2018.2877634
33. Abidin A, Aly A, Cleemput S, Mustafa MA. Secure and privacy-friendly local electricity trading and billing in smart grid.
arXiv preprint arXiv:1801.08354. 2018 Jan 25.
34. Mengelkamp E, GÃďrttner J, Rock K, Kessler S, Orsini L, Weinhardt C. Designing microgrid energy markets: A case study:
The Brooklyn Microgrid. Applied Energy. 2018; 210:870–880. https://doi.org/10.1016/j.apenergy.2017.06.054
35. Liu C, Chai KK, Zhang X, Lau ET, Chen Y. Adaptive blockchain-based electric vehicle participation scheme in smart grid
platform. IEEE Access. 2018 Ma; 6:25657-25665. https://doi.org/10.1109/ACCESS.2018.2835309
36. Kosba A, Miller A, Shi E, Wen Z, Papamanthou C. Hawk: The blockchain model of cryptography and privacy-preserving
smart contracts. In 2016 IEEE symposium on security and privacy (SP) 2016 May 22, San Jose, CA, USA, 839–858.
https://doi.org/10.1109/SP.2016.55
37. Hou J, Wang H, Liu P. Applying the blockchain technology to promote the development of distributed photovoltaic in China.
International Journal of Energy Research. 2018; 42(6):2050–2069. https://doi.org/10.1002/er.3984
38. Liu H, Zhang Y, Yang T. Blockchain-enabled security in electric vehicles cloud and edge computing. IEEE Network. 2018;
32(3):78–83. https://doi.org/10.1109/MNET.2018.1700344
39. Zhu L, Wu Y, Gai K, Choo KK. Controllable and trustworthy blockchain-based cloud data management. Future Generation
Computer Systems. 2019; 91:527–535. https://doi.org/10.1016/j.future.2018.09.019
24 Samuel and Javaid
40. Yucel F, Bulut E, Akkaya K. Privacy Preserving Distributed Stable Matching of Electric Vehicles and Charge Suppliers.
In2018 IEEE 88th Vehicular Technology Conference (VTC-Fall) 2018 Aug 27, Chicago, IL, USA, USA, 1–6. https://doi.
org/10.1109/VTCFall.2018.8690603
41. Zhang Y, Deng RH, Liu X, Zheng D. Blockchain based efficient and robust fair payment for outsourcing services in cloud
computing. Information Sciences. 2018; 462:262–277. https://doi.org/10.1016/j.ins.2018.06.018
42. Liu N, Yu X, Wang C, Li C, Ma L, Lei J. Energy-sharing model with price-based demand response for microgrids of peer-
to-peer prosumers. IEEE Transactions on Power Systems. 2017; 32(5):3569–3583. https://doi.org/10.1109/TPWRS.2017.
2649558
43. Devine MT, Cuffe P. Blockchain electricity trading under demurrage. IEEE Transactions on Smart Grid. 2019; 10(2):2323–
2325. https://doi.org/10.1109/TSG.2019.2892554
44. Nach H, Ghilal R. Blockchain and smart contracts in the logistic and transportation industry: the demurrage and mar-
itime trade use case. In 1st Annual Toronto FinTech Conf. 2017, Toronto, Canada, 1–9. https://hamidnach.com/2017/09/
15/blockchain-and-smart-contracts-in-the-logistic-and-transportation-industry-the-demurrage-use-case/
45. Aono Y, Hayashi T, Wang L, Moriai S. Privacy-preserving deep learning via additively homomorphic encryption. IEEE
Transactions on Information Forensics and Security. 2017; 13(5):1333–1345. https://doi.org/10.1109/TIFS.2017.2787987
46. She W, Gu ZH, Lyu XK, Liu Q, Tian Z, Liu W. Homomorphic consortium blockchain for smart home system sensitive data
privacy preserving. IEEE Access. 2019; 7:62058–62070. https://doi.org/10.1109/ACCESS.2019.2916345
47. Li F, Luo B, Liu P. Secure information aggregation for smart grids using homomorphic encryption. In2010 first IEEE
international conference on smart grid communications 2010 Oct 4, Gaithersburg, MD, USA, 327–332. https://doi.org/10.
1109/SMARTGRID.2010.5622064
48. Min Z, Yang G, Shi J. A privacy-preserving parallel and homomorphic encryption scheme. Open Physics. 2017; 15(1):135–
142. htpps://DOI10.1515/phys-2017-0014
49. Al-Harthy MH. Oil Export Tanker Problem-Demurrage and the Flaw of Averages. Energy exploration & exploitation. 2008;
26(3):143–156. https://doi.org/10.1260%2F014459808786933717
50. Solar Radiation Research Laboratory (SRRL) [Online], Available on: http://https://www.nrel.gov/esif/
solar-radiation-research-laboratory.html/. Accessed August 6, 2019.
51. Bingtuan GA, Xiaofeng LI, Cheng WU, Yi TA. Game-theoretic energy management with storage capacity optimization
in the smart grids. Journal of Modern Power Systems and Clean Energy. 2018; 6(4):656–667. https://doi.org/10.1007/
s40565-017-0364-2
52. Lu H, Huang K, Azimi M, Guo L. Blockchain technology in the oil and gas industry: A review of applications, opportunities,
challenges, and risks. IEEE Access. 2019; 7:41426–41444. https://doi.org/10.1109/ACCESS.2019.2907695
... [ [86][87][88][89][90][91][92] Analyze which data may reveal privacy. Trade-off between privacy and security. ...
... The inner product functional encryption method was used in [87,88] for the energy trading in a blockchain-embedded smart grid. The additive homomorphic encryption were applied in [89,90]. There are relatively few work applying the DP-based methods in energy trading due to its theoretical complexity. ...
Article
Full-text available
The development of distributed energy resources, such as rooftop photovoltaic (PV) panels, batteries, and electric vehicles (EVs), has decentralized the power system operation, where transactive energy markets empower local energy exchanges. Transactive energy contributes to building a low‐carbon energy system by better matching the distributed renewable sources and demand. Effective market mechanisms are a key part of transactive energy market design. Despite fruitful research on related topics, some practical challenges must be addressed. This review surveys three practical issues related to information exchange in transactive energy markets: asynchronous computing, truthful reporting, and privacy preservation. The state‐of‐the‐art results are summarized and relevant multidisciplinary theories are introduced. Based on these findings, several potential research directions are suggested that could provide insights for future studies.
... Furthermore, latest review papers address several elements of peer-to-peer trading that are also studied here. Doan et al. (2021) offer an overview of numerous P2P initiatives now being implemented in various regions of the world (Sabillon et al., 2021;Samuel and Javaid, 2021), providing a comprehensive overview of several kinds of community markets and P2P energy trading systems. However, Haggi and Sun (2021) and Cao et al. (2021) describe how several blockchain with multiple distributed-based ledger technology may be used for diverse applications in the power industry, while Al-Obaidi et al. (2021) discuss the problems and potential of these applications. ...
... The authors suggest a blockchain system that focuses on paralleled double-chain paired by high-frequency authentication method, which enables the trustworthy and safe settlement for power trading transaction in Park et al. (2018). Samuel and Javaid (2021) build trading programs based on consortium-based blockchain to attain the required trading efficiency among plugin hybrids and EVs in an electrical market. Tesfamicael et al. (2020) propose a multi-signature blockchain to enable security transaction in smart grid with decentralized energy trading without relying on third parties. ...
Article
Full-text available
Peer-to-peer (P2P) energy trading platform is an upcoming energy generation and effective energy managing strategy that rewards proactive customers (acting as prosumers) in which individuals trade energy for products and services. On the other hand, P2P trading is expected to give multiple benefits to the grid in minimizing the peak load demand, energy consumption costs, and eliminating network losses. However, installing P2P energy trading on a broader level in electrical-based networks presents a number of modeling problems in physical and virtual network layers. As a result, this article presents a thorough examination of P2P studies of energy trade literature. An overview is given with the essential characteristics of P2P energy trading and comparatively analyzed with multiple advantages for the utility grid and individual prosumers. The study then addresses the physical and virtual levels that systematically categorize the available research. Furthermore, the technological techniques have been gone through multiple problems that need to overcome for P2P energy trading in electrical networks. Finally, the article concludes with suggestions for further research.
... Also, demand based pricing and privacy of the EVs were not considered. To resolve demurrage fee disputes between users in the energy supply chain, a blockchain based secure demurrage mechanism was proposed in [25]. The proposed mechanism enabled users to achieve energy efficiency and cost minimization. ...
... The importance of this study for vehicular energy networks is given below. EVs' records that are handled by the centralized solutions [7], [8] [7] 2019 MPPS Stackelberg game [8] 2018 Dynamic pricing Stackelberg game SDN [13] 2017 Iterative double auction Iterative method PoW [14] 2018 Two-path tariff Contract theory DBFT [15] 2019 Iterative method Ethereum [16] 2019 WST and SAT Crowdsensing system [23] 2018 [24] 2020 Bilateral trading [25] 2019 Analytical method Iterative method PoA Ethereum [26] 2017 Auction matching Iterative method [27] 2017 Day ahead Two-stage game theoretical model [33] 2017 Differential privacy [34] 2019 Direct pricing Bound detection algorithm ...
Article
In this paper a secure energy system is proposed that consists of private and public blockchains for vehicles in sustainable cities and society. The former protects vehicle owners from spatial and temporal information based attacks while the latter provides efficient energy trading in sustainable cities and society. In the proposed system, the dynamic demand based pricing policy for the vehicle owners is proposed using types of vehicles, time of demand and geographical locations. The vehicles’ social welfare and utility are maximized using an optimal scheduling method along with the proposed pricing policy. Also, the vehicle owners’ privacy is protected by applying differential privacy in the proposed consensus energy management algorithm. The numerical analyses show that 89.23% reduction in energy price is achieved as compared to 83.46%, 73.86% and 53.07% for multi-parameter pricing scheme (MPPS), fixed pricing scheme and time-of-use pricing scheme (ToU), respectively. Applying the proposed scheme, the owners can achieve about 81.46% reduction in their operating cost as compared to 80.48%, 69.75% and 68.29% for MPPS, fixed pricing scheme and ToU, respectively. Moreover, the proposed system is 60.32% secure as compared to 39.67% for MPPS system. Furthermore, using less information loss against considerable background knowledge of an attacker, higher privacy protection of vehicles is attained.
... [ [79][80][81][82][83][84][85] Analyze which data may reveal privacy. Tradeoff between privacy and security. ...
... The inner product functional encryption method was used in [80,81] for the energy trading in blockchain-embedded smart grid. Additive homomorphic encryption were applied in [82,83]. There are related few work applying the DP-based method in energy trading due to the theoretical complexity. ...
Preprint
Full-text available
The development of distributed energy resources, such as rooftop photovoltaic (PV) panels, batteries, electric vehicles (EVs), and flexible loads, is shifting our power systems operation from a centralized manner to a decentralized manner, where local energy exchanges are empowered by transactive energy markets. Transactive energy contributes to building a low-carbon energy system by better matching the distributed renewable sources and demand. Effective market mechanisms are the key part of transactive energy design. Despite the fruitful research on related topics, there are some practical challenges remain to be addressed. This review surveys three practical issues particularly related to the information exchange in transactive energy, i.e., asynchronous-computing, truthful-reporting, and privacy-preserving. We summarize the state-of-the-art results and introduce relevant theories from multi-disciplinary. Based on these, we point out some possible research directions, which may provide some insights for future study.
... However, this model is inefficient and non beneficial for prosumers as price of energy is more than the grid's pricing tariff. In another work, energy prices are determined based on auction or negotiation market approaches, which are the best approaches for solving the problem of fixed pricing determination [32]. However, both auction and negotiation approaches become complex and time consuming when the number of users grows. ...
... The efficiency of the system is improved Confirmation latency and block creation time are not considered Consortium blockchain, homomorphic encryption, and demurrage mechanism [32] To improve security and enhance pricing scheme Security, trust and fixed pricing problems are resolved Verifiable mechanism and less computational complexity for consensus mechanisms are not considered Fig. 1: The Proposed System Model prosumers can communicate with each other. For instance, nearby residential homes can directly connect through a physical cable wire to transfer energy. ...
Article
Local energy trading has attracted the attention of many researchers as a result of its promising benefits. These benefits include minimizing gas emission, reducing power shortage , and establishing a competitive energy market. However, the energy trading between several prosumers causes trust, security, and privacy challenges in energy systems. On the other hand, a single point of failure and an increase in overall system cost occur when the energy system is managed using a centralized model. Therefore, to tackle the mentioned issues, this work proposes a two-layered secure Peer-to-Peer (P2P) energy trading model based on blockchain. The proposed model has two layers: authentication, and secure energy trading. In the authentication layer, in order to protect the proposed model from impersonation attacks, a mutual authentication process is implemented. In the energy trading layer, a new consensus mechanism is proposed to minimize the number of malicious validators. Afterwards, an incentive-punishment algorithm is introduced to motivate energy prosumers to contribute more energy in the model. Next, a dynamic contract theory based on supply-demand ratio pricing scheme is proposed. The purpose of the proposed pricing scheme is to solve the issues associated with the existing pricing schemes. It also preserves the privacy of the actual energy consumption behavior of the trading participants. Furthermore, a consensus mechanism validators' selection model is proposed. The aim of the proposed work is to have an efficient and secure P2P energy trading platform. Simulations are executed to show the performance of the proposed model in terms of communication and computational costs, reputation, energy contributed, reward, and prices. The results for the authentication process show 7.45 ms computational cost and 1152 bits communication cost, which are better than the existing works. In the consensus process, 66.67% of the validators are selected to conduct the consensus for every transaction. This selection efficiently improves the consensus process and minimizes the number of malicious validators. In the proposed model, the increase in reward is observed for increased energy contribution, decreased non-malicious transactions and adjustment of energy consumption. The proposed model shows a satisfactory performance in terms of trust, security, and privacy.
... To address the above mentioned challenges, an efficient solution is required to ensure irrevocable, transparent, and distributed digital transactions. Blockchain technology is a distributed network that is able to solve the problems associated with the centralized approach [17], [18]. It addresses the problems in a decentralized and distributed manner. ...
Article
Full-text available
A Smart Community (SC) is an essential part of the Internet of Energy (IoE), which helps to integrate Electric Vehicles (EVs) and distributed renewable energy sources in a smart grid. As a result of the potential privacy and security challenges in the distributed energy system, it is becoming a great problem to optimally schedule EVs' charging with different energy consumption patterns and perform reliable energy trading in the SC. In this paper, a blockchain based privacy preserving energy trading system for 5G deployed SC is proposed. The proposed system is divided into two components: EVs and residential prosumers. In this system, a reputation based distributed matching algorithm for EVs and a Reward based Starvation Free Energy Allocation Policy (RSFEAP) for residential homes are presented. A short-term load forecasting model for EVs' charging using multiple linear regression is proposed to plan and manage the intermittent charging behavior of EVs. In the proposed system, identity based encryption and homomorphic encryption techniques are integrated to protect the privacy of transactions and users, respectively. The performance of the proposed system for EVs' component is evaluated using convergence duration, forecasting accuracy, and executional and transactional cost as performance metrics. For the residential prosumers' component, the performance is evaluated using reward index, type of transactions, energy contributed, average convergence time, and the number of iterations as performance metrics. The simulation results for EVs' charging forecasting gives an accuracy of 99.25%. For the EVs matching algorithm, the proposed privacy preserving algorithm converges faster than the bichromatic mutual nearest neighbor algorithm. For RSFEAP, the number of iterations for 50 prosumers is 8, which is smaller than the benchmark. Its convergence duration is also 10 times less than the benchmark scheme. Moreover, security and privacy analyses are presented. Finally, we carry out security vulnerability analysis of smart contracts to ensure that the proposed smart contracts are secure and bug-free against the common vulnerabilities' attacks. The results show that the smart contracts are secure against both internal and external attacks.
... To address the above mentioned challenges, an efficient solution is required to ensure irrevocable, transparent, and distributed digital transactions. Blockchain technology is a distributed network that is able to solve the problems associated with the centralized approach [17], [18]. It addresses the problems in a decentralized and distributed manner. ...
Article
A Smart Community (SC) is an essential part of the Internet of Energy (IoE), which helps to integrate Electric Vehicles (EVs) and distributed renewable energy sources in a smart grid. As a result of the potential privacy and security challenges in the distributed energy system, it is becoming a great problem to optimally schedule EVs' charging with different energy consumption patterns and perform reliable energy trading in the SC. In this paper, a blockchain based privacy preserving energy trading system for 5G deployed SC is proposed. The proposed system is divided into two components: EVs and residential prosumers. In this system, a reputation based distributed matching algorithm for EVs and a Reward based Starvation Free Energy Allocation Policy (RSFEAP) for residential homes are presented. A short-term load forecasting model for EVs' charging using multiple linear regression is proposed to plan and manage the intermittent charging behavior of EVs. In the proposed system, identity based encryption and homomorphic encryption techniques are integrated to protect the privacy of transactions and users, respectively. The performance of the proposed system for EVs' component is evaluated using convergence duration, forecasting accuracy, and executional and transactional cost as performance metrics. For the residential prosumers' component, the performance is evaluated using reward index, type of transactions, energy contributed, average convergence time, and the number of iterations as performance metrics. The simulation results for EVs' charging forecasting gives an accuracy of 99.25%. For the EVs matching algorithm, the proposed privacy preserving algorithm converges faster than the bichromatic mutual nearest neighbor algorithm. For RSFEAP, the number of iterations for 50 prosumers is 8, which is smaller than the benchmark. Its convergence duration is also 10 times less than the benchmark scheme. Moreover, security and privacy analyses are presented. Finally, we carry out security vulnerability analysis of smart contracts to ensure that the proposed smart contracts are secure and bug-free against the common vulnerabilities' attacks. The results show that the smart contracts are secure against both internal and external attacks.
... However, it is not beneficial for prosumers as the grid energy price is 70% more than the local energy price. Market negotiation method is another different type of ET where sellers and buyers bargain for energy prices [19]. However, trust and transparency issues are not solved and also, it is time consuming when the number of traders increases. ...
Article
This paper proposes an energy trading model based on blockchain to manage and supervise the trading process. In the model, proof-of-energy reputation generation and proofof-energy reputation consumption consensus mechanisms are proposed to solve the high computational cost and huge monetary investment issues created by the existing consensus mechanisms. Similarly, a mutual verifiable fairness mechanism based on time commitment is presented, which is introduced to prevent cheating attacks in the model. The proposed model’s performance is assessed using energy cost, peak-to-average-ratio, and trust. The simulation results show that the energy cost of the proposed model decreases by 40%. The results for the load balancing depict that the values of peak-to-average-ratio of the proposed model with 20% and 50% peak demand reduction are 6.88 and 3.50, which are lower than 9.17 of the benchmark model. Moreover, the proposed model’s results show satisfactory performance for privacy and security of the system.
... The blockchain has emerged as a promising, user-friendly and efficient technology for the implementation of a secure and reliable decentralized P2P energy trading market [97,98]. [99,100,101]. ...
Thesis
Full-text available
With the advent of the smart grid (SG), the concept of energy management flourished rapidly and it gained the attention of researchers. Forecasting plays an important role in energy management. In this work, a recurrent neural network, long short term memory (LSTM), is used for electricity price and demand forecasting using big data. This model uses multiple variables as input and forecasts the future values of electricity demand and price. Its hyperparameters are tuned using the Jaya optimization algorithm to improve the forecasting ability. It is named as Jaya LSTM (JLSTM). Moreover, the concept of local energy generation using renewable energy sources is also getting popular. In this work, to implement a hybrid peer to peer energy trading market, a blockchain based system is proposed. It is fully decentralized and allows the market members to interact with each other and trade energy without involving a third party. In addition, in vehicle to grid and vehicle to vehicle energy trading environments, local aggregators perform the role of energy brokers and are responsible for validating the energy trading requests. A solution to find accurate distance with required expenses and time to reach the charging destination is also proposed, which effectively guides electric vehicles (EVs) to reach the relevant charging station and encourages energy trading. Moreover, a fair payment mechanism using a smart contract to avoid financial irregularities is proposed. Apart from this, a blockchain based trust management method for agents in a multi-agent system is proposed. In this system, three objectives are achieved: trust, cooperation and privacy. The trust of agents depends on the credibility of trust evaluators, which is verified using the proposed methods of trust distortion, consistency and reliability. To enhance the cooperation between agents, a tit-3-for-tat repeated game strategy is developed. The strategy is more forgiving than the existing tit-for-tat strategy. It encourages cheating agents to re-establish their trust by cooperating for three consecutive rounds of play. Also, a proof-of-cooperation consensus protocol is proposed to improve agents’ cooperation while creating and validating blocks. The privacy of agents is preserved in this work using the publicly verifiable secret sharing mechanism. Additionally, a blockchain based edge and cloud system is proposed to resolve the resource management problem of EVs in a vehicular energy network. Firstly, a min-max optimization problem is formulated to construct the proposed entropy based fairness metric for resource allocation. This metric is used to determine whether users have received a fair share of the system’s resources or not. Secondly, a new deep reinforcement learning based content caching and computation offloading approach is designed for resource management of EVs. Lastly, a proof-of-bargaining consensus mechanism is designed for block’s validation and selection of miners using the concept of iterative negotiation. Besides, a survey of electricity load and price forecasting models is presented. The focus of this survey is on the optimization methods, which are used to tune the hyperparameters of the forecasting models. Moreover, this work provides a systematic literature review of scalability issues of the blockchain by scrutinizing across multiple domains and discusses their solutions. Finally, future research directions for both topics are discussed in detail. To prove the effectiveness of the proposed energy management solutions, simulation are performed. The simulation results show that the energy is efficiently managed while ensuring secure trading between energy prosumers and fair resource allocation.
Article
Full-text available
Energy crisis and the global impetus to “go green” have encouraged the integration of renewable energy resources, plug‐in electric vehicles, and energy storage systems to the grid. The presence of more than one energy source in the grid necessitates the need for an efficient energy management system to guide the flow of energy. Moreover, the variability and volatile nature of renewable energy sources, uncertainties associated with plug‐in electric vehicles, the electricity price, and the time‐varying load bring new challenges to the power engineers to achieve demand‐supply balance for stable operation of the power system. The energy management system can effectively coordinate the energy sharing/trading among all available energy resources, and supply loads economically in all the conditions for the reliable, secure, and efficient operation of the power system. This paper reviews the framework, objectives, architecture, benefits, and challenges of the energy management system with a comprehensive analysis of different stakeholders and participants involved in it. The review paper gives a critical analysis of the distributed energy resources behavior and different programs such as demand response, demand‐side management, and power quality management implemented in the energy management system. Different uncertainty quantification methods are also summarized. This review paper also presents a comparative and critical analysis of the main optimization techniques used to achieve different energy management system objectives while satisfying multiple constraints. Thus, the review offers numerous recommendations for research and development of the cutting‐edge optimized energy management system applicable for homes, buildings, industries, electric vehicles, and the whole community.
Article
Full-text available
In this paper, a blockchain-based data sharing and access control system is proposed, for communication between the Internet of Things (IoT) devices. The proposed system is intended to overcome the issues related to trust and authentication for access control in IoT networks. Moreover, the objectives of the system are to achieve trustfulness, authorization, and authentication for data sharing in IoT networks. Multiple smart contracts such as Access Control Contract (ACC), Register Contract (RC), and Judge Contract (JC) are used to provide efficient access control management. Where ACC manages overall access control of the system, and RC is used to authenticate users in the system, JC implements the behavior judging method for detecting misbehavior of a subject (i.e., user). After the misbehavior detection, a penalty is defined for that subject. Several permission levels are set for IoT devices' users to share services with others. In the end, performance of the proposed system is analyzed by calculating cost consumption rate of smart contracts and their functions. A comparison is made between existing and proposed systems. Results show that the proposed system is efficient in terms of cost. The overall execution cost of the system is 6,900,000 gas units and the transaction cost is 5,200,000 gas units.
Article
Full-text available
The Internet of Things (IoT) industry is growing very fast to transform factories, homes, farms and practically everything else to make them efficient and intelligent. IoT is applied in different resilient scenarios and applications. IoT faces lots of challenges due to lack of computational power, battery and storage resources. Fortunately, the rise of blockchain technology facilitates IoT in many security solutions. Using blockchain, communication between IoT and emerging computing technologies is made efficient. In this work, we propose a secure service provisioning scheme with a fair payment system for Lightweight Clients (LCs) based on blockchain. Furthermore, an incentive mechanism based on reputation is proposed. We use consortium blockchain with the Proof of Authority (PoA) consensus mechanism. Furthermore, we use Smart Contracts (SCs) to validate the services provided by the Service Providers (SPs) to the LCs, transfer cryptocurrency to the SPs and maintain the reputation of the SPs. Moreover, the Keccak256 hashing algorithm is used for converting the data of arbitrary size to the hash of fixed size. AES128 encryption technique is used to encrypt service codes before sending to the LCs. The simulation results show that the LCs receive validated services from the SPs at an affordable cost. The results also depict that the participation rate of SPs is increased because of the incentive mechanism.
Article
Full-text available
In a research community, data sharing is an essential step to gain maximum knowledge from the prior work. Existing data sharing platforms depend on trusted third party (TTP). Due to the involvement of TTP, such systems lack trust, transparency, security, and immutability. To overcome these issues, this paper proposed a blockchain-based secure data sharing platform by leveraging the benefits of interplanetary file system (IPFS). A meta data is uploaded to IPFS server by owner and then divided into n secret shares. The proposed scheme achieves security and access control by executing the access roles written in smart contract by owner. Users are first authenticated through RSA signatures and then submit the requested amount as a price of digital content. After the successful delivery of data, the user is encouraged to register the reviews about data. These reviews are validated through Watson analyzer to filter out the fake reviews. The customers registering valid reviews are given incentives. In this way, maximum reviews are submitted against every file. In this scenario, decentralized storage, Ethereum blockchain, encryption, and incentive mechanism are combined. To implement the proposed scenario, smart contracts are written in solidity and deployed on local Ethereum test network. The proposed scheme achieves transparency, security, access control, authenticity of owner, and quality of data. In simulation results, an analysis is performed on gas consumption and actual cost required in terms of USD, so that a good price estimate can be done while deploying the implemented scenario in real set-up. Moreover, computational time for different encryption schemes are plotted to represent the performance of implemented scheme, which is shamir secret sharing (SSS). Results show that SSS shows the least computational time as compared to advanced encryption standard (AES) 128 and 256.
Conference Paper
Full-text available
Internet of Things (IoTs) is widely growing domain of the modern era. With the advancement in technologies, the use of IoTs devices also increases. However, security risks regarding service provisioning and data sharing also increases. There are many existing security approaches, although these approaches are not suitable for IoT devices due to their limited storage and limited computation resources. These secure approaches also require a specific hardware. With the invention of blockchain technologies, many security risks are eliminated. With the help of blockchain, data sharing mechanism is also possible. In this paper, we proposed a novel secure service providing mechanism for IoTs by using blockchain. We introduced cloud nodes for maintaining the validity states of edge service providers. The rating and cryptocurrency is given to edge servers. Given rating and incentive is stored in cloud node and updated with respect to time. The smart contract is proposed to check the validity state of the edge server as well as compare and verify the service provided by edge servers. In our proposed system we perform service authentication at cloud layer as well as edge server layer. Moreover, by using Proof of Authority (PoA) consensus mechanism overall performance of our proposed system also enhanced.By experimental analysis it is shown, our proposed model is suitable for resource constrained devices.
Conference Paper
Full-text available
The emergence of smart homes appliances has generated a high volume of data on smart meters belonging to different customers which, however, can not share their data in deregulated smart grids due to privacy concern. Although, these data are important for the service provider in order to provide an efficient service. To encourage customers participation, this paper proposes an access control mechanism by fairly compensating customers for their participation in data sharing via blockchain and the concept of differential privacy. We addressed the computational issues of existing ethereum blockchain by proposing a proof of authority consensus protocol through the Pagerank mechanism in order to derive the reputation scores. Experimental results show the efficiency of the proposed model to minimize privacy risk, maximize aggregator profit. In addition, gas consumption, as well as the cost of the computational resources, is reduced. Index Terms-Blockchain, consensus mechanism, proof of authority, privacy preserving and smart grid. I. INTRODUCTION Presently, because of the rapid growth of the world population and the technological innovations, a lot of energy is needed in a short period of time and during peak hours, and its effect increases the cost of production. Customers can, therefore, optimize their utilization based on the current energy demand and supply. As a result, demand response and dynamic pricing proposal are subject to privacy issues. In a smart grid, customers will share their hourly information load profile with a service provider only to allow a certain level of privacy to be maintained, which is a major barrier for customer participation. In order to efficiently aggregate customer data, while preserving their privacy, Liu et al. [1] propose a privacy-preserving mechanism for data aggregation. The proposed solution minimizes the cost of communication and computational overhead. However, a trusted environment is not considered. To achieve a trusted environment, several studies in [2]-[8] used blockchain as privacy-preserving mechanism for data aggregation; privacy protection and energy storage; secure classification of multiple data; incentive announcement network for smart vehicle; crowdsensing applications; dynamic tariff decision and payment mechanism for vehicle-to-grid. A survey concerning privacy protection using blockchain is discussed in [9]. The survey highlights all the existing
Article
Full-text available
Consumer (co-)ownership in renewable energy (RE) has proved successful in engaging consumers in financing RE, thus becoming “prosumers” which in turn induced positive behavioural changes in energy consumption. Providing a collective low threshold financing mechanism for RE the Horizon 2020 project SCORE implements “Consumer Stock Ownership Plans” (CSOPs) in three pilot projects in the Czech Republic (City of Litoměřice), Poland (City of Słupsk) and Italy (Susa Valley). Additionally SCORE seeks to respond to the European Buildings Initiative (part of COM(2016) 860 final “Clean Energy For All Europeans”) and in particular to the challenge to develop flexible energy efficiency (EE) and RE financing platforms at national or regional level targeting grants towards vulnerable consumers as laid out in its annex. In this context EE projects for blocks of flats can be a lever for consumer owned RE projects where the installation costs partly overlap with EE measures as for example insulation of rooftops and installation of rooftop PV systems. These EE projects typically qualify for subsidies to financing EE improvement of flats and municipal buildings and thus can cross subsidize also the investment in micro RE installations. This paper demonstrates synergies between EE measures and RE investments via CSOP-financing in blocks of flats in Poland and the Czech Republic. Empirical evidence from Germany backs these effects of consumer co-ownership. Preferential conditions for Renewable Energy Communities under the 2018 recast of the Renewable Energy Directive (RED II) will support such schemes in the future.
Article
With increasing distributed energy (DE) and storage devices integrated into power market, energy provision is becoming more complicated. The real-time pricing (RTP) is an ideal method for smart grid to balance real-time demand and shift peak-hour load. In this paper, we focus on the smart grid with integration of DE and storage devices and formulate the related RTP as a noncooperative game. In this model, both spatially and temporally coupled constraints, which couple the energy demand of all users and over all time slots, are taken into account. In addition, satisfaction maximization and cost minimization are equally considered, and DE is assumed to be kept for the user’s own use or to be sold to the smart grid. The existence of the optimal strategies in the noncooperative game are analyzed and an online distributed algorithm is further proposed to obtain the Nash equilibrium by dual decomposition. With this approach, each user can schedule the optimal energy consumption, generation and/or storage strategies while preserving the privacies of the users and the provider. Numerical results illustrate that the RTP strategy can effectively reduce peak load, balance supply and demand and enhance the welfare of each user.
Article
Natural convection heat transfer of molten salt is widely used in concentrated solar plants, such as the solar receiver, the single‐tank thermal energy storage system, and so forth. Meanwhile, adding nanoparticles into molten salts to form nanofluids can obviously improve the thermal properties of the working medium. However, the heat transfer performance of the molten salt‐based nanofluids has not been investigated extensively, and the action mechanism between base fluids and nanoparticles is still unclear. In the present work, a lattice Boltzmann model considering fluid and nanoparticles as two different phases was developed, and various interactions were taken into consideration. Meanwhile, the effects of nanoparticle concentrations, aspect ratios of the rectangular vessel, and Ra on natural convection heat transfer of solar salt‐based SiO2 nanofluids were analysed. The results show that specific heat capacity contributes substantially to heat transfer for all aspect ratios, and the maximum enhancement of natural convection heat transfer is obtained with a mass fraction of 1.0%. However, increase in Ra intensifies the effect of viscosity and weakens the heat transfer enhancement. Through interaction analysis, it indicated that nanoparticles tend to be driven to the top area of the rectangular vessel by temperature difference, driving force, and drag force. Meanwhile, a Nu enhancement contour was provided to optimize the design of a single energy storage tank.