## 3 Motivation and Challenges
Actually, in a research report, published in May 2017, by the European Commission [35], they provide the total potential capacity of residential solar PVs, based on the proportion of available free space that can be used for the PVs installation. A graphical representation of residential PV electrical generation potential compared to the total national electricity generation capacity in the EU is illustrated in Figure 1 [35; 36; 37; 38; 39; 40; 41; 42; 43; 44]. It can be seen that, if exploited to its fullest, energy generated by households using only PV solar panels can be tremendously significant. Hence, residential electricity generation has great potential and in some countries such as the UK, and Belgium, it can reach 50% of the total energy being generated by the respective national provider. Further studies also showed that, if prosumers formed renewable energy cooperatives, the amount of energy generation capacity would strongly resonate. In this vision, extensive research that has been conducted in [45] revealed data in favor of our claim. It is stated, that 15,000 households own shares in wind electricity generation cooperatives, which consist of 40% of the electricity generated by wind, in Denmark. Germany as well played an essential role in the development of the RE market within Europe. In this regard, community ownership is estimated to have a share of almost 20% of the total onshore wind power. Another aspect of developing a smart contract for energy trade is local legislation and the legal framework of the country where it aspires to be implemented. How each participant is considered from a legal point of view is inferred according to his role and his interactions with the rest of the participants. This implies a set of rules and regulations that they have to abide by. For example, in Germany, if a prosumer is considered a business, he has to contribute to the balancing of the grid (the German Energy Industry Act) [46] and add a withdrawal policy, according to the Consumer Rights Act in the EU [47]. These regulations must be implemented and enforced by the smart contract to ensure that each participant complies with the laws to which they are bound. A typical example is the Enerchain project [48], which is an energy trading blockchain for peer-to-peer transactions, specially designed to be compliant with the EU's Regulation on Wholesale Energy Market Integrity and Transparency (REMIT). On the other hand, some countries' legal systems, obstruct the decentralized energy P2P market. For example, according to the EU Renewable Energy Directive [49], a \"renewables self-consumer\" consumes local energy that is generated behind the meter. Similarly, the Dutch law requires a provider certification for the sale of power to the electricity grid [50]. In such cases, the legislative framework should be amended accordingly. In this direction, one can cite the BEST (Blockchain-based decentralized energy market design and management structures) project in Germany, which is working to establish a bidding system for the open-source electricity market supported by the German Federal Ministry for Economic Affairs and Energy [46; 51; 52]. Figure 1: Residential PV electrical generation potential versus the total national electricity generation capacity in the EU. On the other hand, reliability is also given priority as the third challenge. Ensuring the electricity consumption data committed by the consumers be secure, remains of considerable importance. In the following subsection, the design of the proposed platform and its architecture is vividly explained, so that the approach that is adopted in our research to solve this challenge is made clearer. Lastly, we believe it would no doubt be useful to conclude this section with another challenge pertinent to blockchain and its applications as well as the technologies relying on current cryptographic algorithms in general, to outline future trends. Indeed, it is constructive to mention quantum computation as one of the promising directions for future development.