In order to promote energy decentralization, it is necessary to adopt several concepts that, working together, allow the implementation of a system that works as an aggregator of producers and consumers, with well-defined rules and a clear market operation. Local energy production aims to create more flexible and resilient systems with new ways to produce energy from different sources (e.g., solar, wind and biomass), which allow better results for everyone involved, whether through cost reduction or greater environmental sustainability. Despite this recent commitment to decentralization, it remains important that the current participants in the system are an integral part of the new solution, due to the existing complexity, namely the need for electrical power grid connections, so the distribution system operator (DSO) is an integral part of the process, as well as the energy traders [
14].
Blockchain networks allow to support the integrity and transparency of an entire process, ensuring transactions, since to make changes an attacker needs to have the support of a high percentage of the network, which depends on the type of mechanism chosen [
15]. Besides security concerns, blockchain adoption can have many other uses to help in the implementation of a local energy production system. In the following sections, we present information about the main concepts that support this review.
2.1. Local Energy Production
Nowadays, industries, small and medium enterprises and citizens rely on the current centralized markets and infrastructures for the provision of energy. All these key actors in the system face challenges related to increased energy costs, protection of energy provision to ensure power supply access and CO
2 emissions. In this sense, it is necessary to assure that the electrical system has the necessary characteristics and conditions to guarantee its robustness and give the necessary confidence to all involved agents. As companies develop, new services emerge, as well as new installations, creating challenges in terms of energy consumption and production. Many consumers, with the development and maturation of new energy production technologies, with considerable increases in system efficiency, became producers in order to have greater autonomy. These challenges force the system to have greater flexibility in order to accommodate new consumption and production points. With new energy and IoT technologies, it is possible to tackle these problems and promote the adoption of decentralized systems that can contribute to enhance energy efficiency, since they have the capacity to allow the safe exchange of data and information and ensure the transparency of the process, enabling a broader participation by consumers, thus leading to new possibilities for business models. Energy decentralization can bring solutions to increased energy demand, resource usage and energy poverty because it allows to create renewable energy communities, introducing social neighborhoods with low-income people, so that any production peaks can be used to bring energy to these homes, thus reducing their energy needs from the electrical power grid [
16].
Peer-to-peer (P2P) transactions and decentralized energy production allow everyone who produces energy, for example, through solar photovoltaic systems, to sell their energy to other facilities for use in the vicinity, safely. This transaction system can be a turning point on the market. However, there are regulatory issues that have to be obeyed and that vary according to the country where they are inserted. If there is not a dedicated energy distribution electrical power grid between producer and consumer, it will be necessary to inject into the main distribution electrical power grid, requiring the authorization of the distributor, and a set of legislation procedures. The alternative is also for traders to buy this energy directly and then sell it at “normal” prices on the market; however, the involvement of a third party causes prices to increase [
17].
With the increased number of decentralized installations introduced in the systems, intermittency issues arise. The distribution networks currently implemented were designed to supply energy to consumption points, not to receive an eventual excess of production. This paradigm shift causes disruptions in the network that impose additional management costs on the part of the competent entities [
18]. It is important to mention that these entities have to maintain the balance of the network and for this they may have to overprovision their grid capacity, thus increasing costs. This is why it is so important to have demand/response mitigation strategies and incentives for consumers to adhere to these mechanisms [
19]. There is also the need to control power systems because weather conditions affect solar and wind energy production. Based on these conditions the energy produced by photovoltaic units can have a variation, causing in certain conditions an energy production surplus for local grids, especially households [
20].
By adding a larger number of installations at the community and neighborhood level, the complexity is increased; however, it also allows the management to be carried out with a greater number of equipment, thus allowing a more complex electrical power grid management. More installations in the electrical power grid have the advantage of reducing losses in the electrical power grid, since production is local and does not need to use the transmission electrical power grid. One of the proposals made to solve some of these problems is to convert the generated energy into a virtual currency, thus allowing the settlement between the various actors [
13]. The Ethereum framework, for example, uses the concept of “gas” payments for smart contracts and transactions, where “gas” corresponds to a metric of the computational effort for the operations. The virtual coin used in this case is the Ethereum token
ether, and all smart contracts work based on this [
16]. One
ether corresponded to 1964.32 € according to
Coinbase as of 7 July 2021.
Blockchain can be a powerful tool to help to implement microgrid solutions to provide robust and secure transactions and data exchange between all actors of the process, in order to promote energy decentralization [
21].
Table 1 presents the main differences between the centralized trading approach used with energy companies and the proposed peer-to-peer trading approach [
17].
2.2. Blockchain Technology
The concept of blockchain was introduced back in 2009 with Bitcoin [
26]. Blockchain technologies bring several advantages regarding the energy sector, allowing trading and energy exchange between energy producers and consumers without the control of a central entity [
27]. Blockchain can be used for management, trading, security, transparency, awareness, communication and certification.
For management purposes, the invoice and billing system using smart meters and smart contracts makes it possible to settle accounts and invoices automatically for consumers and distributed generators. For trading, market management is an important point, since distributors and traders need to carry out their energy consumption forecasts. With blockchain, together with other technologies, it is possible to make an intelligent management of it. Improved data transfer using smart devices makes it possible, through data transmission, to cross information. Note that these technologies are also being used to improve automatic connections, allowing control systems and networks to correct tariffs in real time, promoting P2P transactions.
For trading using smart contracts, there are contractual transaction protocols based on programming languages suited for each usage domain that are automatically executed when all parties provide the required data. Using protocols and user interfaces, these contracts must comply with legal procedures, all data must be securely stored and available for consultation during the execution period, and all contracts must be fully recorded for future verification. The smart contract itself must also be able to prevent security breaches and external interactions if possible, as well as control data accessibility for all parties involved on a contract [
28].
For security and transparency purposes, ensuring safety transactions using programming verification techniques, guaranteeing the confidentiality of data, user and transparency with standardized processes that cannot be changed during time [
13].
To add value for consumers, advertising and communication with customers is made in a direct way, almost individually, according to their preferences, using for that purpose the information collected through energy management systems. Improved sharing of resources supported by the electrical power grid management makes it possible to offer other services, such as energy storage, as well as charging stations for electric vehicles, because currently most projects located for power generation have to ensure consumption at the same time as production, due to the lack of storage. The blockchain network can, thus, contribute to the management of the electrical power grid, helping to minimize the intermittency generated by the introduction of renewable energy into the electrical power grid [
29]. Increased competition with smart contracts that can streamline the process of changing energy suppliers, which allows for a reduction in energy tariffs [
30].
One of the advantages of blockchain is the fact that it is able to certify the origin of the energy produced, thus being important for green certificates and to assure consumers that the energy they are purchasing is actually from renewable energies, something very important in social terms, so it has this most advantageous benefit as well [
31].
The various areas of blockchain usage have already been explored in some way in previous studies, with application cases. In the revised literature, it was possible to identify some projects that intend to implement models to promote energy decentralization. Some platforms that have already been developed, such as PONTON Gridchain and Enerchain, are used for electrical power grid management and energy P2P direct trading. Electron is an Ethereum based platform that allows real-time switching of energy suppliers and provides P2P trading. SolarCoin rewards prosumers per each MWh generated. Energo focuses on machine-machine connections and the possibility of making transactions between them, as is the case with electric vehicles and charging stations that can interact with each other, thus making transactions through a digital wallet.
B.S. Lee et al. proposed a platform based on Ethereum for the creation of a relationship between consumers and prosumers through smart contracts [
32]. A scheme with energy routers is also being implemented, where in each microgrid there is an energy router that is a node of blockchain which is operated by the blockchain-based multi-factor electricity transaction match mechanism. In this scheme, a set of transactions, records and fund settlement are recorded. It includes a node application module, an electricity transaction acquisition module, a blockchain nodes module and a smart contract module [
22]. A double chained model of blockchain can be implemented to facilitate and expedite transactions between prosumer and consumers and establish smart contracts and then form coalitions for negotiation and energy exchange [
4].
A cooperative approach for P2P transactions and improved privacy concerns in a secure environment is also possible. Cooperatives may have energy to sell, but selling energy to energy companies is currently not profitable due to the low prices they practice for local producers. A P2P approach between cooperatives is proposed in [
3]. An example of possible parties involved in a cooperative P2P approach are solar PV panels, smart appliances, smart HVAC systems, electric vehicles, energy storage systems and smart meters that can measure the energy and share data in a bidirectional way, where DSO can obtain information from the equipment and also send information, e.g., to change the type of electricity tariff. Once each of the elements has an identification, it is possible through blockchain technology to identify the energy consumed and produced by each of the systems and distribute energy between them, that is, when equipment is able to consume the energy, it is distributed to them and when surplus exists it is stored [
13].
Ali et al. present a system to group prosumers using blockchain to manage the possibility of scaling the infrastructure and the respective decentralization in a P2P trading scheme [
11]. It proposes a scheme called SynergyChain to promote the scalability of the solution, as well as the decentralization of the prosumer grouping mechanism in a P2P context. It includes a learning module that improves the system’s adaptability [
2]. A financial platform to facilitate investments in renewable energy sources based on the Ethereum blockchain is also a solution. It implements a P2P Marketplace, based on price, thus bringing together investors and prosumers. The traded energy and its value are represented by “tokens”, which are exchanged between participants automatically through pre-established conditions in smart contracts [
33].
Another proposed system, called ETSE and developed under the PETRAS BlockIT project, facilitates the energy transaction between prosumers. Management is carried out through smart contracts in a blockchain network associated with smart meters. The system analyzes the various types of attacks that can then be promoted, bearing in mind the prevention of attacks [
15].
2.3. Internet of Things
In order to implement a decentralized energy system, it is important to ensure that an adequate data exchange process is in place, because of the need to have real time information about energy consumption and production. This need requires the deployment of the “smart home” concept, supported by IoT technologies, with the introduction of sensors, smart devices and communication protocols that builds the foundation of P2P transactions, allowing consumers to trade energy with safety. Therefore, in the context of the model proposed in this paper, IoT provides local sensing to account for energy transactions without central supervision.
The growing interest on IoT technologies extends to several application areas [
34]. Although there are multiple IoT architecture proposals [
35], a basic IoT architecture can be divided in three layers: Objects, Network, and Application. The Objects layer collects data from the physical world using sensors that are integrated in electronic devices called sensor nodes. These devices include other components [
36] that are essential for the node operation, such as a processing unit, a communication transceiver and a power source. Some devices may also act on the physical world using actuators. The Network layer connects the Objects layer to the Application layer, which is normally composed of several types of communication networks, which form the data communication infrastructure used by the different entities of the IoT. This layer also handles other IoT tasks, such as data storage and cloud computing. The Application layer provides specific services for the users based on the data collected by the Objects layer, such as automation of processes, use of data mining and control algorithms and user interface through IoT clients.
It is important to mention that the integration of equipment with sensors requires that consumers have to deal with additional technology, applications that require the collection of data and the additional interpretation of information [
37]. The IoT is constantly growing, allowing to exchange huge amounts of information on a daily basis, which also raises issues related to information privacy. Blockchain can be a complementary technology to guarantee these situations, and improve the behavior in terms of storage and security [
38].
Smart meters are important devices in this system, as stated in
Figure 1. With smart meters, it is possible to obtain information about energy consumption and production within short time intervals (e.g., 15 min). This is important data for trading platforms. All data are encrypted and placed in the blockchain for smart contract purposes [
14].