Keywords

1 Introduction

Considering the current evolutions in the energy systems area toward the smart grids and with the advent of smart cities, energy supply is moving from a central fossil-based generation to the distributed renewable generation, such as solar and wind power. Furthermore, the proliferation of electric vehicles (EVs) used in these cities caused an unpredictable load profile that should be supplied in a real-time manner. While renewable energy sources (RESs) and EVs can be beneficial from both economic and environmental point of view, growth of them may result in various challenges for secure and reliable operation of the grid. Although load variations and uncertainties are not new issues in the energy sector, sustainable and clean approaches to energy production in smart cities have increased the complexity of these challenges.

  1. A.

    Motivation

Lack of flexibility in a renewable-integrated power grid can result in two major issues for electricity markets [1]:

  • Negative market prices

    Experiencing negative prices in an electricity market can signal different types of inflexibility in the power grid, for instance, the inability of generators to reduce the output, insufficient load to use excess energy, generation surplus from RESs, or inadequate capacity in the transmission network which all of them will cause the imbalance of supply and demand. Although negative prices can also happen when there are no RESs, their existence can worsen this issue.

  • Price volatility

    Price volatility, as fluctuations between high and low prices, can occur due to constrained transmission capacity, ramping, and fast response and inability in reducing demand.

The lack of flexibility in an energy network leads to unstable operation of the grid and extreme problems in the electricity market. Since traditional flexibility-providing solutions are incapable of dealing with current power systems transition, to address such challenges, flexibility tools and resources have to evolve along with advances in the energy sector [2]. Different flexibility approaches, based on the relative cost, are shown in [1]. Economic factors and network characteristics are two important considerations when implementing any specific flexibility solution. As it is discussed in [1], improving market design is one of the most promising low-cost solutions for increasing network flexibility.

Together with the other market approaches, that is, capacity markets, ancillary services, and joint markets, recently, a novel market design, called peer-to-peer (P2P) electricity market, has attracted a lot of attention in research communities. Using the P2P market design, small-scale consumers and prosumers are able to exchange energy with each other. This real-time/semi-real-time market acts like other financial markets and works according to the supply and demand concepts. The exchangeable product in such markets can be a surplus of energy. Hence, the excess energy production from a prosumer can be sold to the other neighbors. In the past, implementing such structures seemed to be not realistic. However, with recent advances in information and communication technologies (ICTs), especially distributed ledgers, it is getting more practical than ever. Fortunately, by incentivizing the demand-side resources (DSRs) and utilizing ICTs, P2P energy markets not only provide flexibility at a relatively low-cost but also adapt distributed energy resources (DERs) as potential flexible sources. As a result, the main issues of the grid turn into solutions.

  1. B.

    Literature Survey

Over the last years, several research works have focused on the design of P2P energy markets. The existing literature can be classified into two main categories. Some researches focus on the market design and related mechanisms, while another group of researches investigates grid operation in the existence of a P2P electricity market.

In terms of market mechanisms, reference [3] proposes a P2P trading platform, called bilateral contract networks, which focuses on scalability issues of a P2P market. It makes use of real-time and forward contracts to maximize the utility of market participants. Besides, the authors in [4] address scalability in P2P markets by proposing a market-clearing mechanism based on the adaptive segmentation method. References [5,6,7,8] propose different approaches for bidding strategies in restructured electricity markets. Although the focus of these studies is on pool-based markets, their methods can be employed as a base to develop bidding strategies in local P2P markets. Several P2P market designs based on blockchain technology is proposed in [9, 10], while references [11, 12] use blockchain to particularly develop trading platforms for EVs trading. Reference [13] investigate the possibility to implement a P2P market in a low-voltage microgrid, by using game theory as a mean to simulate P2P transactions between peers. As can be seen, the aforementioned studies have focused on the market aspects of the P2P market rather than on technical issues in the P2P market operation.

Despite the necessity of technical consideration of P2P markets, it has attracted less attention. A sensitivity-based market architecture is proposed in [14] to ensure that each new P2P transaction in the market does not violate operational constraints. Reference [15] introduces the term, product differentiation, to account for the preferences of each participant and as a tool for grid operators to reach cost recovery and maintain the secure operation of the grid. Authors in [16] use blockchain technology to assess power losses caused by each P2P transaction. Reference [17] proposes a bi-level bidding strategy for a transactive energy architecture to balance several deviations in the microgrid, such as variations of the load.

  1. C.

    Contributions

As described, while there are a number of studies that focused on the theoretical aspects of P2P markets, the following question is yet to be answered: How a P2P electricity market is able to be used as a means of flexibility procurement in the future smart cities? This chapter is an effort to respond to this question and has the following aspects:

  • Introducing different architectures for designing a P2P market in smart cities.

  • Analysis of the role of the distributed ledgers in designing a P2P market and introducing the existing pilot projects around the world.

  • Proposing an exploitation framework for P2P markets to be used as a market-driven tool for flexibility provision in smart cities.

  1. D.

    Organization

The remainder of this chapter is organized as follows. Different P2P market structures according to the degree of decentralization are discussed in Sect. 2. Several ideas for P2P flexibility harvesting in smart cities are proposed in Sect. 3. Section 4 introduces different challenges that should be addressed to make the most out of P2P markets. The role of blockchain technology and its different architectures for designing a P2P market is introduced in Sect. 5. Furthermore, some of the well-known pilot projects and P2P platforms are reviewed in Sect. 6. Finally, concluding remarks and future directions are discussed in Sect. 7. A schematic overview of the topics presented in this chapter is depicted in Fig. 1.

Fig. 1
figure 1

A schematic overview of the topics presented in this chapter (The small icons used in Figs. 1, 2, 3 and 4 of this chapter are designed by www.flaticon.com.)

2 P2P Market Structures

In recent years, there have been great environmental concerns that led to the evolution of various industries. The energy sector, as one of the most important parts of this transition, is already playing its decisive role by integrating distributed energy resources (DERs) in the power grid. Reaching a perfect integration invites the use of decentralized operation of the grid. Microgrids, as a network of DERs and flexible loads which can operate either autonomously or as a part of the main grid, are one of the huge advances toward a more decentralized network. As a result, electricity markets are struggling to reach themselves to this evolution.

In traditional networks, the required energy for balancing demand and supply should be provided by the main grid, resulting in a passive role for the consumer. Figure 2 represents such networks.

Fig. 2
figure 2

Traditional pool-based market (black arrows represent communication links and cash flow)

Through this approach, the burden of flexibility procurement is mostly on conventional generators. For reaching equal demand and supply, flexibility can be provided by ramping generators or through contracts made in other markets, such as capacity markets. As it is obvious, in pool-based markets, all the attempts are taking place on the production side. Even in more modern approaches, like demand response, there are occasions in which prosumers run out of energy and need to buy the required electricity from the only provider, which is the upstream network [18]. As a result, even in such cases, the responsibility of flexibility provision is on the production side of the main grid. This issue is a result of the fact that electricity markets are not keeping up with the technical transition in grid operation, which is decentralization.

A very recent effort toward market decentralization is P2P energy markets. The word “P2P” refers to exchanging an item between two peers. A peer can be a person or even a computer, which is able to send and receive items. Furthermore, item refers to anything exchangeable either physical or virtual. For example, the so-called Bitcoin is a virtual currency that can be transferred from one peer to another. By adopting this definition to the energy sector, the P2P energy market concept begins to shape.

A P2P energy market is a network of end-users capable of exchanging energy with each other. Due to the type of connectivity between peers, different structures can be realized for P2P markets. In the following sections, a comprehensive review of these designs is presented.

2.1 Decentralized P2P Energy Market

A decentralized P2P market is illustrated in Fig. 3. This type of market is the most decentralized design comparing to other P2P structures since there is no intervention of a supervisory agent. It should be noted that connections represent communication links among peers, while the energy network and power system connections can be different [19]. Since this chapter focuses on local markets for flexibility procurement, each peer is considered to be a prosumer with the ability to produce, consume, and store energy.

Fig. 3
figure 3

A decentralized P2P electricity market (Arrows stand for communication links and cash flow; black arrows: among peers, red arrows: between each peer and upstream market)

In a P2P electricity market, the exchangeable product is a surplus of energy. Hence, a prosumer that has excess energy generated from its resources can sell it to a consumer who needs it. As a result, without intermediary supervision, a transaction takes place between two peers to trade a certain amount of energy at a price that both parties are agreed on. Demand and supply are the relying concepts of this market. Therefore, consumers and prosumers compete on asking and bidding processes to reach their goal, which is buying energy at a low price or selling it at a high price. This competition is what makes flexibility harvesting possible in a smart city.

For example, in the peak hours, as a result of increasing demand and lack of sufficient production, energy prices in the pool-based market begin to rise. This rising behavior in the energy price is due to increased production costs during peak hours. These costs can be related to traditional approaches for providing flexibility, such as contracts in adjustment and balancing markets. Now, the contributions of P2P markets to flexibility provision begin to appear.

In the aforementioned example, consumers are charged with more costs for buying the required energy. Hence, in those hours, they prefer to participate in a P2P market where they can procure their consumption at a relatively low cost. On the other hand, prosumers find the opportunity to sell their excess energy at a beneficial price, which is lower than the main grid price, to incentivize consumers to trade with them. As a result, prosumers compete with each other to offer a lower price compared to other prosumers. Moreover, consumers try to order at a higher price relating to the others. By doing so, flexibility is automatically provided by end-users competing to buy or sell the excess energy at a competitive price. Of course, the amount of flexibility highly depends on the amount of excess energy existing on the network.

Microgeneration, mostly DERs, can be used to achieve excess energy for trading in a P2P network. As mentioned before, although DERs bring challenges to traditional markets, in a P2P energy market, they are essential components to make P2P markets work. In such structures within smart cities, flexibility harvesting can be made feasible by using microgeneration in parallel with new technological advances in ICT.

Thanks to its distributed approach, P2P markets have a modular design, making them work even by collapsing any peers of the network. Consequently, without changing operation methods, new peers can add to the system [20]. This modular scheme not only brings more security to the whole network but also enables peers to access the local and updated data more conveniently. Moreover, since energy production happens in the local area, transmission losses decrease considerably.

2.2 Semi-Decentralized P2P Energy Market

Now, by decreasing the degree of decentralization, P2P market design can be modified to reach a higher level on the network. This semi-decentralized structure is illustrated in Fig. 4. It can be seen that, instead of individual prosumers, a group of prosumers trades energy with other groups of neighbors. This design is well suited for microgrids and any type of network which has a manager. Although some references may refer to this agent with different phrases, such as microgrid/community/district manager, the concept of this supervisory agent stays the same. Its responsibility is to manage the entire group by assessing their needs and making trades on behalf of them, with neighboring groups.

Fig. 4
figure 4

Semi-decentralized P2P market (arrows stand for communication links and cash flow. Black arrows, between peers and the manager; blue arrows, among neighbouring groups; red arrows, between each group and upstream markets)

Same as decentralized P2P markets, this group-based design can also readily be applied to smart cities. By doing so, different groups within the city can be shaped, each group consisting of prosumers who share the same goals. These common goals can be social objectives, such as reducing carbon emission by using green-only energy. Furthermore, in a semi-decentralized P2P market, each group can be treated as a microgrid.

Hence, by mixing qualities of both centralized and decentralized management, the flexibility needs of the whole system can be provided through P2P trading among microgrids. The coordinator plays an essential role in this market. Its responsibility is to assess flexibility needs according to the supply and demand balance within the microgrid. As a result, the surplus of energy in the microgrid can be traded with neighboring microgrids that need it. Moreover, in the case of existing excess energy after clearing the market, it can be traded with the main grid to provide even more flexibility for the whole system. Same as decentralized P2P market, thanks to its distributed nature, failing of any groups does not result in system collapse.

P2P markets are emerging in the energy sector while going through their beginning stages in the industrial area. Although these markets have lots of advantages, they need to overcome their challenges, for reaching mass adoption. Hence, in the following sections, a review of the advantages and challenges of P2P markets is provided.

3 P2P Markets Contributions in Flexibility Harvesting

The P2P energy market is a step forward toward energy democratization. Consequently, it serves many social benefits since it removes big players and each user can make a decision on what type of energy to buy and which prosumer to buy energy from. Peers can directly negotiate on the energy price while considering their preferences. The most beneficial outcome of such markets is when there are more peers with diverse production technologies, allowing the system to have excess energy even when there is no sunlight radiating on PV panels or wind blowing through wind turbines. The rest of this section is focused on P2P market contributions for enhancing grid operation and flexibility harvesting in smart cities.

3.1 Incentives for Flexibility Provision

In other flexibility approaches, even new ones like demand response, a lot of demand-side potentials remain unused. This is because there are not many incentives for an end-user to use its resources in a coordinated manner for enhancing grid parameters. Lowering the cost of energy is almost the only incentive for them to shift their energy usage. Hence, through this incentive, consumers shift their energy usage to off-peak hours or they have to buy expensive energy from the grid [21, 22]. Meanwhile, prosumers decide to use on-site production in peak hours and reduce the usage of grid energy. However, an important question remained unanswered: is this all the potential to expect from the whole demand-side of a smart city?

In other flexibility solutions, prosumers do not use the whole potentials of their DERs as a source of capacity. For getting the most out of DERs, they should be used in a coordinated manner to cover the required flexibility from the main grid. Reaching this coordination invites the use of a new market mechanism, which is the P2P energy market [23].

In this case, users can be incentivized by benefits that come from selling their excess energy to neighbors. It is worth mentioning that the word “neighbor” not necessarily refers to physical proximity, and it can be any individual that a peer can communicate with. By enabling this, new business models and opportunities can be created for households of a smart city to willingly provide flexibility for the whole system.

3.2 Decreasing Uncertainty

The intermittent nature of RESs is another factor that increases the need for flexibility provision in smart cities. Although recent advances in weather forecasting can help to decrease the amount of uncertainty, still it is a huge challenge to overcome, for transitioning to a sustainable smart city. In this regard, acknowledging the decentralized approach of P2P electricity markets, they can serve a group of resources with different technologies making energy from various locations. This distribution of energy production in a market results in more energy liquidity for trading while representing less uncertainty in energy availability. Hence, prosumers and consumers can complement their needs based on the locations they are trading from and the technologies they have.

3.3 Reducing Flexibility Costs

Another challenge of traditional flexibility approaches is the way that costs are shared among end-users. For example, costs related to capacity contracts for flexibility provision used to be distributed equally between consumers, even with the fact that they may not be responsible for the cost they are charging for. However, in a P2P structure, the costs of each energy transaction can be attributed to both parties involved in a trade. Hence, it serves as a better cost allocation approach compared with traditional flexibility solutions [24].

3.4 Risk Management

Capacity-related costs in conventional flexibility methods are a solution for retail suppliers to account for risks associated to load variations and generation uncertainty. However, it is proved that, for example, groups of wind power producers can share risks and achieve more profits by contracting together in the electricity market [23]. Hence, by efficient share of information in a P2P environment, groups of prosumers can contract to their supplier more efficiently, which results in decreasing the risk-related costs.

3.5 Energy Democracy

Additionally, in power systems, energy always has been assumed as a homogeneous product. Consequently, in flexibility provision, the only goal for the main grid is to provide flexibility at a low cost and maintain reliable operation of the network. However, this may not be the case for nowadays sustainable cities in which end-users have more expectations and preferences for using energy. In this regard, P2P markets make the opportunity for users to select the source and type of energy they want to buy from. It results in shaping different classes of energy and treating electricity as a heterogeneous product. For example, some prosumers may prefer to use green-only energy. In a P2P mechanism, such prosumers can track the source of energy and only trade with the supplier that uses RESs for energy production. This can incentivize new investments in sustainable production, since new preferences and expectations for energy users are required. For more insights about different energy classes, the reader is referred to [23].

3.6 Solving Grid Problems

While other approaches follow the traditional top-down structure, P2P markets can be considered as a collaborative approach for problem-solving in a power grid. In the case of grid-related issues, such as congestion or loss of production, peers are able to cooperate in solving the problem [2].

Finally, a summary of the aforementioned challenges in traditional flexibility approaches and their solutions in P2P electricity markets is presented in Table 1. It is worth mentioning that P2P markets are in their beginning stages, and like every other approach in this stage, they do present challenges that should be addressed. Hence, in the following section, a review of challenges related to the implementation of P2P markets is discussed.

Table 1 Advantages of P2P markets over the other flexibility solutions

4 Challenges of Flexibility Harvesting with P2P Markets

Several challenges need to be tackled to implement this new paradigm in large-scale projects.

4.1 Technology Diversity

For being a reliable flexibility solution, P2P markets need to comprise peers with various technologies for energy production. Also, if only a few users participate in a P2P market, it results in a lower diversity of technologies. In this case, a high share of the required energy for consumers need to be provided from the main grid. For example, if the predominant technology of peers is photovoltaic, the excess energy can exist only during the day. Hence, at the other times, consumers are forced to procure the required energy from the main grid. On the other hand, if a higher diversity of technologies is available when there is no sunlight, excess energy would exist through other sources, such as battery storages, electric vehicles, and wind turbines.

4.2 Production Efficiency

Efficiency is another factor to consider when thinking of P2P market designs as a flexible solution. Large-scale technologies for energy production are more efficient comparing to small-scale production. However, since energy production in P2P networks takes place in the local area, transmission losses would decrease considerably. Hence, lower transmission losses may compensate for higher losses in energy production. However, there is no actual method to accurately measure the difference between these two losses [23]. Also, due to limited production, the P2P market design is well suited for small-scale grids. However, in more developed cities with a higher population, energy needs are much higher to be provided with only onsite production. Hence, for large-scale deployment of P2P markets, more efficient energy production along with more diversity of technologies is mandatory.

4.3 Scalability

Scalability is another issue for P2P markets, especially when thinking of implementing such markets on a large scale. By increasing the number of peers, negotiations per second will rise up, and as a result, more investments in ICT infrastructures would be needed. Hence, in decentralized P2P design which comprises numerous peers negotiating with each other, handling all information and clearing the market in each second would make computational issues that should be tackled. However, using the semi-decentralized structure would partially address this issue.

4.4 Data Sharing and Privacy

While The distributed way of sharing information across the network is generally an advantage of P2P markets, it can make privacy and security issues. Hence, technical considerations in designing P2P communication have a high priority. One of the promising candidates for creating such scalable networks is blockchain technology which will be discussed in the next section.

4.5 Technical Constraints

Moreover, a lack of central control for decentralized P2P networks can endanger the secure operation of the grid. Although implementing a semi-decentralized network can partially solve this issue, still grid operator is not in control of transactions. Hence, there should be a mechanism for grid operators to partially predict transactions and ensure that each trade does not breach the technical constraints of the grid.

4.6 Technology Dependent

To reach a precise design for P2P markets, a variety of new technologies for the virtual layer would be needed, such as blockchain and the Internet of Things (IoT). Hence, users should be motivated to participate in this new transition and also acquire the knowledge for working with these new technologies and mechanisms for energy provision.

These are major challenges that P2P markets are faced with. To implement P2P markets in a large-scale manner and benefit from their great advantages for flexibility provision, these challenges should be addressed in future researches.

5 Distributed Ledger Technologies and Blockchain

The decentralized nature of P2P energy markets invites the use of distributed technologies. One of the promising candidates is distributed by ledger technologies (DLTs), especially blockchain technology. While P2P markets can exist without it, using blockchain can solve several challenges in P2P market implementation and accelerate their real-world adoption. Hence, in this section, an overview of blockchain structure and its contribution to P2P markets is presented.

5.1 Blockchain Structure

Generally, blockchain technology can be defined as a distributed ledger that stores the origin of any digital asset. Thanks to its distributed nature and the use of cryptographic hashing, blockchain can be realized as a secure and transparent database. Although the concept was described back in 1991 by Stuart Haber and W. Scott Stornetta, it was not until 2008 that its first real-world application, so-called Bitcoin, was introduced in a paper by Satoshi Nakamoto, whose identity is still unknown. Bitcoin is a cryptocurrency that can be traded in a P2P manner while all the transactions would be stored in blocks.

Blocks, which consist of digital information, get chained to one another and construct a public database. According to the application, digital information can be any data that is desired to be recorded. In the case of Bitcoin, digital assets are bitcoin transactions. However, typically, data within a block can be categorized into two pieces of information.

One type of data includes general information about the transaction, such as the date, price, identities, etc. As an example, for each trade in a P2P energy market, data can consist of the date and time of the trade, the amount of exchanged energy, the agreed energy price, the identity of both participants involved in the trade, etc. It should be noted that a single block is not necessarily the host of only one transaction. In some cases, like the Bitcoin blockchain, thousands of transactions can be recorded just in one block.

Another type of data consists of cryptographic codes for each block, which separates it from other blocks. This unique data, called “hash code,” is the identity of each block. Its purpose is to translate digital information into a structured piece of code. An example of a hash code generation based on the MD5 hash function is illustrated in Table 2. A hash code is the only indication that always distinguishes each block from the others. Since each block has also the hash code of the prior block, this mechanism also serves security purposes. As a result, if a hacker tries to alter information in a block, the hash code would change, and as a consequence, it would not match with the hash code of the next block. Hence, the attack would be detected by the network and the altered information would not be valid to add to the block.

Table 2 Hash code example

In a blockchain network, there is a specific approach to add new data to the network. Continuing with the Bitcoin example, assume a person makes a transaction, by sending a certain amount of bitcoin to another person. By performing the exchange, all information about this transaction will be sent to an existing block that holds other transactions as well. To get into the block, the transaction should be confirmed through a consensus mechanism. A network of computers, called miners, is responsible to validate new transactions and allow them in the blockchain. Through this consensus mechanism, computers ensure that the same amount of bitcoin is not spent twice, which is called double-spending. To do so, miners participate in a competition to solve complex mathematical problems. The miner that wins the competition would be legitimate to verify the new block to be added to the blockchain. By doing so, miners are rewarded with bitcoin cryptocurrency. Hence, a lot of people are incentivized to provide powerful processors to contribute as a miner in Bitcoin blockchain. Although this consensus method, called proof of work (PoW), would make a huge energy demand, it is needed to keep the Bitcoin blockchain works. After reaching a consensus, by assigning a hash code, a new block would securely and permanently be added to the network.

After the emergence of Bitcoin, a variety of other blockchain platforms has been introduced. Ethereum blockchain is one of the most famous platforms in this area. By using the concept of smart contracts, Ethereum has developed blockchain applications to a whole new level. Smart contracts are pieces of code on the blockchain that would be executed once specific conditions are met. Hence, it allows users to develop decentralized applications running on the blockchain network.

While Bitcoin and Ethereum are two cryptocurrency applications of blockchain, the technology is not restricted to cryptocurrencies, and it has a lot more to offer in decentralized applications. It is worth mentioning that Bitcoin and Ethereum are running on a public blockchain, meaning that everyone can participate in the network and take part in the consensus procedure. Nevertheless, there are also other types of blockchain, such as private, permission, and consortium blockchain networks which use different approaches in data accessing and recording.

5.2 Blockchain and P2P Energy Markets

Since blockchain technology uses a P2P architecture for communications, it seems to be the most natural choice to enable P2P energy trading in a power grid. It must be pointed out that blockchain acts more as enabling technology in P2P markets, while for a successful deployment, other ICT infrastructures would be needed to complement blockchain technology.

It should be noted that P2P energy markets can exist even without distributed ledgers like blockchain network. However, using these technologies would offer more benefits while addressing several challenges compared to centralized solutions. In a central platform, all information about each transaction, such as the amount, price, and origin of energy, settlement conditions, etc., should be processed by a central node. While by using a decentralized solution like blockchain, all peers can participate in verifying and processing new transactions. It not only makes the whole network more efficient but also results in much more reliability; since by failure of each node, the system still can continue to work. Moreover, by increasing the number of users, centralized approaches will suffer from scalability issues since a central server is responsible for handling communications and exchanges between all peers. In contrast, within a blockchain network, this burden will be shared among users by a consensus mechanism, making the whole system more scalable.

Therefore, by eliminating the need for a central agent like DSO, blockchain technology would contribute to designing a more secure, reliable, and scalable P2P energy market. By using blockchain, up to thousands of smart contracts can be processed near real-time without the need for a central server. Currently, the consensus approach in Bitcoin allows only seven transactions per second. However, other alternatives like Ethereum and Hyperledger are able to process tens and hundreds of transactions per second, respectively [6].

6 Practical Projects and Pilots Around the World

Up to this section, the concept of a P2P energy market, its contributions to flexibility procurement, and its enabling technology, blockchains, has been discussed. This subject has attracted considerable attention over the last years while an increasing number of pilots for P2P energy transactions are carrying out all over the world. In this section, we overview several P2P energy projects to investigate the deployment of this new concept in the energy sector.

6.1 The Brooklyn Microgrid

The LO3 Energy company has created a microgrid that runs on a P2P energy platform. This project was one of the earliest blockchain applications in the energy sector. In this microgrid, neighbors are able to trade the surplus of energy to one another. All transactions are implemented through smart contracts, which eliminates the need for a supervisory agent. The project uses tokens in the Ethereum platform to enable energy trading. Each household is utilized with a smart meter that continuously measures the surplus of energy. By producing energy through solar panels, each prosumer earns tokens. Hence, prosumers can sell their energy to other participants in the network by exchanging these tokens with them at an agreed price. All the payments would be performed by smart contracts and transaction information, such as contract terms, the amount of traded energy, and the identity of participants will be recorded on the blockchain network. Each user in the microgrid has access to the transaction log and can participate in the verification process. It is worth mentioning that the trading mechanism is similar to stock exchanges, where users can define orders according to the amount of energy and the desired price while the market would be cleared by matching these orders in real-time. For more insights about the project, the reader is referred to [9, 25].

6.2 Piclo Platform

The Piclo is the first online P2P platform in Britain which provides a marketplace to trade renewable energy directly. As a result of the partnership between Open Utility and 100% renewable energy supplier Good Energy, Piclo was launched in October 2015. Through P2P transactions, the project aims to provide not only fairer renewable tariffs for RES producers but also lower energy costs for consumers. Open Utility believes that P2P energy matching and related platforms can unlock the full economic potentials of decentralized generation and local communities in the future. Piclo, in its trial, has provided a platform for business consumers, such as The Eden Project, BDP, Benson signs, etc., to buy their energy directly from RES producers like Brixton Energy Solar, Logoch Wind Farm, Scandale Hydro, etc. Each consumer can define its preferences and freely choose the producer which they want to buy energy from. Similarly, a producer is able to see its buyers and select the customer which wants to trade with. Good Energy is responsible for contracts, meter data, the market balance, etc. According to meter data, pricing, and preferences of both producers and consumers, Piclo provides information visualizations and analytics for participants and also clears the market on a half-hourly basis. Through the Piclo platform, a consumer can buy energy from different technologies according to the preferences, time of the day, and also seasonal conditions. For example, the consumer is able to buy solar energy during the daylight while using hydro and wind power at other times of the day.

As a result of direct negotiation between producers and consumers, each producer can define its desired prices which may be higher or lower compared to other producers. The energy provider can add a description and explain the reason behind extra or discounted rates. For example, a producer can define a discount for local consumers within a range of 10 km. On the other hand, in the occurrence of an accident, the producer can define premium prices to receive support from the local community to partially cover its costs. Therefore, the community will collaborate to solve its problems and contribute to its development. Trial results show that consumers have welcomed such ideas and subscribed to pay premium prices while they can receive discounts through buying energy from local producers. For more information and reviewing other results of the platform, reader is referred to [26].

6.3 Power Ledger Platform

Power Ledger is a technology company that implemented blockchain technology in the energy sector by enabling people to trade electricity with each other. This company was created in 2016 and developed its very first project for energy trading in the south of Perth, Australia. Currently, Power Ledger works also on other applications such as energy tracking, carbon trading, virtual power plants, etc. Platform μGrid is one of the Power Ledger pilots which particularly focuses on enabling P2P energy trading in a community. It can create a local marketplace with defined rules to facilitate direct RES trading. The platform is able to provide energy efficiency and better management by tracking consumption and visualizing the flow of bulk energy. μGrid can incentivize consumers by providing cheaper energy, consumption visualization, and opportunities for new revenue streams for building managers. Moreover, it can incentivize energy providers to invest more in renewable energy facilities. This pilot is implemented on several projects in Thailand, Australia, Japan, and Italy.

One of the Power Ledger projects deployed in Australia aims to reduce energy costs by providing a P2P trading platform between prosumers and consumers in a local area. Therefore, prosumers can achieve more profits by sharing their surplus in the P2P platform. In the wholesale market, PV prosumers can sell the excess energy to the grid at 7 c/kWh while they will be charged 25 c/kWh for buying energy. However, there is a fixed price at 20 c/kWh for purchasing energy from the Power Ledger platform. Hence, the platform would incentivize both prosumers and consumers to participate in the P2P market and, by doing so, bring more flexibility to the whole system [25, 27].

7 Status Quo, Challenges, and Outlook

In recent advancements in ICTs technologies along with the increasing proliferation of distributed energy systems in the energy systems of the buildings and houses, the P2P energy market as a new concept is proposed to deal with the small-scale energy transactions in such distributed energy systems. The distributed nature of this market and opportunities for profit-making incentivize the new agents called prosumers to produce and consume energy locally. Local P2P markets are expected to affect the future of energy procurement on the demand-side of the network and provision of the required services for optimal operation of the grids.

Implementation of the P2P markets at the smart cities of the future brings the following advantages for the citizen:

  • They would benefit from energy democracy since they are able to freely choose the trading partner and the type of energy to buy.

  • Operation issues of the grids will be solved locally through P2P mechanisms in microgrids, districts, or communities which in turn reduces the imposed cost to the citizens.

  • Designed economic incentives and price signals for attracting citizens’ participation in providing the network services will also bring credit that decreases the total energy costs of the citizens.

Despite significant advantages, there are also several challenges, such as scalability, that need to be addressed for large-scale implementation of P2P markets. Therefore, developing proper methods for processing transactions and sharing information in a scalable manner can be considered as the future direction of research. Due to the distributed nature of P2P markets, using distributed optimization techniques to simulate such markets is also a promising direction. Another evolving research direction is the use of blockchain technology and cryptocurrencies to improve flexibility trading among users.