Blockchain, an alliance for secure energy transactions in the Industrial Internet of Things

Abstract

Peer-to-peer (P2P) energy transactions are ubiquitous in the Industrial Internet of Things (IIoT), such as microgrids, energy collection networks and vehicle-to-grid. But in these cases, mistrust and opaque energy markets pose the usual security and privacy challenges. In order to solve the security challenge, we propose a secure energy trading system named Energy blockchain by using consortium blockchain technology. The energy blockchain can be widely used in the general case of P2P energy transactions free of trusted intermediaries. In addition, to reduce transaction restrictions caused by transaction confirmation delays on the energy blockchain, we propose a credit-based payment scheme to support fast and frequent energy transactions. An optimal pricing strategy for credit – based loans using Stackelberg game is also proposed. Security analysis and numerical results based on real data sets show that the proposed energy blockchain and credit-based payment schemes are secure and efficient in IIoT.

Key words – Blockchain, Energy Trading, Industrial Internet of Things (IIoT), security and privacy, Stackelberg game

I. introduction

The Industrial Internet of Things (IIoT) has attracted great attention from academia and industry, which is an important part of the future transformation of industrial systems [1], [2]. IIoT provides interconnection and intelligence for industrial systems through sensing devices and actuators with universal networking and computing capabilities [3]. However, it is a huge challenge for industrial systems to meet the increasing energy demands of IIoT applications, and the number and performance requirements of IIoT nodes are increasing [4], [5]. To address this challenge, previous studies have proposed peer-to-peer (P2P) energy transactions between IIoT nodes (e.g. electric vehicles) [6]. IIoT nodes can exchange surplus energy with other nodes via P2P to partially meet energy demand, improve energy efficiency and reduce transfer losses used to promote green industrial systems.

Many emerging technologies have been introduced into green industrial systems, such as energy collection, wireless power transmission and vehicle-to-grid [7]. Combined with these technologies, industrial systems will develop various efficient and sustainable P2P energy trading schemes [6]. Here are three typical P2P energy trading schemes for IIoT.

  1. Microgrids: Smart buildings with solar panels or wind turbines can form microgrids, in which buildings collect environmental energy and exchange energy between microgrids in a PEER-to-peer manner.

  2. Energy collection network: Industrial nodes with energy collection capability can obtain energy from renewable sources or charge themselves via mobile chargers using wireless power transmission in P2P energy transactions.

  3. Vehicle-to-grid networks: Electric vehicles that act as energy storage devices perform charging operations at load valleys and return their energy to the grid to reduce load peaks. Vehicles can also sell energy to nearby charging vehicles in P2P mode with the help of local aggregators [8], [9].

While P2P energy transactions play a critical role in IIoT, there are still common security and privacy challenges for the average P2P energy transaction scenario.

1) It is not safe for IIoT nodes to conduct large-scale decentralized energy transactions in an untrusted and opaque energy market. 2) IIoT nodes with excess energy may be reluctant to participate as energy providers due to privacy concerns [10]. In this case, there is an imbalance between energy supply and demand between IIoT nodes. 3) In P2P energy transactions, there is an intermediary to review and verify the transaction records between IIoT nodes.

Such intermediaries suffer from problems such as single points of failure and privacy leakage [11]. Therefore, it is important to design a unified and secure energy trading system for various energy trading scenarios in IIoT [11]. In addition, there is a need to encourage more IIoT nodes with excess energy to act as energy distributors by designing appropriate incentives.

More recently, blockchain technology has been studied in energy transactions due to its advantages of decentralization, anonymity and trust. Blockchain, an open, distributed ledger that records transactions in a verifiable and permanent way, is the underlying architecture of Bitcoin. Aitzhan proposed a digital currency “NRGcoin” based on bitcoin protocol for renewable energy transactions in smart grid [12]. [11] A multi-signature blockchain approach to secure transactions in distributed smart power grids. However, due to the high cost of setting up a common blockchain in energy-constrained IIoT nodes, existing methods may not work well for PEER-to-peer energy transactions between IIoT nodes.

Our previous work [9] has shown that federated blockchains have the potential to build decentralized power trading systems with moderate costs. Federated blockchains are specific blockchains with authorized nodes that are used to maintain distributed shared databases. Based on [9], this paper further utilizes alliance blockchain technology to develop a unified and secure P2P energy transaction system based on alliance blockchain, namely energy blockchain. Energy blockchain can be widely adopted in different scenarios of IIoT, including the car-to-grid scenario in [9]. Instead of focusing on the pricing of power transactions in [9], we first observe the typical P2P energy transaction scenario in IIoT. We then proposed a unified energy trading framework that includes energy buyers, sellers and aggregators. Energy blockchains are built on pre-selected energy aggregators (EAG) to publicly audit and share transaction records in public energy trading scenarios without the need for trusted intermediaries. In addition, similar to bitcoin, transaction confirmation delays on energy blockchains limit fast transactions, leading to inefficiencies [13]. To address this challenge, we designed a credit-based payment scheme to support fast and frequent energy transactions. IIoT nodes can complete quick payments by applying for loans based on their credit from credit banks. An optimal loan pricing strategy for credit banks is proposed to maximize the utility of credit banks in IIoT.

The main contributions of this paper are as follows:

1) Unified Energy Blockchain: We look at typical energy transaction scenarios in IIoT and build a cost-effective unified energy blockchain for IIoT.

2) Credit-based payment: In order to reduce the limitation of transaction confirmation delay, we designed a credit-based payment scheme to support frequent energy transactions, thus realizing fast payment.

3) Optimal pricing strategy: For credit-based payment schemes, we propose an optimal pricing strategy for credit-based loans based on Stackelberg game to maximize the utility of credit banks. Numerical results show that our energy blockchain and credit-based payment scheme are effective.

II. IIOT’s blockchain energy transaction

A. Unified P2P energy trading framework

In IIoT, P2P energy transaction activity takes place between IIoT nodes all the time to balance energy supply and demand. Figure 1 shows the three typical P2P energy transaction scenarios mentioned in section 1, namely, microgrids, energy collection networks, and vehicle-to-grid networks. For these typical energy trading schemes, it is crucial to provide a unified energy trading framework, thus establishing an energy blockchain for secure energy trading [14]. The unified energy trading framework consists of three parts:

1) Energy nodes: IIoT nodes (e.g., smart buildings, industrial sensors, and electric vehicles) play different roles in P2P energy transactions: energy buyers, sellers, and idle nodes. Each node chooses its own role based on the energy situation and future work plan.

2) Energy aggregator: EAG acts as an energy broker to manage transaction-related events and provide wireless communication services to IIoT nodes. EAG corresponds to different physical entities in different energy trading scenarios. For example, an advanced metering infrastructure in a microgrid could be EAG. Augmentation-based workstations with computing and storage capabilities in an energy collection network can be EAG. In vehicle-to-grid, local aggregators can act as EAG.

Figure 2 shows the four entities in the EAG: the transaction server, the credit bank, the account pool, and the memory pool. The trading server collects energy requests from the energy nodes and matches the energy trading pairs of those energy nodes. Here, a digital cryptocurrency called Energy Coin acts as a digital asset for energy nodes, used to trade energy in IIoT [9]. Each energy node has an energy coin account to store personal transaction records. This account has a corresponding wallet to manage personal energy coins. We use a random alias as the public key of the energy node wallet (called the wallet address) to replace the real address of the wallet to protect privacy. The mapping between all wallets and the corresponding wallet address and energy coin account is stored in the local account pool. The account pool in the EAG records and manages energy coin funds in the personal wallet address of the energy node. The memory pool stores all transaction records of the local energy node.

3) Smart meter: Each IIoT node has a built-in smart meter that can calculate and record the amount of energy traded in real time. Energy buyers pay energy sellers based on smart meter records.

B. Unified energy blockchain for secure P2P energy transactions

In order to support secure P2P energy transactions, we established an energy blockchain based on a unified P2P energy transaction framework using the Alliance blockchain. With traditional blockchains, an important transaction audit phase, known as the conformance process, is performed before the transaction record becomes a blockchain. This phase is performed by all nodes in a traditional blockchain at a high cost. In contrast, the energy blockchain performs a conformance process on the pre-selected EAG at a modest cost. These EAGs collect and manage their local transaction records. After the consistency process between EAgs is completed, the transaction records are organized into blocks and thus stored in the memory pool.

Here are more details on the key operations of the energy blockchain with the help of EAG. Table 1 lists the main terms used in energy blockchains.

1) System initialization:In the energy blockchain, we use an effective Boneh-Boyen short signature scheme (secure key distribution based on identity cryptography) for system initialization. Each energy node becomes a legal entity after being registered with a trusted authority, such as a government department. Have a real identityThe energy node I joins the system and obtains its public and private keys () and Certificates (). certificateCan be used to uniquely identify an energy node by binding its registration information. Node I gets a set of ω wallet addresses from the authority. Authorizing authority to generate mapping list {} and store the list in the account pool. When node I performs system initialization, node I uplows the wallet address it is using to its nearest EAG account pool. Node I checks the integrity of its wallet and downloads the latest data about its wallet from the memory pool and credit bank in the EAG. Memory pools store all transaction records in the energy blockchain, and credit banks record credit-based payments.

2) Select the role in the energy transaction: For P2P energy transaction, the energy node selects its role (i.e. energy buyer and seller) according to its current energy situation and energy demand for future work plan. Energy nodes with excess energy may become energy sellers to meet the local energy needs of energy buyers.

3) Energy transaction between buyer and seller: Energy requests (including the amount of energy from the energy buyer) are sent to nearby EAG’s trading server. The transaction server in the EAG acts as a controller to calculate total energy requirements and broadcast those requirements to local energy vendors. EAG acts as an energy broker for energy Nodes, setting transaction prices based on the current energy market and incentivizing local energy vendors to participate. The energy vendor determines that it sells energy and returns the response to the controller. The controller matches energy supply and demand between energy nodes. The energy is then transferred from the energy seller to the corresponding buyer via power lines or wireless power transmission.

4) Pay with energy coins: As shown in Figure 2, the energy buyer transfers the energy coins from his wallet to the wallet address provided by the energy seller. Energy buyers who do not have enough energy coins can apply for tokens from credit banks based on their credit rating to complete their payment. The third part gives more details. The energy vendor retrieves the latest blockchain data from EAG’s storage pool to validate the payment activity. Energy buyers set a new record. These transaction records are verified and digitally signed by the energy vendor, so they are uploaded to the EAG for review. After that, credit lines for energy sellers and buyers were increased.

To balance energy demand and supply in the energy blockchain, we provide incentives to encourage energy nodes to meet local energy needs for their own benefit. Energy sellers in the EAG who contribute the most to energy supply for a certain period of time are awarded energy coins based on the energy flow contribution measurement between energy buyers and sellers. This is a specific proof of work for the energy node of the energy contribution, called the proof of work (i.e., the total amount of energy traded).

5) Building blocks in energy blockchain:EAG collects all local transaction records for a specified period of time and then encrypts and digitally signs these records to ensure authenticity and accuracy. Figure 2 shows thisTransaction records are organized into blocks. For traceability and validation, each block contains one toAn encrypted hash of a previous block in an energy blockchain. Like in Bitcoin, EAG tries to find its own proof of valid data auditing work (that is, hashes that meet certain difficulty values). EAG relies on the random number ϕ, the hash value of the previous block, the timestamp, the hash tree of the transaction, etc. (represented as) [15] to calculate the hash value of its block. That is,. Here, the system adjusts the difficulty to control the speed at which a particular ϕ is found. After finding a valid proof of work (i.e., ϕ), the faster miner (EAG) broadcasts the block and the particular ϕ to the other EAG. Other EAG reviews and validates transaction records and ϕ in the block. If other EAGs recognize the block, the data in the block will be added to the energy blockchain in a linear, chronological order, and the fastest miner will be rewarded with energy coins.

6) Implementation of the consensus process: the consensus process is carried out by the authorized EAG and the leader of the fastest EAG with valid proof of work. Figure 3 shows that the leader broadcasts block data, timestamps, and proof of work to other authorized EAGs for verification and review. For mutual monitoring and verification, these EAGs audit block data and broadcast the audit results to each other with signatures. Upon receipt of the audit results, each EAG compares its results with other EAGs and sends the response back to the supervisor. This response includes EAG audit results, comparison results, signatures and records of audit results received. The responsible person analyzes the response received from EAG. If all EAGs agree to block data, the leader will send the record including the currently audited block data and corresponding signatures to all authorized EAGs for storage. After that, the block will be stored in the joint blockchain and the leader will be rewarded with energy coins. If certain EAGs are inconsistent with the block data, the leader will analyze the audit results and send the block data back to those EAGs for review if necessary.

The energy blockchain has good scalability and can keep up with the network size of a large number of IIoT nodes. Unlike public blockchains, the consensus process for energy blockchains takes place on a small number of authorized EAgs [16]. With the development of the network, predefined nodes can also expand their computing power and storage resources as the number of transactions increases [17]. When authorized EAG formation is complete and remains constant, the total time required to reach a new block consensus is stable regardless of network size [18].

III. Fast P2P energy transaction payment based on credit

In an energy blockchain, all authorized EAGs are required to review and verify transaction records in the new block (the consensus process). The consensus process takes a certain amount of time to complete (called transaction confirmation time). The energy coins used for transaction and payment will eventually reach the corresponding wallet address. Although the transaction confirmation time in our energy blockchain is shorter than that in Bitcoin (about 60 minutes) [19], [20], frequent trading of energy by IIoT nodes is still inconvenient and impractical. Some energy buyers may not have energy coins to trade energy frequently. To solve this problem, we designed a credit-based payment scheme to support fast transactions, so frequent P2P energy transactions can be carried out through energy coin loans.

In Figure 4, each credit bank in the authorized EAG acts as a trusted bank node with sufficient energy coins. The credit bank provides an energy coin loan to the energy node based on its energy value, and the energy coin is then transferred from the credit bank’s account to the wallet address shared between the credit bank and the borrower. More details on the steps for a credit based payment scheme are provided below.

1. Token request:

The borrowerEnergy buyer I, who does not have enough energy coins, can apply for a token based on the credit value obtained from the local credit bank to complete the payment.

Step 1: Send to EAG M containing real identityCertificate,, all used wallet addresses, loan amountAnd current creditRequest, i.e

Step 2:On receipt of requestAfter that, the credit bank verifies against the records in the account pool and the credit bankIdentity and check givenThe flow of funds. So credit banks calculateThe current wealth of.

Step 3:It is allowed when the following conditions are metGet a token:

A)Energy coin accounts have some wealth in them;

B) The account has a fixed income (for example, selling its energy to earn energy coins);

C)Is not negative.

Credit bank calculatesThe best loan amount and the corresponding interest rate and penalty rate, namely the loan price. For more details on loan pricing, see Section 4.

Step 4:Credit bank creates a shared wallet () and combine the public and private keys of this wallet (i.eand) sent to the.isShared wallet address with credit bank.And credit banks are allowed to use the energy coins in the wallet and recharge the wallet if necessary.

Step 5: Receive the following response, which includes the token () and the signature of the token() :

Among them

and

Here,Including current balance, loan amount, certificate of AuthorizationWallet,The expiration period t, the repayment buffer of the loan buffer and the previous loan history.The energy coin loan will be repaid during the buffer period, otherwiseWill be subject to late fees (i.e., fines).By loan repayment recordsAnd previous credit based payment historyHash values of. inWhere, S is the amount of loan repayments in the buffer of previous loan records, while F is the amount of loans not repaid on time.

2. Energy coin payment:

During energy trading,Use the purseThe energy coin completes the payment. Each wallet-based payment is verified and recorded by a local credit bank. Credit banks put hashes of data related to payments into pre-records for review if necessaryThe wealth. For more details on the payment operation, see below.

Step 1:The borrowerInclude the following tokens (), token signature and Certificate of Authorization () is sent to the energy seller.validationIn theandExpiry date (i.e. T) and check all previous credit-based payment records in the energy blockchain to confirmCurrent balance in

Step 2will, energy bills, address of wallet used to receive energy coins () and the digital signature of the above information is sent to the credit bank:

Step 3:Credit bank through credit bank with original recordsVerify received by comparing. Credit bank inspectionIs the balance sufficient to pay the bills? If so, then the credit bank will purseIn the energy coin transfer toTo complete the payment. If not, the credit bank sends a notice of insufficient balance to.

Step 4:After that, the credit bank is updatedandAnd add its digital signature to the new tokenIn the. The above credit-based payment history is reviewed and recorded in the energy blockchain, while a new token is sent to the buyer for renewal.

3. Energy coin loan repayment:

At the end of the token validity period,The latest token will be received, including all usesThe hash of a credit – based payment record.

Here are three cases of loan repayment.

1) Case one: IfPaid off the energy coin loan within the repayment buffer,The interest is repaid to the credit bank as a transaction cost. The interest rate is calculated in section 4.

2) Case TWO: IfCan not repay the loan in time, thenThe f in will increase by one, reducing the buyer’s creditworthiness. The buyer’s new credit is expressed as

Among themIt’s the credit for the NTH energy transaction. D is constant and d is greater than 0. Credit banks generate a record of this event, so they store the record in the memory pool and upload it to the energy blockchain. When the buyer finally pays off the energy coin loan,Still subject to a penalty on the amount of the loan.

3) Case three: IfIf the borrower refuses to repay or is unable to repay the loan over a long period of time (for example, one year), the credit bank will blacklist the borrower and broadcast this information to all nodes in the energy blockchain. All IIoT nodes and credit banks will then refuse to work with the borrower.

IV. Optimal loan pricing in credit-based payments

In this section, we introduce the definition of the problem with regard to the amount and pricing of the energy coin loan (i.e., interest rate and penalty rate) to enable the borrower to maximize the economic benefits of the credit bank. Energy buyers who do not have enough energy coins act as borrowers and apply for loans from local EAG credit banks. Borrowers who are energy buyers can then purchase energy from energy sellers.

A. Problem expression

In the local EAG M, for the debit, credit bank M (i.e) the loan amount provided is expressed as. hereand.The minimum energy demand is expressed as.Is the given price of energy before the loan application. The credit bank must submit to BiprovideTake out a loan to make energy payments. We think the local credit bank has enough energy coins to support the borrower’s loan request. If the local credit bank does not have enough energy coins for the borrower to use, nearby credit banks can cooperate to support loan requests in the energy blockchain.Is expressed as the satisfaction function

Among themandisPredefined factors of.The utilization rate of is expressed as

Among themIs the repayment capacity of the loan, i.eThe probability that the loan can be repaid within its repayment buffer.Can be achieved byRepayment Record(mentioned in Section III). At this point,.Is the lending rate on which credit banks depend.It’s the penalty rate for late payments. We believe that the relationship between interest rate and penalty rate is[21]. hereIs a predefined factor, such as 3.5.That’s when the loan starts.

The remuneration of credit banks includes fromLoan interest, and ifLate fees (i.e., penalties) for failing to repay loans on time [21]. The management fee of the credit bank is.isUnit cost of the lender bank. Therefore, the economic interests of credit banks are defined as follows:

Among themIs a predefined credit rating factor, depending onCredit rating given by credit bank (here).It’s based on the borrower’s loan history. The credit rating of energy buyers is divided into different grades according to the credit value of energy buyers. Higher credit ratings lead to higher. The relevantFor more details on values, see section V-c.

Non-cooperative Stackelberg games typically study the multi-level decision-making process of many independent decision makers in response to the decisions made by the game leader [22]. In this paper, we develop a non-cooperative Stackelberg game in which the credit bank is the leader and the borrower is the follower. The credit bank ultimately determines the penalty rate for each borrower individually (i.e). Each borrower will be subject to the penalty rate given by the credit bank at the maximum loan limit (i.e) to respond. The strategic form of game G is defined as

The objective functions of the leader (i.e., credit bank) and follower (i.e., borrower I) in the local EAG are expressed as follows respectively:

(That is, the bank isThe penalty rate is the sum of the maximum earnings of the borrower to the maximum loan lineMaximize utilization)

B. Solutions

We use backward induction to solve SE (Stackelberg equilibrium, namely Nash equilibrium) of the game mentioned above [23]. First of all to solveOf the optimal loan amount (i.e), and the credit bank determines the optimal interest rate and penalty rate.

By pairing (2)Asked aboutThe derivative of theta, we have theta

That means that UI is strictly concave. We solved this problemTo obtain the best strategy, as follows:

Among them

We substitute PI (8) into PI (3), and then

To illustrate, we simplify the equation as follows:

Among them

Based on theAsked aboutThe derivative of theta, we have theta

whenWhen, we haveand. whenfor

and

There wereand. Utilization functionFirst it increases and then it goesIncrease and decrease. The function is strictly concave [24]. There is a maximum. So we go throughGet the optimal strategy

whenWhen,. So we have. For simplicity, we can rewrite the bank’s optimal strategy in the following way:

and

To achieve a Stackelberg balance (SE), the credit bank needs to communicate with each borrower. Algorithm 1 is proposed to provide a distributed way for all borrowers and credit banks in order to iteratively reach the unique SE proposed by the game.

Theorem 1: In the proposed Stackelberg game G, a unique SE can always be obtained between the credit bank and the borrower in set B [22].

Prove the utilization function in :(2)The relative to theDifferentiation is strictly concave,, i.e.,. So for any penalty rateEvery borrower has a uniqueTo maximize the. Obviously, given the strategies chosen by all players in the game, game G reaches SE when all borrowers and credit banks (i.e., players) reach their respective optimized utility. So, obviously, once the credit banks find the best price, the proposed game G will reach SE, and the borrower chooses its only loan amount. From (11), we notice thatRelative to theIt’s strictly convex. Therefore, the credit bank can find the only optimal price according to the borrower’s strategy. Therefore, there is a unique SE.

V. Safety analysis and numerical results

In this section, we first provide a security analysis of energy blockchains. We then evaluate the performance of energy blockchains and use real data sets to analyze the performance of credit-based payment schemes.

A. Security analysis of energy blockchain

Unlike traditional communications security and privacy protection, our energy blockchain uses federation chains to ensure the security and privacy of energy transactions. The security performance related to blockchain is as follows [25].

1) Get rid of trusted intermediaries: In our energy blockchain, IIoT nodes trade energy in a PEER-to-peer manner, unlike traditional centralized transactions that rely on globally trusted intermediaries. With the help of the authorized EAG, all IIoT nodes have equal energy trading rights. Energy blockchains are powerful and scalable without the involvement of globally trusted intermediaries.

2) Wallet security: Without the corresponding key and certificate, no opponent can open the wallet of the IIoT node and steal energy coins from the wallet. Since each IIoT node has a unique wallet that corresponds to its coin account, we use multiple wallet addresses as pseudonyms for this wallet to protect privacy.

3) Transaction authentication: All transaction data is publicly reviewed and authenticated by other entities, including IIoT nodes and trusted EAG. It is impossible to harm all entities in the energy blockchain because there would be huge costs. Even if the EAG is broken, problematic transaction data is still found and corrected before it is constructed into blocks.

4) Data unforgerability: The decentralized nature of the Federated blockchain combined with digitally signed transactions ensures that no adversary can form an IIoT node to disrupt the network. This is because an adversary cannot forge the digital signature of any node or gain control over most of the network resources [25]. An adversary that controls one or more EAgs in the energy blockchain cannot learn anything about the raw data because it has been encrypted using the key of the IIoT node. An adversary cannot falsify audited and stored data in the energy blockchain [19].

5) No double spending: Energy coins rely on digital signatures proving ownership and public transaction histories to prevent double spending. Transaction histories are shared using P2P networks and agreed upon using proof-of-work.

B. Energy blockchain performance analysis

We compared transaction confirmation times for different energy transaction frequencies in different blockchains and evaluated the performance of the average transaction speed of our proposed credit-based payment scheme. In this case, transaction speed refers to the number of energy transactions completed in an hour. Average total transaction confirmation time refers to the average time to complete the energy transaction consensus process of an energy node. For illustrative purposes, we simulated 240 minutes of performance between 50 pairs of IIoT nodes. Similar to Bitcoin, the transaction confirmation time of traditional blockchain is 60 minutes, while our energy blockchain transaction confirmation time is 10 minutes [20]. In our energy blockchain, the total number of preselected EAgs is 51. For IIoT nodes, energy transaction frequencies within an hour are equally probabilistic from {1, 2, 3, 4, 5} sets. Each IIoT node has 20 energy coins in its wallet for PEER-to-peer energy transactions.

Figure 5 (a) shows that for traditional blockchains (such as Bitcoin), the average total transaction confirmation time for energy nodes is longer than for our energy blockchain as the frequency of energy transactions increases. This is because our energy blockchain only performs a consensus process on the pre-selected EAG, not all connected nodes in a traditional blockchain. Figure 5 (b) shows the average transaction speed of energy transactions in different scenarios. During the energy transaction period, IIoT nodes that do not have enough energy coins cannot conduct the next energy transaction until the last transaction completes the consensus process. Thus, as shown in Figure 5 (b), traditional blockchains and our energy blockchains have an upper limit on average transaction speeds within 1 hour. Thanks to the credit banks in EAG, our credit based payment schemes have higher transaction speeds on average. These credit banks supply enough energy coins to IIoT nodes to continuously execute energy transactions on the energy blockchain without the restriction of transaction confirmation delays. The results show that our proposed scheme supports fast P2P energy transactions and, therefore, frequent energy transactions between IIoT nodes.

C. Performance analysis of credit payment

We investigate the performance of the proposed credit-based payment scheme based on the real data set of loans issued by the Lending Club in [26]. This data set includes current loan status (for example, full payment), latest payment information, credit limit, address, and so on. According to the Loan Club’s loan data, there are 890,000 observations, 35 of which have gradually improved credit ratings (” A1 “, “A2”, “… “). , “B1”, “B2”, “…” , “G4”, “G5”), as shown in Figure 6. For the IIoT, we considered 100 borrowers with credit ratings ranging from A1 to G5. The NTH credit rating has a corresponding credit rating factorN =35. The probability that the borrower belongs to the specified credit grade is distributed according to the probability distribution histogram in Figure 6. Five groups were divided into five credit banks to apply for energy coin loans. The credit bank, which has a limited number of energy coins each, offers loans to only 20 borrowers. We performed two heuristic energy coin allocation schemes to compare performance with our proposed scheme. One heuristic allows borrowers to apply for a random number of energy coins from five credit banks (called the Random number option, or RAS). Another is that borrowers can apply for average amount of energy coins (called average amount plans, or AAS). Our program makes the best pricing decision for the borrower based on the borrower’s information such as income, loan history, credit worthiness. More parameters about our proposed approach are listed in Table II.

Figure 7 (a) shows a performance comparison of the energy coin allocation scheme. For example, we set the loan rate to 0.1 in RAS and AAS. We note that in our proposed scheme, the credit banks can gain the best economic benefits. The five credit banks in our proposed scheme have an average economic return 64.8% higher than AAS and 226.9% higher than RAS. Similar results can be found in Figure 7 (b). The five randomly selected borrowers in our proposed program had an average economic return 24.1% higher than AAS and 5.7% higher than RAS.

FIG. 8 shows the convergent changes of the economic benefits of randomly selected credit banks and the optimal loan amount of randomly selected borrowers respectively. Note that after 19 iterations, economic returns and optimal loan amounts converge rapidly to their optimal values, respectively.

Figure 9 shows the credit rating factorsImpact on the performance of credit banks, as wellImpact on borrowers. FIG. 9 (a) shows that asWith the increase of credit banks, their economic profits decline. This is because borrowers with higher credit ratings are more likely to repay their loans on time, reducing penalties for credit banks. As shown in Figure 9 (b), the repayment capacity of the borrowerIt has a positive impact on the average economic interests of borrowers. In conclusion, according to Figures 5 to 9, our proposed energy blockchain and credit-based payment scheme is effective and efficient for energy transactions in IIoT.

VI. Conclusion

In this paper, we propose a unified energy blockchain based on the Alliance blockchain for secure energy transactions in various typical scenarios for IIoT, such as microgrids, energy collection networks and vehicle-to-grid. We also designed a credit-based payment scheme to overcome transaction restrictions caused by transaction confirmation delays, which supports fast and frequent energy transactions through credit-based payments between energy nodes. We propose Stackelberg game for optimal pricing of energy currency loans to maximize the economic benefits of credit banks. We performed security and performance analyses to evaluate energy blockchain and credit-based payment schemes separately. Security analysis shows that our energy blockchain achieves secure energy transactions, and numerical results show that energy blockchain and credit-based payment schemes are effective and efficient for energy transactions. There are several interesting issues that need further investigation, such as optimal EAG options, specific scenarios designed for extreme situations, including IIoT nodes with excellent or bad credit values.