## 3 Blockchain-Based P2P Energy Trading Model  
P2P energy can potentially revolutionize the energy landscape by promoting decentralization, flexibility, and consumer engagement. Free trade among peers offers more options for sellers and buyers, promoting mutually beneficial transactions. A blockchain-based P2P ecosystem would offer consumers access to a diversified portfolio of energy resources that can answer to their specific requirements in terms of time, price, and sustainability goals. The open aspect of the P2P energy trading model stimulates healthy competition among providers, ensuring high-quality service at the lowest possible prices. In contrast, a regulated market limits consumers' options, often leaving them with a single supplier. This lack of competition allows the supplier to dictate both the quality and price. An open market with diverse DERs, such as solar, wind, and electric vehicles, presents exciting opportunities and competitive market prices for the consumer as well as the prosumer. Hence, prosumers with surplus energy can manage the quantity and timing of their sales to maximize profit. The chance to sell energy among peers would encourage investors to expand into DER projects, benefiting developing countries suffering from electricity shortages. P2P energy trading would increase local energy exchange, reducing dependency on the utility grid and enhancing power reliability. Additionally, P2P energy trading can enhance grid resilience and flexibility by leveraging DERs, demand-side management, and local energy trading to mitigate grid disturbances and optimize grid operations. By decentralizing energy production and consumption, P2P trading can enhance grid reliability and reduce dependency on centralized generation and transmission infrastructure. Similarly, P2P energy trading can help improve voltage regulation in the distribution grid by reducing voltage fluctuations and optimizing voltage profiles. When energy is generated and consumed locally within the same distribution network segment, it can help maintain voltage levels within acceptable limits, thereby reducing losses associated with voltage deviations. Moreover, P2P energy trading can facilitate load balancing within the distribution grid by enabling energy transactions between local producers and consumers. When surplus energy generated via DERs is consumed locally rather than being transmitted over long distances, it can help alleviate congestion on distribution feeders and reduce losses associated with overloaded circuits. Also, P2P energy trading can potentially reduce transmission losses by minimizing the need for long-distance energy transmission from centralized power plants to end-users. When energy is generated and consumed locally, it avoids the losses incurred during transmission over high-voltage transmission lines, which tend to have higher losses than distribution lines. At the distribution level, by promoting the use of distributed generation and localized energy consumption, P2P energy trading can improve the overall efficiency of the distribution system. For a P2P energy trading model to properly operate, several prerequisites must be met:  
* A power grid connecting the two ends of an energy transaction must be present, along with essential electrical components like cables, transformers, and meters;
* An advanced metering infrastructure is needed to manage transactions and ensure energy is transferred from the correct source to the correct user. A control system is also necessary to check and control energy quality parameters like frequency and voltage;
* A secure end-to-end device communication protocol is required for the flow of information between peers;
* An online platform is required to allow users to transparently and anonymously communicate and exchange information about available energy, load demand, and prices as well as other information. The first two points are usually provided in most modern grids.