Peer-to-Peer Trading and Energy Community in the Electricity Market - Analysing the Literature on Law and Regulation and Looking Ahead to Future Challenges

The threat of climate change, significant growth in the number of prosumers and local energy generation, and the development of new technologies enabling new business models are all contributing to rapid change in the electricity sector. Within this context, peer-to-peer (P2P) trading and energy community (EC) are new, emerging modes of transacting energy that defy the traditional hierarchies based on vertical agreements between energy providers at the retail level and consumers. This article has two interlinked purposes. Firstly, it surveys existing published research that addresses the descriptive and normative legal aspects regarding the design and implementation of P2P trading and EC in the Europe Union. The second purpose of this article is to look forward. Designing and implementing markets for P2P trading and EC are complex challenges. Therefore, this article’s chief contribution is to provide an overview of the various legal issues that could or will arise in the wake of P2P trading and EC. Based on the literature review findings, the article lays out in clear terms the current gaps in knowledge. Our legal reasoning includes both sector-specific regulation and general fields of law. The remainder of the article is structured as follows. Section 2 clarifies the concepts of P2P trading and EC, as used throughout this article. Section 3 develops the literature review in the context of P2P trading. Session 4 does the same for EC. Section 5 concludes.


Introduction *
The threat of climate change, significant growth in the number of prosumers and local energy generation, and the development of new technologies enabling new business models are all contributing to rapid change in the electricity sector. Within this context, peer-to-peer (P2P) trading and energy community (EC) are new, emerging modes of transacting energy that defy the traditional hierarchies based on vertical agreements between energy providers at the retail level and consumers. P2P trading and ECs are primarily horizontal modes of exchanging energy between two or more so-called prosumers, electricity market actors who both consume and produce energy.
The terms P2P trading and EC are recent additions to the debate over energy regulation and have generated much interest among scholars and policymakers. P2P trading and EC are part of a broader trend towards the trading and sharing of electricity and other associated business models. These new concepts could contribute to the market integration of existing decentralised renewables generation, which currently lies in the hands of final customers and civil society. In addition, they may become a cornerstone for balancing the system at the local level by showing the potential for a decrease of grid dependencies and, ultimately, the avoidance of network costs. Last but not least, such models could also promote the energy transition through the expansion of distributed energy generation from renewable sources throughout society.P2P trading and EC differ from the established relationships in electricity markets, which have traditionally been between utility companies and passive final customers. For this reason, they do not sit well with the current state of energy law and regulation. In addition, they generate tensions with more generally applicable areas of law, such as consumer law, contract law, tort law, corporate law, competition law, and data protection, among others. These tensions pose a challenge to the implementation of P2P and EC models. This article has two interlinked purposes. Firstly, it surveys existing published research that addresses the descriptive and normative legal aspects regarding the design and implementation of P2P trading and EC. This literature review has entailed sourcing, reading, organising, and analysing published papers on either P2P trading or EC in the most relevant sectoral and non-sectoral academic journals and institutional reports in the last five years. Most of the referred literature considers P2P trading and EC in Europe, which is reflected in our choice to analyse the literature through the lens of European national laws and EU law. Furthermore, we consider not only legal scholarship but also interdisciplinary papers written by economists, engineers, and political scientists to the extent that we identified a relevant legal dimension to their claims and arguments. We organise the results of this literature review into blocks that represent the legal issues already addressed in the literature.
The second purpose of this article is to look forward. Designing and implementing markets for P2P trading and EC are complex challenges. Therefore, this article's chief contribution is to provide an overview of the various legal issues that could or will arise in the wake of P2P trading and EC. Based on the findings of the literature review, the article lays out in clear terms the current gaps in knowledge. Specifically, it identifies the expected legal and regulatory issues that could arise with the implementation of P2P and EC but have not been covered in legal research so far. Our legal reasoning includes both sector-specific regulation and general fields of law. We hope to incentivise the legal community to fill these missing blocks through academic research and the practical development of P2P and EC projects. * We thank Nicolò Rossetto, Jean-Michel Glachant, Hans W-Micklitz, Simon Vanhove, and Blanche Lormeteau for commenting on earlier and/or later versions of this article. Any remaining errors are ours. The research leading to these results received support from the Global Observatory on Peer-to-Peer, Community Self-Consumption, and Transactive Energy Models hosted by the Technology Collaboration Programme of the International Energy Agency. Robert Schuman Centre for Advanced Studies Working Papers The remainder of the article is structured as follows. Section 2 clarifies the concepts of P2P trading and EC, as used throughout this article. Here, we compare how the literature has employed these terms and how they have been defined in EU law. Section 3 develops the literature review and identifies the missing blocks in the context of P2P trading. Session 4 does the same for EC. Section 5 concludes.

Conceptual Clarification: From Self-consumption to Emerging Modes of Exchanging Energy
One of the main challenges in researching P2P trading and EC is the conceptual confusion that these terms still spark in debates among scholars and policymakers. There is neither a consensus nor a shared understanding of the kind of decentralised energy exchanges entailed in P2P trading or EC. For instance, while some include energy traded between final customers using intermediary online platforms in the definition of P2P trading, others would restrict it to trading between household consumers using blockchain technology. Similarly, while some refer to EC as any group of prosumers who self-generate electricity and share it among themselves, others would limit it to a group of prosumers who generate renewable electricity via a non-profit legal entity.
Given the range of conflicting definitions, we begin this article with a conceptual clarification. In order to do so, we compare the definitions adopted in previous publications by scholars and regulators with the definitions recently adopted in EU law via the Clean Energy Package (CEP). The paper thus makes no normative claim regarding the definition of P2P trading or EC (i.e., whether the definition adopted by us is optimal or more suitable to market practices) but simply establishes a conceptual framework for readers to navigate the following pages.
To explain the complexities of defining P2P trading and EC, we start by introducing the overarching concepts relating to the activation of the demand side in electricity markets-namely, individual selfconsumption (i.e., by prosumers) and collective self-consumption. It is followed by an introduction to P2P trading and EC properly.

Individual Self-consumption
Within electricity systems, the concepts of P2P trading and EC are closely linked to the notion of individual self-consumption undertaken by prosumers. In general, prosumers are market participants who both produce and consume their own goods or services. The term was first coined in Alvin Toffler's bestseller, The Third Wave, to refer to the increasing participation of consumers in the production of goods and services, leading to a blurring of the distinction between consumers and producers. 1 The notion of the prosumer entails three recurring areas of contention in electricity systems. First, there is a discussion about the types of actors that count as prosumers. For the purposes of this paper, we posit that the term prosumer refers to end-users who generate and consume their own energy, encompassing both individuals (including households), and large customers like hospitals, schools, or factories. 2 A second area of contention concerns the requirement that prosumers be connected to the grid. Parag and Sovacool identify two interesting future paths. While the first path sees millions of off-grid and selfsufficient agents managing their energy production and consumption autonomously, in the second path, consumers stay connected to the grid and provide services to it. 3 The jury is still out on which of the two 1 Alvin Toffler, The Third Wave (Bantam Books 1990). The third area of contention concerns the different ways prosumers can feed electricity into the grid. One option is to allow them to sell their excess electricity to a supplier in a net-metering relationship. Net-metering is, therefore, a pricing system that allows prosumers to send their excess electricity back into the grid at retail rates. Net-metering schemes were particularly popular in the early 2000s as a way to support the roll-out of distributed renewable generation. However, these schemes are currently being rolled back throughout Europe as more market-based policies increasingly replace them. Another option is to enable prosumers connected to the grid to either trade or share their excess electricity directly with third parties or through aggregators. 4 Because this paper's main subject is precisely prosumers engaging in trading activities or sharing self-generated electricity, we will focus on the second alternative.
Considering these three areas of contention, we offer a definition of prosumers that will apply through the paper. Prosumers are end-users who generate and consume their own energy, provided that self-generation does not constitute their primary commercial activity, and that they are connected to the grid, and do not engage in net-metering schemes.
Many jurisdictions are currently reforming their regulatory framework to include a definition of prosumers. It is also true at the European level. The EU proposed and approved several regulatory reforms in the CEP, which superseded the 3 rd Energy Package of 2009. The new package encompasses a number of EU legal instruments that, inter alia, put in place the legal framework to ensure the establishment and economic incentives for new modes of trading or sharing self-generated electricity such as joint self-consumption, P2P trading, and EC. As usual, in constructing this framework, the EU legislator firstly harmonised definitions and did so by giving meaning to prosumers at the outset.
The EU legislation covers the notion of 'prosumer' in the recast of the Renewable Energy Directive (EU) 2018/2001 5 (hereinafter, RED II) and the Directive on common rules for the Internal Market for Electricity Directive (EU) 2019/944 6 (hereinafter, IMED). However, instead of using the term prosumer, which is widespread in the literature, the RED II and the IMED adopt different terms to refer to activities commonly undertaken by prosumers. While the IMED adopts the generic term 'active consumer', 7 which does not distinguish consumers that generate their own electricity from those engaging only in demand-response, the RED II is more specific by defining it as 'renewable self-consumer'. 8 'active customer' means a final customer, or a group of jointly acting final customer, who consumes or stores electricity generated within its premises located within confined boundaries or, where permitted by a Member State, within other premises, or who sells self-generated electricity or participates in flexibility or energy efficiency schemes, provided that those activities do not constitute its primary commercial or professional activity.
'renewables self-consumer' means a final customer operating within its premise located within confined boundaries or, where permitted by a Member State, within other premises, who generates renewable electricity for its own consumption, and who may store or sell self-generated renewable 4 Council of European Energy Regulators, 'Regulatory Aspects of Self-Consumption and Energy Communities' (2019) <https://www.ceer.eu/documents/104400/-/-/8ee38e61-a802-bd6f-db27-4fb61aa6eb6a> accessed 2 September 2020. Internal Market for Electricity Directive, Art 2 (8) 8 Renewable Energy Directive, Art 2 (14). Robert Schuman Centre for Advanced Studies Working Papers electricity, provided that, for a non-household renewable self-consumer, those activities do not constitute its primary commercial or professional activity.
The concept of the prosumer in EU law, in its various forms, underpins the various models for the exchange of electricity discussed in this paper. For instance, both 'active customers' and 'renewable self-consumers', as defined by EU law, may act as self-sufficient agents, managing their energy production and consumption autonomously. On the other hand, they also share and sell electricity with third parties. Whenever an individual prosumer establishes a legal relationship with third parties to consume self-generated electricity in a condominium jointly, share power as a donation, or exchange in a trade relation, this prosumer is no longer acting autonomously. It becomes instead part of a decentralised system that could connect anywhere from two to hundreds or even thousands of prosumers.

Collective Self-consumption
The recent development of the sharing economy, along with the increased viability of individual selfconsumption, has led to an increasing interest in the direct sharing of electricity between prosumers. 9 In contrast to individual self-consumption, collective self-consumption is a term that could refer to any collective form of jointly energy production and self-consumption. A major characteristic of collective self-consumption schemes is that they constitute a specific activity that exists regardless of the specific organisational and market aspects. 10 In other words, whenever two or more customers come together to self-generate and self-consume electricity, a collective self-consumption scheme is formed, regardless of the nature of the legal relationship. For the purpose of this paper, this is the key difference between collective self-consumption, on the one hand, and P2P trading and CE, on the other. The latter are defined, among other aspects, by the specific types of legal relationships in which they are grounded.
Collective self-consumption is explicitly mentioned in both the IMED and the RED II. The IMED enables collective self-consumption by defining active customers as either an autonomous individual self-consumer or 'a group of jointly acting active customers'. 11 The RED II, instead, uses a more restricted definition of 'jointly acting renewable self-consumers': 12 'jointly acting renewables self-consumers' means a group of at least two jointly acting renewables self-consumers in accordance with point (14) who are located in the same building or multiapartment block.
The RED II restricts the concept of jointly acting renewables self-consumers to prosumers located in the same building or multi-apartment block. Considering this limited definition of the RED II, Frieden et al. make a distinction between jointly acting renewable self-consumers on a building scale and jointly acting renewable self-consumers on a block scale. 13 In this regard, either a condominium as a legal entity or a common ownership of property holders would manage self-generation and self-consumption among those living in that condominium and, as argued by Frieden et al., neighbouring condominiums. Some EU Member States, such as France and Austria, recognised collective self-consumption as a way of sharing production and electricity consumption even before the CEP came into force. With the enactment and ongoing transposition of the IMED and the RED II, collective self-consumption has 9 ibid. 10 Dorian Frieden and others, 'Collective Self-Consumption and Energy Communities: Overview of Emerging Regulatory Approaches in Europe' (European Commission 2019). 11 Internal Market for Electricity Directive, Art 2 (8) gradually been regulated at the national level, whichin turnhas produced various different ways of distinguishing between collective self-consumption, P2P trading, and EC have emerged.

Peer-to-peer Trading
For the purposes of this paper, we define P2P trading as a transaction of electricity between two consumers or prosumers as peers utilising an electronic platform. It is a horizontal transaction, which clashes with the traditional vertical structure of the electricity sectors value chain.
The literature combines the term P2P with different descriptions of certain behaviours, such as sharing, transferring, exchanging, and trading. However, these terms are not consistent with the nature of the underlying legal relationship. For the Council of European Energy Regulators (CEER), 'P2P energy sharing' is generally used as a broad overarching terminology that encapsulates all possible interactions between participants in self-consumption schemes (individual, collective and community self-consumption), including P2P trading. 14 In the CEER's report, the term 'P2P energy transfer' is used in relation to the use of blockchain technology as a tool for certification within EC projects. The term 'P2P arrangement' is also used in opposition to virtual net-metering, as a complement to vertically integrated arrangements and therefore as the opposite of horizontally integrated transactions. 15 Others do not apply these differentiations, and instead, treat 'P2P' and 'sharing' as synonyms. 16 For this part, the legislator uses the terminology 'sharing energy' 17 when referring to renewables self-consumers acting jointly in front of the meter. The legislator thereby distinguishes this conduct strictly from peerto-peer trading. 18 The analysed literature also asks which actors are covered by the term 'peer'. Some authors apply a rather philosophical approach, which states that P2P trading is a structure where all peers cooperate with what they have available for a commons-based distribution of goods. 19 Others use a more limited understanding and relate it to flexible, independent, grid-connected and direct exchanges of electricity. 20 The German Federal Network Agency, as well as Lang and Mueller, use the concept of P2P very broadly for both horizontal contracting between businesses (B2B) and consumers (C2C). 21 In this conception, in order to be considered as peers, the actors only have to interact on the same market level, but not necessarily as prosumers or consumers. For instance, two power generators that trade electricity B2B could interact within a P2P scheme. This is an uncommon position, as it is generally accepted that the actors participating in P2P trading are necessarily consumers who produce electricity themselves and who switch between being buyers and sellers, or simply prosumers. 22  P2P trading is often seen as a characteristic of the sharing economy. The term denotes prosumers directly engaged with each other utilising a platform tool to construct a marketplace on a local level or virtually. 24 However, the European legislator takes its own approach within the RED II, stating that: 25 Peer-to-peer trading of renewable energy means the sale of renewable energy between market participants by means of a contract with pre-determined conditions governing the automated execution and settlement of the transaction, either directly between market participants or indirectly through a certified third-party market participant, such as an aggregator. The right to conduct peerto-peer trading shall be without prejudice to the rights and obligations of the parties involved as final customers, producers, suppliers or aggregators. This definition talks very generally about market participants as peers. At first sight, the EU definition might clash with the majority opinion in the literature, which limits P2P trading to the new horizontal contractual relationship between prosumers and consumers. However, the European legislator links P2P trading specifically to renewable self-consumers in the RED II: 26 Member States shall ensure that renewables self-consumers, (...) are entitled: to (...) sell their excess production of renewable electricity, (...) peer-to-peer trading arrangements, without being subject (...) to discriminatory or disproportionate procedures and charges, and to network charges that are not cost-reflective; (...).
Although the legislator only associates P2P trading with renewables self-consumers explicitly, this does not mean that the trading behaviour is only open to these actors. Rather, the aim seems to be to protect the rights of renewable self-consumers specifically. In other words, the legislator wants to open up the possibility of P2P trading to these actors as well, because established, economically strong market players do not need special consideration in terms of procedures and charges in order to conduct P2P trading.
The European legislator makes no mention of the need for the trading to be carried out through a digital platform. Instead, the trade must abide by pre-determined conditions governing the automated execution and settlement of the transaction. Some authors see this as evidence that the legislation wanted to encompass trading models that are associated primarily with modern information technologies, such as blockchain, that have a high potential for automatization due to so-called smart, self-governing contracts, making the use of a digital platform a requirement in practice. 27 At the same time, the EU terminology is a recognition of the complexity and speed of modern electricity markets, in which it seems unlikely that P2P contracts without tailored conditions and automated execution could actually work in practice. As a result, the EU has chosen a definition that tries to be inclusive but understands P2P trading somewhat differently than most of the existing literature.
P2P trading is generally explicitly linked to the digitalisation of the energy system. 28 Digitalisation provides the data and connectivity that is essential for P2P trading. 29 This leads some authors to conclude 23 van Soest (n 2); Chankook Park and Taeseok  Looking at the wider economy, early digital platforms enabling P2P trading of services and goods, like eBay and Amazon, were the first to recognise the potential 'flattening' effect of the internet, whereby traditional hierarchies become less relevant. Conceptual works argue that the combination of new communication and energy techniques provides fertile ground for the rise of these kinds of transactions. 31 The thinking on P2P transactions in the electricity system thus forms part of a larger economy-wide trend of internet-enabled horizontalization. Platforms enabling P2P trading can also be considered collaborative platforms that offer offline services, such as the sale of electricity, and online services, like digital interconnection among prosumers and consumers. 32 According to the European Commission and its communication on the collaborative economy, "the term collaborative economy refers to business models where activities are facilitated by collaborative platforms that create an open marketplace for the temporary usage of goods or services often provided by private individuals". 33 More specifically, three main actors operate in collaborative platforms: i) service providers who share assets or resources acting as professional actors or on an occasional basis; ii) the users of these services, and; iii) the online platform acting as an intermediary that provides market operators with the digital interconnection needed to facilitate their exchanges.

Energy Community
For the purpose of this paper, the term 'energy community' (EC) and its variations, such as 'renewable energy community', 'citizens energy community', 'community self-consumption', or 'simple community', denote an organisation based on open and voluntary participation of civil society, which owns and controls its operations in market activities such as generation, distribution, supply, consumption, aggregation, energy storage, energy efficiency, or charging services for electric vehicles. Moreover, the primary purpose of ECs must be to provide environmental and social benefits for the community or local area, rather than financial profits. The definition of EC focuses much more on organisational and market aspects of this business model, in contrast to the abovementioned collective self-consumption schemes. 34 Therefore, ECs as distinguished in the present paper display four critical features in common: i) the organisational form; ii) the governance procedures to either access or manage the organisation; iii) the ownership of organisational shares and assets, and; iv) the purpose. There is an ongoing harmonisation of the use of the term 'community' in the EU internal energy market, which is aligned with the definition of EC employed in this article. It is due to the consistent definitions of 'renewable energy community' and 'citizen energy communities' introduced by the CEP in the RED II and the IMED, respectively. It is worth mentioning that consistency of the definition of EC is the result of excellent Lobbying for Change, as coined by Alberto Alemanno, 35 by REScoop (the European federation of renewable energy co-operatives) during the drafting of the EU legislation, which continues to serve the Member States in the current stage of transposition. However, before the CEP, there was no consistent use of the term community, and it is still a source of confusion in the recent literature and policy debates.
Community-scale energy generation is not a new feature of the sustainable energy debate. 36 Since the 1970s, the term community has been linked to the advocacy of alternative technologies for local, small-scale and collective approaches to sustainable energy generation, and against the mainstream energy policies of large-scale and centralised technical systems. However, there is an immense variety of ways by which those promoting community-scale energy have engaged with civil society. For instance, Walker and Devine-Wright distinguished existing community energy projects in the UK according to two dimensions: namely, the process and the outcome dimensions. 37 The process dimension concerns the need for considerable involvement of local people in planning, setting up, and, potentially, managing the project. 38 The outcome dimension focuses on the benefits of the project and how they are distributed among the local people. 39 Although the process and outcome dimensions consider the importance of civil society, they are silent about the organisational form of communities and the ownership of the distributed renewable plant or legal entity's assets.
These kinds of imprecisions in the use of the term community lead to the conceptual confusion between EC and other consumer-centred initiatives such as collective self-consumption, P2P sharing or trading. For instance, Vangulick and Ernst refer to prosumers exchanging their surplus generated energy with their neighbours and/or with actors located nearby as a community, even though the described initiative was not, in reality, a form of EC. 40 Similar misuse of the term community is seen in other commercial-oriented sharing initiatives such as sonnenCommunity, which allows customers with Photovoltaics (PVs) and batteries to share their electricity with other customers but whose platform is owned by the Dutch company Shell.
Since the CEP, the organisational dimension of EC has become an integral part of the definition of energy communities (ECs) in the EU. The EU legislation reinforces not only the process and the outcome dimensions but also the mandatory allocation of ownership of distributed energy resources in the hands of ECs. The decision to strictly define ECs represents an innovation. 41  introduces two very similar definitions of EC, contained in the RED II 42 as 'renewable energy community' and the IMED as 'citizen energy community': 43 'renewable energy community' means a legal entity (a) which, in accordance with the applicable national law, is based on open and voluntary participation, is autonomous, and is effectively controlled by shareholders or members that are located in the proximity of the renewable energy projects that are owned and developed by the legal entity; (b) the shareholders or members are natural persons, SMEs or local authorities including municipalities; (c) the primary purpose of which is to provide environmental, economic or social community benefits for its shareholders or members or for the local area where it operates, rather than financial profits.
'citizen energy community means a legal entity that (a) is based on a voluntary and open participation and is effectively controlled by members or shareholders that are natural persons, local authorities, including municipalities, or small enterprises; (b) has for its primary purpose to provide environmental, economic or social benefits to its members or shareholders or to local areas where it operates rather than generate financial profits; and (c) may engage in generation, including from renewable sources, distribution, supply, consumption, aggregation, energy storage, energy efficiency services or charging services for electric vehicles or provide energy services to its members or shareholders'.
The CEP is in the transposition phase, which means that EU Member States should bring into force national laws on the definitions of renewable and citizen energy communities by 30 June 2020 for the RED II 44 and by 31 December 2020 for the IMED. 45 Looking at the available literature, there are two approaches in which national laws are studied regarding EC definitions. One is the comparative analysis of national laws before the approval of CEP, while the other is the dogmatic analysis of how the definition of ECs could still diverge after the CEP's transposition. There is a broad consensus that the EU legislator left a few albeit important aspects undefined. It will be up to national legislators and regulators to make decisions on, for instance, the precise proximity requirement that defines a renewable EC. In this context, Member States will have the opportunity to experiment and eventually come up with innovative solutions and converge, at a later stage, towards best practices. 46

Energy Regulation
Conceptually, it is useful to split the electricity system into two distinct levels. First, there is the physical layer, which denotes the engineered network consisting of generators, wires, substations, etc. The physical system is controlled by a set of rules that can be described as grid regulation. Specifically, this includes the details for system operation and the responsibilities of all participants to keep the system stable. Second, there is the market layer, which is regulated through a set of market operation rules that aim to ensure efficient allocation of resources. Different markets within the sector can be distinguished, all of them partly characterised by different legal regulations. Firstly, the retail market, where energy is sold to the end consumer, can be differentiated from the upstream wholesale market, where mostly largescale energy producers and a few major consumers trade. In addition, there are markets for ancillary services, such as the provision of flexibilities or capacities as system services. establishment of so-called local energy markets, aiming for a system-friendly balancing of supply and demand on a local level, is being discussed in the political and legal sphere.
Consequently, in order to be able to engage in P2P trading, a player has to abide by both the rules on grid-system access and market access. This fact can turn out to be an obstacle for P2P trading and in the end, hinder its establishment. For this reason, the present section is divided in two. The first section covers the debate over the extent to which sector-regulation rules can facilitate or preclude grid access for P2P trading. The second focuses on the effects on market access.
To start, P2P energy trading is generally only possible if the prospective parties to the transaction have access to the electricity grid. Since the parties involved in P2P electricity trading are prosumers, as defined above, we will discuss the barriers to electricity system access from the point of view of these players. The challenges related to the integration of prosumers are primarily technical, but they are translated into regulatory issues through the relevant regulatory instruments.
The primary challenge is getting access to the network itself. Historically, large energy companies in most EU Member States were hesitant to allow prosumers to access the grid. As prosumer activities have grown from a marginal occurrence to a widespread phenomenon, regulators have gradually become more inclined to grant grid access to prosumers. The main regulatory instrument enabling prosumers to access the grid is rules ensuring third-party access. These rules were introduced as part of the liberalisation of the energy system, in order to prevent large integrated energy companies from limiting access to the network. The third energy package included relatively strong unbundling rules and stringent language on third-party access, to remedy deficiencies identified in the second energy package. The rules on third-party access have been strengthened even further in the CEP. The IMED states that third-party access should be granted based on published tariffs, applicable to all customers and applied objectively and without discrimination between system users. 47 This language makes clear that prosumers should be treated like other system users, thereby ruling out discrimination against them in accessing the grid. 48 A second issue relates to the attribution of responsibilities to actors for imbalances that arise in the electricity grid. If P2P traders are considered suppliers, they would be subject to the same requirements as large-scale suppliers. The IMED clarifies that prosumers are financially responsible for any imbalances they cause in the system unless they transfer the balancing responsibility to another party. 49 However, the allocation of responsibilities is intimately linked to the question of whether prosumers, and by extension P2P traders, should be seen primarily as consumers or as suppliers. The result is that while prosumers can continue to rely on consumer protection, 50 they are nevertheless treated more as suppliers for issues relating to the technical aspects of the electricity system. This creates an idiosyncrasy that cannot be solved without a close look at the general rules of consumer, contract, and tort laws, which we offer below.
A third issue related to P2P energy trading is that it is a complex operation relying heavily on modern communication technologies. Accordingly, successful participation of prosumers in smart energy systems depends not only on access to the grid but also on access to the telecommunications required for the operation of smart energy systems. 51  surrounding access to communications systems are less absolute. 52 The diversity of communication technologies allows for a variety of parallel networks. As a result, regulations on access to telecommunication regimes only include minimum guarantees, as the consumer has (in theory at least) a variety of telecommunication networks to choose from. It is argued that the current framework does not guarantee that smart energy services will be available to all consumers. Accordingly, a more robust framework for access to telecommunication networks, like the third-party access regime in electricity regulation, needs to be developed. 53 A fourth issue concerns the role of DSOs in enabling P2P trading. Although long-distance P2P trades are possible in principle, the natural environment for P2P trading seems to be the local environment. This local dimension raises questions about the role of the DSO in ensuring the smooth execution of P2P trades. Some authors argue that the DSO should take on more system operation roles, for example, as the coordinator of virtual power plants (VPPs) consisting of P2P traders. 54 It is also predicted that the transition towards a more distributed electricity system, of which the development of P2P trading is one example, will lead to a growing role for DSOs in system management. Besides, it is anticipated that DSOs will increasingly take on roles relating to ICT and data sharing between market participants. 55 However, this extended DSO role remains rather conceptual for now, and there are many outstanding issues, both technical and legal, to be solved before this concept can be operationalised. For instance, the question of how P2P energy trading business models are affected by the EU unbundling requirements must be addressed. The unbundling rules could be an insurmountable hurdle for certain business models that might otherwise offer great potential for accomplishing EU goals in market access. The impact of the unbundling rules has not been adequately discussed in the literature.
There are still two major issues that have not yet been fully explored in the academic literature. The first issue concerns network charges where electricity is shared over the public network. The IMED states that smart meters should be able to account for electricity put into the grid from the premises of the active customer. 56 Moreover, both the RED II 57 and IMED 58 ensure that prosumers are subject to cost-reflective, transparent and non-discriminatory network charges that account separately for electricity fed into the gird. However, neither the Directive nor the literature has clarified whether the network charges as they apply to standard electricity consumption should also apply to P2P electricity trading. A second issue concerns the role of the platform providers for P2P trades. The exact legal and practical design of these platforms is still unclear. While several authors have hinted that DSOs could take up this role, it remains to be clarified whether this would be in line with the unbundling rules.
Besides ensuring grid-system access, the implementation of P2P trading can be precluded by a lack of rules ensuring prosumers can access retail, wholesale or even flexibility markets. An essential first step is that P2P traders are recognised as market actors by the regulatory framework. From a historical point of view, the right to sell self-generated energy is not at all naturally given. 59 Prosumers were not entitled to the same level of market access as traditional parties, such as large energy producers, suppliers and traders. Researchers find that this historical background has led to a regulatory disconnect that 52 Diestelmeier (n 16); Diestelmeier and Kuiken (n 51). 53 Diestelmeier (n 16 (1) and (2)(e). 59 van Soest (n 2). Robert Schuman Centre for Advanced Studies Working Papers hinders innovation. 60 With the CEP, the European legislator has, for the first time, created a set of rules that explicitly addresses P2P trading. 61 Since it did so through a directive, Member States are now dutybound to transpose this set of rules into their national legal frameworks.
Nevertheless, this general inclusion of prosumers and P2P trading does not exclude the existence of other legal barriers to market access. For example, the regulator's requirement that traders have a retail supply licence imposes a significant constraint and complexity on innovative business models around P2P trading. 62 In addition, the legal framework lays out a clear set of rules on the supply of electricity, such as requirements regarding the form of contracts, reporting and information-transfer obligations, but also regarding the balancing obligations of energy suppliers. 63 The intense focus on a single-supplier model is also problematic. 64 Most of the current retail arrangements allow only a single supplier to settle the system costs on behalf of a consumer. 65 The existing retail market, therefore, prevents a multisupplier model. In practice, an individual consumer can, in most circumstances, only obtain his or her power from a single supplier. 66 A P2P trading scheme, in contrast, consists precisely of constant and short-term switching between different suppliers, for example between P2P trading activity and a backup supplier that can add supply capacity when the local production is insufficient. The single-supplier model also presents a hurdle for making use of flexible demand, although this limitation is partly tackled by the CEP, for example through the recognition of the role of aggregators and the possibility for consumers to conclude a contract with an aggregator without the supplier's permission.
Besides the removal of barriers, scholars also point to the importance of incentives for P2P participation. 67 Prosumers should be exposed to relevant price signals on the retail level and receive tangible financial incentives for adjusting their consumption pattern accordingly. Flexible electricity offers such as dynamic pricing, subscription models, and pricing according to comfort levels rather than kWh, are expected to become a reality for many consumers in the coming years, supporting the empowerment of prosumers and P2P schemes. However, there is a risk of cross-subsidisation in favour of prosumers, leaving behind those who are currently unengaged and digitally excluded. 68 In order to be able to engage in P2P trading, potential sellers need to be able to connect with potential buyers. In the case of P2P trading, there is usually a P2P platform provider. The literature contains discussions on the exact role of the P2P platform provider. Scholars see the role of the P2P platform provider primarily as a facilitator rather than an energy supplier. 69 They also believe that P2P transactions will generally take place behind the meter. 70 Morstyn et al. propose four paradigmatic models-namely, retail supplier platforms, vendor platforms, microgrid and community platforms, and public blockchain platforms. 71 In summary, the review of the research to this point has addressed the question of whether P2P trading is prohibited. Currently, P2P trading is not prohibited. On the contrary, the CEP aims to put the consumer at the centre of the system. The European legislator introduces new market participants and provides them with new rights and obligations. After its transposition into national law, this future regulatory framework is quite promising in its support for new business concepts such as P2P energy trading. 72 Nevertheless, the research has identified many practical hurdles posed by law, as well as a lack of incentives to get involved in P2P trading.
This discussion of the status quo in the legal literature leads to a multitude of open questions. Since P2P trading between prosumers is a new type of transaction, the rules relating to P2P trading and the scientific examination of them are still very much in their early stages. Thus, questions remain for entrepreneurs who want to implement new business models or prosumers who want to enter the market. A clarification of these terms will bring important legal security for prosumers and other actors. Furthermore, it appears that the literature relies solely on the new definitions of new market participants and trading concepts when referring to potential changes in the Member States' market regulations.
However, in order to truly understand the legal framework, it is necessary to read these terms in conjunction with all the rules that the European legislator has linked to these concepts. The RED II states that the concepts related to new market participants are connected to the obligation of the Member States not to discriminate against them within their national regulatory framework and not to impose unreasonable burdens on them. 73 A complete understanding of the legal framework, therefore requires a view on the relationship between these concepts and the relevant laws of the Member States. One of the principal outstanding questions will be how to distribute balancing responsibilities and other tasks amongst market actors in order to guarantee a cost-efficient and safe system, on the one hand, and an accessible system with low barriers to market entry, on the other.

Consumer Law
P2P trading primarily affects the role of consumers, traditionally seen as passive market actors. Indeed, P2P platforms are based on disruptive technological innovations designed mainly to empower consumers and promote their active role as prosumers. To this end, the spread of new models to generate and share energy forces a rethink of whether current legal instruments ensuring consumer protection in the electricity market could be adapted to P2P contexts, or whether it is necessary to conceive new, tailored legal solutions.
The main legal issue concerns the status of prosumers that operate in these platforms, particularly whether a prosumer that sells energy to another prosumer in a P2P platform is a business or still a consumer. Answering this question is crucial for stimulating the engagement of household prosumers in these innovative business models. It stands to reason that they will only participate if they are sure to maintain their consumer status and, consequently, continue to benefit from consumer law protections. The literature has tried to rationalise this question merely from a regulatory point of view, arguing that considering prosumers as suppliers could result in an unjustifiable burden being placed on them because they will have to comply, for example, with strict consumer provisions when they sell energy. As a result, imposing the obligations of suppliers on prosumers could prevent the rise of P2P trading platforms. 74 At the moment, there are no systematic legal answers to this complex topic. In this section, we endeavour to give some preliminary solutions to this issue, firstly by taking into account the more 72 Sinan Küfeoğlu and others, 'Digitalisation and New Business Models in Energy Sector' (University of Cambridge 2019). 73 Renewable Energy Directive, Recital 68. 74 Lavrijssen and Carrillo Parra (n 55). general European energy law framework and, secondly, by examining the compatibility of the innovative figure of the prosumer with European consumer law.
From a European energy law perspective, the question of whether prosumers have to comply with the rules imposed on energy suppliers is still unanswered. 75 According to Art. 21 (2)(c) of the RED II, renewable energy consumers are entitled to maintain their rights and obligations as final consumers. This notion of final customers also includes the category of renewable self-consumers and, therefore, household prosumers. As a result, household prosumers should continue to benefit from specific energy consumer protection provisions in addition to their general consumer rights. Similarly, Art. 2(18) states that the right to conduct peer-to-peer energy trading shall be without prejudice to the rights and obligations of the parties involved as final customers. However, even though the directives recognise the consumer nature of prosumers, it is still unclear whether, in disintermediated P2P electricity marketplaces, a prosumer should grant to other prosumers the basic contractual rights enshrined in Art. 10 of the IMED, and whether the public services obligations 76 should be imposed on prosumers.
In answering these questions, it bears noting that, because of their non-professional nature, prosumers acting as sellers could hardly ensure a high level of consumer protection to prosumers acting as users, at least if P2P transactions are not mediated by centralised platforms that take care of these issues. Similarly, it is implausible that they could handle complaints of consumers or other prosumers in a simple, fair and prompt manner 77 because they do not have a complex legal structure that would enable them to do so. This leads us to conclude that prosumers cannot act in the market as suppliers because their non-professional nature does not allow them to comply with the legal obligations laid down by energy law. 78 Moreover, enforcing the compliance of prosumers with the strict provisions imposed on suppliers would also violate the principle of non-discriminatory treatment to which prosumers are subject according to the IMED 79 and the RED II. 80 According to this principle, in similar circumstances, prosumers must be treated in the same way as other electricity undertakings, whereas in different circumstances, they must be treated differently than other electricity undertakings, unless there are objective reasons to do otherwise. If prosumers must not be subject to disproportionate and discriminatory procedures, they should not be required to comply with the same legal obligations imposed on energy suppliers to protect consumers and ensure the security of supply. 81 These preliminary findings on the legal nature of prosumers from an energy law point of view need to be coordinated with the notion of the consumer as outlined in European consumer law, in order to give a broader conceptual basis to our analysis. Is the energy prosumer, as described above, covered by the notion of the consumer according to European consumer law? Or should we develop a whole new legal category? Or should we consider him as a producer? We will examine whether energy prosumers can be considered consumers from a general consumer law perspective.
According to European consumer law, a consumer is a natural person who is acting for purposes that are outside his trade, business, craft, or profession. This notion does not differ much from the definition 75 Lang and Müller (n 27 of prosumer contained in the RED II 82 and the IMED, 83 according to which household prosumers are allowed to generate and sell self-generated renewable electricity, provided that those activities do not constitute the primary commercial or professional activity. In any case, beyond definitions, could the fact that prosumers act as producers or suppliers towards other prosumers and consumers in P2P platforms jeopardise their legal qualification as consumers?
The qualification of prosumers as consumers seems to be coherent with the gradual openness shown by the European institutions and the Court of Justice regarding the notion of the consumer. The intention of stretching the notion of the consumer is clear from recital 17 of Directive 2011/83/EU on consumer rights, according to which [t]he definition of consumer should cover natural persons who are acting outside their trade, business, craft or profession. However, in the case of dual purpose contracts, where the contract is concluded for purposes partly within and partly outside the person's trade and the trade purpose is so limited as not to be predominant in the overall context of the contract, that person should also be considered as a consumer. 84 Recital 18 of the Directive 2013/11/EU on alternative dispute resolution for consumer disputes reaffirms that if a contract is concluded for purposes partly within and partly outside the person's trade (dual purpose contracts) and the trade purpose is so limited as not to be predominant in the overall context of the supply, that person should also be considered as a consumer. 85 Stated differently, consumers acting for purposes that are predominantly-but not exclusivelypersonal can maintain their status as consumers. From this standpoint, P2P agreements are not concluded by household prosumers for dual purposes-partly commercial and partly not-but only to satisfy their energy consumption needs and, marginally, to sell the energy in excess in a non-professional manner. Even if the agreements between prosumers in P2P platforms were considered dual purpose contracts, prosumers would continue to enjoy consumer protection because the energy trading activity is marginal and does not constitute the predominant activity in the overall context of the supply contract.
Concerning the European Court of Justice, the recent Condominio di Milano via Meda case 86 and the Schrems case 87 could be relevant to our investigation. In the first case, the question referred to the Court was whether the concept of consumer within the meaning of Directive 93/13 precludes an entity, such as the commonhold association (condominio) in Italian law, which does not come within the concept of 'natural person' or 'legal person' from being regarded as a consumer in cases where that entity concludes a contract for purposes which are outside its trade.
According to the Court, even though a commonhold association does not fall under the concept of a consumer within the meaning of Directive 93/13, Member States' case-law can extend consumer protective rules to such an association. Consequently, the Court extends the scope of application of consumer law beyond natural persons by ensuring that the Member States can apply consumer 82  protections to subjects that cannot be legally considered consumers but suffer a situation of asymmetry of information and bargaining power vis-à-vis professional market actors.
In the Schrems case, the Court had to decide whether the activities of publishing books, lecturing, operating websites, fundraising, etc., entail the loss of a private Facebook account user's status as a consumer. The judges refer to the previous case-law of the Court, 88 explaining that the notion of a consumer is defined by contrasting it to that of an economic operator. They confirm that only contracts concluded solely to satisfy individual needs in terms of private consumption, outside and independently of any trade or professional activity, are covered by the special rules laid down by the regulation to protect the consumer as the party deemed to be the weaker party. Besides, the Court specifies that, in case of dual purposes contracts, consumer law provisions are applicable only if the link between the contract and the professional activity of the contracting party is so slight as to be marginal.
Consequently, consumer protection rules apply to contracts concluded by market actors that can be considered weak parties because they do not operate in a professional capacity. Precisely because of their non-professional nature, consumers suffer a situation of asymmetry of information and bargaining power towards contractual counterparties that are professional market actors. For this reason, the law lays down complex mechanisms of protection. Most importantly, the Court specifies that, in the context of consumer contracts, the knowledge and information that a person possesses or the expertise that person may acquire in a specific field cannot deprive him of the status of consumer. The position of prosumers in P2P platforms can be analysed through the lenses of these rulings. 89 Prosumers enter into a P2P agreement with other prosumers not to pursue a professional activity but to sell the excess of self-produced energy that they usually self-consume. Although they can acquire expertise in the field of energy trading, they do not have professional or commercial skills in this sector and act merely to satisfy their individual needs by consuming the self-produced energy and selling it only if in excess. The only actor who assumes a professional role in a P2P energy trading network and pursues commercial interests is the platform provider who manages the transactions. Prosumers rely on the complex system constituted by the network of peers precisely because of the monitoring role played by the internet service provider that ensures order and the proper functioning of the platform. In P2P energy platforms, and more generally across the entire sharing economy, the notion of the consumer as a subject who restricts himself only to consuming products or services in a passive manner is intended to be overcome by a broader concept that also includes prosumers, who remain weaker parties in contractual relationships (asymmetry of information and bargaining power towards the platform) but have a more proactive (non-professional) role in the market.
Another relevant but unsolved question at the intersection of general energy law and European consumer law is whether the traditional business-to-consumer (B2C) electricity market model is still  (2019) 11 Sustainability 5286. The authors analyse the Schrems case and argue that "according to the preliminary ruling of the CJEU, not all household energy prosumers would be subject to consumer protection law. Energy prosumers fall into two main groups for consumer rights protection law. According to the ruling of the court, one group of energy prosumers that acts as consumers (the trading activity is only marginal) would enjoy consumer protection; the other group, which acts for commercial purposes, would lose the consumer protection in relation to contracts that have commercial purposes. However as mentioned above, the wording of the Directive (EU) 2018/2001 'On the promotion of electricity from renewable energy sources' guarantees all household energy prosumers the protection of consumer law, even when their activities have commercial or professional aims. Consequently, such legal regulations can be considered as part of a support scheme for energy prosumers". However, this solution is not convincing, not only because of the concrete non-professional action of prosumers in P2P electricity agreements but also because prosumers that sell self-produced energy pursuing commercial interests cannot be classified as prosumers ('active consumers' and 'renewables self-consumers') according to Art. 2(8) IMED and Art. 2(14) RED II and, for this reason, they cannot benefit from consumer protection provisions laid down in energy law and general consumer law. appropriate regarding consumers' rights to transparent information insofar as the parties are equal and not professional. Indeed, a comprehensive legal analysis of the effects of the transposition of traditional consumer law guarantees in P2P contexts is still missing. Electricity consumers are subject to Art. 10 of the IMED, which provides the same contractual rights to users as Annex I of the repealed Electricity Directive of 2009 and is inspired by the traditional theory of information. This theory claims that the main instrument ensuring consumer protection is access to information because information about their consumption allows consumers to compare other offers from competitors and put into effect their right to choose suppliers freely. In this way, they can take full advantage of the opportunities of the liberalised internal electricity market. Accordingly, the question arises as to whether it still makes sense to adopt a traditional B2C model, which has the aim of addressing the information asymmetry between consumers and suppliers, if all prosumers in a P2P platform are considered as active consumers and operate on a level playing field.
A related outstanding question is how traditional energy consumer law instruments-such as the right to choose and switch suppliers, 90 the right to a highly regulated contract with an energy supplier, 91 and the right to receive detailed contractual information from suppliers-change in a market in which collective models of consumption are emerging and traditional actors are losing their market power. The platform (or even the internet service provider that manages the platform) seems to be the subject in the best position to ensure consumer protection to prosumers and consumers in P2P transactions. All these questions are deeply connected to another-namely, the legal qualification of digital energy trading platforms, which is of crucial importance from the perspective of consumer protection law.
P2P electricity platforms can be considered collaborative platforms in view of the emerging sharing economy. As the case-law of the European Court of Justice has shown, 92 a central question with collaborative platforms is whether they should be qualified as providers of information society services that allow consumers to keep in contact, under the e-Commerce Directive (2000/31/EC), 93 or whether it would be better to view them as energy suppliers. The Court has outlined the criterion of decisive influence as the method to identify the regime applicable to these platforms, such as Uber and Airbnb, in which some aspects relate to services, while others relate to goods. According to this criterion, a platform can be considered a provider of information society services if the intermediation service offered is autonomous and not merely ancillary from the substantive service, such as transportation for Uber or provision of accommodation for Airbnb.
The legal literature has not yet examined in depth the legal questions raised by P2P electricity platforms in the framework of the collaborative economy. However, some authors notice that the decisive influence criterion does not seem to be a solution that could be easily adapted to electricity P2P trading. 94 Indeed, it would be hard to see whether the digital connection of prosumers in the network has not had a decisive influence on the substantive service and can be considered as an autonomous service, or whether the digital interconnection is an integral part of an overall service whose main component is the supply of electricity. The IMED ensures a specific level of protection to energy consumers, tailored to their peculiar needs in a highly regulated market through the action of suppliers in the market. Not considering P2P energy platforms as energy suppliers would be problematic because it would result in prosumers being deprived of their rights as energy consumers, 95  imposed on suppliers. 96 However, even not applying the e-Commerce Directive could seriously affect consumers, thus diminishing the protective instruments specifically designed for consumers operating in a digital environment. The e-Commerce Directive contains a detailed list of transparency requirements 97 and regulates the treatment of online contracts, including the information that should be given to users before an order is placed, such as the different technical steps to follow to conclude the contract and the technical means for identifying and correcting input errors. 98 As a result, it appears that the most suitable solution would be to qualify P2P electricity platforms as providers of information society services subject to the e-Commerce Directive and, at the same time, as electricity suppliers, according to the Electricity Directive. It would ensure a high level of protection to consumers in their twofold role as digital consumers and as electricity consumers. At the same time, this dual qualification could assure a fairer competition by obliging providers of P2P platforms to comply with the strict market requirements imposed on electricity suppliers. 99

Contract Law
The traditional electricity market design was based on bilateral contracts as agreements between two parties-a buyer, and a seller. In a community of prosumers, the relationships between buyers and sellers can no longer be conceived as bilateral, because a P2P market implies multi-bilateral agreements between agents. 100 This represents a substantial innovation for the market structure of the electricity sector and raises significant questions about the contractual relationships among prosumers who operate in the same energy platform and share the electricity generated by their self-production units. Addressing the issue of the legal design of P2P platforms from a contract law perspective is of crucial importance for regulating the energy transition.
The main questions are related to the automated nature of transactions and depend on the decentralised design of electricity P2P trading platforms. Indeed, the innovative technological context makes it difficult to adapt the traditional contract law categories elaborated for transactions between consumers and suppliers to trading relationships among peers in a digital environment. Blockchain is the most promising technology to implement P2P electricity transactions, as the iconic case of Brooklyn Microgrid has shown. In this case, smart contracts running in a blockchain platform allow owners of rooftop solar panels to sell the excess electricity produced directly to their neighbours. The use of blockchain and smart contracts poses relevant contract law issues, mainly related to the difficulty of translating the computer code of smart contracts into human language and programming smart contracts in such a way that they can anticipate any eventuality. To this end, a strategic role also from a legal perspective is played by coders and developers, which can be considered accountable parties in so far as 'smart contracts are only as smart as the person who programs them '. 101 Moreover, in the current legal context in which smart contracts are not yet regulated, concluding P2P energy contracts also in the 'dumb' form could be the best intermediary solution to ensure a framework with greater legal certainty for energy consumers in case of disputes. 102 Smart contracts might be very successful in the electricity P2P market because energy transactions contain rules and terms that are 96 Internal Market for Electricity Directive, Art 9. 97 E-commerce Directive, art 5 and 6. 98 E-commerce Directive, art 9-11. 99 Schaub (n 32). The Author introduces the solution of the dual qualification of Uber, arguing that it applies to all collaborative platforms. 100 Sousa and others (n 19). 101 Lang and Müller (n 27). 102 On the necessity of 'code-and-contract' hybrids, see Mateja Durovic and André Janssen, 'The Formation of Blockchain-Based Smart Contracts in the Light of Contract Law' 19.
highly formalised and can more readily be translated into code. Indeed, contract law rules are characterised by flexibility and malleability, and the inflexible structure of smart contracts may be a problem in the case of complex and articulate transactions. 103 However, this aspect does not seem highly problematic for the energy sector due to the rigid structure of P2P electricity agreements.
Apart from the specific case of blockchain and from a more general standpoint, one of the main issues should be whether it is possible to adapt traditional contractual liability rules in P2P energy platforms. The question we must ask ourselves is who would be responsible and accountable for a breach of contract? Is the prosumer involved? Is it the platform itself or all the prosumers who participate in the platform that counts? In addition, it remains to be clarified whether it is possible to easily identify the defaulting part in a decentralised context in which transactions are launched autonomously in the platform. If this is not possible, it would be necessary to find legal solutions to manage disputes in networks of peers, emphasising the horizontal dimension in which these platforms operate.
Moreover, according to Art. 10 of the IMED, energy consumers have the right to a contract with their supplier that specifies the fundamental elements. It is necessary to find out how we can interpret this right in a disintermediated P2P context. Most specifically, who is the counterparty of the peers that interact with each other in the platform? The platform itself? Other peers? In answering these questions, it is necessary to find the most adequate contract law solution to ensure a framework of legal certainty to prosumers, consumers and, most importantly, vulnerable consumers, who may be the most affected actors by digitalisation and disintermediation.
All these questions lead us to explore another important, emerging issue that concerns the collaborative economy-namely, the allocation of liability for non-performance by the non-professional suppliers of offline services. 104 This question also concerns P2P electricity platforms, and the point is to determine criteria to define cases where a platform could be held liable for non-performance of the underlying energy supply service, or where this liability rests on prosumers. This question arises because platforms often act not as mere intermediaries but as the actual suppliers of the service. Platform providers operate as professional actors and assume the economic risk of P2P trading operations by defining the content of the supply contract, the terms and the standards that prosumers must meet to offer the performance.
To this end, the approach adopted by the e-Commerce Directive on "Liability on intermediary service providers" 105 could present an appropriate solution. Although these provisions have been applied mainly to infringements of intellectual property and personality rights and are not meant for the collaborative economy context, it should be stressed that the Directive refuses a form of unmitigated platform immunity and introduces liability for user conduct only when platforms have an active role in the transmission or storage of information. In principle, without going into the specific content of these provisions, platforms should not be held liable for suppliers' conduct as long as their actions do not correspond to the situations referred to in the e-commerce Directive. 106 Adopting the same regulatory approach could be useful to define whether electricity platforms should be held liable for non-performance by individual prosumers. It would be possible to introduce a sort of joint liability of the platform in cases where it exerts an active 'remote control' over the conditions under which prosumers provide the supply service (for instance when it determines at least the maximum fare, 103  when it receives that amount from the user before paying part of it to the prosumers or when it exercises a certain control over the quality of the way the supply service is provided).
This solution is also coherent with the philosophical foundations behind the concept of P2P trading in the electricity sector-namely, the idea of empowering and enabling consumers to become prosumers and to trade without intermediaries. Allocating the entire liability for non-performance on prosumers would preclude the success of these innovative marketplaces and create an unreliable environment for consumers. This because prosumers do not have the complex legal and financial structure required to offer energy services on their own, and, for this reason, they rely on the professional role played by the platform.
Finally, there are some issues related to international private law that should be mentioned, since peer-to-peer platforms allow their participants to exchange electricity not only with other members that are in proximity but also with consumers and prosumers that are further away. This is not a problem in cases of a national P2P agreement, concluded by national prosumers and consumers, and to be performed only on national soil. In this case, the P2P contract will be subject to the corresponding national law, which also determines the jurisdiction. However, concerning P2P international agreements, the issue is more complicated. A failure to properly determine the applicable law and the competent jurisdiction in the agreement would lead to legal uncertainty that could seriously affect weak parties in the market, such as prosumers and consumers.
Although some authors have addressed this issue regarding smart contracts and blockchain, 107 it has not yet been addressed by the legal literature on P2P electricity marketplaces. To overcome this problem, it could be useful to adopt a general agreement at the moment of the initial connection of prosumers to the platform that establishes the criteria according to which parties can choose the applicable law and jurisdiction in cases of need for judicial enforcement. 108 These criteria could be related to the place where the contract has been concluded, or where the hardware operating the platform is located, or even the place where the default has occurred.

Tort Law
The intersection of new energy technologies recalibrates the relationships within energy supply systems in favour of a decentralised energy-sharing network. In view of this, whether there is -or should bea middle-man responsible for energy supply is a core issue to investigate. While intermediaries challenge the fundamental assumptions of P2P systems, they also enormously ease the allocation of liability in case of dysfunctions (failures, accidents, or errors). So, one of the most relevant questions to address is where liability for accidents should stand in a complex system that combines traditional energy infrastructure with an automated digital grid based on advanced technologies, such as blockchain.
Indeed, using disintermediated and decentralised technology to implement P2P platforms could radically change the roles of market actors, posing the urgent regulatory question of how to organise responsibilities. In these decentralised contexts, system users could contribute to the quantity and the quality of supply, and this leads to weakening the need for intermediate entities, allowing peers to interface directly in a dispersed market. According to a legal framework that assigns to intermediariessuppliers and system operators-the responsibilities of electricity supply, how should these responsibilities be allocated in a context in which trust in intermediaries is replaced by trust in a technological system? Regulating the role of peers in decentralised trading platforms requires rethinking European University Institute 21 the design of market regulation because the changing role of system users makes it complex to enforce a measure of clear accountability in case of failures, accidents or errors.
From a liability perspective, the first step should be to address the disintermediation issue. Intermediaries significantly ease the allocation of liabilities in the case of system dysfunctions. Besides, they allow us to isolate such dysfunctions throughout the transaction flow. Conversely, disintermediation makes clear identification of liable subjects difficult to achieve. In this context, it is first necessary to identify the market operators affected by disintermediation. Is it energy suppliers? Or the system operators such as distribution and transmission companies?
Answering this question is essential because each market actor has different obligations towards consumers, so identifying the subject affected by disintermediation could clarify which responsibilities have to be redistributed. To this end, it should be noted that disintermediation involves electricity transactions at the retail level and exclusively concerns the supply phase, namely the market relationships between traditional suppliers and prosumers/consumers. The transmission and distribution layers, on the contrary, would be hardly influenced by the building of a disintermediated platform. These layers are closely connected to the technical management of the physical energy grid, 109 rather than the digital infrastructure that can be built upon it. Consequently, if failures concern the transmission or the distribution phase of the electricity supply chain, system operators can be held responsible according to the traditional liability rules in force in the electricity sector. On the contrary, if accidents are caused during the electricity supply phase, the liability, which traditionally is on suppliers (intermediaries), should be reallocated through the development of new legal mechanisms.
Having clarified this point, the second task is to address the issue of who can be considered liable in case of system dysfunctions. Stated differently, which organisational entity can be held responsible if the system fails in this decentralised context? More specifically, it is necessary to establish whether a single prosumer should be accountable to other prosumers in the platform in case of failures. If so, as noted in section 3.3., the non-professional nature of prosumers could be an obstacle to ensure adequate compensation to damaged parties. Moreover, in decentralised systems, it would be difficult to identify who has done what and therefore have a clear understanding of accountable actors and traceback failures in the energy supply chain.
To this end, it could be useful to introduce mechanisms of pooled responsibilities compliant with the current system in which suppliers and system operators are accountable to consumers. As a result, a distributed form of liability among peers that use decentralised technologies and take the risk of dysfunctions, failures, and errors may guarantee the reliability of the energy system and, at the same, promote participation to these platforms, introducing an element of legal certainty. From this angle, the benefits offered by decentralisation are balanced with the acceptance by all participants of the platform of the risks of failure. Therefore, if no one is directly responsible for how the platform works, but everybody concurs in it, then everybody should be liable for dysfunctions or errors. Otherwise, it would be no space for ensuring ex-post legal guarantees to participants in disintermediated systems.
From this point of view, consumers could claim damages directly from the entire network of peers in the case of highly decentralised platforms and be sure to obtain compensation. Then, at a later stage, those who had paid compensation and those who had caused the damage could regulate their internal relationships and decide how to allocate these costs. So, this system could guarantee to market participants both the certainty of being compensated in the case of failure and the distribution of risks that they cannot easily monitor because of decentralisation. And above all, this solution could ensure a balance between empowerment and self-responsibility on the one side, and the need for protection of consumers, on the other. Robert Schuman Centre for Advanced Studies Working Papers Finally, liability among market actors in the case of dysfunctions remains to be qualified in legal terms. The abovementioned idea of a system of pooled responsibilities seems readily adaptable to decentralised electricity P2P marketplaces. However, it should be clarified whether this liability concerns the breach of contractual obligations of market actors, or whether it should be classified in terms of non-contractual liability, denying the existence of a contract interconnecting all peers who trade electricity in a digital platform. In the latter case, it should be examined whether a regime of fault-based liability or strict liability might fit better in the context of energy supply activities. Considering the speed of electricity transactions and the decentralised environment of P2P platforms, proving the existence of the psychological element in case of system failures could be extremely difficult. In any case, where accidents are not caused by acts of individual prosumers but depend on coding or design errors, traditional rules on product liability can be considered applicable.

Property Law
Distributed energy generation and new peer-to-peer technologies also challenge the role of property law in the energy sector. In the recent past, property law was relevant mainly for the resources side of the energy sector, contrary to what happened in the field of production and consumption, in which property law issues were of marginal importance. However, today property tools should be the focus of the legal debate on the energy transition process, precisely because of the rise of innovative, decentralised business models. 110 Most specifically, some authors identify a new property-energy connection that can be summarised in this sentence: "if you want to put a solar panel on your roof, it has to be your roof". 111 This connection raises different legal issues, among which the so-called 'renter's problem'. Tenants have the possessory interest in the assets but not the authority to decide whether to install smart and distributed energy systems on the landlord's property. At the same time, tenants' occupancy is generally too short to reap the gains on any investment in installations such as rooftop solar. In contrast, landlords have the authority to make decisions and the time to reap a return on any investment, but they lack incentives to invest in such energy projects because they are not bearing the energy consumption costs. Given the increase in the number of people that rent their residences in the last decade, addressing this problem is of strategic importance to the spread of renewable energy sources at the local level.
Several ideas have been floated to address the renter's problem. 112 The first is mandating building upgrades so that all homes come to include energy efficiency installations and renewable-energygeneration assets. The second is the possibility of smart energy leases-voluntary mechanisms that would incentivise landlords and tenants to install energy efficiency technologies. A third way to overcome the renter's problem is to promote participation in energy-sharing projects and peer-to-peer trading platforms, in which parties pool their interests and cooperate to share their energy, like in energy communities as we address below.
Another related question concerns the role of property as a strategy for delegating authority to multiple agents in the context of distributed energy resources management. Dispersing the production of energy at the local and residential level means distributing control over the management of these resources, and so the power to make decisions. However, in the energy context, the shift of the centralised market paradigm towards a distributed structure could be problematic because grid operators need to provide a reliable electricity supply to various distributed customers. This means not only that transmission and distributions companies should adapt their modus operandi to this new scenario and govern the problem of the intermittency of renewable energies, but also that individual prosumers should become responsible for the management of the production units that they own.
Finally, we should also examine the connection between private law and public law aspects in the regulation of the entire energy transition process. Some authors stress that full ownership is still a precondition for participating in P2P agreements and, more generally, in smart and distributed energy projects. 113 This precondition represents a significant barrier to achieve 'energy democracy' driven by technological innovations, as some authors have theorised. 114 It appears that creating a really democratised energy market involving all citizens requires participatory mechanisms not based on ownership, but that enable consumers to be active, even if they cannot install solar panels on their rooftop. Considering ownership as a de facto precondition to participate in energy projects could be classified as a discriminatory treatment towards the most vulnerable consumers and is in contrast to the approach of the CEP, according to which all consumers ought to play a role in fostering the energy transition. In a nutshell, enabling only homeowners to become prosumers represents a disproportionate and discriminatory requirement that jeopardises the right of consumers to act as "active consumers" as enshrined in the IMED 115 and the RED II. 116

Competition Law
P2P energy trading is necessarily enabled through electronic platforms process data as a tool to connect peers. These platforms provide the foundation for multi-sided markets (or platform markets) that have at least two distinct user groups that provide each other with network benefits. 117 As new intermediaries directly connecting buyers and sellers, P2P trading platforms for electricity oppose the traditional pipeline model, in which a retailer makes a pre-selection of possible products. 118 As the developments in the sector for the sale of goods or short-term renting show, electronic platform intermediaries potentially gain enormous market power through network effects and economies of scale, 119 thereby having the ability to change market structures completely. This leads to new challenges for competition law. Firstly, scholars and policymakers are trying to address the enormous market power that such platform intermediaries can generate. When a market-dominant position has been achieved, its abuse is prohibited by the legislator (Art. 102 TFEU). To determine the existence of a dominant market position, market power has to be measured. For this purpose, the relevant market has to be defined in a geographical, product-and time-related sense. 120 Traditionally this has been done by analysing which products are substitutes for each other. 121 Kreifels and Podszun (n 117). Robert Schuman Centre for Advanced Studies Working Papers question as to whether such a market even exists within competition law. 122 Furthermore, there is a debate over whether multiple sides of a platform constitute several different markets or if the platform constitutes a market on its own. 123 The answer lies within a complex individual assessment of the products and services being traded, the network effects, and the possibilities for substitution.
When it comes to P2P trading of electricity, the complex conception of digital markets is combined with the equally complex outline of electricity markets. For example, it is unclear whether the product of electricity within a P2P trading scheme differs from the product of electricity from a central power plant or even from traditionally produced and marketed renewable energy. The outcome of the market definition heavily determines the existence of a dominant market position. Whereas market power has traditionally been assessed through market shares, in the context of the digital economy, this approach seems to be of limited use due to the increased volatility in digital markets. For example, the European Commission argued that in a volatile environment, market shares provide less indication of market power. 124 As a result, other factors are gaining importance in determining the dominant market position of digital economy players, such as the existence of barriers to market entry, network effects and access to data. 125 These factors will, therefore, also have to be considered for the markets in which P2P trading platforms operate.
As P2P business models are only just emerging, it seems that P2P trading platform intermediaries are far from achieving a dominant market position if we apply traditional market definitions. Conceptually, P2P platforms share characteristics of both the markets for fully digitised services and traditional business models. In this respect, the traditional regulatory and legislative approach seems capable of responding to the competitive challenges of such business models, for the most part.
Another issue is the way prices are set on electronic platforms enabling P2P trading. Depending on the exact structure of the business model, it is conceivable that prices will not be found dynamically and autonomously between the parties, for example, due to the usage of algorithmic pricing (which is potentially problematic in itself) 126 or manually, but that they are pre-determined contractually by the platform operator. The purpose of such agreements could be the stimulation of transactions in a systemfriendly manner, for example, concerning certain weather conditions or times of the day.
Nevertheless, it seems questionable whether such contractual conduct by the platform operator is compatible with Art. 101 TFEU. According to this article, all agreements between undertakings that may affect trade between the Member States, and which have as their object or effect the prevention, restriction or distortion of competition, are prohibited. Individual prosumers using the platform are undertakings within the meaning of Art. 101 TFEU, because the status of an undertaking does not depend, for example, on the intention to make a profit, but only on whether the actor is permanently economically active. Such contractual agreements on price determination are also capable of artificially changing market conditions since prices would possibly behave differently without such agreements. If these agreements are carried out not only nationally, but within the framework of a cross-border setup, an effect on the trade between the Member States cannot be excluded. However, in order to be covered by Art. 101 TFEU there must also be a noticeable effect. There is no noticeability if the relevant market is only marginally affected because of the weak position of the parties on it, making a violation of Art. 101 TFEU improbable. 127 The use of blockchain in platforms has also been covered by the competition law literature, where the development of the technology is either described as being hindered through existing regulations or seen as a tool to tackle legal hurdles. 128 Nevertheless, the academic discussions on blockchain and competition law seem to get ahead of themselves. For example, some authors argue that blockchain makes anti-trust law as we know it unusable because the very concept of blockchain as a trustguaranteeing technology contrasts with a legal area that intends to regulate anti-trust. 129 Nevertheless, the blockchain and competition law frameworks are striving for the same goal, namely decentralisation. Therefore, technology and law should work hand in hand instead of against each other, according to the approach of a regulation of and with blockchain. 130

Data Law
Even though the exchange of energy between prosumers could, in theory, be conducted without any digital framework, almost all authors and the European legislator agree that P2P trading consists of a certain degree of automation through the use of a digital platform environment. Therefore, P2P trading and other future business models necessarily depend on data. 131 This data relates, for example, to the consumption and generation behaviour of actors participating in a P2P trading scheme. Ultimately, it is used to combine the consumption and use of energy and to run through all further processes associated with it automatically.
Since this digital data must first be collected, smart meter infrastructure seems an essential prerequisite for the actual implementation of P2P trading. 132 Currently, such infrastructure is, to a large extent, not yet in place, since the data available to existing retail suppliers cannot be accessed by other parties and is often of poor quality. 133 Nevertheless, smart meter rollouts are happening across Europe, supported by the CEP. 134 The European Commission predicted in 2014 that close to 200 million smart meters for electricity would be rolled out in the EU by 2020. 135 At the same time, observers have noted that data from smart meters will have to be complemented by other sources, such as network data, data from electric vehicles and home appliances as well as the concept of the Internet of Things (IoT). 136 The use of data is regulated in the European Union. Data cannot simply be collected, stored, used or passed on. Data protection in the European Union finds its foundation within the General Data Protection Robert Schuman Centre for Advanced Studies Working Papers Regulation (GDPR), 137 which is directly applicable and does not require transposition by the Member States. Future business models, including P2P trading schemes, will have to be designed following this legal framework. Nevertheless, scholars have expressed concern about the current level of protection of personal data in the EU. The authors find that dynamic pricing and aggregation contracts collect enormous amounts of personal consumption data, which are the cornerstone of the whole system. They emphasise the importance of sustainable protection of such data. 138 If P2P trading is organised without intermediates, for example, based on blockchain technology, further legal questions arise. The use of a blockchain per se might already violate the European legal framework. There is quite some legal uncertainty as to the legality of blockchain-based smart contracts. 139 EU data protection law appears to pose major obstacles to blockchain applications, especially where they are public-facing. If personal data 140 within the regional scope of the GDPR is processed using a blockchain, the legal framework seems to be generally incompatible with the specific technology. This is because data subjects have the right to access their personal data and information relating to the data processing, 141 the right to the rectification of inaccurate personal data, 142 and the right to the erasure of personal data, the so-called 'right to be forgotten '. 143 A blockchain, however, is characterised as an immutable ledger, to which data can only be appended or deleted. According to Richard, Mamel adn Vogel, neither the draft proposal for a new ePrivacy Regulation (which acts partly as a lex specialis to the GDPR) nor the Commission's proposal for a recast IMED from 2016 (which includes general data protection provisions and references to the GDPR relating to data protection in smart metering systems) seems to offer certainty for blockchain applications. Consequently, in certain cases, the use of a blockchain is not compatible with the GDPR. 144 The right to be forgotten appears to be particularly problematic, leading to the finding that if Art. 17 of the GDPR is taken seriously in its current form, the use of blockchain technology in a wide range of areas is only conceivable in a manner that violates its basic principles. Therefore, the authors push for the evolution of data protection principles with regards to decentralisation and the internal digital market. In order to not endanger the innovation potential of blockchain technology in general, lawmakers are encouraged to reduce this right of deletion for complex and decentralised IT architectures in favour of a right to sufficient protective measures, in particular pseudonymisation. 145

Energy Regulation
Energy community (EC) represents a significant novelty in the landscape of the liberalised electricity market. ECs are collective actors with specific organisational and governance features, not primarily driven by commercial purposes. Contrary to collective self-consumption and other traditional market 143 General Data Protection Regulation, art 17. 144 Richard,Mamel and Vogel (n 128). actors, an EC is necessarily constituted as a legal entity (for example as a cooperative, public-private partnership, or an association) and has to comply with sector-specific governance rules on openness to new shareholders and members, effective control over decision-making and management, and ownership of organisational assets. 146 EC projects can assume diverse forms, ranging from large cooperatives taking full advantage of the open grid to off-grid island systems. 147 Several authors focus on the regulatory disconnect between the lofty goals of ECs as a legitimate way to promote the engagement of citizens in the energy sector and a way to streamline the energy transition and the reality that many ECs lack resources because of their small-scale, local nature, and non-profit structure. 148 Because ECs often experience difficulties navigating complex administrative procedures, authors call for a reduction of unjustified regulatory and administrative barriers. Such demands include fair, proportionate and transparent licensing and registration procedures, as well as fair, proportionate, transparent and cost-reflective charges. 149 In particular, there is a need to determine network charges through a cost-benefit analysis, which provides an opportunity to frame ECs in terms of the benefits they can provide to the energy system and the community. 150 The impacts of this regulatory burden have been discussed in light of EU primary law as well. 151 Following the general principle of 'equal treatment', it is forbidden to treat similar situations differently and different situations the same way without objective reasons. 152 In the Paint Graphos case, the European Court of Justice established the criteria of a non-commercial operator in order to determine if tax exemptions for co-operatives did not distort competition within the meaning of Art. 87 (1) TFEU. 153 The co-operatives in question were free from the interests of outside investors and were controlled by equal members, which in the eyes of the CJEU led to the conclusion that tax exemptions for the cooperatives in question did not violate EU law. Scholars are now applying this idea to the regulatory treatment of ECs.
However, the requirement for non-discrimination works both ways, and it cannot result in an unfair and inefficient deflection of certain costs. In particular, ECs using the regulated system infrastructure should contribute to the recovery of system costs and be rewarded only as far as their activity brings a reduction in those costs. For this reason, most authors accept that community selfconsumption should be subject to network charges and levies to a certain extent. 154 Exempting it entirely from those payments would represent an unjustified advantage and would penalise other network users that are not part of an EC.
ECs also touch on the role of the energy supplier. When self-consumption covers only a fraction of energy demand and a traditional market operator continues to supply the residual demand of the community members, a series of issues emerge. Traditionally, the supplier has been considered the only 146 Roberts (n 41 interface between individual customers and the rest of the energy system and the market. As a result, it has been vested with a series of duties like the collection of network charges and levies or the performance of specific universal service obligations. The development of self-consumption can compromise the delicate balance of rights and duties imposed on the supplier. In particular, it may lead to higher costs and lower revenues, undermining the economic sustainability of the supply business. 155 A significant issue that has not been settled refers to the amount of charges that community members should pay on the energy collectively self-consumed. The CEP refers to 'cost-reflective network charges' but does not provide further clarification. In a similar vein, the CEP states that national regulatory authorities shall define charges, tariffs and levies in line with a transparent cost-benefit analysis, but it does not provide details on how such a cost-benefit analysis should be performed. 156 National legislators and national regulatory authorities are working to clarify these issues. 157 The implementation of the new legal framework in the coming years will provide an opportunity to develop national approaches. We hope that this will lead to convergence on a shared vision, similar to the one that is currently emerging on the regulation of individual prosumers, where net-metering is now widely considered as an inefficient and unfair way of promoting distributed renewable energy generation via network regulation. 158

Company Law and Governance
The distinguishing feature of ECs in the EU is that they must be constituted as organisations. This means that a community initiative not constituted as a legal entity would be not eligible to be recognised as an EC. The RED II and the IMED also impose rules concerning the corporate governance of ECs. Art. 2(16) of RED II and Art. 2(11) of IMED establish that ECs must be based on the open and voluntary participation of natural persons, small and medium enterprises and local authorities. This means that the discussion on the enabling framework of ECs is heavily intertwined with issues that fall into the realm of company law and corporate governance.
The main legal issue concerns the non-harmonising legal forms that could constitute an EC. Member States have the discretion to choose the type of legal entity that may be used to form an EC. As a result, co-operatives, (limited) partnerships, companies with community interest, foundations, non-profit organisations, social enterprises, associations, and public-private partnerships have all been recognised as ECs. 159 There are also legal forms that are recognised only in a particular jurisdiction, such as civil law agreements in Poland, 160 collective consumer ownership in the Netherlands, 161 and non-profit customer-owned enterprises in Denmark. 162 Among the varieties of legal forms, scholars tend to agree that co-operatives provide the best model to frame ECs. 163 In co-operatives, the distribution of profits is limited, and any surplus is invested in supporting its members or the civil society. 164 Moreover, cooperatives that subscribe their foundations to the seven International Cooperative Alliance (ICA) principles are aligned ahead with corporate governance rules imposed on ECs, such as voluntary and open membership and democratic control by members.
The decision to not explicitly define a legal form for ECs at the European level has advantages and disadvantages. Member States can use their discretion to decide which existing legal forms are most appropriate for ECs according to their national company law. 165 National company laws may diverge in the treatment of legal entities in terms of decision-making, liability, tax advantages, start-up costs or administrative burdens. 166 On the one hand, establishing a dedicated legal form would reduce the risk of commercially oriented organisations seeking recognition as an EC to take advantage of EC-related benefits. On the other hand, Member States that diverge in the choice of the legal form may have to mutually recognise each other's legislation in order to avoid discrimination against ECs incorporated in another Member State. The absence of such mutual recognition might preclude the geographic enlargement of an EC and the decision to enter into cross-border operations.
The second source of debate about ECs concerns their modes of corporate governance. Corporate governance is the mechanisms, processes, and relations that govern how corporations are controlled and operated. It is about stakeholders, team production, director primacy, and shareholder primacy. 167 Both RED II and IMED establish mandatory rules concerning the governance of community initiatives to be recognised as ECs. These regard four rights and obligations-namely, i) eligibility for holding shares or memberships; ii) exercise of control; iii) open and voluntary access to participation, and; iv) distribution of costs and benefits of ECs.
Firstly, the eligibility for partnership or membership in the ECs is limited to certain categories of individual or legal persons. In this aspect, the EU legislator decided to take different approaches in RED II and IMED, which has been a source of confusion in the transposition phase. RED II limits the eligibility for becoming shareholders or members of renewable ECs to individuals, local authorities (including municipalities), and SMEs insofar as the participation of the latter does not constitute their primary commercial or professional activity. IMED, instead, takes a more relaxed approach by not placing limits on the eligibility rights to own shares or memberships. Instead, it limits the exercise of effective control of ECs to individuals, local authorities and SMEs. The purpose of limiting the eligibility to hold shares in ECs is to prevent commercial energy companies from unfairly taking over ECs. 168 Given that there is no limit on the eligibility to participate in citizen ECs, they have a higher risk of commercial-oriented energy companies trying to influence the workings of the community. This is 162 Salvatore Ruggiero  The second legal issue on corporate governance matters concerns restrictions to the exercise of control on ECs and the potential conflicts in the definition of company control in the CEP and national company laws. Both RED II and IMED use the term 'effective control' in this context. Although the CEP does not define 'effective control' precisely, IMED introduces a general definition of control. It encompasses 'the possibility of exercising decisive influence on an undertaking, in particular by (a) ownership or the right to use all or part of the assets of an undertaking; (b) rights of contracts which confer decisive influence on the composing, voting, or decisions of the organs of the undertaking'.
There are some legal issues at this point that we aim to shed light on. Firstly, it is not clear whether the definition of 'control' in IMED is meant to define 'effective control' for ECs. While Caramizary and Uihlen answer this question in the affirmative, 170 REScoop argues that the CEP grants the Member States the discretion to define 'effective control' in the transposition phase. 171 Secondly, national company laws often establish the conditions by which somebody will have a controlling position within an enterprise. As a result, there is uncertainty about how 'effective control' of ECs will be measured. Will it be according to the voting rights of shareholders as usually defined in company national laws, the definition of control in IMED, or an eventual ex-post assessment of whom de facto influences decision-making within those community initiatives? The latter might encompass not only shareholders but also financial institutions.
In RED II, renewable ECs must be controlled by shareholders or members that are in 'proximity' to the renewable energy projects that are owned and developed by the community. The definition of 'proximity' is to be determined by the Member States. Considering that the primary purpose of RED II is to create an enabling framework for the dissemination of ECs, what is the reason that justifies the geographical restriction of renewable EC activities? It is worth noting that neither the economic impact assessment for RED II 172 nor the Commission proposal itself considered or proposed such a geographical restriction on renewable ECs. Therefore, we believe that these measures are the result of a parliamentary amendment and, if so, need to be critically assessed by legal scholarship from a teleological interpretation rather than a textual one.
The third concern regarding corporate governance encompasses the obligation of ECs to be based on open and voluntary participation, which both RED II and IMED assert. The openness criteria mean that any individual or legal person eligible to become either shareholder or member of ECs could exercise their right of integrating community initiatives without being subject to unjustified or discriminatory conditions. The openness criteria are the turning point between recognised ECs and most of the so socalled ECs that lack collective ownership, 173 or public-private partnerships undertaken by local authorities. 174 This is the reason advocates for ECs underline the importance of distinguishing community ownership from participation with community benefits. 175 While the latter may be seen as a generous gesture made by commercial renewable energy developers to a local community, ownership and membership suggest that the community itself is taking at least some responsibility for aspects of 169 REScoop and ClientEarth (n 165). 170 Caramizaru and Uihlein (n 147 the project. In contrast to openness, voluntariness should be understood as ensuring the right of members or shareholders to leave ECs.
The legal issue concerning the openness and voluntariness of ECs also relates to the threshold between reasonable and unreasonable opt-in or opt-out fees. The obligation of being based on open and voluntary participation does not preclude ECs charging participants opt-in or opt-out fees. In fact, this is common practice considering that citizens can help finance renewable generation by buying in shares a renewables project. However, the EU legislation charges the Member States with ensuring openness and voluntariness without distinction between the different market activities that could be carried by ECs. In this regard, REScoop recommends that Member States consider the purpose of the EC. 176 ECs formed to set up new renewable plants need only be open to new members at the financing stage, while divestments could be limited to some extent. On the other hand, ECs for renewable self-consumption, sharing initiatives or district heating must be open to any member unless there are technical energy system limitations, while opt-outs must respect the normal rules regarding consumers' rights to switch suppliers.
The fourth and last corporate governance issue regards the non-commercial purpose of ECs. Both the RED II and the IMED, by defining ECs, establish that these legal entities must provide environmental, economic, or social community benefits for shareholders, members or the locality of operation rather than to generate financial profits. 177 However, EU law does not forbid ECs from making profits as long as the profits are reinvested into the community, nor does it preclude them from providing a return on investment to members. The legal issue is, therefore, to set a threshold between a reasonable and unreasonable distribution of profits or return on investment. REScoop recommends the Member States determine this threshold ex-ante in the transposition phase or by limiting CEs to legal forms that, per se, restrict distribution of profits among members (e.g., co-operatives).

Consumer Law
Consumer protection measures in previous EU energy regulation have developed in past decades on the premise that any service agreement between a natural person and energy incumbents is a consumer contract. As a result, individual consumers have been protected by sector-specific regulation on consumer protection rights, as well as general rules of consumer law at the EU and national levels. ECs are community initiatives constituted as legal entities that are entitled to engage in various market activities, such as the supply of energy, heating and cooling, provision of aggregation, energy sharing or self-consumption within ECs, and even ownership and management of distribution systems. Individuals could establish legal relationships with an EC as a shareholder, a final customer, or both simultaneously.
The variety of ways in which individuals can interact with ECs raises a challenge concerning the application of consumer protection rights to natural persons who are engaging in community activities as shareholders or members and, at the same time, as final customers. This question admits of no simple answer. The RED II establishes that Member States must "ensure that final customers, in particular household customers, are entitled to participate in a renewable EC while maintaining their rights and obligations as final customers". 178 Similarly, the IMED ensures that "members and shareholders of a citizen EC do not lose their rights and obligations as household customers or active customers". 179  undermine the motivation of consumers to switch suppliers from a traditional supplier to an EC. 180 Others assume that consumer protection rights in any kind of situation are granted based on a narrow textual interpretation of Art. 22(1) of RED II and Art. 16(1)(a) of IMED. 181 Although the wording of the Directives ensures that individual shareholders or members of ECs do not lose their rights as final customers, it does not imply that those individuals are entitled to consumer protection rights. Any preliminary finding on the legal nature of EC members needs to converge with EU consumer law and, eventually, national consumer laws. There are various ways in which ECs interact with members or shareholders in market activities. For instance, individuals investing in common renewable projects can do so as shareholders or as members of ECs. In this case, they are final customers but also investors. By contrast, individuals could take the position of contractual parties in energy supply agreements, besides being shareholders or members, where an EC operates as an energy supplier. Individuals could opt-in to ECs to engage in energy sharing or self-consumption energy schemes. The context matters and the application of consumer protection rights need to be interpreted in each case.
In the first scenario, natural persons who are members or shareholders, as well as contractual parties in supply agreements with an EC, are undoubtedly consumers. Under such a business model, ECs would own renewable-energy-generation assets and, under a traditional supply licence, would sell the energy back to the members as a service. In this case, consumer protection rights should not be affected by the establishment of an EC involved in the supply of energy, even if those consumers are also shareholders. Consumers have to be protected from unfair contract terms and should be able to exercise their rights, notably to conclude several contracts with different energy service providers or a detailed supply contract, to have accurate billing information, to switch suppliers, or to get help from a certified Alternative Dispute Resolution body.
In the second scenario, however, individuals could enter ECs as shareholders or members and, at the same time, engage in energy sharing or self-consumption schemes with the community. Both RED II and IMED establish measures enabling ECs to engage in energy sharing while stressing that community members must retain their rights and obligations as final customers. To add another level of complexity, IMED adds that citizen ECs must be treated like an active customer regarding network charges whenever they engage in consumption of self-generated electricity.
There is no technical definition of energy sharing in any of the provisions of the CEP. In the recitals of IMED, the EU legislator makes reference to sharing electricity produced using generation assets within citizen ECs by 'offsetting the energy component of members or shareholders using the generation available within the community, even over the public network, provided that both metering points belong to the community'. REScoop explains that by using smart meters, an EC, either by itself or through a third party, would virtually aggregate the load profile of members, and then allocate portions of sharing energy between members according to an established distribution agreement between them. 182 In legal terms, sharing energy means allocating the generated electricity owned by the community to community members or shareholders instead of selling it in the market. For instance, the energy received by the community member could be classified as a return on investment in a renewable project instead of a contractual transaction.
The key legal question is whether a natural person who-as a member of a community who has adopted multiple personalities as investor and final customer in energy-sharing schemes-could still retain his status as a consumer. As discussed in the prior sections on P2P trading, a consumer is a natural person who is acting for purposes outside his trade, business, craft, or profession, according to EU consumer law. 180 Roberts, Bodman and Rybski (n 159). 181 Energy Cities and others (n 150); Caramizaru and Uihlein (n 147); REScoop and ClientEarth (n 165). 182 REScoop and ClientEarth (n 165).

Tort Law
ECs constitute a new type of entity due to their membership structure, governance requirements and purpose, but the market activities they undertake are not different from traditional incumbents. Community-based initiatives can operate as generators, suppliers, aggregators, or even network operators. It is the reason a key concern of the EU energy regulation, as mentioned, is to ensure a level playing field between ECs and traditional incumbents without distorting competition. In other words, the rights and obligations applicable to the former should be applicable to the latter in a nondiscriminatory manner, which could range from the right to access a sort of renewable either to the obligations to compensate for imbalances.
Like P2P trading, the IMED provides that a citizen EC should be financially responsible for the imbalances that it causes in the electricity system unless it delegates its balancing responsibility to third parties. 183 From the Directive wording, it is indisputable that the EU legislator aims to preclude the Members States from waiving ECs' responsibility for imbalances, which can endanger power system reliability. Considering that contracting a third party to balance responsibility can be costly and challenging for a small initiative, 184 ECs can indeed be subject to liability claims for damages before system operators and final customers when licensed as retail electricity suppliers. However, could an EC participant, be it a shareholder or ordinary member, be equally responsible for imbalances?
The first legal issue concerns whether shareholders or members can be financially responsible for ECs' debits. The answer depends mainly on the type of legal entity that frames the EC and, above all, the applicable national laws. Roberts, Bodman, Rybski argue that the reasons for creating ECs as legal entities include limiting individual liability. 185 Notwithstanding, each type of legal entity may have different rules concerning shareholder liability, which usually ranges from liability for debts up to the value of shares to greater risks. Moreover, the risk allocation of similar legal entities could also diverge from one Member State to the other. For instance, in a general partnership, each partner has 'joint and several liability' for debts that are incurred by the partnership. Any partner can be held liable for all the debts incurred by the partnership. Alternatively, individuals can establish a limited partnership, which shields individual members or partners from absolute liability.
The second issue concerns the legal obligations of ECs to inform shareholders in advance about the liability risks. It is arguable that individuals or SMEs, which essentially operate as non-professionals, may raise objections with engaging in community initiatives if they are informed about their liability risk, if any. While the EU energy regulation is silent about the obligation of ECs to inform the liability risks to interested shareholders and members, the MiFiD II is not. MiFiD II is one of the cornerstones of EU financial services law. It sets out which investment services and activities should be licensed across the EU and organisational conducts standards that those providing such services should comply with. One of the organisational conduct standards concerns the disclosure of financial risks to investors in financial instruments.

Property Law
According to the legal definition contained in IMED and RED II, renewable energy installations and projects could be owned and developed by the same EC as a legal entity composed of all the members. In particular, the regime for ECs laid down in Art. 22 RED II and Art. 16 IMED represents the European 183 Internal Market for Electricity Directive, art 16 (1)(a). Member States play a strategic role in assessing potential barriers to the development of renewable ECs at the national level. Their focus should be on enabling vulnerable homeowners and tenants to participate in these communities. Energy community business models that are based merely on home property rights could have discriminatory effects on vulnerable and energy-poor consumers and prevent them from exercising their right to become 'active consumers' by participating in these innovative legal entities. At the same time, offering ownership of new renewable energy projects to local residents could be a critical factor in guaranteeing participation and the development of new installations and securing local support. 187 In other words, consumers should not only have the opportunity to participate in but also own renewable energy projects. In this regard, ownership entails the direct engagement of community members, who are responsible for some aspects of renewable energy projects and can be directly involved in the project planning process. Communities should be able to utilise a combination of different ownership models, with a mix between public, community foundation, and commercial ownership. Allowing these different models will support broad participation in community management. 188

Conclusion
P2P trading and EC are new modes of transacting energy. While P2P trading is a special form of energy exchange, which has to be considered in the context of digitalisation and the sharing economy, EC stands for a new form of organisation of plant ownership, energy distribution and participation in the energy system. Nevertheless, conduct in the energy sector is strongly determined by energy law and regulation, but also by other areas of law. This is necessary to ensure a secure, environmentally friendly and costeffective supply of energy in the EU. As a result, new energy supply concepts such as P2P trading and EC, which are subject to legal rules, are either inhibited-and therefore cannot be implemented-or they expose problematic parts of the legal framework in such a way that the legislator tries to adapt them.
With the CEP in 2019, the European legislator explicitly dealt with P2P trading as well as EC for the first time and created conditions in the energy and regulatory framework that should integrate the concepts into the system. Now it is up to the Member States to incorporate the standards of the Directive into national law. However, other areas of law, also increasingly affecting energy sector operations, remain untouched by the CEP. Problems have been uncovered in those areas of law as well. Looking into the future, it is clear that with regard to P2P trading, EC and the CEP, the European legislator demonstrated a legislative will to implement new concepts in the system. However, many legal questions remain unresolved, which leads to legal uncertainty that may deter investment in the sector.