A Sustainable Home Energy Prosumer-Chain Methodology with Energy Tags over the Blockchain

: In this paper, we aim to provide a power trade system that will promote a sustainable electrical energy transaction ecosystem between prosumers and consumers of smart homes. We suggest a blockchain-based peer-to-peer (P2P) energy transaction platform be implemented to enable efﬁcient electrical energy transaction between prosumers. We suggest the platform be built on the blockchain, as this technology allows a decentralized and distributed trading system, and allows a more transparent, trustworthy and secure P2P trading environment. We believe that such characteristics of the blockchain are necessary in electrical energy transactions within the smart home environment because the smart home aims to enhance user comfort and security, along with energy conservation and cost-savings. First, we classify the two different types of P2P trade to identify which will best beneﬁt from the use of the suggested blockchain-based P2P energy-transaction platform. Within the two types of P2P trade, that we classify (pure P2P trade and hybrid P2P trade), the hybrid P2P trade will beneﬁt more from a blockchain-based P2P energy-transaction platform. In the blockchain-based P2P energy-transaction platform, a smart contract is embedded in the blockchain and called an energy tag. The energy tag will set conditions for making every future energy transaction more cost-efﬁcient while maintaining the most ideal and high-quality energy selection. With the blockchain-based energy tag in the energy-transaction process, multiple energy resources and home appliances will be democratically connected in order to provide users with high-quality, low-cost energy at all times and locations. In this paper, we provide simulation results that compare the unit price of electrical energy on the suggested platform to the unit price of electrical energy set by currently existing conventional power-generation companies. Additionally, we present simulation results that calculate how long initial investments to create a smart home environment that enables P2P energy transactions will take to be paid back. Based on simulation results, we believe that, in the long run, the suggested blockchain-based P2P energy-transaction platform will create a sustainable energy-transaction environment between consumers and prosumers, and the expanding ecosystem will enable the development of a trusted, sustainable, secure and energy-efﬁcient energy transaction environment.


Introduction
The very beginning stages of smart homes were aimed at enhancing the convenience of home owners.From the 1960s, when smart homes and smart home appliances were first introduced, devices equivalent to smart refrigerators were developed.Starting in the 1990s, developers concentrated on introducing smart homes that were more aware of user healthcare, and implemented gerontechnology into the home [1].More modern developments of smart homes have not moved far from this technological trend, as the development of automative technology has led to the concentration on user convenience within the home and workplace [2][3][4].This has led to the enhancement of user-centric smart homes and, furthermore, smart cities.
Whereas user convenience used to be the focus for smart homes, starting from the early development of the concept, the goal has been somewhat attained due to recent technological developments.Now, interest is increasingly being turned towards energy-efficient smart homes.
In the smart environment, the energy domain plays the role of the energy prosumer or the equivalent role, and each prosumer aims to make their home a more energy-efficient and cost-efficient sustainable home.Surplus energy from self-production can be sold on energy markets or energy domains in the vicinity for profit.We classify 10 energy domains within the smart city; conventional power-generation company, solar power-generation company, wind power-generation company, large-capacity energy-storage system operator, energy-storage system for buildings, energy-storage system for homes, electric vehicle-charging station, electric vehicles, smart homes without energy-storage systems, and smart buildings without energy-storage systems.
Currently, most energy-transaction systems operate as counter trade, with the conventional power-generation company being the central ledger.This energy-trading system is less cost-efficient, since energy at singular, fixed rates is provided to homeowners.Peer-to-peer (P2P) trade can be an option between prosumers, but issues of trust, security and efficiency regarding P2P exchange remain unsolved in the current energy market.
Currently in Korea, the Korea Electric Power Corporation (KEPCO) has a monopoly in energy transactions.KEPCO is the current sole electrical energy provider in Korea, and all households go through KEPCO in order to purchase energy.Although the idea of having a singular ledger that is in charge of all energy transactions may be convenient, issues such as flat electrical energy prices that disallow for market competition disable consumers making the most cost-efficient energy purchase choices.Additionally, the fact that KEPCO enjoys a monopoly in the electrical energy trade leads to a need for more substations to be built over time, which is a less sustainable choice from an environmental and economic perspective.
We believe that a method of solving the current security and trust issues in energy exchange is to provide an energy tag, thereby allowing the most cost-efficient energy connection of multiple energy resources and home appliances for high-quality and low-price energy.This optimal choice will allow for the smart home to become a truly sustainable home.In this paper, we suggest that the blockchain be implemented to further enhance the trust, transparency and security in a distributed and direct P2P energy-trading system.We will suggest a blockchain energy-transaction model along with scenarios and simulation results that will prove that the suggested transaction platform will create sustainable environments for smart home dwellers, energy-providing companies, and society.
In Section 2 of this paper, we will introduce previous works that have presented efforts to make a more sustainable environment for the home, building or city.In Section 3, we will provide a brief definition of the blockchain, smart home and smart city, and will introduce our definition of sustainability and the electrical-energy domain classification and energy-trading systems between energy domains.In Section 4, we offer a design for a blockchain-based P2P energy transaction platform.Section 5 will introduce the classification and trading scenarios of energy domains, and simulation results acquired.Finally, in Section 6 we will discuss and finalize the results and provide an outlook for the proposed transaction technology.

Previous Works
Creating energy-sustainable buildings has been a core interest for decades.Previous works have already presented efforts to create an energy-efficient and sustainable environment for the home, building and city.Moreno et al. presents a low-cost localization system in the context of smart buildings.The system focuses on energy sustainability, which connects to savings of costs, while creating a non-intrusive and low-cost solution for users [5].
Pan et al. notes that current green buildings, which are designed for environmental sustainability, are not energy efficient due to the centralized and static building controls that most buildings operate on.Therefore, the research presents an internet of things (IoT) framework with smart location-based automated and networked energy control.Smartphone platforms and cloud-computing technologies enable a multiscale energy proportionality, which includes user, building, and organizational-level energy proportionality [6].Efforts to attain environmental sustainability occur not just on a local level.Recently, national efforts have been made to further implement strategic energy consumption and management in order to create sustainable cities and environments [7][8][9][10].
Compared to previous energy-sustainability efforts made, efforts to adapt a smart grid system or blockchain-based system to increase energy efficiency are relatively new but not completely novel.As early as 2014, implementing the blockchain into an energy system has been constantly suggested and experimented with [11].The very early attempts made by Mihaylov et al. utilized a digital currency, NRGcoin, to encourage prosumers to trade locally-produced renewable energy using the digital currency.While the currently existing Bitcoin trade consumes computing power, the idea of NRGcoin was that the currency was created by injecting energy into the grid.Since then, the blockchain has been brought up frequently as a solution for increasing energy efficiency and lowering costs due to the decentralized characteristics it offers.
Mannaro et al. present the Crypto-Trading project, which aims to utilize a blockchain-based smart grid for the management of electricity to efficiently manage energy demand and supply in order to improve distribution networks, while regulating the consumption of energy.Additionally, the project aims to monitor and analyze electricity consumption by final consumers separately from electricity suppliers.All in all, the project's main goal is to promote a decentralized and intelligent energy production and distribution project, thereby ultimately satisfying local consumption [12].
Mengelkamp et al. also present a blockchain-based smart grid to provide energy prosumers and consumers with a decentralized market platform.This eliminates the need for a central intermediary, creating an operational auction mechanism for small communities.The goal of the blockchain-based smart grid structure was to create a decentralized market that would be advantageous in terms of market price, while creating a secure, transparent transaction log for energy transactions [13].
This paper distinguishes itself from previous works by presenting a decentralized blockchain-based structure that will enable prosumers and consumers to trade directly and efficiently.The premise is that the structure will be able to adjust to and compare current electrical-energy market prices, allowing users to trade more cost effectively than before.The goal of this paper is to suggest an electrical-energy transaction platform that will allow for high-quality, low-cost energy transaction between prosumers and consumers at all times in all places.

Definitions of Sustainability
It is important to first define the term "sustainability".The Cambridge Dictionary defines sustainability as "the idea that goods and services should be produced in ways that do not use resources that cannot be replaced and that do not damage the environment" or "the ability to continue at a particular level for a period of time [14]".
Ghaffarian Hoesini notes that the term sustainability "bases and enforces on interdisciplinary and incorporates the mutual enrichment of society, environment and economy [15]."Although there are numerous definitions of sustainability, the general definition of sustainability in the smart home includes controlling energy performance while enhancing the life quality of users [15].Wang et al. notes that by the late 20th century there was a rising interest in environmental sustainability, and by the 21st century, being "sustainable" implied that natural resources are finite but reusable, and consumers should begin to seek value in secondary and repurposed manufactured goods.In order to create this environmentally and economically sustainable environment, product prices must reflect true costs, indicating that environmental impacts during manufacturing and disposal should also be indicated in monetary costs [16].
Previous definitions focus on environmental sustainability and, furthermore, focus on how to create an environment that will allow for such environmental sustainability.In this paper, we define sustainability as being able to maintain an energy prosumer environment that can further create environmental and economic benefits for society and users.We make this definition so that it will fit the notion that the blockchain-based P2P energy transaction platform will be able to create a sustainable energy transaction ecosystem between prosumers, consumers, and current energy providers.The ecosystem will be achieved since users will see benefits in utilizing the proposed energy-transaction platform, as the platform aims to further provide users with economic benefits and energy efficiencies.
Figure 1 above compares the current energy-transaction process and the energy-transaction process that we suggest in this paper.The figure on the left depicts the current energy-transaction process in which KEPCO, a conventional power-generation company in Korea, is the sole provider of energy.Even if consumers and prosumers decide to collect their own energy for use through personal photovoltaic cells (PVs), all transactions must go through KEPCO, which leads to a complete monopoly by KEPCO in the energy market.This prohibits direct trade between energy prosumers and other consumers, which then disables prosumers and consumers from trading with the most cost-efficient and high-quality energy choices.All consumers must purchase energy from KEPCO, which is set at a flat price by the company.Additionally, if the number of customer PVs increases, KEPCO is forced to increase the size of energy-storage systems (ESS), which requires additional infrastructure costs while decreasing prosumer profitability.
consumers should begin to seek value in secondary and repurposed manufactured goods.In order to create this environmentally and economically sustainable environment, product prices must reflect true costs, indicating that environmental impacts during manufacturing and disposal should also be indicated in monetary costs [16].
Previous definitions focus on environmental sustainability and, furthermore, focus on how to create an environment that will allow for such environmental sustainability.In this paper, we define sustainability as being able to maintain an energy prosumer environment that can further create environmental and economic benefits for society and users.We make this definition so that it will fit the notion that the blockchain-based P2P energy transaction platform will be able to create a sustainable energy transaction ecosystem between prosumers, consumers, and current energy providers.The ecosystem will be achieved since users will see benefits in utilizing the proposed energy-transaction platform, as the platform aims to further provide users with economic benefits and energy efficiencies.
Figure 1 above compares the current energy-transaction process and the energy-transaction process that we suggest in this paper.The figure on the left depicts the current energy-transaction process in which KEPCO, a conventional power-generation company in Korea, is the sole provider of energy.Even if consumers and prosumers decide to collect their own energy for use through personal photovoltaic cells (PVs), all transactions must go through KEPCO, which leads to a complete monopoly by KEPCO in the energy market.This prohibits direct trade between energy prosumers and other consumers, which then disables prosumers and consumers from trading with the most cost-efficient and high-quality energy choices.All consumers must purchase energy from KEPCO, which is set at a flat price by the company.Additionally, if the number of customer PVs increases, KEPCO is forced to increase the size of energy-storage systems (ESS), which requires additional infrastructure costs while decreasing prosumer profitability.The figure on the right side depicts the energy transaction process that will be made possible based on the energy platform suggested in this paper.This paper aims to suggest a blockchain-based P2P energy-transaction platform that allows prosumers and consumers to trade energy in a direct and secure method that guarantees that users obtain and sell high-quality energy at the optimal price.The P2P energy-transaction platform reflects energy prices, which shift constantly based on the level of supply and demand within the market.The energy-transaction process operates based on the sellers' and buyers' will to sell and purchase energy at any time, and each transaction is made directly between prosumers and consumers, eliminating the need for a central ledger such as KEPCO.This The figure on the right side depicts the energy transaction process that will be made possible based on the energy platform suggested in this paper.This paper aims to suggest a blockchain-based P2P energy-transaction platform that allows prosumers and consumers to trade energy in a direct and secure method that guarantees that users obtain and sell high-quality energy at the optimal price.The P2P energy-transaction platform reflects energy prices, which shift constantly based on the level of supply and demand within the market.The energy-transaction process operates based on the sellers' and buyers' will to sell and purchase energy at any time, and each transaction is made directly between prosumers and consumers, eliminating the need for a central ledger such as KEPCO.This new energy-transaction ecosystem then, in turn, shifts KEPCO's or any other conventional power-generation company's role in the energy market.Now that consumers and prosumers are no longer limited to energy-transaction choices provided by KEPCO, it can no longer maintain its monopoly as a single energy provider.Thus, KEPCO then becomes another prosumer in the energy market instead of maintaining its sole role as an energy provider.This also eliminates the need for KEPCO to increase the size of ESSs, because now KEPCO is not the central ledger that is in control of all electrical-energy transactions made between consumers and prosumers, cutting extravagant infrastructure-investment costs for KEPCO.We believe that this new, sustainable ecosystem enabled by the blockchain-based P2P energy platform suggested in this paper will enable a truly energy and cost-efficient energy-transaction environment for all prosumers and consumers of energy.

Definitions of Smart Home and Smart City
The smart home has various definitions, with the expectation that the home becomes a smart entity itself.The general definition of a smart home is a "residence[s] equipped with a high-tech network, linking sensors and domestic devices, appliances, and features that can be remotely monitored, access or controlled, and provide services that respond to the needs of [their] inhabitants [1]".The smart home has a promising outlook, as the general expectation is that the future smart home will meet goals such as enhancing domestic comfort, user convenience, strengthening security, and increasing leisure while simultaneously being energy efficient [17].Additionally, the general expectation for smart homes is that it must be equipped with advanced technologies that enable the automation of functionalities [2] and promote comfort, safety, the well-being of dwellers, and energy-conservation actions [3].The smart home sets itself apart from previous houses because it has a key goal in providing a sense of security and comfort to users through functional automation [4].Although the outlook is promising, the smart home has challenges.Besides the obvious technical challenges in achieving a completely sustainable and convenient environment, the smart home poses challenges in initial installation and maintenance, challenges in adoption for users, interoperability between systems, and lack of privacy and security [17].
There is a lack of a clear definition of the smart city, but based on previous works, the smart city offers key characteristics that are not far off from the smart home.Many authors define the smart city as a structure that is intended to manage or mitigate problems generated by rapid urbanization and population growth through the highest efficiency and resource optimization.Problems that the smart city aims to resolve include waste management, mobility, energy supply, etc. [18].Additionally, the smart city is considered to be an integrated living solution that efficiently connects various aspects to improve the quality of life for citizens of the city [19].Commonly, the smart city involves components such as natural resources, infrastructures, power, transportation, education, healthcare, government and public safety to enhance the life of citizens [19].Like the smart home, the smart city also focuses on the sustainability of resources and applications [19].Of course, the smart city itself is challenging to establish, due to the costs and resources required in achieving and maintaining a smart city, regulatory systems, and technical challenges [19].
The smart home and smart city are, inevitably, interrelated, and both aim to essentially achieve a sustainable environment for not only current users and citizens, but future users and citizens as well.Energy efficiency is key to achieving those goals for the smart home and smart city.Thus, it is essential to understand current energy domains within the city, and how those domains play into energy provision to the smart home and smart city.

Energy-Domain Classification
Within the smart city, the energy domain plays the role of the energy prosumer or the equivalent role.The energy prosumer is defined as a subject that can simultaneously produce and consume energy.To prosume energy, the energy prosumer holds production lines such as renewable power-generation facilities and ESS.Prosumers use renewable-energy plants to produce electricity and then consume it, and if there is a shortage of energy then prosumers consume energy produced by outer sources.Surplus energy from self-production can be sold for profit on energy markets or energy domains in the vicinity.
In this paper, we make 10 classifications of the energy domains within the smart city.The energy domain acts as an energy prosumer among the objects connected through the power system network in the smart city.Additionally, we classify each energy domain as to whether it is supply-oriented or consumption-oriented.These classifications can be seen in Figure 2 below.Energy domains that were both supply-oriented and consumption-oriented were energy prosumers, and energy domains that satisfied only one of the supply or consumption classifications were either supply-oriented or consumption-oriented energy.
(1) Conventional power-generation company: generally, conventional power-generation companies purchase electricity from domestic power producers and sell them to domestic power-consumption objects.In Korea, the Korea Electric Power Corporation (KEPCO) purchases electricity from Korea South-East Power, Korea Central Power, Korea West Power, Korea Southern Power, Korea East-West Power, and Korea Hydro and Nuclear Power.All electricity generated from the power-generation companies above are managed by KEPCO.
(2) Solar power-generation company: solar power-generation companies use solar power to generate electricity.Generally, domestic solar power-generation companies have more than 1 MW of power-generation capacity.The electrical power produced is based on the electricity price (SMP) sold to conventional power generators and the electrical power required to certify the supply of renewable energy according to the new and renewable energy supply mandatory system (RPS) sales (REC).(3) Wind power-generation company: wind turbines generate electricity using wind power.As of 2016, the total output of domestic wind power facilities is about 1031 MW.The generated power is classified the same as the power generated by solar-power generation.(4) Large-capacity energy-storage system operator: the large-capacity energy-storage system stores and utilizes renewable energy or late-night power energy to increase economic efficiency.As of 2017, about 40 companies have installed large-capacity energy-storage systems with installed capacity of more than 1 MW in Korea, and the contract power for their transactions is about 22 MW per year.(5) Energy-storage system for buildings: energy-storage systems for buildings store and use economically efficient energy such as renewable energy or late-night power energy.As of 2017, there are 50 energy storage systems installed in Korea with capacities exceeding 200 kW.(6) Energy-storage system for the home: energy-storage systems for homes store and utilizes economically efficient energy such as energy produced by small-scale renewable energy facilities like photovoltaic power-generation facilities or late-night power energy.As of 2017, there are eight energy storage systems installed in Korea with capacities of 200 kW or less.(7) Electric vehicle charging station: electric vehicle charging stations refer to all infrastructure for charging electric vehicles.The infrastructure includes power supplies, chargers, and charging-information systems.An electric vehicle charging station purchases electricity from a power sales outlet and sells it to an electric vehicle capable of storing electricity through a battery in the vehicle.It also acts as an intermediary in selling electric power produced by electric vehicles.9) Smart home with no home energy-storage system: the smart home is limited to those that are equipped with a system or similar equipment capable of monitoring the power supplied from the power grid network and the household energy-storage system is not installed.(10) Smart building with no building energy-storage system: smart buildings are limited to those that are equipped with a system or similar equipment capable of monitoring the power supplied from the power grid network, and the energy-storage system for buildings is not installed.

Energy Trading System between Energy Domains
Here, we classify three major trading systems that are used in the energy domain.Energy exchange between energy domains is aimed at generating revenue for the domain and is classified as counter trade, power wholesale, and P2P transactions.Each transaction proceeds between the specified energy domains, and the transaction target is electric energy.
(1) Counter trade: the counter trade generates electricity through the renewable power-generation facilities installed in the energy domain, and after self-consumption, it transfers the surplus power remaining to the main power-supply source and subtracts the charge to be paid to the main power-supply source by the amount of the corresponding electrical power energy.The transaction method can be utilized in the energy domains other than KEPCO if the energy domain acts as a power-generation company.(2) Power wholesale: power wholesale is a method in which the energy domain sells electricity generated from renewable-generation facilities or energy-storage systems to the electrical power market through intermediaries.The billing system suggested in this paper replaces power wholesale with P2P transactions through virtual contracts of blockchain.(3) P2P transaction: a P2P transaction is a trading scheme that shares or sells power between energy domains.The transaction includes not only direct sales of electricity, but also transfers or sales of energy for a certain period throughout the contract.

Energy Trading System between Energy Domains
Here, we classify three major trading systems that are used in the energy domain.Energy exchange between energy domains is aimed at generating revenue for the domain and is classified as counter trade, power wholesale, and P2P transactions.Each transaction proceeds between the specified energy domains, and the transaction target is electric energy.
(1) Counter trade: the counter trade generates electricity through the renewable power-generation facilities installed in the energy domain, and after self-consumption, it transfers the surplus power remaining to the main power-supply source and subtracts the charge to be paid to the main power-supply source by the amount of the corresponding electrical power energy.The transaction method can be utilized in the energy domains other than KEPCO if the energy domain acts as a power-generation company.(2) Power wholesale: power wholesale is a method in which the energy domain sells electricity generated from renewable-generation facilities or energy-storage systems to the electrical power market through intermediaries.The billing system suggested in this paper replaces power wholesale with P2P transactions through virtual contracts of blockchain.(3) P2P transaction: a P2P transaction is a trading scheme that shares or sells power between energy domains.The transaction includes not only direct sales of electricity, but also transfers or sales of energy for a certain period throughout the contract.
Within the smart city, direct and distributed P2P transaction between smart homes and home owners are efficient and therefore necessary.Additionally, power wholesale enables the energy transaction to be more economically efficient.However, currently in Korea, most energy-transaction systems are counter trades because KEPCO is wholly in charge of energy transactions.This is a common issue in any region where there is a conventional power-generation company.Additionally, issues of trust and security regarding P2P exchange remain unsolved in the current energy market.Therefore, we suggest that the blockchain be implemented to further enhance trust and security, therefore enabling a distributed and direct energy-trading system.
In this paper, we classify P2P transaction into hybrid P2P and pure P2P.Pure P2P refers to P2P trade where energy is the transaction item.In the hybrid P2P, the transaction item is the energy-use authorization itself.When a user or energy domain purchases energy-use authorization, this creates a contract based on whom the user purchased the energy-use authorization from, where the energy is from, and what the current energy price is.This is where the blockchain comes into use.For example, in the case of a pure P2P trade, user A and user B will trade energy by user A sending 100 kWh worth of energy from A's ESS to B for 1 dollar.In the case of a hybrid P2P, B can purchase monthly energy use authorization from A to purchase and use C's energy.

Definition of Blockchain and Smart Contract
The blockchain is defined as the "first native digital medium for peer-to-peer value exchange.Its protocol establishes the rules-in the form of globally distributed computations and heavy-duty encryption-that ensure the integrity of the data traded among billions of devices without going through a trusted third party.Trust is hard-coded into the platform . . .[Blockchain] acts as a ledger of accounts, a databased, a notary, a sentry and clearing house, all by consensus [20]".
The blockchain creates a trust-based cross-certification system.Instead of having one verifier that determines whether a source can be trusted or not, the blockchain positions several verifiers that communicate with one another to determine whether the new device/information/person can be trusted and added to the chain [20].Because of the innovative format it offers, the blockchain can be adapted to various fields.The blockchain can mean different things in different fields.From a technical point of view, the blockchain is a back-end database that maintains a distributed ledger that can be inspected openly.In business, the blockchain is an exchange network for moving transactions, value, and assets between peers without the assistance of intermediaries.In the legal scheme, the blockchain validates transactions, replacing previously trusted entities.
Although the blockchain technology does have limitations, it offers core advantages such as security, transparency and scalability.Security is achieved through layers of confidentiality, integrity and availability.Since each block is hashed, which ensures that the block is valid and verified, the block and chain then become confidential.The fact that a block is not created randomly or in surfeit also adds the characteristic of integrity.Additionally, since the blockchain is a distributed and decentralized platform, the technology becomes widely available and resilient towards technological glitches and failures.Unlike traditional technologies and structures that rely heavily on one single entity and, in turn, fails when that critical structure is undermined, the blockchain aims to eliminate such issues.
Already in the legal sector, the smart contract is gaining interest as a method for eliminating pre-existing legal verifiers.The smart contract consists of information that the traditional legal contract would have.However, one key aspect is that the smart contract is meant to eliminate as much human interaction as possible.The current smart contract is believed to be able to conduct most jobs without human intervention [21].In the case of making electricity payments, this may include registering consumption, calculating the amount owing, creating an invoice, and delivering the invoice.However, the current smart contract is still not free from human intervention when it comes to making pre-authorizations.In other words, every time a transaction is made, the transaction must be authorized by the user.
Based on the blockchain characteristics, the blockcahin appears to offer obvious contributions to the energy sector.First, the blockchain can enable the smart home and smart city to interact in a truly decentralized and distributed method.Next, the blockchain can act as a secure legal verifier of frequent energy transactions between households, individuals and organizations within the smart city.In this paper, we will introduce the blockchain into the energy-transaction platform.The blockchain will provide a tag for each energy transaction.Tags already exist in the current technology sector.Data or information have tags for identification, and we suggest that the blockchain be utilized to securely store and validate the energy tags.The tag will identify where the energy was produced, and where it was consumed, and the tag will then be saved on the blockchain.Section 4 will further offer a detailed description on the blockchain-based energy platform for hybrid P2P trade, along with the elements that go into each energy tag.

Suggested Blockchain-Based P2P Energy-Transaction Platform
This paper suggests a blockchain-based energy transaction platform that operates in the process illustrated in Figure 3 below.The IoT applications within the smart home collect data on whether an energy consumer needs to purchase more energy or a prosumer has spare energy to sell.Further detail on how an energy purchase or sale is determined for each smart home household will be provided in the following sections.Based on the need to purchase or sell energy, a purchase or selling tag is formed, which is then sent to all participants of the suggested energy-transaction platform.The tag is then confirmed by a participant who wishes to engage in a transaction with the original prosumer/consumer.Then, the tag is assigned to a block, which is when the transaction becomes valid.The generation of a block triggers a ledger between the two participants engaging in direct energy transaction.Finally, the ledger is then sent to all participants in the energy-transaction platform.
Sustainability 2018, 10, x FOR PEER REVIEW 9 of 18 offer a detailed description on the blockchain-based energy platform for hybrid P2P trade, along with the elements that go into each energy tag.

Suggested Blockchain-Based P2P Energy-Transaction Platform
This paper suggests a blockchain-based energy transaction platform that operates in the process illustrated in Figure 3 below.The IoT applications within the smart home collect data on whether an energy consumer needs to purchase more energy or a prosumer has spare energy to sell.Further detail on how an energy purchase or sale is determined for each smart home household will be provided in the following sections.Based on the need to purchase or sell energy, a purchase or selling tag is formed, which is then sent to all participants of the suggested energy-transaction platform.The tag is then confirmed by a participant who wishes to engage in a transaction with the original prosumer/consumer.Then, the tag is assigned to a block, which is when the transaction becomes valid.The generation of a block triggers a ledger between the two participants engaging in direct energy transaction.Finally, the ledger is then sent to all participants in the energy-transaction platform.The energy-transaction platform based on the tag embedded in the blockchain will allow for a trade that considers the current price rate of energy in each energy domain, purchase demand rate, sales demand rate, and trade object and trade protocol selection.This information is then permanent, transparent and secure, making sure that future trade decisions and tag productions are stable, thus maintaining the constant choice of high-quality energy and low-cost energy for a more sustainable smart home.All transactions will be made with KRW, instead of utilizing cryptocurrency.
Figure 4 illustrates an overview of how energy transactions on the blockchain-based energy transaction platform are made between the seller and buyer.Energy domains are initially classified based on the current price, and the purchase or selling tags for each transaction are made.According to the current domain price hierarchy and purchase/sale demand, the trade domain and trade The energy-transaction platform based on the tag embedded in the blockchain will allow for a trade that considers the current price rate of energy in each energy domain, purchase demand rate, sales demand rate, and trade object and trade protocol selection.This information is then permanent, transparent and secure, making sure that future trade decisions and tag productions are stable, thus maintaining the constant choice of high-quality energy and low-cost energy for a more sustainable smart home.All transactions will be made with KRW, instead of utilizing cryptocurrency.
Figure 4 illustrates an overview of how energy transactions on the blockchain-based energy transaction platform are made between the seller and buyer.Energy domains are initially classified based on the current price, and the purchase or selling tags for each transaction are made.According to the current domain price hierarchy and purchase/sale demand, the trade domain and trade protocol undergo selection.Once the selection is made, the purchase/sale confirmation tag is confirmed by the seller and buyer, and the trade protocol is confirmed, which is when the ledger and block are generated to validate the transaction.Finally, once all the transactions are made, the block with information of the transaction added to the chain.
The following section will provide scenarios of energy transaction between different energy domains, and an algorithm to identify what energy will be the most cost-efficient and high-quality energy choice.Based on the algorithm, we ran a simulation to compare energy-transaction results between the suggested blockchain-based energy-transaction platform and currently existing counter-trade platforms.

Setting Energy Domains and Scenarios
In this section, we will introduce classification and trading scenarios of energy domains.In Section 3.3, we made 10 classifications of energy domains.The 10 domains were then organized into either prosumer-oriented energy, consumer-oriented energy or supply-oriented energy.In this section, we take this classification and further organize the energy domains based on energy price, type of energy domain and trading protocol, and then provide a scenario for the trade.
Considering the cost hierarchy of different energy domains, we ordered the 10 domains from lowest cost to highest cost.The domains can be seen above in Figure 5.The figure above is set based on the energy price rate in March 2016.Although the cost will vary depending on the demand and supply rate of the market during each period, for this case we set fixed rates to build a scenario.The type of energy domain was then set based on the classification we made earlier in Section 3.3.Energy that is supply-oriented is titled So.Energy, and energy that is consumption-oriented is titled Co.Energy.Energy that is both supply and consumption oriented, and therefore prosumer-oriented is titled Energy Prosumer in the figure.Each of the three scenarios are set based on the trading protocol between energy domains.
In Scenario 1, the energy prosumer trades with the supply-oriented energy, which is then a hybrid P2P.The energy prosumer, in this scenario is the electric vehicle which saves and consumes energy created for itself.The wind-generation company is a supply-oriented energy domain, and thus provides energy to outer sources.The electric vehicle may decide that it needs more energy for each month and is looking for the best energy option.Their neighbor happens to have an energy contract with the wind-generation company, which includes a voucher to use at that energy domain.Although the cheapest option may seem like the ideal option, in the P2P trade, price is not the only option that should be considered.The distance of how far the energy domain is, what kinds of

Setting Energy Domains and Scenarios
In this section, we will introduce classification and trading scenarios of energy domains.In Section 3.3, we made 10 classifications of energy domains.The 10 domains were then organized into either prosumer-oriented energy, consumer-oriented energy or supply-oriented energy.In this section, we take this classification and further organize the energy domains based on energy price, type of energy domain and trading protocol, and then provide a scenario for the trade.
Considering the cost hierarchy of different energy domains, we ordered the 10 domains from lowest cost to highest cost.The domains can be seen above in Figure 5.The figure above is set based on the energy price rate in March 2016.Although the cost will vary depending on the demand and supply rate of the market during each period, for this case we set fixed rates to build a scenario.The type of energy domain was then set based on the classification we made earlier in Section 3.3.Energy that is supply-oriented is titled So.Energy, and energy that is consumption-oriented is titled Co.Energy.Energy that is both supply and consumption oriented, and therefore prosumer-oriented is titled Energy Prosumer in the figure.Each of the three scenarios are set based on the trading protocol between energy domains.
In Scenario 1, the energy prosumer trades with the supply-oriented energy, which is then a hybrid P2P.The energy prosumer, in this scenario is the electric vehicle which saves and consumes energy created for itself.The wind-generation company is a supply-oriented energy domain, and thus provides energy to outer sources.The electric vehicle may decide that it needs more energy for each month and is looking for the best energy option.Their neighbor happens to have an energy contract with the wind-generation company, which includes a voucher to use at that energy domain.Although the cheapest option may seem like the ideal option, in the P2P trade, price is not the only option that should be considered.The distance of how far the energy domain is, what kinds of vouchers exist for a certain choice, or what contractual relationship exists between the two energy domains will all be taken into consideration.In this scenario, the electric vehicle user will then decide to purchase energy-use authorization from their neighbor on the wind power-generation company, because the voucher included offered a $100 discount when the user purchases energy for a year.
In Scenario 2, the wind power-generation company and the smart home engage in a hybrid P2P trade.The smart home can use energy efficiently within the household and consists of devices that can make smart-energy decisions but is not an energy producer itself.The smart home may decide that it needs to purchase additional energy for this month and will look for the ideal energy transaction option.In this scenario, the smart home decides to purchase energy-use authorization from their friend on the wind power-generation company because of the "short distance" it has with the energy domain.The smart home owner's friend decided that they do not need extra energy from the wind power-generation company and agrees to sell their energy-use rights to the smart home owner.The distance factor can be considered as purely physical, but in this case, is logical.When the distance between energy domains are close, physically it reduces the time and costs needed for the user to reach the energy domain.Logically, short distance indicates that there is less chance for simultaneous trades that lead to certain restrictions in transactions.If the user chooses an energy domain of a larger distance, it means that the number of users looking for an energy transaction also increases.Keeping a short distance between energy domains somewhat limits the number of simultaneous energy transactions, and thus distance must be considered when making an energy transaction.
Sustainability 2018, 10, x FOR PEER REVIEW 11 of 18 the energy domain.The smart home owner's friend decided that they do not need extra energy from the wind power-generation company and agrees to sell their energy-use rights to the smart home owner.The distance factor can be considered as purely physical, but in this case, is logical.When the distance between energy domains are close, physically it reduces the time and costs needed for the user to reach the energy domain.Logically, short distance indicates that there is less chance for simultaneous trades that lead to certain restrictions in transactions.If the user chooses an energy domain of a larger distance, it means that the number of users looking for an energy transaction also increases.Keeping a short distance between energy domains somewhat limits the number of simultaneous energy transactions, and thus distance must be considered when making an energy transaction.Finally, in Scenario 3, the smart building trades with the energy-storage system for the home.The smart building is largely an energy consumer, and the energy-storage system for the home retains a certain level of energy for each month, storing surplus energy.Thus, in this sense the smart home acts as a producer of energy as well.In this scenario, a smart building owner decides that they need more energy to operate a construction.Their neighbor owns a home that has an ESS.Thus, the Finally, in Scenario 3, the smart building trades with the energy-storage system for the home.The smart building is largely an energy consumer, and the energy-storage system for the home retains a certain level of energy for each month, storing surplus energy.Thus, in this sense the smart home acts as a producer of energy as well.In this scenario, a smart building owner decides that they need more energy to operate a construction.Their neighbor owns a home that has an ESS.Thus, the two will engage in a pure P2P trade.The smart building owner simply needs to directly purchase energy from the ESS owner, and thus the pure P2P trade will take a similar form to mortgages.Figure 6 provides an algorithm of how to select the ideal energy-transaction domain.
user must have another option and must create another contract on the blockchain.The new contract may not be as cost-efficient as the previous one but will meet certain standards based on the information in the energy tag created during the previous transaction.This is beneficial for the user because the previous tag will look for energy-transaction options that meet previous transaction standards.By doing so, the energy tag will find a similarly cost-efficient and high-quality energy domain that it can create a new hybrid P2P transaction with.This process occurs without the user having to search for new options that may not be as beneficial as the previous energy transaction.

Conditions for Simulation
In this section, we will prove a simulation within the smart home that has installed a PV and ESS that utilizes the blockchain-based P2P energy transaction platform suggested in this paper.The simulation will first prove that the suggested transaction platform will have absolute economic benefits over purchasing energy through conventional energy-generation companies.The simulation will further estimate how long it will take for the money earned through the suggested energy transaction platform to pay back the amount of money originally invested in installing the PV and ESS to the smart home.This simulation will provide insight on the return on investment (ROI) in installing PVs and ESSs in the smart home.Several conditions must be clarified regarding the PV, ESS and smart home in this simulation.Based on the algorithm above, users can select the most ideal energy domain for the trade and proceed with either the hybrid P2P trade or pure P2P trade.The pure P2P trade will then be saved on the blockchain as like a mortgage, since the transaction will be directly paid to the energy provider.In the case of hybrid P2P trade, the transaction will utilize the energy tag.The energy tag truly comes into use in a spin-off scenario of Scenario 1.In this scenario, the EV user has already made a contract to use energy from the wind power-generation company with a voucher.However, the EV user is out of town and cannot effectively charge with the wind power-generation company.Then the EV user must have another option and must create another contract on the blockchain.The new contract may not be as cost-efficient as the previous one but will meet certain standards based on the information in the energy tag created during the previous transaction.This is beneficial for the user because the previous tag will look for energy-transaction options that meet previous transaction standards.By doing so, the energy tag will find a similarly cost-efficient and high-quality energy domain that it can create a new hybrid P2P transaction with.This process occurs without the user having to search for new options that may not be as beneficial as the previous energy transaction.

Conditions for Simulation
In this section, we will prove a simulation within the smart home that has installed a PV and ESS that utilizes the blockchain-based P2P energy transaction platform suggested in this paper.The simulation will first prove that the suggested transaction platform will have absolute economic benefits over purchasing energy through conventional energy-generation companies.The simulation will further estimate how long it will take for the money earned through the suggested energy transaction platform to pay back the amount of money originally invested in installing the PV and ESS to the smart home.This simulation will provide insight on the return on investment (ROI) in installing PVs and ESSs in the smart home.Several conditions must be clarified regarding the PV, ESS and smart home in this simulation.
Each PV panel has 54 cells, each cell collecting 250 Wh with its height being 1480 mm and width being 1000 mm. 12 of those PV panels are connected to create a home solar panel that can collect 3 kWh of energy.The estimated installation price is 3,108,000 KRW (each panel being worth 259,000 KRW).Each ESS can save up to 6.4 kWh of energy, and 2 ESS are connected to create a home ESS that can save up to 12.8 kWh.The estimated installation price of the home ESS is 7,772,000 KRW (each ESS being worth 3,886,000 KRW).
The smart home in this simulation contains the PV and ESS installation mentioned above and has the optimal environment in which the PV is utilized to charge the ESS.Additionally, it should be noted that the smart home in this simulation has the optimal environment for collecting as much sunshine as possible, such as facing the south, the PV being angled appropriately, etc.It is conditioned that, every day the smart home collects energy via the PV to charge the ESS fully.The approximated time needed for the ESS to be fully charged is 4 h.According to a survey performed by LG Group, as of July 2016, there are 3815 households that are equipped with solar power-generating units.Accordingly, this paper will also perform a simulation of 3815 households.Based on the electricity consumption rate during the month of July of 2016, we created a table that calculates smart home electricity consumption per day and classifies each household accordingly.
The simulation was run for July and September of 2016.July had 31 days, and September had 30 days.During the month of July, the average electricity usage rate per household was 7.8 kWh, and the average electricity price rate set by KEPCO for this month was 1073 kWh/KRW.For the month of September, the average electricity usage rate per household was 8.4 kWh, and the average electricity price rate set by KEPCO for this month was 759 kWh/KRW.

Simulation Process
Based on the simulation conditions mentioned in Section 5.2, the simulation for this paper was run by the following methods.Following the conditions and guidelines set in Section 5.2, daily electricity consumption rates were randomly generated for the months of July and September of 2016.For example, if the random consumption rate for 1 July 2016 was 5 kW, the generation result will be classified as Group A according to Table 1.Each household that is a smart home will consume energy from the ESS, which is charged by the PV daily.Because each smart home household collects energy for itself and consumes the self-collected energy first, a couple of potential cases must be introduced.In one case a household classified as Group A may consume 5 kWh of energy throughout one day, while the home ESS charges and collects 12.8 kWh for that day.That household then is left with a surplus of 7.8 kWh of energy, which it can sell to another household on the suggested blockchain-based P2P energy-transaction platform.Another case introduces the scenario in which a household consumes 18 kWh of energy throughout one day.This household is classified as Group F and needs to purchase 6.8 kWh of energy since the home ESS only charges and provides 12.8 kWh.Like the two cases provided above, households classified as Groups A, B, C, and D (partial), will be able to sell energy on the P2P transaction, whereas households classified as Groups D (partial), E, and F will purchase energy on the P2P platform.
In this simulation, during the two months (July and September), every day each smart home household collects, stores and consumes energy (the amount is set to be random) and is classified into an appropriate group.Groups that can sell surplus energy will transact with groups that wish to purchase energy on the P2P platform.During the two-month period, the P2P transaction energy sales price will be randomly generated to a price that is 70~90% cheaper than the average price selected by KEPCO.The daily average electricity price is computed according to the total amount of electrical energy transacted and the total amount of transaction money, which is then applied to the entire period.The total transaction money, households that sold, and the total dates of transactions will calculate the daily average sales amount per household, which will be used to calculate how long it will take for the initial investments on the PV and ESS to be paid back.Finally, during the two-month period, the daily energy sales prices set by KEPCO will be compared to the sales prices of the suggested P2P transaction platform, and the profit will be calculated.

Simulation Results
Simulations were run for the month of July and September of 2016.The month of July had 31 days, and September had 30 days.The simulation was run over a total of 3815 smart home households and based on the conditions mentioned in Section 5.2, daily electric energy consumption rates, electric energy amount available for sale, electric energy amount that must be purchased, and the P2P transaction unit price were included for simulation.Figure 7  price will be randomly generated to a price that is 70~90% cheaper than the average price selected by KEPCO.The daily average electricity price is computed according to the total amount of electrical energy transacted and the total amount of transaction money, which is then applied to the entire period.The total transaction money, households that sold, and the total dates of transactions will calculate the daily average sales amount per household, which will be used to calculate how long it will take for the initial investments on the PV and ESS to be paid back.Finally, during the two-month period, the daily energy sales prices set by KEPCO will be compared to the sales prices of the suggested P2P transaction platform, and the profit will be calculated.

Simulation Results
Simulations were run for the month of July and September of 2016.The month of July had 31 days, and September had 30 days.The simulation was run over a total of 3815 smart home households and based on the conditions mentioned in Section 5.2, daily electric energy consumption rates, electric energy amount available for sale, electric energy amount that must be purchased, and the P2P transaction unit price were included for simulation.Figure 7    Once the sellers and buyers of an energy transaction are determined, the P2P energy transaction unit price was simulated to always be 70~90% cheaper than the flat unit price set by KEPCO, which is visualized in Figures 8 and 9.The prices generated were randomly generated to represent unit  Based on the average profit gained from the energy transaction, we then calculated how long it would take for the total amount of initial investment for the installation of PV and ESS in the smart home to be paid back.Calculations resulted in a total of 19.7 months (approximately 1 year and 7 months) for PV installation payback, and 49.3 months (approximately 4 years and 1 month) for ESS installation payback.Once the investments on installation are paid back, all future profit gained from the P2P energy transaction will be net profit for smart-home prosumers.Table 3 elaborates on the ROI results.The overall simulation results indicate that the energy transaction made on the suggested blockchain-based P2P transaction platform is more economically beneficial while guaranteeing high-quality energy for consumers.Not only is the energy-transaction unit price cheaper than the current flat unit price suggested by KEPCO, but it also creates a sustainable smart home environment and energy-transaction ecosystem.After initial investments on PV and ESS installation are paid back, the suggested platform then provides net profit to smart-home dwellers, thereby offering long-term economic benefits.The suggested platform not only creates a sustainable smart-home environment, but also changes the energy-transaction ecosystem.Since conventional power-generation companies (in this paper ones such as KEPCO) can no longer maintain a market monopoly, companies will have little choice than to become another prosumer in the P2P energy-transaction market.Such an elimination of companies' market monopoly also offers a macroscopic benefit to society and the environment.When conventional power-generation companies try to maintain a market monopoly, companies are forced to build additional substations, requiring additional infrastructure investments.The suggested P2P energy-transaction platform eliminates the need for such extra infrastructure investments, thereby eliminating extravagant investments, and a heavy toll on residential communities and the environment that may occur from the construction of additional substations.

Conclusions and Discussions
To date, smart-home technology has been primarily focused on user convenience rather than energy efficiency.However, with recent international interest being focused increasingly on the energy domain, there is a need for the smart home to also make developments regarding energy efficiency and management.Previous works have mentioned that sustainable homes, buildings and cities offer environmental benefits and cost savings in energy transactions.In this paper, we suggest a blockchain-based energy-trading system that will promote the creation and maintenance of an ecosystem by offering environmental and economic benefits for consumers and prosumers who engage in energy transactions.The key goal of this paper was to prove that the suggested platform offers long-term incentives to users while working on a secure and decentralized structure, thereby obtaining a sustainable ecosystem for P2P energy-trade between energy prosumers and consumers.
By understanding the current energy domains and trading systems, we identified limitations in making more cost-efficient and environmentally friendly choices in energy consumption.We uggest a blockchain-based energy platform be implemented to enable efficient energy transactions between prosumers.We suggest the platform be built on the blockchain, as the technology allows a decentralized and distributed trading system, and allows a more transparent, trustworthy and secure P2P trading environment.We believe that such characteristics of the blockchain are necessary in the energy transaction within the smart home environment because the smart home aims to enhance user comfort, security, along with energy conservation and cost-savings.We classified the two different types of P2P trade to identify which type of P2P trade will best benefit from the use of blockchain technology.Between the two types of P2P trade we classified (pure P2P trade and hybrid P2P trade), the hybrid P2P trade will benefit more from a blockchain-based energy-transaction platform.The energy tag presented in this paper will set conditions to make every future energy transaction more cost-efficient, while maintaining the most ideal and high-quality energy selection.By utilizing the blockchain-based P2P energy-transaction platform in the energy trade process, multiple energy resources and home appliances will be democratically connected to provide users with high-quality, low-cost energy at all times and locations.This will increase user convenience and smart-home sustainability while minimizing human intervention, but maintaining trust and sustainability.Additionally, the macroscopic goal is to eliminate the stern monopoly held by a selected few energy providers in the energy market.
Based on the suggested platform, we ran simulations over 3815 households during July and September 2016.The simulation considered the daily electrical energy consumption rates, electrical energy amount available for sale, electrical energy amount that must be purchased, and the P2P transaction unit price.The P2P energy-transaction unit price was simulated to always be 70~90% cheaper than the flat unit price set by KEPCO, and the cheapest energy would always be sold/purchased first.To prove that the suggested P2P energy-transaction model would have long-term economic benefits over initial investment costs, we then proceeded to calculate the amount of time it would take for initial investment costs to be paid back before smart home dwellers would gain net profit.Calculations resulted in a total of 19.7 months (approximately 1 year and 7 months) for PV installation payback, and 49.3 months (approximately 4 years and 1 month) for ESS installation payback.After this period of time, smart-home dwellers would be able to make a net profit from the suggested P2P energy transaction.
For future research, we hope to fully develop and implement the blockchain-based P2P energy transaction platform within a smart-home environment and make long-term comparisons of energy costs between a regular home and a smart home that can utilize the suggested blockchain-based P2P energy-transaction platform.Testing the energy tag in different scenarios across diverse energy domains and households in diverse climates will also advance the blockchain-based P2P energy-transaction platform.In addition, we aim to develop an energy-transaction system that will function on a larger scale than the individual smart home-the smart city.In this paper, we have suggested a blockchain-based P2P energy-transaction platform model that can make a single smart home more sustainable; however, a conglomeration of residencies and buildings will require a larger-scale blockchain-based platform.For future research, we hope to expand the smart-home model into a sustainable smart-city model, thereby increasing the energy efficiency of players within the city and the city itself.

Figure 1 .
Figure 1.Comparison of power system between current and suggested energy-transaction platforms.

Figure 1 .
Figure 1.Comparison of power system between current and suggested energy-transaction platforms.

( 8 )
Electric vehicle (PEV, EV): an electric vehicle is limited to a vehicle having a battery and an electric motor inside the vehicle and capable of converting kinetic energy into electrical energy during operation and storing it in a battery.The electric vehicle sells the electrical power through the electric car charging station or the cutter.(

Figure 2 .
Figure 2. Type definition according to energy-domain performance capability.

Figure 2 .
Figure 2. Type definition according to energy-domain performance capability.

Figure 3 .
Figure 3. Design of smart energy-transaction data with blockchain.

Figure 3 .
Figure 3. Design of smart energy-transaction data with blockchain.

Sustainability 2018 ,
10, x FOR PEER REVIEW 10 of 18 between the suggested blockchain-based energy-transaction platform and currently existing countertrade platforms.

Figure 5 .
Figure 5. Classification and trading scenarios of energy domains.

Figure 5 .
Figure 5. Classification and trading scenarios of energy domains.

Figure 6 .
Figure 6.Optimal transaction target selection algorithm for energy domain deals.

Figure 6 .
Figure 6.Optimal transaction target selection algorithm for energy domain deals.
provides a segment of what the simulation results indicated.Sustainability 2018, 10, x FOR PEER REVIEW 14 of 18 provides a segment of what the simulation results indicated.

Figure 7
Figure 7 illustrates the smart home daily electrical-energy consumption rate of 15 July 2016.The graph provides a visual representation of how individual smart home households will decide to either sell or purchase energy and indicate that electrical energy of lower unit price sells first.Once the sellers and buyers of an energy transaction are determined, the P2P energy transaction unit price was simulated to always be 70~90% cheaper than the flat unit price set by KEPCO, which is visualized in Figures8 and 9.The prices generated were randomly generated to represent unit

Table 1 .
Smart home household classifications.

Table 2 .
Average profit from P2P energy transaction.

Table 3 .
Return on investment (ROI) for P2P energy transaction.