# Energy Blockchain for Public Energy Communities
## 1 Introduction
### State of the Art  
In recent years, many advancements have been made in using the blockchain as enabling technology for the development of smart energy grids and local energy communities (LECs) [2; 3; 4; 5]. Indeed, the availability of a completely independent and trusted third party allowed the sharing of certified information among the participants, enabling the possibility to reach a peer to peer (P2P) consensus on the optimal use of local resources [6; 7; 8]. These advancements are of particular interest when coupled with smart grid management and control technologies, which can provide fast and autonomous systems able to manage the operation of electricity systems. For example, in Reference [5; 9], the authors highlight the effective increasingly use of blockchain architectures in more and more use cases related to P2P distributed energy trading in smart grids.  
Blockchain represents a tool able to address the current needs of the decarbonization, decentralization and digitalization of the power sector, with a strong push towards enhancing the role of final consumers. The potential application of blockchain technology in future energy systems can be divided into two main categories of problems: (_i_) electrical energy and services trading in power markets; and (_ii_) renewable energy certification and active user tracing (demand response applications and flexibility services offered by prosumers) [10; 11].  
Blockchain technology is a set of shared and distributed data structures, or ledgers, capable of securely and automatically storing digital transactions without the need for a central authority. Thanks to its evolution compared to the first applications in the field of cryptocurrencies [12], its potential in many sectors is now recognized, particularly where it can be used in conjunction with other technologies, such as artificial intelligence, the Internet of Things (IoT), and advanced sensors and smart metering devices. In fact, while many of the processes related to power exchanges can also be carried out with first generation measurement devices and traditional centralized IT systems, the transition to the blockchain is necessary for the complete performance monitoring in future electrical systems. In particular, the use of the blockchain is unavoidable for managing and sharing real time data with the users of the electricity system (distribution system operators, traders, producers, and final customers), to ensure complete traceability of operations and verification of the requirements required for the provision of energy services.  
Definitely, blockchain-based platforms are of particular interest to small locally managed grids where the existence of a human led control center is hardly sustainable from an economic point of view. This is the case of LECs, formed by a small group of users, which would benefit from high-level automation of network management to develop local energy markets (LEMs) and P2P energy trading optimizations [6; 13; 14; 15; 16].  
Despite the great advantages connected to the implementation of distributed ledger technologies, there are still different issues that act as a barrier to their practical application. One of the main difficulties is privacy concerns since the users' consuming (or producing) habits cannot be removed from the blockchain once written. Although different promising efforts have been made in this field, the effective impossibility to remove this data from the ledger still pose significant concerns to the effective feasibility of the process, especially in relation to the new legislative norms in terms of personal data protection [9; 17; 18; 19; 20; 21].  
Anyway, the privacy concerns arising for residential users do not apply to public buildings and facilities. Contrarily, the public disclosure of this data can become a great advantage for both the society and public institutions [1; 22; 23].