3. Peer-to-Peer Energy Trading
3.1. Prosumer and Consumer Cases
Peer-to-Peer (P2P) energy exchange is a peer-sharing facility where renewable energy consumers and small cooperative services provide consumers with energy in homes, offices, etc. Peer-to-Peer (P2P) energy exchange is a peer-sharing service where consumers of renewable energy and small cooperative services provide power to consumers in homes, offices, etc (Figure 3). Indeed, P2P technology provides an opportunity for a new generation of models in the energy sector [89]. The authors suggested in [90] that the energy prices will adapt to a competitive and automated economy due to the shift in electricity delivery technologies and trends. At the same time, P2P power generation is traded across the energy industry and is now evolving. The authors suggested in [91] that P2P assists individual consumers to become consumers and exchange surplus resources with competitors. The use of on-site PV characterizes Self-consumption. In this vein, energy storage will improve self-consumption. The obtained results showed that the intermittent effect of renewable energy production leads to an uncoordinated distribution of energy to/from the grid. Thus, utility networks cannot enhance reward/punish clients. The authors highlighted the need to allow consumers to self-organize into a group to increase their personal and group use [92].
Figure 3. Prosumer energy management scheme
The authors stated in [93] that the major components and technology involved in P2P energy trade are listed and categorized according to their activities. As shown in Figure 3, Figure 4 for P2P energy circulation, four-tier levels are suggested.
Figure 4. Peer-to-Peer energy trading levels
3.2. P2P Energy Trading
Due to the issues with traditional distributed energy trading and the blockchain-based paradigm proposed (i.e., infrastructure-based P2P energy trading), there is a need to include grids with technology for energy trading. For example, in an ad hoc P2P energy sharing model, local micro-grids will be combined with potential for energy suppliers using a blockchain-based network (Figure 5). As a result, customers can not only import from another consumer, but they can also opt to purchase electricity from traditional power plants [94]. Because of the blockchain’s immutability and distributed existence, this model ensures that all transactions are open to all prosumers and large energy providers, especially governments. The government should have the forum in order to gain ownership over the energy sharing market [95]. That will aid in increasing the appeal and opportunity for all parties concerned. Since distributors will be compensated for these facilities, this model will provide more business opportunities for traditional suppliers. The architecture of this design indicates the presence of smart devices on both the consumer and power supply sides. The structure is classified into four levels: Tier power grids, which include both major companies and countries that either generate or distribute energy [96]. Data transfer is where much of pre-negotiation and communication will take place. The transaction is executed in three stages. First, the consumer expresses his intent to purchase energy. Sellers apply their offers, and the buyer chooses one of them. Another important line of communication is between the vendor and the Grid. The seller must agree to a deal for distributor services. The blockchain layer is responsible for storing all transactions [97].
Figure 5. P2P energy trading
3.3. Infrastructure-Based Energy Trading
The centralized organization manages traditional electricity trading. However, prosumers do not need centralized authority for P2P transactions. Prosumers may directly interact with each other for energy exchange in the assumption that physical ways of transmitting energy occur [98]. For e.g., two adjacent houses will communicate via a wire cable, and the energy can then be transmitted directly. The premise in the infrastructure-based P2P energy sharing paradigm is that prosumers have smart meters and IoT sensors mounted on the object on which they are purchasing energy (e.g. Home-To-Vehicle-V2H/H2V) [99]. As seen in Figure 6, these devices interact with one another through the blockchain in order for the transaction between the two entities to be efficient. Another presumption is that the prosumers have the functional means to exchange resources with one another. The proposed architecture in [100] for a pure P2P trade does not have to include any outside party in the negotiation process. Prosumers and consumers interact with each other from transactions and behavior. If consumers have the material resources to transmit electricity, they can conduct transactions without intermediaries. Since specific conversations take place on a different network, this removes the communication strategy from the blockchain system [101].
Another case that fits into the infrastructure-based P2P power-sharing model is the Brooklyn microGrid [102]. It depends on a limited number of Prosumers and customers (for example, five Prosumers/consumers) related to each other. By using smart meters and e-wallet, consumers may sell excess electricity to neighboring customers. The transaction is executed using self-executing contracts, and each participant has access to all transactions. Users can decide the total cost they are willing to provide and prioritize the type of energy required (i.e., conventional or Renewable Energy). The Micro-Grid outages mentioned here are premature, and some operational issues may appear. One of them is to provide the physical infrastructure for energy conversion and global scale (for example, dealing with situations where the seller is not close to the buyer but needs to sell the energy) [103].
Figure 6. Infrastructure-based energy trading
4. Blockchain Technology in SG
4.1. Motivations of Applying Blockchain in SG Paradigm
SG is considered an advanced strategy that combines digital and network computing technologies to transform and modernize the traditional grid heritage in power distribution and a more reliable, efficient and insightful transmission network [104]. These modernization changes have arisen due to severe climate change and the need for renewable energy sources. The overarching goal of these transformations and modernizations is to change the energy environment by combining distributed energy supply with sustainability and utilization and reducing dependence on generations based on fossil fuels. The old traditional network serves customers with its long-distance transmission lines, while the innovative network model brings producers and consumers closer together by installing renewable suppliers as independent distributors [105].
Although the smart grid and the energy internet are intended to adapt to dispersed and centralized energy generations, one of the significant drawbacks to the current architecture is the central structure. Energy generations, transmission and distribution networks, and markets depend on primary or intermediate institutions. Smart grid elements connect and coordinate with prominent organizations that can track, receive, data process and assist all aspects with adequate control signals in this centralized environment. Moreover, the energy is usually transmitted through a long-range network to transfer the powers to the end-users through the distribution network [106].
Unfortunately, given the penetration of renewable energy and the ever-increasing number of components, the latest architecture for smart grid systems raises some questions. Scalability, scalability, high computing, connection pressures, availability attacks, and the inability to monitor potential power systems with many components are among the considerations [107]. As a result, moving to a decentralized infrastructure is an intelligent network direction that offers more complex, insightful and proactive functions. The network infrastructure also evolves and advances towards a fully integrated network with clustered configurations to increase complex interactions across all components of the innovative network systems. The synchronization and usability provided by EI also contribute to the most economical, efficient and reliable innovative network system service [108].
The energy market is rapidly increasing as the current topic progresses. The SG was intended to guarantee reliable power delivery, low losses and good efficiency, and energy supply reliability. The idea allows individuals to produce power on a limited scale and supply it to the grid. However, the concept brings complexities to the current infrastructure, such as how a transaction between these generators and users is handled, checked, and registered [109]. This segment demonstrates how blockchain can be used to process innovative grid transactions. Smart contracts are used to carry out transactions, and the network functions as a transaction verifier. The blockchain ensures transaction immutability, ensuring that any transaction between generators and consumers is completed. It also gives marketing background immutability, which may be helpful when auditing or resolving a transaction conflict [110].
4.2. Blockchain Evolution and Structure
The last twenty years have seen a remarkably rapid rise in blockchain technology, from the first Bitcoin protocol (blockchain 1.0) and the advance to Ethereum (blockchain 2.0), already referred to as killer denominations (Blockchain 3.0) (Figure 7). As a result, the infrastructure has evolved from a simple database to a fully dispersed cloud storage network [111]. Ethereum’s potential blockchain lies in developing blockchain technology from a database-only cryptocurrencies service to a more general infrastructure capable of operating multiple decentralization applications in various fields, such as financial services and any sector that could benefit from digital currencies. The first and second generations of blockchain encountered several challenges that prevented their rapid adoption [112]. As listed above, proving possession of an asset without central authority through the consensus mechanism is a time-consuming process. To execute any transaction on the Ethereum blockchain, each node must compute all of the included smart contracts in the network in real-time, resulting in a slower transaction pace. The blockchain consists of blocks arranged in sequence in time, secure, and linked using a hash function. The block is named in time so that it cannot be changed. A block is made up of a group of transactions [113]. A transaction in Bitcoin is the transfer of ownership of funds. However, in our case, it can be exchanged for the payment of electricity. The hachage function is a mathematical function in one sense that produces a constant output regardless of the input. A slight adjustment in the information can lead to significant changes in production. The difference is also exceptional because it is easy to calculate exit based on the entry, but not otherwise. When the block is complete or it is time to create a new block, it is penetrated with a specific hachage function, H (x), where x is the current block number [114]. The hashtag is then stored in the next block, to form a ”chain”. The procedure was repeated before the last block so that the slight change in the block would be notified quickly because the change is invalid. Bitcoin can be used to change the owner of a currency or to transfer money from one individual to another. However, instead of a true identity, the former and subsequent owners are represented by a specific identifier known as the title [115]. The address is derived from the public key of the private-public key. As a result, the network will quickly verify the health of the property owner. Since the blockchain records the complete history of the purchase, it can be traced back to its beginning, eliminating the problem of double spending.