## 2 Related Work
### Energy Trading Using Blockchains  
In this subsection, we will be highlighting the major role of blockchain in the use of energy trading [8; 9; 10]. P2P trading being a new trend in technology, requires overwhelming adoption by a large mass to claim success. This is achieved only if the needs and the possibilities of the individual are seriously taken into account. Using blockchain combined with smart contracts for reliable tamper-proof transactions are catching particular interest among the researchers' community and industry. As far as smarter and stronger feasible technologies with enhanced capacity and flexibility for power transmission and distribution (T & D) systems are concerned [11], the blockchain-based technology can be identified in two main classes of particular interest [12]; the first class, referred to as Electricalenergy trading, comprises principally P2P energy sales where today's energy systems are changing in ways that make old strategies obsolete [13; 14; 15]. The second class can be observed through the role of Certification of Renewable Energy emissions, which enables the prosumer in an aggregation program to be granted recognition as a participant. Additionally, Demand Response tracking, where the blockchain records the amount of green power that is injected into the grid, manages the remuneration mechanisms and ensures transparency. Moreover, this would allow the operating point of the power system to be continuously adjusted. A thorough review that elucidates what blockchain can do for power grids is found in [16]. The authors have considered an in-depth survey of the use of blockchain-based technology in the energy sector in general and the power grid especially, through a systematic categorization according to the field of activity, regardless whether this is coming from start-up companies or big technology firms. Meanwhile, a comprehensive review [3] analyzed the current trends in the energy market and how blockchain technology can contribute to this line. The authors in [17] have reviewed the demand response in smart electricity grids equipped with renewable energy sources. A critical survey was carried out in [18] that spotlights the benefits and challenges of electrical demand response. Furthermore, the work in [19] has shown how flexibility and forecasting contribute to reducing the need for grid extension, but this would require strengthened monitoring of the distribution grids. In other works, such as in [20], the authors have proposed a smart contract-based P2P energy trading system with a dynamic pricing model. In reality, several industries are investing in blockchain technology, albeit the expectations of researchers are very high, indicating the continual challenges of blockchains' applicability, in the energy sector particularly. According to the literature reviewed in the context of blockchain-enabled energy trading, it is noted that most of the p2p blockchain energy trading proposed platforms are based on energy tokenization. Energy asset-based tokens are created upon a defined energy amount generation. Created tokens can be traded, such as brikCoin [21], or redeemed as energy, such as WePower [22]. This paradigm suffers from two drawbacks that we aim to address:  
* Purchased energy under consumption: When the energy is redeemed using its corresponding energy token, consumers are not refunded in case of under-consumption. This issue can be deduced from the results presented in [23], where the author laid out the purchased energy versus its consumption using his proposed energy token, namely ForDelToks. It is seen that in most cases, the energy purchased is not fully consumed. Similarly, another work presented in [24] also highlights this issue. As a matter of fact, in the result presented by the author in his proposed token-based energy trading platform, it can be noticed that the seller tokenized surplus energy is mostly under-consumed by its respective buyer.