# Blockchain Solution for Buildings' Multi-Energy Flexibility Trading Using Multi-Token Standards
## 2 Related Work
In the second category, many solutions advocate the adoption of blockchain technology for the implementation of decentralized demand response programs via peer-to-peer energy trading [25]. However, most of them are focused on electricity and fail to address other energy carriers. The blockchain-based digitization via tokenization could unlock more small-scale energy flexibility while considering the buildings' operational constraints, households' preferences, and social enablers enacting the compensation of flexibility shifting via remuneration from P2P trading [13; 26]. Tokenization in blockchain refers to the ability to associate a specific asset with it--in this case, the energy or the flexibility for producing and consuming energy. In [27], the design considered two types of tokens, monetary value through fungible tokens and energy with certification through non-fungible tokens. They focus on the entire token lifecycle management, from creating and bidding up to transferring and redeeming. In [28], the authors showed the possibility of creating immutable snapshots for token balance query based on an extension of OpenZeppelin's ERC-20 (for fungible tokens) and ERC-721 (for non-fungible tokens). Others consider the case of locking fungible tokens for trading in peer-to-peer energy, trading up to the point of transaction settlement using locks in certain predefined conditions [29]. [PERSON] et al. use Zap to represent the non-fungible energy tokens, with users being billed based on consumption with the possibility for Zap's metadata to be offloaded off-chain [30]. In [31; 32], payment schemes for trading renewable energy are analyzed from two distinct perspectives: the reward of the energy producers and the cost of energy consumption. Certain requirements are identified to ensure that the blockchain is not used maliciously, such as incentives to use one's own energy before buying from the grid. The multi-stage energy optimization and retrofitting solution [33] deals with old buildings that could be retrofitted for better energy consumption and production. In [34], the authors focus on the interoperability between blockchains, named cross-chain. The solutions range from atomic swaps, where tokens are exchanged at the same time, and cross-chain messaging, where values can be read and written between blockchains, to state pinning, where the hash of a particular block is pinned to another blockchain. In [35], X-as-a-service represents the value to society, which needs to mirror the reality on the blockchain, where X can stand for security, integrity, or some other value. The proposed architecture uses private authorities and implies an onion-layered system where each layer ensures a value. [PERSON] et al. consider the definition of a renewable energy certificate that has as a unit 1 MWh of green energy [36]. A renewable energy token is issued on Ethereum when the energy is fed to the grid, and the energy producer can trade it either against its own consumption or for profit. In the third category, blockchain and tokenization are successfully used in cross-energy sectors to reinforce trust. The idea of blockchain as a trust protocol between the real and digital world is introduced in [37]. As tokens are created by smart contracts, an external audit is recommended for trust, which can be implemented with the help of IoT devices. In [38], the authors focus on the circular economy and propose a framework for the digitalization of assets, where identity and ownership are identifiable and obey contracts involving a transparent token exchange. In [39], the digitalization of assets is carried out using the ERC-T(token) protocol, which replicates an ETF (exchange-traded fund). This differs from a fungible ERC-20 and non-fungible ERC-721 by not allowing reverse transfers. Some authors have considered the splitting of the ownership of the NFT token and the risk it poses to an economic system over any over-the-counter security [40; 41].