Blockchain-Based Power Trading Process

78 Abstract. Recently, the paradigm of the power industry has been digitalization with the focus on renewable energy. With this shift toward an energy–information and communications technology (ICT) convergence accelerator, there will also be many changes that affect energy policies. In particular, in terms of energy demand management, there will be regional-centric self-reliant decentralization, and the activation of distributed energy resources (DERs), including renewable energy, will result in the deployment of microgrid-type virtual power plants on a region-wide basis. This paper designs a blockchain-based power transaction process in which individuals (producers) can produce and use power themselves or sell the remaining power to others, rather than transmitting and using the developed power from the existing centralized power grid.


Introduction
Recently, people-to-people (P2P), people-to-machine (P2M), and machine-tomachine (M2M) digital and information and communications technologies (ICT) processes are entering a hyper-connected society that is closely connected online and offline. A hyper-connected society refers to a society where people, processes, data, and objects can be linked together to create new values and innovations through intelligent networks. In particular, ICT applications in the power industry can lead to the efficient operation of existing energy systems, as well as to the creation of new values, such as the combination of renewable energy support and power storage devices, electric vehicles (EVs), and the development of various energy services.
The energy sector is also expected to accelerate the transformation of the energy system, and to contribute to a drastic change in daily life through the fusion of technological elements of the fourth industrial revolution under a smart grid base centered on the power industry. Energy storage technology, combined with small distributed energy resources, plays an important role in system-linked or standalone operations, such as microgrids and virtual power plants (VPPs). Integrated operation of microgrids, VPPs, and energy management systems (EMSs) allows optimal power production and consumption, and enable regional-unit energy production and consumption at the same time. For example, using weather data and a geographic information system to predict renewable energy generation, or effectively managing renewable energy facilities that rely heavily on natural conditions, will contribute to optimizing energy production and consumption in certain areas.
As such, the technology of the fourth industrial revolution can be used to construct a convergence system centered on distributed power, and to optimize existing facility operations in the process of transition to a low-carbon energy system. The future energy system is expected to be a form of adjustment (demand response) in the supply and demand balance based on regional-energy selfsufficient systems utilizing distributed energy sources (e.g. stand-alone microgrids, virtual power plants, etc.). In the demand management sector related to energy consumption, fourth industrial revolution technology will strengthen ICT-based demand management, including energy savings and demand response, and will contribute to the development of new energy business models.

Small power brokerage market in operation
The energy prosumer has emerged, producing and using electricity, and selling extra power from an owned small power plant. Electric vehicles, smart home appliances, smart buildings, and smart houses have increased in number. It is now a hyper-connected society where all of these are connected due to the development of digitalization and ICT. Telecommunications and information technology companies are entering new fields in the power industries, such as microgrids, EV charging infrastructure, and energy storage and management, and convergence is accelerating.
In addition, many factors, such as changes in the internal and external environment, advances in ICT, and the spread of the shared economy, have combined to create aggregated business opportunities in the power sector. They create value by gathering and optimizing energy, information, and services among the various participants, or by promoting exchange.
Economies of scale are needed for small-scale power players in order for distributed power, demand response, and battery storage to have influence. The energy aggregator performs this role.
The energy aggregator's business model is based on dividing profit that generates collecting, sharing, and optimizing of assets held by multiple customers. The area where energy aggregator activity is most active is demand response.
Aggregation businesses have also started in areas such as total distributed power, renewable energy, and P2P power trading.
There are also commercialized VPP projects in some countries that collect power generated by renewable energy, using these projects as a single power plant. Aggregators have also emerged that provide intermediary platforms for the energy prosumer to sell any remaining electricity to neighbors and regions.
Countries around the world are continuously introducing power transaction brokerage services that collect electricity produced by small distributed power plants (i.e., VPPs) and that sell it to the power market. The size of the global VPP market is growing by 30 percent annually, from $190 million in 2016 to $710 million in 2021. It operates cloud-based software on the Internet of Energy (IoE), like a power plant, without large-scale power generation or investment in power transmission facilities, in order to collect and sell power from a large number of small distributed sources. Global energy companies in countries such as Australia, Germany, and Japan are actively carrying out VPP demonstration projects, and Korea revised the Electricity Business Act in December 2018 to allow power transaction brokerage projects for electricity generated or stored by small distributed power sources of under 1 MW. Tesla plans to build and install solar energy (5 kW), batteries (13.5 kWh in each), and a smart meter system for at least 50,000 households in South Australia by 2022, integrating it into cloud-based software in the world's largest virtual power plant. Combined, it can meet the power demand of 75,000 households, or 20 percent of the total electricity demand in South Australia, with 250 MW of solar power and 650 MWh stored in batteries, and it can save up to 30 percent on household electricity bills.
This concept of the IoE is a network infrastructure that integrates energy and data/information, enabling power generation and energy storage capacity to be balanced with energy demand in real time. The IoE will enable active integration of advanced metering infrastructure (AMI), demand-response, e-prosumers, vehicleto-grid EVs connected as power consumption and storage media, and various distributed power and energy storage devices and grid management.
The IoE will present a groundbreaking methodology for monitoring and communicating energy distribution, energy storage, and energy grids by providing a variety of information and connectivity to the energy grids in conjunction with buildings, cars, and cities. It will also leverage renewable energy, energy storage, smart meters, energy gateways, smart plugs, and consumer electronics to provide energy consumers, manufacturers, and utility providers with new and powerful tools to reduce resources and costs, and control and manage target devices.

Home energy management system
As IoE technology advances in establishing an integrated network between smart home appliances and small distributed power sources, home energy management system (HEMS) markets for energy reduction and supply and demand management in homes and regions are growing. The global smart home energy management system market is expected to grow from $1.3 billion in 2017 to $3.7 billion in 2023. It is predicted that integrated systems that can be compatible and that can interact with a variety of devices, rather than stand-alone systems that are only linked to specific devices, will drive growth of HEMS markets. If the existing system is to help save energy at home, it will have to develop to optimize energy supply and demand at a regional level, and analyze data collected in the cloud through smart meters and intelligent AMIs to predict energy consumption patterns in each household and power demand in the region. Robotina, a home energy management system company in Slovenia, installs smart meters and HEMS controllers on power distribution boards in the home to analyze the power usage patterns of each home appliance device and collect data on a cloud-based smart grid platform.
Artificial intelligence technology optimizes power consumption in the home, including turning off the power of consumer electronics devices that are not in use. By combining the collected data, electricity rates, and weather information, the technology then turns the devices on again when electricity rates are the lowest. Furthermore, the smart grid platform enables joint purchase and transactions of electricity, and provides data collected by individual households to the power supply network to optimize energy supply and demand in the region.
In response to the spread of microgrids and the advancement of the IoE technology, domestic energy companies need to develop services that enhance compatibility with networks and key devices and security related to energy data," said Kim Bo-kyung, a senior researcher at the Korea Institute for International Trade. "Considering connectivity with core IoE network devices such as an energy storage system (ESS), smart meters, and intelligent metering infrastructure as well as smart home devices, the convenience of integrated solutions is maximized, and the vulnerability of data security as the IoE network deployment becomes more advanced can result in serious costs. We should actively consider ways to utilize blockchain technology, which is difficult to falsify," he said. "We need to expand our hardware-centric business strategy to the level of a solution or platform to gain the upper hand in the energy prosumer market, which is in its initial formative phase.
With the IoE, energy can be delivered in both directions, anytime anywhere, and monitoring of energy consumption will be available at all levels, from individual units to regional, national, and global units. The IoE provides consumers with a reliable, flexible, efficient, and economical energy supply network, allowing them to combine centralized large-scale power plants with distributed, small, renewable energy sources, such as solar and wind power, as a single fusion system. For this purpose, a system with blockchain-based smart solutions is needed to implement energy trading in the autonomous form of the region by introducing a model of virtual power plants in the region.

Blockchain technology coupling
Recent moves have been made to actively adopt smart technologies to enable and efficiently manage VPP-personal power transactions (P2P). Blockchain technology in P2P transactions minimizes the role of intermediate interventions for secure and free transactions. In the case of a VPP, the integrated manager can participate in the power market while optimizing distributed resources by obtaining data related to power production and consumption using IoT technology, machine learning, and artificial intelligence.
One of the factors that have brought new energy projects into the spotlight is blockchain technology. By sharing energy supply and transaction information to distributed plants through blockchain technology, many types of decentralized services can be introduced to energy prosumer markets. The size of the global blockchain-based energy service market is expected to grow from $390 million in 2018 to $7.11 billion in 2023. Because real-time exchange of energy and related data between users is possible, even without a central server, the cost is reduced, and it can be applied to a variety of energy services due to excellent security and new speeds. Areas where related infrastructure construction and deregulation have been preceded by actual commercialization have entered the stage of materializing business models, with the focus on power trading between individuals.
Large companies and start-ups are actively participating in business models in China, Europe, and the U.S. with investment in renewable energy. For example, in the U.S., LO3 Energy is generating profits from power transactions between individuals in the form of trading of distributed power generation, such as solar power, among local residents in the form of a blockchain, while LO3 Energy makes profits through sales of power transaction commissions and smart meters. Denmark's M-PAYG provides small solar panels and batteries to local residents in developing countries, and requires them to use power for mobile payments. It currently operates a dollar settlement system, but plans to introduce a blockchain payment system. This paper designs a blockchain-based power transaction process that allows individuals (producers) to produce and use power themselves or sell the remaining power to others, rather than transmitting and using the developed power from the existing centralized system.

Energy cloud
The concept of the energy cloud comes from cloud computing, a service that uses all computing resources over the Internet, from applications to data. The energy cloud is a platform for the integration and competition of advanced technologies and solutions to gain market share within a dynamic market. In the field of power, large-scale centralized power supply structures, such as thermal, hydro, and nuclear power, are being transformed into decentralized ones. Distributed power is being extended to regulations on carbon emissions and the advent of the prosumer. In addition, the installation price of distributed power is cheaper and cheaper compared to existing power sources. These changes converge with the diversification of technologies like cloud computing, and evolve beyond distributed power. Technologies such as energy storage, energy efficiency improvement, and demand response will evolve into an energy cloud that allows power grids to be controlled. The energy cloud has economies of scale, flexibility, and resiliency. The energy cloud transformation increases distributed power, generates and sells power on its own, and results in a growth of the smart grid market.

Dag-type blockchain: iota
If the existing generation of blockchain is made in the form of a linear structure, the Internet of Things Association (IOTA) is the blockchain of a new nonlinear structure. Because of its nonlinear structure, it has the advantage of being able to handle all transactions in parallel, and the speed of transactions increases with more participants. In particular, if all blockchains had previously existing miners and participants, the IOTA would operate in a form that would allow all participants to approve and issue transactions equally. The IOTA operates a trading system based on the structure of the directed acyclic graph (DAG), called Tangle. The directed acyclic graph is one of the graph types, and is a non-circular directional graph. When you look at Figure 3, the peak of the graph is oriented and connected to another peak, but there is no cycle separately, and it cannot return to itself on any path. Tangle uses algorithms that leverage the direction of the DAG among transactions that accumulate over time to select tips based on the weight and reliability of a particular transaction (Popov, 2017).

Tangle
Tangle consists of a structure in which participants must approve two previous deals in order to request a transaction. The criteria for which a transaction is selected are determined by the tip selection algorithm (TSA) and are randomly chosen according to the cumulative weight of the transaction. In order to approve the selected transactions, the user requesting the transaction must go through proof of work (PoW). Although it is a calculation process similar to a blockchain, the actual amount of calculations required is not large, and all participants can proceed with the transaction without a fee, since the role given without paying the fee is a condition to approve the transaction. This is an optimized transaction structure for M2M micropayments that do not require high computational volumes and do not have fees. Looking at Figure 4, there are three types of transaction that the Tangle network makes: first is a fully fixed transaction, second is an inconclusive deal, and finally, a tip. This is determined by the confinement level of the transaction, which is determined by the number of times the previous transactions are approved directly or indirectly by newly created tips (Gal, 2015).  Figure 5 is a way to ensure that the trading system of the Tangle network is maintained normally. Currently, the IOTA Foundation does not disclose the number of traders participating in, and the amount of transactions in progress within, the Tangle network. But if malicious users take advantage of the low unit and processing time of transactions when the network participates on a small scale, the transactions of other users may not be approved normally, taking up more than a certain percentage of the transactions in the Tangle network. So, the IOTA Foundation is now determining whether certain transactions, called milestones, are being approved in the network, occurring every two minutes on the coordinate nodes. Snapshot removes a portion of the Tangle network that has passed a certain time, and stores only the required portion of the user's information related to that part of the network as a way to avoid overloading the network as it grows. This eliminates the need for participants to store all status information for the Tangle network.
In this paper, the service structure is created so that rapid processing and trust can be achieved simultaneously with the focus of the Internet of Things service, which requires real-time operation in the third-generation blockchain IOTA, mentioned in Section 2.2.

Blockchain for power trading
Blockchain technology is expanding its use from the parts that can be applied to transactions that exclude intermediary agencies. It is emerging as a hot topic in various applications, such as the Internet of Things and self-driving cars in financial transactions that can reduce virtual currency functions and transaction fees. In addition, various projects are underway in the energy sector, and many changes in existing power trading and supply systems are expected when they become commercialized [4,5,6,7,8]. In fact, blockchain-based technologies are applied to transaction systems that compensate for solar power production in Solar Coin prosumer trading systems that produce solar energy and that trade surplus electricity between neighbors, and electric vehicle charging stations (CSs).
A blockchain-based system for energy trading consists of three parts (Aujla AND Kumar, 2019). There is an energy trading system between EVs and CSs, a computer system using Edge as a service, and a blockchain-based safe energy trading mechanism using Edge as a service.
EVs in smart cities must be charged with energy from CSs placed in various locations. EVs need to exchange energy with a CS in geographic locations in order to achieve maximum benefits in terms of energy and price. Similarly, a CS sells the available energy to maximize profits. However, transferring data from an EV to the cloud or a server could cause a higher delay and incur additional costs for an energy transaction service provider. To overcome this, edge computing reduces additional delays and costs by enabling data processing and decision-making closer to enduser locations. Blockchain systems are used to provide security for transactions between electric vehicles and charging stations. The consensus algorithm is used to validate transactions shared between the approver nodes in the blockchain. All nodes selected as edge nodes serve as approver nodes used to calculate EV work.
(1) Transaction initialization: EVs that initially wish to exchange energy with a CS transmit authentication information to trusted nodes. The edge node then calculates the hash function to initialize transactions on the network.
(2) Block header generation: Once the deal for an EV is finalized, the block headers are generated by calculating the hash from the muckle hash tree.
(3) Block validation and activity proof generation: The approver node calculates PoW for each transaction to be added from the blockchain upon receipt of a message from the edge node. All edge nodes present in the network act as approver nodes to validate transactions in that EV. All approver nodes calculate PoW, and when more than 50% of the general agreement is reached, the transaction is added to the blockchain according to the result.
(4) If the value of the PoW corresponds to the received message, the block shall be deemed to have been verified on the approver node. All approver nodes calculate the PoW for the EV and send the results to the transaction server. If there is consensus on the general agreement that more than 50% of the blocks on the node are valid, the blocks are added in the blockchain; otherwise, the transaction is discarded.
Meanwhile, Dinh et al. (2018) announced how blockchain could be used to address data privacy issues in the Internet of Things (IoT). Through a smart contract, a system model with access control mechanisms was developed to allow users to fully control their data and track how third-party services access the data.  controlled data access using blockchain models and attribute-based encryption systems in the Internet of Things environment to protect personal information. In order to achieve granular access control, a smart shield was used to create a licensed permission access control table (PACT), and the owner first places a smart shack on the access control table of the block chain.

Smart contract
The smart contract was first proposed by Nick Szabo in 1994. The existing contract is written, and in order to fulfil the terms of the contract, the actual person must perform per the contract terms. However, if you create a contract with a digital command, you can execute the contract automatically according to the terms.
The smart contract creates contracts for the terms of transactions between traders, monitors contract performance over a blockchain network, and can execute contracts quickly without separate verification by the central system as to whether the contract was fulfilled or not by automatically executing the contract. Through the smart contract, consumers and suppliers can quickly trade and settle production and savings energy, and further reduce transaction fees incurred through brokerage houses.
The smart contract operates as seen in Fig. 7 inside the blockchain network when transactions occur. All nodes in the network will share content registration transactions and will store them in the transaction database. After this step, the smart contract application is executed according to the contents of the transaction, and the results are reflected in the smart contract database.

Blockchain-based power trading process
In this paper, a power trading process based on blockchain is constructed as shown in Fig. 8. Fig. 8 is largely divided into the access device layer, the blockchain layer, and the edge layer. The access device layer is a user layer that attempts to access shared data using smart devices, while the blockchain layer is configured for data access and security. The edge layer is configured to identify the users accessing the data, and provides the data. (1) The user accesses the smart contract using a smart device.
(2) A smart contract requires a threshold to operate.
(3) The user requests a threshold from the certification node.
(4) The certification node requires the user to have a DACT consisting of an identity of things (IDoT). The certification node matches the DACT that is delivered to the DACT that was registered by the user in advance. When matched, the threshold is given to the user.
(5) The user executes the smart contract using the threshold.
(6) The user receives the hash address of the shared data from the smart contract that has been activated.
(7) The data are transferred to the service node, which provides the shared data. The delivered service node shares data with the owner's privacy information if the number of hash addresses received is more than one.
The proposed system consists of a blockchain-based secure energy trading mechanism using edge-as-a-service.

Conclusion
In this paper, we worked out a blockchain-based power trading model that allows individuals (producers) to produce and use power themselves or sell the remaining power to others. In other words, if prosumer1 wants to purchase electricity through blockchain's smart contract function and requests a transaction with prosumer2, which sells electricity, it generates trading information as a block, and anonymously releases the trading information to participants and utilities in power trading, which is verified and blocks previous trading.