A survey on blockchain‐enabled smart grids: Advances, applications and challenges

IET Smart CitiesVolume 3, Issue 2 p. 56-78 REVIEWOpen Access A survey on blockchain-enabled smart grids: Advances, applications and challenges Chao Liu, orcid.org/0000-0001-6473-2292 School of Electronic Engineering and Computer Science, Queen Mary University of London, London, UKSearch for more papers by this authorXiaoshuai Zhang, Corresponding Author xiaoshuai.zhang@qmul.ac.uk School of Electronic Engineering and Computer Science, Queen Mary University of London, London, UK Correspondence Xiaoshuai Zhang, School of Electronic Engineering and Computer Science, Queen Mary University of London, London, E1 4NS, UK. Email: xiaoshuai.zhang@qmul.ac.ukSearch for more papers by this authorKok Koeng Chai, School of Electronic Engineering and Computer Science, Queen Mary University of London, London, UKSearch for more papers by this authorJonathan Loo, School of Computing and Engineering, University of West London, London, UKSearch for more papers by this authorYue Chen, School of Electronic Engineering and Computer Science, Queen Mary University of London, London, UKSearch for more papers by this author Chao Liu, orcid.org/0000-0001-6473-2292 School of Electronic Engineering and Computer Science, Queen Mary University of London, London, UKSearch for more papers by this authorXiaoshuai Zhang, Corresponding Author xiaoshuai.zhang@qmul.ac.uk School of Electronic Engineering and Computer Science, Queen Mary University of London, London, UK Correspondence Xiaoshuai Zhang, School of Electronic Engineering and Computer Science, Queen Mary University of London, London, E1 4NS, UK. Email: xiaoshuai.zhang@qmul.ac.ukSearch for more papers by this authorKok Koeng Chai, School of Electronic Engineering and Computer Science, Queen Mary University of London, London, UKSearch for more papers by this authorJonathan Loo, School of Computing and Engineering, University of West London, London, UKSearch for more papers by this authorYue Chen, School of Electronic Engineering and Computer Science, Queen Mary University of London, London, UKSearch for more papers by this author First published: 20 May 2021 https://doi.org/10.1049/smc2.12010AboutSectionsPDF ToolsRequest permissionExport citationAdd to favoritesTrack citation ShareShare Give accessShare full text accessShare full-text accessPlease review our Terms and Conditions of Use and check box below to share full-text version of article.I have read and accept the Wiley Online Library Terms and Conditions of UseShareable LinkUse the link below to share a full-text version of this article with your friends and colleagues. Learn more.Copy URL Share a linkShare onEmailFacebookTwitterLinked InRedditWechat Abstract Electric power grid infrastructure has revolutionized our world and changed the way of living. So has blockchain technology. The hierarchical electric power grid has been shifting from a centralized structure to a decentralized structure to achieve higher flexibility and stability, and blockchain technology has been widely adopted in the energy sector to deal with grid management, billing, metering, and so on, because of its nature of decentralization. Here, the aim is to provide a multi-dimensional review on the technological advances of the blockchain in smart grids. Its corresponding applications based on these advances, including company projects and use cases, are summarized. Furthermore, the security threat issues in smart grids, Ethereum Virtual Machine (i.e. the operating environment of consensus mechanisms), and smart contracts are analysed, with a brief conclusion to manifest the prior tasks in building secure blockchain-based infrastructures in smart grids. As such, the challenges and features of different protocols and their applicability in each use case are identified to provide an insightful guide for future research studies. 1 INTRODUCTION Traditional power grids are generally used to carry power from central generators to a large number of customers. According to some literature studies, the characteristics of this power network mode are summarized as follows [1, 2]. Firstly, the high distribution loss is caused by long distance transmission. Secondly, distribution stations must be built, and there are high civil and installation costs. The risk rate of large-scale power supply accidents is high due to the use of integrated power supply. It is difficult to control and monitor regional power quality and performance. At present, thermal power generation is still widely used, which brings more environmental problems. In addition, its information services are lagging behind the needs of our times. The traditional power network is a rigid system. The access and exit of power supply and the transmission of electric energy are inelastic, which leads to the lack of dynamic flexibility and grouping of the power network. The vertical multilevel control mechanism is slow to respond and cannot build real-time, configurable and reconfigurable systems. The self-healing and self-recovery capability of the system is completely dependent on entity redundancy. There are many information islands in the system which lack information sharing. Although the degree of local automation is constantly improving, due to the imperfection of information and due to weak sharing ability, the multiple automation systems in the system are fragmented, local and isolated, and unable to form a real-time organic unified whole, so the intelligence degree of the entire power grid is low. In contrast, Smart Grid (SG) uses two-way flows of electricity and information to create an automated and distributed advanced energy delivery network, which is expected to be the next-generation power grid [3]. SG utilizes modern information technologies and computational intelligence in an integrated version to deliver power, which is characterized by self-monitoring, adaptive recovery and distributed generation. The new features of smart grid technology can be concluded as follows: Two-way flow: Through the use of electromechanical components, conventional grid transfers electricity and the information goes from power generating units and utilities to consumers in a single direction way. In a smart grid, it adopts Information and Communication Technology (ICT) to allow two-way communication flow, and the electricity can be delivered bidirectionally [3]. Distributed energy resources: Smart grid utilizes micro-sources such as renewable energy to form a microgrid to support distributed energy systems; however, the traditional grid system is centralized where generation and distribution are hierarchical. By utilizing micro-sources, SG can control and optimize electricity demands of local areas in a more economical and reliable way. The distributed generation promotes the development of new grid paradigms, which benefits from smart energy subsystem technologies. Storage systems can be used in virtual power plants or nearby loads. The storage system comprises the distributed electricity generators (including renewable energy from the wind, sun, tide and so on) and fast response devices including batteries and EVs, which add flexibility to the control of the microgrid. By storing energy at times of excess power and generating electricity at times of low generation, the microgrid system is capable of accommodating the power demand profile fluctuation. Furthermore, the characteristics of different storage devices can be utilized to tune the frequent and rapid power changes in renewable resources, which brings economic advantages for the microgrid as well as improves the power quality. The technological advances in the smart grid can be categorized into four groups including power and energy technologies, power system capacity, power system performance, and end-user integration [4]. In the process of energy decentralization and digitalization from a traditional hierarchical grid network to a smart grid, the main challenge is to explore the most suitable control paradigm and distributed technologies. Blockchain is a shared decentralized ledger that can support permissioned or permissionless user participation, which provides scalability, security, redundancy and adaptable applications [5]. The inherent nature and recent development of blockchain technology have made it a promising solution for energy grid advancement. Furthermore, compared with conventional SG that fully depends on the redundancy of each entity to ensure system reliability, blockchain can utilize distributed ledger technology (DLT) and consensus mechanisms that can be continuously replicated on all or at least a group of nodes in a blockchain network to avoid a single point of failure. Despite the assistance from blockchain technology, the transformation from the traditional grid structure to the smart grid still faces huge workloads from the infrastructure design, installation and requirements from various stakeholders. The challenges of the smart grid system based on the analysis of current applications are addressed as follows: Integration: The massive distributed energy resources such as solar panels and wind turbines need to be integrated into the smart grid system where power generation is intermediate and unpredictable. The interactions between the distributed resources and grid operators are highly random with different control standards and protocols so that an automated control system is required to accommodate more types of decentralized participants. Scalability: As mentioned above, the rise in the number of participants will increase the number of transactions. The latency will increase with higher user participation. And there is inherent latency of the system response time for communication, power delivery and settlement, which serves the system's scalability [6]. Security: Security concern has two aspects, data privacy and the vulnerabilities and mitigations in both blockchain and smart grids. The transaction data in a traditional grid system is exposed to various attacks which can be inferred from a user's identity and activity patterns [7]. Moreover, smart grid systems that utilize advanced ICT protocols can be compromised or eavesdropped due to fake or malicious data attacks in the network [8]. In this regard, this paper presents a comprehensive review of the blockchain technology solution to smart grid transformation from the point of technological advances in its industrial applications and, finally, the challenges and opportunities. Various use cases of blockchain applications in the energy sector demonstrate that blockchain technology will be a game changer in the future. Furthermore, the discussed challenges involve not only the security concerns in blockchain itself but also the threats and safeguards to smart grids that will act as holistic lessons for advancing the combination of blockchain and smart grids in future. Compared with the surveys [9, 10] that do not involve the security concerns related to blockchain-enabled smart grids or only show some high-level security concepts, the strength of our survey is to provide in depth security discussions on both blockchain and smart grids. Meanwhile, compared with two other surveys [11, 12] that only focus on the security and privacy of blockchain, this work also presents the challenges and countermeasures from the perspective of smart grids to offer a broader view of security and privacy for different researchers in the fields of blockchain and smart grids. Our contributions focus on technological insight to evaluate the novelty and feasibility of blockchain technology: This work provides an in-depth understanding of the advances in blockchain technology in the smart grid. We present a comprehensive state-of-the-art solution from a technical perspective which includes consensus mechanisms and smart contracts, and SG operational side, including energy infrastructure and markets. Based on the technological advances, the blockchain-enabled energy sector applications with prospective fields are identified from current pilot projects and trials. A systematic review of the current use cases is provided according to the consensus mechanism type, which emphasizes on the energy system infrastructure design for different scenarios. By analysing the security issues in the smart contract and Ethereum Virtual Machine (EVM), which are two fundamental entities for storing and running consensus mechanisms applied in the energy sector, we conclude the primary missions to develop a more secure running environment for consensus mechanisms in future. The rest of the paper is organized as follows: Section 2 provides an overview of blockchain technology including terminologies and technologies. In Section 3, blockchain technology in smart grids is presented with key elements and advances. Section 4 reviews state-of-the-art real use cases from pilot projects based on consensus mechanism applications. Section 5 presents a security threat analysis and the challenges exposed in the smart grid and blockchains, and Section 6 provides the conclusion and the scope of future work. A list of abbreviations is also included in Table 1. TABLE 1. A list of common abbreviations Smart Grid SG Electric vehicle EV The Internet of Things IoT Information and Communication Technology ICT Environment Virtual Machine EVM Peer-to-peer P2P Proof of Work PoW Proof of Stake PoS Byzantine Fault Tolerance BFT Proof of Authority PoA 2 OVERVIEW OF BLOCKCHAIN TECHNOLOGY Blockchain technology is primarily known from cryptocurrency applications which are viewed as the first stage blockchain. However, blockchain technology is envisaged to have the capacity to reform financial markets, supply chains and business-to-business services [21]: • Digital securities trading: proof of ownership for asset registries and title transfer of hard assets to secure recording of intangible assets [22]. • Foreign exchange: executes currency exchange and conversions such as Coinbase (wallet) and Kraken [23]. • Digital identity: protects the privacy of consumers by providing an immutable digital identity for users. • Supply chain: improves transparency in supply chain records with the certification of manufactured products or diamonds certification [24]. The variety of proposed applications expect blockchain technology to bring significant process optimization and novel business models. The potential lies in the DLT which can redefine digital trust and remove intermediaries which disrupt traditional forms of hierarchical governance. The disruptive nature of blockchain technology is able to use consensus within the network to enable an open-source and transparent community to support decision-making and system running. 2.1 Blockchain deployment Blockchain is a shared and trusted DLT that permits the recording of any digital asset transaction between parties over a decentralized network, which is initially developed as a mechanism to record financial transaction [25]. Bitcoin is known as the first blockchain application, and the technology is continuously evolving [26]. The advanced features of blockchain are a genuine combination of several techniques including distributed computing, cryptography, peer-to-peer (P2P) communication and game theory, where technological and economic primitives are elegantly considered [27]. Data integrity is guaranteed via the nature of the distributed feature, and the encryption system that uses public and private keys offers users the ability to sign transactions [28]. Blockchain can also be classified as the parent chain and side chain according to the relationship between chains. The comparison between different types of blockchain is demonstrated in the Table 2. • In a public blockchain, there are no access restrictions for any participant. The transactions on the blockchain are available for checking and all peers are allowed to make transactions. Typical applications include Bitcoin and Ethereum. A public blockchain is used in cryptocurrency, e-commerce, Internet banking, etc. [29]. • In a consortium blockchain, update operations are only allowed for its consortium members. Only the selected set of nodes are responsible for executing the consensus mechanism in the network. It is generally suitable for making payments, accounting and auditing between banks where one block can be globally confirmed after confirmation from two-thirds of the nodes. • A private blockchain is applied in private organizations for database management and auditing. The value of private blockchain is that it provides a secure, trackable, immutable and automated platform [28]. TABLE 2. Comparison among public blockchain, consortium blockchain and private blockchain Public blockchain Consortium blockchain Private blockchain Consensus process Permissionless participation Consortium member (permissioned participation) Permissioned participation Centralized Decentralized Multi-centred Centralized Data transparency Public Private Private Reward policy [13] Yes Optional No Trust model Untrusted Semi-trusted Trusted Consensus mechanisms PoW, PoS, DPoS [14] BFT-based (e.g. PBFT, RAFT [15]) BFT-based (e.g. RAFT [16]) Large energy consumption Low energy consumption Low energy consumption Finality [17] No Enabled Enabled Scalability Good Bad Bad Transaction throughput (per second) 3–200,000 1000–10,000 1000–100,000 Transaction approval frequency Slow Medium Fast Use cases Cryptocurrency [18] Payment, accounting [19] Auditing, database management (within the organization) [20] 2.2 Blockchain operations A complete blockchain system is composed of complex technologies, for example, digital signature and time stamps for data storage, consensus mechanisms in the P2P network, mining and PoW, bitcoin wallet for an anonymous transaction technique, Merkle tree for data structure, and so on [30]. It is because of the aforementioned technologies that the blockchain system is constantly transacting, validating and expanding. The fundamental components of blockchain technology are shown below: • Data block: Transactions are stored in the data block where the block generation rate is roughly 10 min for each block, and each data block contains a header and body. The header encapsulates the version, previous block address, timestamp, nonce, Merkel root, etc., and the body contains the transaction counts and details [31]. Each transaction is permanently stored in the data block and available for checking by anyone. And the Merkle tree in the block body applies a digital signature to each transaction so as to ensure that the transactions are not repeated or forged [32]. • Mining and forks: Mining is the process of searching a random number (nonce) which makes the hash value satisfy the requirement for gaining the right block selection [33]. The newly generated block will be broadcast immediately for validation in case of fraud, and the blocks can be traced back through the hash value. However, there will be forks when two miners successfully mine two blocks at almost the same time. After forking, the system will continue mining and choose the parent chain by calculating the maximum proof-of-work where the fork chain will be abandoned [34]. It has also been noted that some mining techniques require huge energy consumption to compute, which can have significant social and economic impacts [35]. • Timestamps: In the blockchain system, the node needs to add the time stamp when generating a new block to record the block write time. The following block will add an approved time stamp to certify the previous block, which forms a long-term increasing time chain. The timestamp is a significant parameter for the proof of existence, which ensures the immutability of the blockchain system [36]. • Unspent Transaction Outputs (UTXO) [37]: UTXO is the basic unit in the bitcoin transaction process. Except for the genesis block, all transactions (Tx) in the block contain the origin of the funds (TX_in) and the output of the funds (Tx_out). Only the UTXO stored in the network nodes with the digital signature can be transacted. In this way, the system does not need to check its complete transaction history to confirm its legitimacy. • Hash function: The hash function codes the original transaction data into a fixed-length string, which is composed of numbers and alphabets [38]. This process is single directed so that the coded hash value cannot be interpreted [39]. SHA 256 is the most commonly applied hash function using the Merkle–Damgard function to generate a 256-bit hash value [40]. • P2P network [41]: P2P network is a distributed application framework that is used to assign tasks and workloads between peers. A blockchain system is established upon IP communication protocols and distributed networks. Each node in the peer network has equal rights which do not exist in any centre point or hierarchical structure. 2.3 Blockchain smart contracts With the complex design of smart contracts, it can be applied to many areas such as database systems, financial derivative services, etc. [42]. Generally speaking, a smart contract cannot be intervened by human activities once it is successfully deployed. The Ethereum is a blockchain platform supporting smart contracts, and the advantages of smart contracts can be concluded as follows: • Real-time updates: A smart contract supported system responds in almost real-time as it does not need an intermediary or third-party authentication, which largely increases transaction efficiency. • Accuracy: The execution of each contract term is pre-defined and under the program's control, where all outputs are accurate and predictable [43]. • Low human intervention: Once a smart contract is deployed, the content of its contract cannot be revised by any parties so that any fraud or dishonest behaviour is punishable by the contract [44]. • Low operation cost: The system can achieve low-cost transactions by removing human involvement in transaction, enforcement and compliance costs [45]. Smart contracts are user-defined programs that determine the rules of writing on the ledger [46]. It is a computer protocol that is capable of self-executing and self-verifying without human intervention once it is deployed on the network [47]. In the technological aspect, smart contracts are executable programs that make changes on the ledger and are automatically triggered when being called or when a specific requirement needs to be met. Before deploying a smart contract, the contract terms and logic flows are made with relevant standards. Then they are recorded in computer language encoding legal constraints and terms of agreements. A smart contract usually provides an interface for human–contract interaction which complies with the recorded logic and rules [48]. With the integration of cryptographic technology, the interaction activities can be authenticated to ensure that the contract is executed without any collisions or fraudulent activities in the process [49]. For example, the management of bank accounts can be viewed as a set of smart contract applications. In the traditional banking system, operations such as withdrawal and deposit need authentication from a centralized bank, and the system cannot run without the bank’s supervision. With the aid of smart contracts, any operation can be programmed with strict logic flows and the system runs by calling the smart contract. In Figure 1, it depicts the logical workflow for the smart contracts on the Ethereum platform. Users can define the smart contracts using programming languages such as Solidity, Serpent and Lisp Like Language, which need to be translated into the EVM bytecodes [42]. Then the code is deployed on the Ethereum nodes with the cost of GAS using the Ethereum cryptocurrency for miners’ confirmation. After it is successfully deployed, users can obtain an address for the contract and the interface. The Javascript API interface provided from web3.js can be used for calling contracts and making interactions [50]. FIGURE 1Open in figure viewerPowerPoint The process of smart contract deployment and calling on the Ethereum platform As a complex combination of various technologies, blockchain is an elegant design of computer science, telecommunication, cryptography and economy. The core technologies includes consensus mechanism, unlocking script [51], Merkel proof [52], transaction rules [38], Recursive Length Prefix [53], etc. In particular, this thesis focuses on the following technologies: A smart contract that resides on blockchain and allows the automation of multi-step processes to self-execute the distributed heavy workflows is envisaged in the energy industry and the Internet of things [54]. The use of a smart contract in blockchain technology is driven by open-source agreements, which also provide the potential to balance supply and demand in the transactional energy market. A smart contract also provides insight into allowing the automation of multi-step processes to self-execute the distributed heavy workflows, which is envisaged in the energy industry and the Internet of things. The consensus mechanism guarantees its robustness against misbehaviour and against malicious participants and incentivizes participants to validate transactions [36]. Hence, blockchain is a promising technology for broad business sectors where transparency, trust and efficiency are needed as it can help design and deploy a proper consensus mechanism. 2.4 Consensus mechanisms In a distributed system, multiple peers form a network cluster through asynchronous communication where states need to be replicated between different hosts to ensure consistency in all the peers [55]. However, if any of the peers in the cluster encounters attacks or failure, it might cause network congestion and broadcast tampered messages in the network. Hence, a fault-tolerant protocol is needed in the unreliable asynchronous network to ensure a consistent consensus among all the peers. As for the blockchain-based distributed ledger, the primary concern is to realize the correctness and consistency of the transaction data from different ledger nodes [56]. The consensus mechanisms in blockchain are the mechanisms or set of rules that enable all the full nodes to reach an agreement or consensus over the order of transactions [57]. There are many types of consensus mechanisms in different blockchain applications or scenarios such as Proof of Work (PoW), Practical Byzantine Fault Tolerance (PBFT), Proof of Stake (PoS), RAFT, Proof of Authority (PoA), etc. After converging of the blockchain consensus process, the final confirmed block/order of transactions is referred to as the consensus finality [58]. It is worth noting that Directed Acyclic Graphs (DAG) could be an alternative to the traditional blockchain technology and can be categorized as a DLT [59]. It differs from blockchain in how transactions are added to a network, and it aims to improve the existing speed, scalability and cost issues of blockchain technology. Furthermore, by addressing the energy consumption issue generated from resource-intensive designed mining protocols, more studies have also explored the benefits of renewable resources to mitigate those negative environmental externalities [60]. 2.4.1 Proof of Work Bitcoin is one of the most widely used blockchain systems that use PoW to solve the critical challenge of reaching consensus among participants [18]. PoW requires participants to dedicate computation time and energy towards work (mining), where the processes of initiating this consensus mechanism are called miners. Miners are required to solve a hash code crypto puzzle before encapsulating the transactions into a new block [61]. The miners repeatedly select a nonce, which is the difficulty in solving the puzzle to obtain a result lower than the threshold, whereas the network peers fight using their computation source. In this way, it is nearly impossible for a single attacker to jeopardize the system by modifying the block and solving the puzzle due to extensive computation. So the system can only be controlled or attacked if someone gains 51% of the total network hash power [62]. Undoubtedly, there is a huge waste of energy and it requires a constant global effort. It is claimed that Bitcoin and Ethereum burn over $1 million worth of electricity and hardware costs per day for running the consensus mechanisms [63]. Moreover, in order to reduce the number of forks in the chain, Bitcoin's PoW is designed to produce a new block in an average of 10 min and the difficulty of mining a new block is increasing. The PoW protocol has proved that it scales to a large number of users for public use. However, transaction rates and finality are comparatively low [64]. The recommended waiting frame is six blocks before accepting a transaction, which makes it impossible for many applications such as electricity trading [65]. 2.4.2 Byzantine Fault Tolerance The origin of BFT algorithms is their work on Byzantine faults which deal with unpredictable actions in computer networks when encountering hardware breakdown, network congestion or malicious attacks [15]. The problem concerns a set of Byzantine generals to agree on a joint plan of action during the war. Generals need to perform a joint action in coordination with the different parts of an army to attack simultaneously; however, the message can only be delivered by senders due to the huge territory. The challenge is to ensure that loyal generals reach a consensus on the plan of attack such that traitors cannot disrupt the attack plan. It is