Decentralized transactive energy community in edge grid with positive buildings and interactive electric vehicles

Decarbonization, Digitalization and Decentralization are the three key pillars to meet the significant rise of energy demand with the rapid development of urbanization, which enable the global low-carbon economy with transactive energy market. The total energy consumption of buildings and transport accounts for more than 70% in global final energy consumption but renewables only meet less than 20% in the demand of heating, cooling and transport. Therefore, buildings and electric vehicles have great potentials in allowing the optimization and balance of supply and demand with their cross-sector transactive behaviors for full-scale flexibility. This paper provides a systematic overview of the positive roles of buildings and interactive transaction behaviors of electric vehicles in establishing sustainable transactive energy community from energy physical space, data cyber space, and human social space. Low-carbon transactive energy solutions with key technologies and latest advances for net zero energy building with high electric vehicle density is discussed in a hierarchical way. Internet of things as the fundamental architecture enables digitalization and interoperability of transactive energy. Blockchain as the core element enables decentralization and transparency of transactive energy. Edge computing as the accelerator alleviates the issues of blockchain and speeds up blockchain-based transactive energy. A comprehensive survey of currently known projects and startups on blockchain-based transactive energy for cross-sector local community with buildings and electric vehicles is provided in the end with the discussion of the open challenges and future perspectives for this promising area.


Introduction
Our planet is experiencing significant and accelerated climate change caused by greenhouse gas. Although carbon emissions are falling sharply in the first half of this year due to COVID-19, it doesn't last for long and starts rebounding when the primary countries in the world are restarting their economy. China, as the largest CO 2 emitter, has dropped carbon emissions an estimated 18 percent between early February and mid-March 2020, avoiding about 250 million metric tons of carbon pollution during this lockdown period due to falls in coal consumption [1]. Also from the prediction research report of ICIS, EU-wide emissions would have a substantial drop of 388.8 million metric tons (− 24.4%) in emissions all seemed to be on by the end of March in China and consumption in all energy sectors will also have a steady recovery of demand after the reopen of the world [1]. Therefore, moving to cleaner energy, increasing energy efficiency and making all energy sectors playing together is the long-term and effective solution for building a sustainable future.
More than half of the world's population now lives in cities that are responsible for 75% of global CO 2 emissions. Buildings are one of society's greatest energy consumers, accounting for almost 40 percent of global energy consumption and nearly the same share of CO 2 emissions [3], while energy used in transport sector represents almost 32 percent of total final energy consumption [4]. Therefore, Heating, cooling, and transportation represent a major challenge worldwide towards transition of renewable energy to clean energy. According to REN21 2020 global status report, more than 200 GW of new renewable energy capacity was installed in 2019, globally rising to total 2588 GW by the end of 2019 [4]. Although renewable energy grew three times faster than fossil and nuclear energy over a five-year period in generation, it only meets 14% of total energy demand in buildings and the lowest share of 3.3% in transport [5]. Electric Vehicles (EVs), which represent a paradigm shift for the decarburization of both the transport and power sectors by strongly coupling them, have huge global markets. The global stock of electric cars (passenger EVs) grew more than 40% in 2019 and there will be more than 1 billion EVs on the road by 2050 [6]. The significant scaling up in EVs deployment creates flexibility potentials for power sectors with smart charging patterns to switch their roles between loads and storage. Therefore, there is a huge potential for buildings and EVs making significant progress in moving to maximum the use of renewables by energy transaction among grid-connected renewable plants, distributed rooftop PV panels or wind turbines and energy storages. Also according to the context of the EU 2021 Annual Sustainable Growth Strategy, to achieve the climate neutrality by 2050, it is necessary to accelerate green transition towards clean energy through fast deployment of renewable energy and hydrogen on buildings and sustainable investment of electricity mobility, such as boosting demand for zero-and low-emission vehicles [7].
Transactive energy (TE), defined as the economic and control methodologies for managing the rate of consumption and generation resources and the energy trading within a power distribution network based on market mechanisms, is widely researched with the purpose of balancing the supply and demand energy network. The concept of TE was first introduced by the GridWise Architecture Council (GWAC) to unite demand-side influences with wholesale markets, retail markets, and system operations [8]. 140 research works related to TE from 2006 to 2019 have been comprehensively reviewed in [9]. The aims and research results have been classified into three categories: (1) transactive network management, (2) transactive control, (3) P2P markets. Business models, control methodologies and strategies for P2P trading market are discussed respectively in a single microgrid, multimicrogrids of a cell and multi-cells in [9]. A bibliographical survey on the applications of TE is provided in [10], including pilot projects, control structure and algorithm. Typical TE frameworks with corresponding applications and projects are introduced in [11]. It can be seen that most of the review research work on TE are from very macro perspective, focusing on the business models, frameworks, structures and control strategies, paying little attention to the practical implementation phase with the discussion of cooperative mechanism of crosssector energy components in TE.
From the policy perspective, EU in its "Clean energy for all Europeans package" [12] legislatively introduce the concept of energy community notably as citizen energy communities and renewable energy communities [13]. This framework aims to change the citizens' role from the passive consumers to active participants to contribute to the energy transition and efficiently help EU meet its 2030 climate and energy objectives [14]. It includes new rules that enable the engagement of citizens to participant in energy markets, through the whole value chain: generating, consuming, sharing or selling energy. Also in the "the revised Renewable energy directive (2018/2001/EU)" [15], the role of prosumers in renewable energy communities is strengthened, countries around EU should provide available schemes to support their participation in transactive energy. In U.S., the transactive energy concept is fast expanded in the whole country. The U.S. Department of Energy (DOE) announced up to $65 million on the topic of "Connected Communities" to expand DOE's network of grid-interactive efficient building communities nationwide in October 2020. [16]. It focuses on the integrated solutions of emerging technologies to maximize the building energy efficiency, such as how to combine and coordinate buildings energy with other types of distributed energy resources for deeper and wider energy flexibility. In China, fossil energy is still dominating in consumption. To achieve clean energy transition, "Energy + Internet" is proposed as a national strategy to promote energy revolution in China, which will promote the opening of energy markets to enhance energy cooperation from various sectors to increase the share of renewable energy. An overview of "Energy + Internet" in China is given in [17]. The National Standards Committee and the National Energy Administration issued the "Guiding Opinions on Strengthening the Standardization of the Energy Internet" in May 2019, which formulate more than 50 energy Internet standards, covering interactive technology standards for active power distribution networks, micro-energy networks, energy storage, electric vehicles, etc., to fully support the construction of energy Internet projects and technology promotion and application.
As analyzed above, the total energy consumption of buildings and transport account for more than 70% in global final energy consumption, but renewables only meet less than 20% in the demand of heating, cooling and transport. Significant progress should be made in sustainable energy distribution and transaction end-user network, which performs active energy management, optimize and balance supply and demand with maximization of renewables penetration by cross-sector energy transaction. This paper presents a comprehensive overview and analysis on the roles of positive buildings, interactive EVs and their interaction in promoting TE for achieving energy flexibility, people comfort and carbon footprint reduction from cyber-physical-social perspective. The main contributions of this paper are: • Symmetrically analyzes the roles, features and relationship of buildings, EVs and people in achieving sustainable green energy transition. • Discusses the great potentials and enablers of transactive buildings and EVs in energy community from three spaces: energy physical space, data cyber space and human social space. • Provides a hierarchical overview of key technologies and latest advances in net zero energy building (NZEB) with high EV density for sustainable TE, including IoT architectures as fundamental framework, blockchain key features, opportunities and risks for decentralized TE marketing with balance of privacy and trust, and the edge computing as the wings to speed up sustainable TE. • Provides a comprehensive survey of sustainable TE related scientific project and commercial startups in edge grid with buildings and EVs cross-sector coordination and transaction. • Identifies the current challenges and discussion about future work research directions towards sustainable TE with 3Ds: decarbonization, digitalization, and decentralization.
The remainder of the paper is organized as follow. Section 2 analyzes the roles of positive buildings and interactive EVs in TE community. Section 3 presents a hierarchical overview of key technologies for NZEB with high EV density in TE community from IoT architecture to blockchain framework with integration of edge computing. Section 4 provides a survey on the state of the art in scientific and commercial applications. Challenges and future perspectives are discussed in Section 5 and the paper is concluded in Section 6.

Roles of positive buildings and interactive EVs in transactive energy community
Energy consumption has dramatically increased in buildings over the past decade due to population growth, global climate change, more time spent indoors, increased demand for building functions and indoor environmental quality. As the largest consumer of energy in the world, it is necessary for buildings to consider the issues on energy reduction and shifting to renewables. Significant energy savings from fossil fuels can be achieved in buildings with properly designed, constructed and operated. Key solutions have been made to implement innovative energy sustainable technologies and formulate green building policies. From the energy perspective, NZEB has received increased interest during the past decade. The concept of NZEB is a building with greatly reduced energy demand which could be balanced by an equivalent generation of electricity (or other energy carriers) from renewable sources. In EU, the recast Directive on Energy Performance of Buildings (EPBD) put "Near Zero Energy Building" as the future target for buildings and set the NZEB as the target for all new buildings by 2020 [18]. In the U.S., the Energy Independence and Security Act of 2007 set a zero-energy target of 50% for new commercial buildings by 2040 and for all new commercial buildings by 2050 [19]. Therefore, global efforts to decarbonize buildings are promoting the development of NZEB and as of early 2020, 6 states and regions, 28 cities, as well as 48 businesses and organizations had signed the Net Zero Carbon Buildings Commitment [4]. On the other hand, human are the main body of the buildings, it is necessary for buildings to provide comfortable working or residential environment for people, offering powerful energy-aware services to improve people's quality of life. The buildings should be smart enough to cognitive human behavior on energy consumption and also including their journeys in buildings and between buildings (activity occurs in commercial buildings at the daytime on working days and in residential buildings at night), ensuring an optimal environment for consumers at all service touchpoints. Meanwhile, except for the role of demander for comfort, people also take the role of supplier for decision making into energy flexibility. It is necessary to consider strong impacts from people who bring in customized requirement as well as security and privacy issues.
Therefore, based on consideration of energy and people, the future requirements for buildings should be green and intelligent, specifically: (1) reducing CO 2 emissions, (2) improving people comfort. The research work refers to three spaces: energy physical space, data cyber space and human social space. Each space has a gap needed to be paved. In physical space, it needs to pave the road for energy flow, matching generation and consumption to penetrate renewable energy as much as possible. In cyber space, due to the fast development of IoT-based digitalization, huge amount of data with big velocity, big volume and big variety are generated from heterogeneous data source, it needs to pave the road for data flow to make big data valuable, matching digitalization and automation for serving both physical space and social space. In social space, it needs to integrate social concerns with technical progress to provide high quality of human living environment, matching the excessive modernization and socialization. Therefore, to achieve transactive local energy internet for minimization of energy consumption, maximization of renewable penetration and people comfort, it is necessary to establish transactive network for energy flow, data flow and human behavior flow. Fig. 1 shows how to enable the positive roles of buildings in transactive energy community from energy physical space, data cyber space, and human social space.
Although thanks to the development of distributed renewable generations, on-site energy storage, and also the drop cost of PV panels and IoT-based monitoring/control devices, the significant progress has been made in reducing energy consumption and increasing penetration of renewables, the high cost of battery storage is still a major challenge. Therefore, it is necessary to find other solutions to shift and storage redundant renewable energy. EV will be one of the effective solutions. The significant scaling up in EVs deployment create flexibility potentials for power sectors with smart charging patterns to switch their roles between loads and storage. Just like a coin has two sides, if only taking EVs as loads and V2G of V2B applied, the peak of the net load curve would increase by 20% with 100% EV penetration in 2050 in Denmark, Germany, Norway and Sweden. And also in only one Province (Guangzhou) of China, one million EVs will increase the peak load of the grid by 15% without any charging control and the peak load can be reduced by 50% if V2G or V2B is available [20]. According to IRENA, as mobile storage, future EVs battery capacity may dwarf stationary battery capacity. In 2050, around 14 terawatt-hours (TWh) of EV batteries would be available to provide grid services, compared to 9 TWh of stationary batteries. Therefore, EVs can be taken as a mobile energy infrastructure for smart green building, just as Grid can provide services for building to help balancing of supply and demand from renewables to achieve NZEB. The next generation of NZEB envisions that a NZEB is connected to multi-type energy infrastructures for energy transaction, such as utility-owned Grid, utility-owned or district-owned heating and cooling, and individual-owned EVs.
Now it becomes a more acute challenge in a sustainable energy distribution and transaction system with increasing amounts of renewable energy that offer fluctuations and unpredictability, high penetration of EVs that offer flexibility but uncertainties, and strong impacts from people who integrate individual demands and security issues via strong interaction with system. To perfect achieve TE in local energy internet level, the role of building turns into a positive player with three factors: (1) interaction with grid to be supplier or consumer for renewables transaction, (2) interaction with EVs to achieve mobile energy transaction, (3) interaction with occupants to be provider for people comfort and executer for energy flexibility from decision making. Therefore, it is necessary to work for a higher agility but trusted crosssector energy transactive system with optimized energy schedule, decentralized control, efficient energy distribution and trusted peoplecentric demand response, which can be adapted to the rate of change associated with the three above factors in market conditions for balance of supply and consumption from renewable sources.
Blockchain, with its four key technologies: smart contract, consensus mechanism, encryption algorithm and decentralized data storage, can practically deploy decentralized algorithms [21]. Blockchain has been proven to have capabilities for energy trading and optimization in energy internet, which enables the distributed ledgers shared by participants that can securely store digital transactions, without the need of a central agent. These transactions are aggregated into blocks, linked to one another by cryptography methods to form a chain of immutable information [22]. Therefore, it is believed that blockchain can take the role of coordinating energy, data and people to build a trusted and decentralized framework for energy transaction in buildings with high EV density. Fig. 2 shows the structure of blockchain-based transactive energy system with positive buildings and interactive EVs. It can be seen that buildings and EVs form the local energy internet, which effectively integrates and coordinates distributed renewables from buildings or houses and mobile energy units with plug-n-play interface for enhanced energy efficiency and flexibility from physical perspective. To consider human impacts, interactions of decision making for energy flexibility and requirement for comfort are integrated for coordination of smart green building and EVs network from social perspective. To digitalize and integrate energy physical concerns and human social concerns into cyber space for making data valuable, IoT-based interactive perception framework should be established as the bridge to connect physical world and virtual world from cyber perspective. To provide a trusted, scalable, transactive and balanced net zero energy community system, blockchain-based decentralized energy transaction platform should be provided for cross-sector energy transaction with transparent record and automatic security. Therefore, the success of implementing a TE system is inseparable from the support and contribution of key technologies and latest advances in net zero energy building with high EV density for blockchain-based TE. Features, methodologies, functions, standards and services of them are discussed in detail in the following section.

Key technologies for NZEB with high EV density in transactive energy community
As analyzed above, the success of TE implementation for NZEB with high EV density not only refers to energy supply side, but also depends on consumption side especially when the traditional one-way power transmission mode changed into a two-way power flow trip and the single role of customer becomes a prosumer who can act as co-creator with the grid and actively take part in transactive energy programs. IoT-based digitalization technologies and data-driven innovations facilitate user-interactive energy distribution and transaction network with highly integration of distributed energy units, human behaviors and also cyber security issues. This section will review the key technologies from cyber physical perspective to fill the research gap in decentralized TE implementation for NZEB with high EV density.

IoT as the fundamental architecture for digitalization and interoperability of TE
According to Statista's report, the total amount of connected devices to the internet is estimated to be more than 75 billion in the world by 2025, increasing five times in ten years [23]. The trend of IoT is the ubiquitous interoperability of everything in residential buildings, factories, cities and countries. To add intelligence and enhance automation of existing energy systems, new digital devices and advanced smart technologies are strategically developed and deployed in various sectors. IoT allows the integration of all kinds of hardware and software, networks and platforms, services and applications. The IoT architecture acts as the backbone to support cross-device integration, cross-network interaction, cross-data communication, cross-service convergence and cross-sector transaction. It fully explores flexibility potential from endusers who are enabled as prosumers to trade and purchase energy from each other [24]. A number of IoT reference architecture models with specific building blocks are derived from general IoT architectures by research institutions, standards organizations, research projects, legal entities, public associations or large companies. The role of reference architecture is to act as an architectural design pattern and provide guidance for the development of concrete architectures. From the initial three-layer architecture, in which only basic minimal layers are defined, to the Fog/Edge based architecture, in which another four layers (Monitoring, Preprocessing, Storage and Security) are inserted as the fog layer. Fog/Edge computing-based IoT (FECIoT) architecture, enhancing the provision of fog/edge computing-based services distributed along the Cloud-to-Things continuum, enables a scalable and adaptable IoT platform with reliable sensing, actuation, analysis and control with millisecond response time [25]. Research groups and big companies derived its own IoT reference architecture from traditional ones by constantly enriching middleware values and adding end-to-end microservices to make it more flexible and intelligent. Table 1 shows the summary of the general IoT architectures and the existing significant IoT reference architectures proposed by famous standards organizations and large companies.
For IoT architecture, a closed-loop digitalization structure with integration of data flow and energy flow should be designed to achieve energy-aware automation from data-driven innovations by establishing the digital bridge between physical layer (transactive energy network) and service-based layer. Then, instead of considering energy management from the country level in traditional energy systems, the prosumerparticipant P2P energy transaction mechanism is triggered from residential level with the development of IoT digitalization architecture in supply side and demand side of energy community. IoT architecture enables interoperability of TE, which involves more and more individual prosumers, such as buildings, homes and EVs. This P2P energy market will reduce the renewable energy cost and enhance the energy flexibility in energy community and its neighborhood. Fig. 3 presents the diagram of TE derived from this closed-loop IoT architecture. Data flow, control flow and energy flow, which are triggered by functional blocks and intelligent services, are mapped to the corresponding module. The conventional power generators which trade with large demand offers are connected to the wholesale market, while transactive energy enables a vison for the interaction and cooperation of retailers or even directly P2P trading in local energy community with decentralized methodologies. Therefore, currently, the energy transactions are generally executed between wholesale and retail markets which equalizes the opportunities for all participants [39]. Buck generation from large wind farms, solar farms or grid storage farms are traded via wholesale energy market, while distributed energy generation from buildings and EVs are traded via retail energy market. Trading models for coordinating these two markets are also a hot research direction in TE.

Blockchain as the key enabler for decentralization and transparency of TE
The energy system is undergoing a rapid transition towards 3Ds: the decarbonization with increasing share of wind and solar energy, the digitalization with IoT and advanced intelligent control, as well as the decentralization with small-scale distributed generation and storage [40]. The legacy model of one-way energy flow from buck generation plants to consumers has been gradually transformed into consumercentric (residential and commercial) energy market. This change not only poses a threat to the conventional business models but also the stability and resilience of energy system and markets. Therefore, the market framework should be reformed to allow all distributed resource owners to participate in and share value with each other, as well as guarantee a stable, scalable, sustainable, transparent and transactive  [33] (continued on next page) market with high security [41]. Blockchain, which allows a cooperative network of mistrusting parties to securely transact with each other, enables a new marketing world of decentralized coordination and transparent transaction, offering residential and commercial actors (individuals or organizations) a digital trusted platform to directly buy and sell energy with each other [41]. Known as a trust enabler, blockchain empowers the distributed-optimization-based trading schemes which can help prevent energy market failures in multi-energy community trading caused by dishonest market players [42,43]. In this section, we will have a detailed discussion on blockchain in its key features, opportunities and risks for TE.

Key features of blockchain in TE for NZEB with high EV density
Although blockchain technologies are still in their infancy, they offer many possibilities for energy sector, managing the entire distributed energy value chain in a more disintermediated and efficient way [44]. Except for the P2P energy trading, it also includes trusted decentralized energy management of generation and distribution, automatic integration of distributed renewables and mobile energy storage, trusted smart assets management of transport and buildings on supply and demand sides for efficient plug-and-play, as well as security and privacy for accelerating growth of data generated from huge amounts of IoT devices, services and applications. There are mainly four key features of blockchain technologies that will make the above possibilities a reality [45,46]. Fig. 4 presents the summary of these key features applied to TE, including concepts, contents, as well as specific services and applications provided for TE.
• Consensus algorithm is the core feature of blockchain technology, which is the foundation and responsible for the success of the unknown peers in a distributed computing environment to trust with each other. There are many consensus algorithms and each algorithm has its own strengths and constraints, which will have different impacts on performance and security. Researchers have done a lot of work on comprehensive review and comparative study which could be referred to [47,48]. • Encryption algorithms help blockchain securely records transaction information and replicates copies among each participant, which has nearly no possibility to be modified once recorded [49]. It ensures that participants joining in blockchain network have complete confidence in the security and privacy of their assets and transactions. Typical algorithms are reviewed in [50,51] and summarized in Fig. 4. • Smart contracts allow for trusted transactions and agreements to be carried out among anonymous parties without the need for a central entity, external enforcement mechanism, or legal system [52]. What smart contracts on blockchain can do is using computing program to streamline the complex transaction process that involves several intermediaries due to the lack of trust among participants [53]. A general form and the key elements of a smart contract for automatic  Features of each language and their comparison on implementation performance are review in [61]. • Decentralized storage offers considerable pricing, performance and security advantages over conventional central storage by breaking apart the users' files and distributing them across multiple nodes [62]. It avoids single point of failure and makes full use of remaining space of multiple points of storage disk around the world. Typical blockchain-based decentralized storage schemes and platforms have been reviewed in [63,64], including storj, Filecoin, Sia, Swarm [65] and BCSolid [66].

Opportunities of blockchain in TE for NZEB with high EV density
From analysis above, according to the definition of NZEB, the basic rules to achieve NZEB can be followed in two ways: minimizing the energy consumption of buildings and maximizing supply from various renewable energy resources. With the integration of new types distributed renewable energy resources (solar panel, wind turbine, heat pump, etc.) and also with the help of new Vehicle-to-Building/Home (V2B/ V2H) technology, it has great potentials for buildings to coordinate these energy resources to achieve NZEB. This section will discuss what opportunities blockchain will bring for the development of NZEB from three aspects.
(1) Interaction with grid for balancing the supply and demand by management of renewables With more and more renewable energy resources connecting to the grid, it is necessary to develop new services and products to coordinate them effectively to play their full role in balancing the grid. The conventional grid with the centrally top-down management system has changed into a bidirectional market with many decentralized edge assets. Coordination is the key [44]. Blockchain with its smart contracts enables automatically buying and selling power for buildings or homes from and to the grid based on real-time price signals. It can automatically discover pricing and settle transactions in a secure and private way without any intermediary toll-takers. Buildings as positive players, which can be dynamically managed to help meet grid needs, NZEB requirements as well as occupants comfort, have great potential to get grid services to achieve NZEB as well as deliver grid services to benefit consumers, grid and society [67]. Opportunities, blockchain will bring to the positive buildings for the flexible grid, are listed below: • Transparent facility management: The behavior of each energy units in buildings (producer or consumer) will be recorded securely in real time, which will be analyzed, computed and forecasted for multi-time and multi-space energy schedule. So that they can participate in energy markets in an efficient, transparent and sustainable way. Blockchain enables a range of decentralized computing and control methodologies to support aggregation and coordination of distributed participants for interaction with grid [68,69]. • Dynamic transaction pricing implementation: The consumers can now act as producer to reduce the burden of the grid. Other consumers can buy the energy directly from these retailers in a local energy community or even neighborhood community. It is necessary to not only consider time-of-use price to shift the peak load, but also consider space price to balance the supply and demand. Blockchain can help prosumers get buying price information and update selling price information in real time and accurately based on the supply and demand at a certain time or in a multi-time scale range [70].
• Simple and low cost transaction: Due to the cutting out of intermediaries, direct energy transactions with blockchain-based digital smart contract not only highly decrease the transaction costs from utility bills and wholesale markets, but also simplify the transaction process with reduction of documentation, contracts and payments. Blockchain plays a key role in further gathering distributed energy units (PVs, wind turbines, EVs, batteries, heat pumps, Power-to-X equipment) to integrate more volatile renewable energy capacity into the grid and make the grid more orchestrated and flexible [71]. (2) Interaction with EVs for balancing the supply and demand by electric mobility With more and more EVs running on the road, it is necessary to develop new services and products to coordinate them effectively to play their two roles in consumer and supplier. Simplifying the billing process at charging stations, including public spaces or even residential locations, will facilitate EV drivers to be able to access any charging station [72]. Meanwhile, V2G/V2B technologies make EVs as mobile storage tool to mitigate fluctuations from renewable energy resources and help balance the supply and demand in peak load time to meet the requirement of NZEB [73]. Blockchain enables widespread use of EVs and charging stations for automatic and secure P2P payment without any centralized intermediary parties. Opportunities, blockchain will bring to the positive buildings for the interactive EVs, are listed below: • Transparent P2P charging implementation: Individuals can share their private EV chargers with others during the times they are not use them to get some money in return. Blockchain can be used to record and broadcast real-time billing data of each charger registered to create a transparent and secure transaction network [74]. • Accurate and effective EV battery management: Lifecycle and condition of battery is essential and sensitive for EV's performance, usability, safety and interoperability with other energy units. As the decentralized ledger, blockchain will clearly and accurately record each transaction's data which can be used to estimate the battery's health and the performance for V2G/V2B, which allows EVs to a part of better-connected and distributed mobile energy network [75]. • Decentralized V2G/V2B coordination with flexibility: The fast growth of EVs will create vast electricity storage capacity but in a mobile way, which has huge potential to provide additional flexibility for support maximization of renewable penetration and NZEB. Blockchain can help certify and manage renewable energy transfers in each transaction among EVs. Power related data will be decentralized stored based on blockchain, including distributed on-site PV panels on buildings, storage batteries and EVs, to measure, forecast and schedule V2G/V2B process for decarbonized flexibility [20]. (3) Interaction with occupants for people comfort and energy flexibility from decision making In future cross-sector P2P TE, consumption behavior will be one of the most important triggers to enhance the flexibility of building energy supply and demand with highly embedded human interaction. Occupants will have multiple applications and devices with the ability to dispatch supply (residential storages, PVs, EVs, etc.) or control demand (smart thermostats, smart plugs, smart cables), all requiring documentation and verification [76]. These individual inputs and outputs acting on the grid should be supported by secure exchange of data flow, control flow and also energy transactive flow. Blockchain enables interaction of buildings, EVs and people with decentralized security and privacy. Opportunities, blockchain will bring to the positive buildings for occupant participation, are listed below: • Transparent and traceable interactive framework: Successful adoption of blockchain will enable automatic and secure interactive framework of the people, process and energy units, which will balance the positive and negative manifestations from human behaviors with identity management, cryptocurrency transactions, behavior traceability, records and authentication. The pattern of energy consumption and operational behavior in residential\commercial buildings and EVs can be identified, classified and recorded based on blockchain for further optimization of people comfort and energy efficiency.
• Trusted protocols of individual decision making for energy flexibility: Individual decision making on distrusted energy supply and demand will integrate lots of uncertainties and even breakdown the whole system. Dynamic interactions of individual decisions are necessary for a better final decision from the global perspective. Blockchain can make trusted protocols to collect individual decisions in real time and increase the alignment between desires and outcomes, which will maximize each participant's individual gain under the condition of meeting the global optimization goals of an energy community in supply and demand [77].

Risks of blockchain in TE for NZEB with high EV density
As mentioned in the first section, blockchain is currently still in its infancy. Therefore, as with any new technology, it is no doubt that there are some unresolved technical issues and a lack of long-term experience with an uncertain future [72]. A good understanding of risks of blockchain implementation in energy sector will be necessary to obtain desirable outcomes from the activity, which will be discussed here in detail.
• Risk of no superior authority: For a decentralized blockchainbased energy transaction system without any superior authority, as at least in the case of today's public blockchain model, who will be the responsible entity if something goes wrong? No one could intervene in a regulatory capacity and provide simple services, such as helping users find their personal access details or revise previous transactions [72]. There is no feature to restore forgotten usernames/ passwords and edit previous executed tasks. Smart contracts are agreed based on software code, which hasn't be mature enough to replace the law [78]. One of the preventive measures for this risk is to adopt permissioned blockchain platform in the decentralized TE architecture. Compared with public or permissionless blockchain, it requires identity permission to join in the network for further transaction activities. Different authority levels could be assigned with predefined role functions with more flexibility. • Lack of standardization: Due to blockchain being at a stage of rapid technological development, a plethora of competing blockchain architectures, platforms and middleware applications are emerging from startups both in scientific and commercial research field. However, there are no mature standards and each of them offers different foundations for development of blockchain-based platforms. While there are some popular public platform's, such as Ethereum and Bitcoin, they are not the only viable architectures [79]. The absence of international standards will carry risks of lack of interoperability, integration with legacy energy systems and consistency of physical energy infrastructure development. There are now international organizations ongoing in these areas. The International Standards Organisation (ISO) is working on a series of blockchain and DLT standards ISO/TC 307, which will be released no later than 2021 [80]. The ITU-T Focus Group on Application of Distributed Ledger Technology (FG DLT) established in 2017 is working on standardization of DLT-based applications and services [81]. One of the preventive measures for this risk is to select the most promising and the best suitable blockchain technology for development of P2P energy trading platform, because normally the related organizations and companies will have strong strength on standardization activities for future interoperability and more business opportunity. Several famous blockchain platforms used in transactive energy field is discussed in [24], including Ethereum, Hyperledger Fabric, Quorum and R3 Corda.

• Risk of speed and costs of transactions with public blockchain:
The operating costs of blockchain system, including the required computing power and related consuming energy, are totally different between private and public blockchains. Private blockchains usually involve lower transaction costs but operate on simplified verification process, while public blockchains usually have very slow performance. For example, Bitcorn takes average 10 min to dig a new block and can only process around 7 transactions per second (tps), while the processing speed of VISA is 24,000 tps [79]. The public blockchains are also energy intensive. The most famous consensus mechanism "PoW" (Proof of Work) employed by Bitcoin and Ethereum works on the principle of "hard to create, easy to verify", which means lot of energy needs to be spent by the node to earn incentive tokens [78]. PoW is the first consensus algorithm in blockchain network that requires the provers to expend huge amounts of computational effort solving an arbitrary mathematical puzzle. It is a competitive process called "mining" to finally generate a blockchain block [82]. Bitcoin currently consumes between 2.5 and 4GW of power [79]. The preventive measures for this risk can be: (1) using permissioned blockchain platform with high tps performance, (2) integrating edge computing with blockchain; (3) replacing consensus mechanism. Identity and security challenges: Although blockchain have been proven very secure, that is not to say they are foolproof. Blockchain is using an asymmetric encryption method based on the public and private key. There is no mapping of the identity with the key, so if someone loses his private key, all of the data and value kept in energy units will be lost forever. Or if someone steals your private key, they have chance to control all your value on the blockchain. It will be terrible. And going forward, when quantum computing which relies on cubits rather than bits) gains momentum, these encryptions are not secure enough [78]. The top 5 blockchain security issues marked in 2019 are: 51% attack, exchange hacks, social engineering, software flows and malware [83]. One of the preventive measures for this risk is to prevent single entity getting control of over 50% mining power. It can be easily achieved by identity monitoring and management functions over permissioned blockchain network.

• Lack of integrity evaluation scheme for blockchain developers and managers:
The implementations of a blockchain-based system are largely dependent on the developers and managers backing the project, who determines the cryptography algorithms. Lack of central management commitment impedes integrity of sustainable activities. Limited technical and operational expertise of adopting this new blockchain technology of developers to energy sectors will be a barrier for sustainable TE. Therefore, individuals should place a very high level of trust on the developers and managers of the new blockchain-based innovative solutions. How can people totally trust them? It is now still lack of acceptance on the part consumers [72]. One of the preventive measures for this risk is to exploit the advances of smart contract, which stores rules, policies and business processes for negotiating terms and actions between different parties and market players with automatic verification mechanism [84]. With the well-defined smart contract, the potentials of blockchain for transparency, reliability and sustainability could be effectively exerted with automated governance.

Edge computing as the wing for speeding the development of blockchain-based TE
As discussed in previous section, although blockchain has attracted significant attention in TE, widespread risks still stand, which are causing scalability issues and affecting blockchain operation. The most serious scalability problems are [85]: (1) Limitations of frequent transactions since all transaction data need to be processed and registered in each node. (2) Costs of space and time since each block have limited size and the execution process of transaction is more consuming with increasing number of transactions. (3) Latency of response time since every recordable transaction requires P2P verification which will significantly impact usability at peak transaction times. It is necessary to find solutions to alleviate these challenges of blockchain. Edge computing, which is a distributed computing paradigm, is introduced to move computation and data storage workload from cloud to the edge of the network to improve response time and save bandwidth [86].

Advances of edge computing for blockchain -based TE
For blockchain, when one transaction node communicates with any other node, transactive data has to travel through the entire blockchain network which will cause heavy workload. Especially for blockchain in IoT, although blockchain increases the scalability of IoT-based networks with integration of transaction trust, the applicability of blockchain for smart IoT applications require high performance of on-demand energy consumption in the mining process [87]. For edge computing, the goal of this network architecture is to execute the compute-intensive and delaysensitive part of an application in the edge network [88]. This distributed computing architecture provides a scalable infrastructure for blockchain nodes to process, verify and record transactions, which enables new data traffic flows and removes the need for data to have to traverse through the core blockchain network [89]. In fact, blockchain and edge computing has a complementary relationship to deal with the challenges for scalability with decentralized management and security. On one hand, edge computing could help alleviate the processing loads on huge amounts of transactions per second by providing computing power, data storage and even smart services from distributed resources. On the other hand, edge computing brings in lots of uncertainties and security issues with its fragmented infrastructure due to the interplay of heterogeneous edge resources. Therefore, with the integration of IoT architecture and blockchain network, edge computing gets its wing to enable a truly efficient, smart and decentralized transactive energy network with high security and scalability. A comprehensive survey on integrated blockchain and edge computing systems is given in [88], including motivations, typical frameworks, advantages in functions of network, storage and computation. The advances of integration of blockchain and edge computing for TE can be summarized in three aspects: (1) scalable network with software defined fog for easy extension and interaction of cross-border TE platforms, (2) decentralized data storage via blockchains for easy management and integration of distributed energy resources and IoT devices. (3) blockchain-based distributed computation for easy transaction and verification with high performance and security in P2P energy trading. Especially for the mordent energy system, the penetration of large-scale intermittent distributed renewable energy resources and increasing uncoordinated EVs will cause significant power fluctuation in edge grid, edge computing is effectively adopted with integration of blockchain technology to implement secure and efficient Vehicle-to-Grid energy trading in Smart Grid [90].

Implementation of edge computing for blockchain -based TE
For achieving NZEB with high EV density in TE, these advantages bring great potentials to establish an open, scalable, trusted distributed cloud marketplace. Fig. 5 presents the blockchain-based TE framework with integration of edge computing. There are three layers. From the bottom to up, it can be derived as: (1) IoT-enabled blockchain energy transaction network layer.
This layer is comprised of prosumer-participant P2P energy transaction network of local energy internet, including buildings and EVs capable of participating in blockchain to exchange messages and energy among each other. This layer is established based on IoT digitalization architecture for interoperability of smart devices with sensors and actuators in supply side and demand side of energy community and its neighborhood. To achieve NZEB, conceptually, it is necessary to connect NZEB to one or more energy infrastructures for energy transaction to balance the energy demand from other renewable sources. Utilityowned Grid, Microgrid, EVs and other buildings are such kind of infrastructures. Blockchain coordinates them in this layer by the following specific services [91]: • Decentralized demand response in local energy internet [92] • Energy flow optimization of microgrid [92] • V2G/V2B planning and schedule [93] • B2B/B2G planning and schedule [94] • EV battery tracking and management • EV charging schedule (2) Blockchain-based edge computing layer.
This layer is between the central cloud and IoT-based end prosumers. For central cloud, it retains the core advantages of cloud computing and moves some load of computing tasks, data storage, real-time processing and analysis away to the edge. For IoT-based end prosumer, it offloads blockchain mining tasks from each prosumer to the edge server, which enables the resource-limited end users to participant in the blockchain [88]. Meanwhile, this layer could provide the strong storage capacity support for the bulky public blockchain or the independent and scalable environment for the private blockchain. This layer also uses blockchain techniques to link all edge servers in a decentralized, coordinated and trusted way. When the transactions are generated by IoT-based prosumers, the transactive information will be broadcasted to the edge computing layer which will coordinate edge servers as well as cloud servers to guarantee the fast and successful transactions with security 13 and privacy protection. The specific services provided by this layer are as [88,95]: • Software defined fog [96] • Software defined components and virtual network • Scalable blockchain database [97] • Computation offloading at the edges • Secure multiparty computation [98] • Scalable verification for public blockchain [97] (3) Blockchain-based distributed cloud layer.
This layer consists of a series of P2P decentralized cloud solutions for TE, including decentralized storage, demand response management, optimization and schedule of energy flow. Each solution envisioned a blockchain-based elastic and scalable cloud computing platform. It not only solves the bottleneck and single-point failure issues caused by the single third-party cloud service, but also reduces the high costs of cloud services from huge cloud providers, such as Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform and Alibaba Cloud [99]. In fact, integrate blockchain into cloud computing is regarded as a Blockchain-as-a-service (BaaS), which accelerates data-driven innovations and energy-aware services to benefit P2P TE markets. The state-of-the art BaaS platforms available on the market has been reviewed in [100], such as IBM blockchain [101], Microsoft Azure blockchain [102], Oracle blockchain [103], Hewlett-Packard blockchain [104], Alibaba blockchain [105], google blockchain [106], Huawei blockchain [107] and so on. The specific services provided by this layer are as [108,109].
• Cloud offloading for edge blockchain and end-prosumer transactive blockchain • Cross-sector communication and service management (transportation, buildings, energy) • Cloud-based huge-data storage and blockchain-based data privacy • Smart supply chain from generation to consumption • Decentralized energy management systems (EMS) with distributed energy entities • Complete traceability and transparency of cloud services Blockchainenabled cloud data provenance

State of the art in scientific and commercial applications
Blockchain technologies have been widely used in energy sector by commercial companies and scientific research centers. A systematic study which reviewed more than 140 blockchain innovation projects and research initiatives in energy sector is given in [22]. The user cases are related to eight categories, including billing, cryptocurrencies, energy trading, renewable certificates, grid management, asset management, electric mobility and others. It is found that more than 30% cases are about P2P energy trading but still in different transaction modes, such as trading for utilities and energy system stakeholders, trading for energy community and micorgrids, and trading for small generators and end-consumers. In this section, we will focus on the-state-of-the-art currently known projects and startups in blockchain-based TE applications with positive buildings and interactive EVs. The key technical features and services of them are summarized in Table 2. Instead of using public blockchain platforms like Ethereum and Hyperledger

Germany
• Support a broad range of energy products from day-ahead to yearly baseload for power and gas in regional and cross regional market. • Deliver and consume energy where it is produced.

PONTON platform
• P2P regional and wholesale market • End-to-end transaction in less than a second • Market-based coordination of flexible schedule in Microgrid with storages and EVs Fabric, most of them developed their own distributed ledger technology (DLT) framework based on blockchain concept. Among the projects shown in Table 2, Insolar from US has its own cloud platform "Insolar Assured Ledger" for building Insolar Transactive Energy System (TES) to seamlessly connect all distrusted stakeholders at the grid-edge for establishing self-sufficient communities [111]. It mainly includes four nodes: renewable Micorgrids node for day-ahead energy trading, large EV Fleet node for absorbing overproduction of solar energy, enterprise Microgrid node for real-time voltage support and distribution system operator node for demand response of grid congestion. LO3 Energy, a blockchain based innovative startup in the field of clean energy transition from US, provides a co-branded market place "Pando" developed on Ethereum blockchain for enabling green energy communities [120]. The science behind them mainly contains four aspects: P2P "Exergy" platform for near-real time automatic energy transaction in local marketplace, resilient and sustainable Microgrid for coordination of consumer and prosumer, trusted DSO for accessing consumer data for building management, and EV charging for mobile energy transaction [112,115]. Power Ledger from Australia is also an Ethereum-based P2P energy transaction platform. There are totally two new concepts on it: one is electronic identity for each power device and the other is real time market that mediates the transaction [117]. It provides multi-scale energy trading platforms to facilitate different trading range. xGrid supports individual P2P trading for selling energy from their own roof PV panels to other energy consumers [121]. Compared with xGrid designed for residential users, µGrid is designed for larger applications [122], which enable buildings to trade energy with each other with support of master meters [123]. Virtual Power Plant (VPP) provides services for renewable generators with batteries to transact stored energy during peak hours [124]. Power Ledger also has cooperation plan with Silicon Valley Power to turn EVs into mobile ATMs [125].

Challenges and future perspectives
It is no doubt that the blockchain is a promising technology for TE to increase the share of renewables across all the energy sectors. More and more energy companies, utilities, research centers and government organizations are currently involved in blockchain-based projects. We have already discussed about the opportunities and risks blockchain will bring into TE in previous section. Here we will discuss the challenges and future work on how to release the potentials of blockchain to enable a low-carbon, sustainable and transactive energy ecosystem.
(1) Compatible architecture with current regulated energy system Challenge: The global energy sector is one of the most highly regulated industries in the world. Large unities and centralized organizations are controlling the energy supply chain from generation to distribution. It is not easy for conventional energy market to significantly change in a few decades. Therefore, it is necessary to consider compatible problem for design decentralized energy transaction architecture in current stage to cooperate all stakeholders in the whole energy chain, centralized or distributed, public or private [126].
Future perspectives: Digitalized monitoring and management solutions for cutting-edge provision of multi-scale energy services over decentralized marketplaces will be exploited with advanced ICT technologies. IoT enabled digitalization and interoperability, as well as blockchain enabled decentralization and security, will redefine the future energy transaction architecture within the following three folds: (i) Co-creation of decentralized service-oriented framework for broad scale integration of science-society dimensions, (ii) Cross-border interactions for a wider and deeper exchange of flexibility, (iii) Cooperative engagement of multi-level market players for user-centric market paradigm. Therefore, an efficient, open but high reliable, scalable but robust decentralized platform to enable modular and pluggable integration of different IoT-enabled energy platforms, cutting-edge provision of multi-scale energy flexibility services and cross-space integration of energy physical communities will be envisioned. It will maximum the engagement of multi-level energy market players with modular blockchain-enabled pluggable services, such as decentralized identity management, pluggable consensus protocols, privacy data with separate channel, automation of multi-scale energy flexibility services and so on.
(2) Perspective development with uncertainties Challenge: Blockchain is still in its infancy. Most of blockchain related energy projects are still at a proof of concept stage or short-term interest in experimentation. The development of blockchain in TE has many uncertainties required further investigation. Blockchain can lower barriers to entry into energy trading market for small-scale energy producers and individual energy generators, therefore, it will not only bring in trading uncertainties from cross-sector energy transactions which will have instability issue on grid, but also technical uncertainties from high-frequency transactions which will speed and bandwidth issue on data processing [127]. Therefore, it is necessary to consider these uncertainties to guarantee a perspective development of blockchainbased TE.
Future perspectives: Blockchain does not follow a 'one-size-fits-all' model [128]. For blockchain itself, there are also many kinds of blockchain platforms and blockchain-enabled services generated to contextaware and application-related sectional deployment, which are continually updating and developing to deal with issues and uncertainties. Policy makers and regulator will also progress the standard frameworks, validity of smart contract and legal classification of tokens and coins for TE market paradigms. To deal with the uncertainties brought by the blockchain's infancy, other digital technologies could be integrated with blockchain and work in a complementary to avoid digital gaps and maximize the impact, such as artificial intelligence (AI). The opportunities and current applications of AI for blockchain to solve cryptocurrencies related issues with their vast amount of daily transactions is discusses in [129].
(3) Incentive mechanism for participants Challenge: Legacy energy plant and utilities don't like decentralized model to replace their revenue streams. There is big inertia in energy industry which will slow the adoption rate of this new technology. Incentive mechanisms are necessary to promote the interests of all the energy stakeholders to participant in this blockchain-based TE, such as price incentives to allow consumer selecting nearby distributed energy retailers, policy incentives to allow utilities coordinating and allocating P2P energy transactions in energy community, and social incentives to allow more and more renewable energy generators participating in this game [130].
Future perspectives: Context-aware or section-specific incentive mechanisms will be developed to meet the diverse requirements of users in decentralized environment with different roles and functions. With decentralized identity management, for TE blockchain can support the integration and extension of various roles, responsibilities and interactions of decentralized market players in different levels. Customized incentive mechanisms will be deployed to different organization (TSOs, DSOs, aggregators) and individuals (consumers, prosumers) and distributed energy resources (generators, storages), or even IoT devices, which will encourage more and more participants and can benefit building a more interoperable, unified, transparent and trusted energy society.
(4) Regulatory sandboxes with manageable scales Challenge: For a new technology, it will be difficult to make significant policy for its development. Therefore, policymakers will play a crucial role in how much potential blockchain can release and benefit energy sector. It is necessary for them firstly to investigate the new technology and understand it, then make positive policies to support the development of technical standards for setting up demonstration projects [131]. Regulatory sandboxes proactively reduce regulatory constraints on innovative financial projects, which enables the innovations to be tested in a safe area and reduces the time and cost of getting innovations to market. It also helps startups to work with regulators to ensure the new technology and business models aligning with regulations [132].
Future perspectives: The potential of blockchain has been widely recognized by EU institutions and authorities [128]. Common principles and criteria for regulatory sandboxes are initiated as best practices in EU. Blockchain-based TE is a strong case for allowing regulatory sandboxes to enable the implementation at manageable scales and minimize policy uncertainties to create a stable market [41].

Conclusions
Decarbonization drives the growth of distributed renewable energy resources at the grid's edge. Digitalization drives the interoperability of demand and supply management by ubiquitous connection across the energy chain. Decentralization drives the tendency of energy generation and distribution close to the demand side. These 3Ds trend all augur for a much more transactive energy market. Buildings and transportation are the largest energy consumers in the world but have the lowest renewable energy share. Therefore, initiatives concerning the implementation of NZEB and significant scaling up the deployment of EVs are growing worldwide. With roof solar and wind turbines, buildings can sell energy to grid or other buildings. With smart charging, EVs can also sell energy to grid and buildings. Blockchain as a novel decentralized technology has particular value to enable an energy transaction platform where multiple mistrusting parties can securely buy and sell energy with each other directly. This paper gave a comprehensive presentation on the positive roles of buildings and interactive transaction behaviors of EVs in blockchain-based TE from energy physical space, data cyber space, and human social space. Key technologies for successful deployment and implementation are discussed in a hierarchical way. The first one is how IoT architecture as the fundamental framework for achieving digitalization and interoperability of TE. The second one is how blockchain enables the decentralization and transparency of TE, including the key features, opportunities and risks. The third one is how edge computing as the wing for alleviating the issues caused by blockchain and speeding up the development of blockchain-based TE. Blockchain has caught widespread imagination in future TE, driving many startups to rocket the idea to TE innovations. Meanwhile, just as other new technologies, blockchain has also received some negative voices and it is true that blockchain's future as the architecture of TE hasn't been completely proved. This paper presented the-state-of-the-art currently known applications of blockchain-based TE with positive buildings and interactive EVs, as well as analyzed the challenges and future work to release blockchain potentials into 3Ds' TE.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.