A Flexibility Market Platform for Electricity System Operators Using Blockchain Technology

: The paper’s main objective is to demonstrate the trading and ﬂexibility of services amongst TSOs, DSOs, and Prosumers in a transparent, secure, and cost-effective manner using Blockchain-based TSO-DSO ﬂexibility marketplace (EFLEX). The aim is to look for ways to help DSOs/TSOs be more ﬂexible and more directly engaged in managing energy ﬂows on the network. EFLEX will streamline the needs of both TSO and DSO on the same platform. Based on the paper’s proposed services, the pilot service demonstration will be carried out in Bulgaria and Romania, and the main focus will be on congestion management, TSO-DSO Coordination, and Marketplace. The proposed objective is achieved by using Blockchain-based smart contracts and distributed ledger technology.


Introduction
The European Union's Clean Energy for All Europeans legislative package contains the Recast Renewable Energy Directive law, which states that before 2050 all the energy consumption in the EU must be from renewable sources [1][2][3][4][5]. This law implies that more renewable energy sources should be connected to the grid and in doing so puts a lot of pressure on both TSOs and DSOs to maintain the grid's stability. This aspect must be considered because TSOs and DSOs have different objectives and means for grid stability [6][7][8][9][10]. As a solution, one uses a common denominator is to increase the flexibility and communication between both parties.
In the last few years, Blockchain technologies in their four main types (public, private, consortium, and hybrid Blockchains, have been developed and applied in many sectors, including the energy one. Other technologies, such as Tangle and Hashgraph, also distributed ledger technologies, use the same idea as Blockchains but without the blocks and the chain they are "Directed Acyclic Graphs". All these technologies use distributed databases, cloud storage, decentralized storage. It is essential to mention that Blockchain is preferred as it helps electricity consumers reduce costs by eliminating intermediariessuppliers and third-party suppliers-who traditionally sell electricity that can be traded on a transparent basis through Blockchain. In comparison with Tangle, the advantage of Blockchain is that not all initial data is public; more, Hashgraph, which operates in a private network, benefits from increased security, transparency and brings economic benefits to electricity consumers. An important aspect is that the financial information is accessible 1.
understanding the current and future problems in network operation; 2.
obtaining experts' views on the flexibility marketplace concept; 3.
getting early-stage feedback on relevant use cases and functionality and for deciding which features of the marketplace should come first, which should come later, and which should be excluded; 4. developing a collective high-level plan to organize the test activities to tackle current and future problems.
The survey consists of responses collected from 41 experts in Europe. As a partner in the project, we actively participated and contributed to the discussions on market design, market services, and coordination schemes from September to November of 2019. We actively led discussions with various partners (FSR, AGEN, Fingrid, IBEX, and others) who shared insights about the flexibility marketplace from July to August 2019. Based on highlevel findings conducted through the survey and our interaction with various partners, two services supporting demonstration were identified: long-term congestion management and operational congestion management. As a first result, one chose two market design options: separate DSO congestion management and TSO congestion management and combined DSO congestion management and TSO congestion management with overlapping merit order lists (MOLs). We also demonstrated our business cases, justification for market design options, and sequence diagrams during the physical meetings in Brussels and Aachen, respectively. In addition, we also presented EFLEX (a web-based decentralized marketplace prototype) at two major events. This paper summarizes the technical requirements and setting of demonstration that take place for the Blockchain-based TSO-DSO flexibility market platform in Romania and Bulgaria. This paper includes a detailed analysis of the technical and functional requirements of the "TSO-DSO Flexibility based market platform". It also provides an analysis of flexibility market arrangements, Proof-of-Concept (POC), and the demonstration of the TSO-DSO procurement for flexibility. The work was started at the beginning of 2019. The project team is comprised of energy and IT implementation experts of different partners and TSO/DSO as end-users in Romania and Bulgaria. This paper includes a detailed analysis of the technical and functional requirements of the "TSO-DSO Flexibility based market platform". The paper also includes an analysis of flexibility market arrangements, PoC, and the demonstration of the TSO-DSO procurement for flexibility. The following detail the work done: • Rationale and Methodology: summarizes the rationale and problems faced by distribution networks. It also introduces the discovery methodology followed by the project. • Flexibility marketplace survey: highlights the flexibility marketplace survey findings. This process is based mainly on LEAN methodology leading to an opportunity assessment that considers the project's directive of using priority features/functionalities of the marketplace as a key element of the value proposition. • Setting-up functional requirements: elaborate the functional requirements, including identified services based on customers, market players perspective, business use cases, sequence diagram and system use cases. • TSO-DSO Coordination: briefly introduces the technical setup that includes data collection from TSO and DSO partners.
Next to this, the penultimate part includes insight into prototype development and visibility of DERs and RES locations and characteristics through flexibility marketplace. Finally, the last part includes planning test activities, attempting to identify future steps, and suggesting follow-up activities.

Rationale behind Blockchain-Based TSO-DSO Flexibility Platform
The higher the integration of renewable energy sources (RES) into the power system, the greater the need for TSOs and DSOs to provide additional flexibility to maintain grid stability. For example, DSO is more interested in voltage preservation and TSO in frequency preservation [29][30][31][32][33]. In the evolvDSO project, it is estimated that 90% of RES is connected to the DSO networks, especially at low and medium voltage levels. In addition, electric vehicles, heat pumps, and other sources of flexibility are also connected to the DSO networks [34][35][36][37]. TSO will need to acquire more and more flexibility from DSO grids. Therefore, TSO needs to coordinate with DSO not to jeopardize the security operation of DSO systems and vice versa [38][39][40][41][42]. There are several models presented in the literature to tackle these problems, the best known being the traffic light model.
The model is based on three phases. The green phase means that renewable sources can give away all the energy produced, which is not acceptable. In contrast, in the red phase, the operating state is critical, which leads to a reduction in RES power or shutdown. Various incentives can be used in the yellow phase, including economic ones, to change the power. However, the traffic-light model suggests no concrete implementation of the yellow phase. In reality, implementing this concept is difficult since it requires multiple human interactions. In addition, the problem of achieving a transparent and secure exchange of data and information among relevant parties is also challenging.
The research aims to demonstrate a Blockchain-based TSO-DSO flexibility platform (EFLEX) in Romania and Bulgaria where flexibility services are traded amongst prosumers, TSOs and DSOs. The objective is to find proper solutions to help DSOs/TSOs to be more flexible and more directly engaged in managing energy flows on the network. EFLEX will streamline the needs of both TSO and DSO on the same platform. To avoid double activation of the same asset, the needs may overlap and can be resolved by facilitating interaction between two Merit Order Lists (MOL's) in order. Proper coordination and effective signaling mechanisms will be established using Blockchain-based distributed ledger technology (DLT). There are several aspects of the trading process where the objective is to ensure efficiency (e.g., asset registration, validating assets' metering data and settling the associated financial operations could be performed using smart contracts and distributed ledger technology).

Bulgaria-Current Situation and Expectations
ESO (nominated TSO) deals with the proper functioning, operational activity, operation and maintenance of the energy system of Bulgaria, and this includes the synchronous activity with the systems related to the Bulgarian energy system.
Currently, there is no exchange of balancing services from the DSOs to the TSO and vice versa in Bulgaria. The TSO is acquiring the necessary services from service providers (producers and big consumers), connected to its network (high voltage-110 kV and above) via long-term yearly contracts. There are operating markets for energy (Day-ahead and Intraday), complementing the regulated delivery for households and small businesses and a balancing market. The Independent energy exchange (IBEX) is using Nord pool as a service provider for its Day-ahead and Intraday trading platforms. The first IBEX Dayahead trading session was on 19th January 2016 with a delivery day 20th of January 2016. Since then, the total traded volume has constantly been growing yearly. A large amount of energy from renewable sources is increasing and the desire to participate in the market during the day because it is difficult for electricity market participants to provide accurate forecasts for market participation in the day-ahead market. Balancing groups, including producers and consumers, are coordinated by Balance Responsible Parties (BRP) to keep the balance inside the group. The balancing market covers any imbalances at a respective price. There are no "aggregators" for small producers and consumers connected to the DSO's networks at the current stage. CEZ BG (DSO in Bulgaria) proposed a demonstration application to be simulated. This demo intends to prove the feasibility of the offered services from the balancing power clients.
To establish better services to end customers, CEZ-BG would like to investigate alternative solutions guaranteeing the same quality of service as grid reinforcement. In particular, CEZ-BG establishes several specific goals, as follows:

•
Smoothen generation and consumption peaks to increase the capacity of existing networks (saving investments); • Perform local balancing and optimize local energy consumption (for commercial buildings); • Improve power quality for customers by decreasing the number and duration of power outages; • Limit losses.

Romania-Current Situation and Expectations
Transelectrica (nominated TSO) manages the operation of the electricity market in Romania, and is responsible for operational stability and safety, grid and market infrastructure development, and coordination of electricity exchanges with neighboring electricity systems.
Like Bulgaria, there are operating markets for energy (Day-ahead and Intraday) in Romania. The day-ahead market provides market participants with a functional tool to balance the portfolio of bilateral contracts, consumption forecast and availability of generation units at an hourly level for the delivery day. The intraday market is a valuable tool for participants, it facilitates the adjustment and balance between bilateral contracts and technical availability as soon as possible before physical delivery. In the balancing market, the purchase of energy is carried out by the Transmission System Operator. In this way, the differences that arise during forecasting are eliminated. In order to reduce the imbalances, additional connections can be made between the market participants, and in case of increasing the capacity, the producers are obliged to announce their offer, as a supplement to the previously stated value.
Similarly, if there is a power reduction, dispatchable producers must offer the amount of electricity notified on the market. On this market, offers and transactions occur at the level of each dispatchable unit, and the Balancing Market Operator performs market administration. Currently, the national regulation concerning flexibility in Romania is yet non-existent. It is foreseeable that future European changes in legislation will trigger the subsequent changes in Romanian regulation bodies. There has been no standard policy of TSO and DSO for managing congestions until the present development. Solely the National Dispatcher provides this service. By 2030, from the total installed power capacity for solar, 750 MW will be prosumer-owned capacity. In the region of Romanian DSO, there will be at least 250 charging stations in the next five years (at present, there are 15 concentrated near gas stations and parking malls). It is also expected to have at least five MWh of storage capacity installed at large loads.

Observation
To meet the expectations, the involvement of end consumers in the Bulgarian and Romanian energy market is crucial. Therefore, it is necessary to give them all the information and tools to participate actively and to have the power to decide how to do it. It is essential to aggregate consumers' flexibility in consumption and generation to create active demand. By doing so, DSOs can communicate with a wide range of assets that already participate in today's electricity market: from current conventional generation plants to industrial or small consumers dispersed in the system with demand management capability, including storage facilities and manageable RES etc., and coordinate the flexibility procurement Energies 2022, 15, 539 6 of 26 process with TSO. DSOs could also give an active customer the possibility of saving money by shifting load towards periods with large wind and solar power production. The load shift should, at least theoretically, correspond to the overall goal of the project-to increase the distribution network's capacity to host renewable power production. For example in Bulgaria, the role of flexibility unit could be performed by a big office building, connected to the DSO's network, equipped with a rooftop photovoltaic power installation (200 kWp) and a battery (200 kW), which could sell/buy active power to/from the network in case of deficit or surplus, respectively, changing the direction in brief periods. The proposed power for the demo is too tiny for actual offers at the market. Shortly, it is expected to have many more such buildings, so the FSPs that will aggregate them will offer from megawatts up to tens of megawatts that could be activated upwards or downwards almost immediately (for the next balancing period).

Methodology
The analysis is performed on several building blocks, representing a structured product discovery approach (Figure 1). To fully frame a solution and implement a minimum viable product, we categorize the demonstration setting into four building blocks: (a) Multi-stakeholder engagement, (b) Blockchain Technology, (c) Prototype development, and (d) Test Activities. Through iteration and reflection, we seek to analyze and refine the processes involved in the demonstration. Once the prototype works in the market setting, improvements or incremental changes can be applied to it to increase or improve functionality and features over the original design. We envision extending the demonstration of a Blockchain-based TSO-DSO flexibility platform for prosumers and consumers to trade electricity in a peer-to-peer fashion.
Romanian energy market is crucial. Therefore, it is necessary to give them all the information and tools to participate actively and to have the power to decide how to do it. It is essential to aggregate consumers' flexibility in consumption and generation to create active demand. By doing so, DSOs can communicate with a wide range of assets that already participate in today's electricity market: from current conventional generation plants to industrial or small consumers dispersed in the system with demand management capability, including storage facilities and manageable RES etc., and coordinate the flexibility procurement process with TSO. DSOs could also give an active customer the possibility of saving money by shifting load towards periods with large wind and solar power production. The load shift should, at least theoretically, correspond to the overall goal of the project-to increase the distribution network's capacity to host renewable power production. For example in Bulgaria, the role of flexibility unit could be performed by a big office building, connected to the DSO's network, equipped with a rooftop photovoltaic power installation (200 kWp) and a battery (200 kW), which could sell/buy active power to/from the network in case of deficit or surplus, respectively, changing the direction in brief periods. The proposed power for the demo is too tiny for actual offers at the market. Shortly, it is expected to have many more such buildings, so the FSPs that will aggregate them will offer from megawatts up to tens of megawatts that could be activated upwards or downwards almost immediately (for the next balancing period).

Methodology
The analysis is performed on several building blocks, representing a structured product discovery approach (Figure 1). To fully frame a solution and implement a minimum viable product, we categorize the demonstration setting into four building blocks: (a) Multi-stakeholder engagement, (b) Blockchain Technology, (c) Prototype development, and (d) Test Activities. Through iteration and reflection, we seek to analyze and refine the processes involved in the demonstration. Once the prototype works in the market setting, improvements or incremental changes can be applied to it to increase or improve functionality and features over the original design. We envision extending the demonstration of a Blockchain-based TSO-DSO flexibility platform for prosumers and consumers to trade electricity in a peer-to-peer fashion. The aim is to create an asset-enabled local electricity market, which considers the state of the distribution grid during the trading process and facilitates transactions desired The aim is to create an asset-enabled local electricity market, which considers the state of the distribution grid during the trading process and facilitates transactions desired from the point of view of the grid state. The needed functionality of the market platform has been decomposed, and several functional sub-modules have been identified. These sub-modules are developed independently, which allows their testing and refinement before the complete integration of the market. The core of the system is the central market module: this module receives the grid information and the bids of the participants (or of the bid generator in the case of the inactivity of the actual user), calculates the dynamic network usage tariff (DNUT), manages the order book, performs the matching of the bids (if automatic bid matching is active) and communicates the actual state of the market towards the user interface (UI), where the actual state of the bids and availability prices of the offers are available for market participants. In the following, we give a brief description of each submodule's functionality and development progress.
The main ideas were tested on simple small examples using initial, integrated implementations. Following these prototype tests, the final implementation's structure and sub-modules have been identified in Figure 2.
has been decomposed, and several functional sub-modules have been identified. These sub-modules are developed independently, which allows their testing and refinement before the complete integration of the market. The core of the system is the central market module: this module receives the grid information and the bids of the participants (or of the bid generator in the case of the inactivity of the actual user), calculates the dynamic network usage tariff (DNUT), manages the order book, performs the matching of the bids (if automatic bid matching is active) and communicates the actual state of the market towards the user interface (UI), where the actual state of the bids and availability prices of the offers are available for market participants. In the following, we give a brief description of each submodule's functionality and development progress.
The main ideas were tested on simple small examples using initial, integrated implementations. Following these prototype tests, the final implementation's structure and submodules have been identified in Figure 2. The bid generator ( Figure 3) is designed as an interactive tool. The submission of latter (intraday) bids depends on the acceptance of earlier (day-ahead) bids (the trading window for a given period opens at D-1 17:00 and closes two hours before the beginning of the period in question). The process of this adaptive trading might be quite complex in the case of prosumers, which may produce in one period and consume in other periods. The flow chart presented in Figure 3 demonstrates the decision process of bid submission for a modelled household prosumer. The bid generator ( Figure 3) is designed as an interactive tool. The submission of latter (intraday) bids depends on the acceptance of earlier (day-ahead) bids (the trading window for a given period opens at D-1 17:00 and closes two hours before the beginning of the period in question). The process of this adaptive trading might be quite complex in the case of prosumers, which may produce in one period and consume in other periods. The flow chart presented in Figure 3 demonstrates the decision process of bid submission for a modelled household prosumer.

Development of the Central Market Module
The central market module is responsible for the base case flow calculations, dynamic network usage tariff DNUT and order book management. The trading is performed for 15 min long periods. The bids may arrive at the central market module either from the bid generator or from the UI of the system (if originating from real end-users). The market module calculates the DNUT for every possible transaction (e.g., a supply bid may be hit by every consumer interested in buying in the respective trading period), and sends the result to the UI, where the availability prices (the result of submission prices and the DNUT) are displayed for each market participant. If automatic bid matching is active in the marketplace (typically, but this is generally an optional feature), supply and demand bids matching each other will be paired by the algorithm. The operation of the market platform is summarized in Figure 4. The process of DNUT calculation is depicted in Figure 5.  module calculates the DNUT for every possible transaction (e.g., a supply bid may be hit by every consumer interested in buying in the respective trading period), and sends the result to the UI, where the availability prices (the result of submission prices and the DNUT) are displayed for each market participant. If automatic bid matching is active in the marketplace (typically, but this is generally an optional feature), supply and demand bids matching each other will be paired by the algorithm. The operation of the market platform is summarized in Figure 4. The process of DNUT calculation is depicted in Figure 5.

Development of the Grid Submodule
The grid (sub) module is a unified network representation. The transformation contributes to the reduction of parameterization errors and validates that the local market is independent of both the topology and the size of the network.
In the last development phase of the grid module, from a semi-functional level to a validated, fully-functional execution level has been obtained in the case of two demonstration sites.
The grid module requires standardized input datasets: network topology data, parameter table of line types, attribute table of prosumers. Thus, the modular structure ensures the scalability and variability of the model.
The various inputs obtained require the data structures to be completed manually. When the initial conditions are met, a graphical representation of the network begins. The parameters of the lines are read, and a connection is made with the respective physical parameters.
The program uses topological information and user information as a distance to the corresponding node of the graph. When this phase is ready, the physical parameterization of the network is also ready and the actual network collapses. The network module calculates the network admission matrix used for other simulations. Each result obtained is stored.
This concept does not solve the question of grid topology changes. The idea is that when the topology changes (DSO), modules calculate with the received one. Indeed, the program runs on an entire topology. If we summarize this topic, the LV grid of both demos will remain unchanged for the whole period.

Development of the User Interface (UI)
Regarding the input side of the UI (UI-I), the UI-I accepts the submitted bids in a predefined format (preferably XML, based on the standard information exchange model (CM), but .csv or other types are also possible-initially, the UI-I must handle .xml files, other formats may be added later). The UI-I has to provide two possibilities for the submission of such files: (1) The first case is designed for 'native' users, market participants. In this case, after the completed login process, the individual files are uploaded to the system via a homepage. The user ID (UID) is defined during the login process. Each user may only submit bids corresponding to the metering IDs (MIDs) assigned to him/her. The MIDs assigned to users are defined in the initialization process of the market. If the bid passes/fails the prequalification process, the user receives a confirmation message (e-mail) about the successful/unsuccessful bid submission. (2) The UI-I must also have an API, through which other applications (primarily the bid generator) can submit bids after the appropriate authentication process.
On the other hand, the main scope of the output side of the UI (UI-O) is to provide information about the submitted bids and their status for users (and for the bid generator module) regarding a defined time interval.
The data available for the actual user in the above cases is different. One assumes that every participant of the market has to log in into the system using its unique user id (UID), which also identifies the metering IDs (MIDs) assigned to the user (e.g., a household user may have a standard meter and an additional meter corresponding to a controlled load at the same POD). In addition to market participants, operators and analysts can also log into the system.

Development of the Grid Submodule
The grid (sub) module is a unified network representation. The transformation contributes to the reduction of parameterization errors and validates that the local market is independent of both the topology and the size of the network.
In the last development phase of the grid module, from a semi-functional level to a validated, fully-functional execution level has been obtained in the case of two demon-

Flexibility Marketplace Survey
A flexibility marketplace survey took place to collect a quantitative and a qualitative response that would allow us to: understand the current and future problems in network operation; obtain 'experts' views on the flexibility marketplace concept; to get early stage feedback on relevant use cases and functionality and to decide which features of the marketplace should come first.
As follows, the key findings of the survey are provided.

1.
The survey consists of responses from 41 experts across Europe. Figure 6 shows the distribution of survey participants according to the power sector group that they belong to. The two most significant contributors were Network Operators (39%) and Research Community and University (39%), with 78% combined.
Energies 2022, 15, x FOR PEER REVIEW 12 of 28 Figure 6. Distribution of survey participants by the power sector group.
2. As power flows become more intermittent and unpredictable, distribution networks will have to tackle congestion-related issues such as feeder overload management and voltage management. If 100 MW of balancing power is requested today, it might be distributed across 5-10 medium-sized generators. If the same volume is requested in 5 years, it might be distributed across 100-1000 small generators, including batteries operated by households. With flexibility control in the hand of multiple owners, documentation, transparency, and automation are crucial. The majority of the participants (76.9%) see a need for DSOs to contract flexibility in the local markets within the next five years for congestion management and voltage control. Most participants state that it is essential to avoid inefficient investments into physical network infrastructure and instead access a broader range of 'non-'network' solutions (flexibility services, new grid tariff designs etc.) to solve congestion-related issues. Here, Blockchain-based congestion management at the grid level will support the complex communication and cooperation of many stakeholders or assets to avoid bottlenecks at the distribution grid level due to load shifting. Blockchain technology provides flexible resources and operators located at TSO, DSO, and customer levels to trade collaboratively without giving power to a single entity. 3. An overwhelming 90.2% of the respondents agree that small/medium-sized generators or load centers should use a marketplace where they could trade services such as demand reduction for additional revenue 4. A majority of the respondents (72.5%) agree that current trading software and platforms for market access do not meet the needs of aggregators, small/medium retailers. i.e., aggregators currently interact with short-term wholesale markets (day-ahead and intra-day), providing market services and ancillary market providing system services. The product requirements keep aggregators out of markets when it comes to small-scale flexibility. Therefore, there is a solid need to empower small and medium players to participate in the marketplace through flexibility services. Here, the automated storage of transactions on Blockchain will enable simple billing, which

2.
As power flows become more intermittent and unpredictable, distribution networks will have to tackle congestion-related issues such as feeder overload management and voltage management. If 100 MW of balancing power is requested today, it might be distributed across 5-10 medium-sized generators. If the same volume is requested in 5 years, it might be distributed across 100-1000 small generators, including batteries operated by households. With flexibility control in the hand of multiple owners, documentation, transparency, and automation are crucial. The majority of the participants (76.9%) see a need for DSOs to contract flexibility in the local markets within the next five years for congestion management and voltage control. Most participants state that it is essential to avoid inefficient investments into physical network infrastructure and instead access a broader range of 'non-'network' solutions (flexibility services, new grid tariff designs etc.) to solve congestion-related issues. Here, Blockchain-based congestion management at the grid level will support the complex communication and cooperation of many stakeholders or assets to avoid bottlenecks at the distribution grid level due to load shifting. Blockchain technology provides flexible resources and operators located at TSO, DSO, and customer levels to trade collaboratively without giving power to a single entity.

3.
An overwhelming 90.2% of the respondents agree that small/medium-sized generators or load centers should use a marketplace where they could trade services such as demand reduction for additional revenue.

4.
A majority of the respondents (72.5%) agree that current trading software and platforms for market access do not meet the needs of aggregators, small/medium retailers. i.e., aggregators currently interact with short-term wholesale markets (day-ahead and intra-day), providing market services and ancillary market providing system services. The product requirements keep aggregators out of markets when it comes to small-scale flexibility. Therefore, there is a solid need to empower small and medium players to participate in the marketplace through flexibility services. Here, the automated storage of transactions on Blockchain will enable simple billing, which otherwise would be complex to achieve manually. Payment to small/medium-sized generators or load centers for their services in the form of tokens would increase overall market efficiency. Tokens stimulate behaviour beneficial to the grid in the form of flexibility and allow it to be quantified and billed simultaneously. Additionally, the involvement of prosumers opens up the value of their assets, thus reducing intrinsic market entry barriers.

5.
When asked about what is missing in the present trading software and platforms, several participants identified the following issues related to the current platforms: a. lack locational information, a feature which is crucial in DSO congestion management; b.
restrictive characteristic in terms of product definition (for example, minimum offer sizes too high, delivery periods too long, lack of reservation payments/long term products); c.
restrictive feature in terms of contracting requirements (for example, requirements for bank guarantees); d.
lack IT interfaces to enable automated processing of asset registration, flexibility contract enforcement, delivery verification, and settlement; e. lack appropriate dispatch mechanisms or activation logic; f. mandate high costs for participation (for example, metering requirements for providing ancillary services).

6.
Finally, the conclusion is that TSO is likely to procure flexibility via existing routes (ancillary services, power exchanges), while the DSO is starting to explore flexibility procurement via other means, e.g., marketplaces or flexibility tendering. 7.
In Figure 7, one can conclude that the respondents provide preference as to which features and functionality should come first, which must come later and which to exclude. Based on the inputs we have decided to start with (i) flexibility asset listing and geo-tagging (ii) procurement-bid management and (iii) contract managementpayment and settlement (using smart contracts).
Energies 2022, 15, x FOR PEER REVIEW 13 of 28 a. lack locational information, a feature which is crucial in DSO congestion management; b. restrictive characteristic in terms of product definition (for example, minimum offer sizes too high, delivery periods too long, lack of reservation payments/long term products) c. restrictive feature in terms of contracting requirements (for example, requirements for bank guarantees); d. lack IT interfaces to enable automated processing of asset registration, flexibility contract enforcement, delivery verification, and settlement; e. lack appropriate dispatch mechanisms or activation logic; f. mandate high costs for participation (for example, metering requirements for providing ancillary services).
6. Finally, the conclusion is that TSO is likely to procure flexibility via existing routes (ancillary services, power exchanges), while the DSO is starting to explore flexibility procurement via other means, e.g., marketplaces or flexibility tendering. 7. In Figure 7, one can conclude that the respondents provide preference as to which features and functionality should come first, which must come later and which to exclude. Based on the inputs we have decided to start with (i) flexibility asset listing and geotagging (ii) procurement-bid management and (iii) contract management-payment and settlement (using smart contracts).

Setting-Up Functional Requirements
As power flows become more intermittent and unpredictable, distribution networks will have to tackle congestion-related issues such as feeder overload management and voltage management.

Identified Business Use-Cases
Based on high-level findings through surveys and interaction with various partners,

Setting-Up Functional Requirements
As power flows become more intermittent and unpredictable, distribution networks will have to tackle congestion-related issues such as feeder overload management and voltage management.

Identified Business Use-Cases
Based on high-level findings through surveys and interaction with various partners, we will focus on long-term congestion management where the timeframe is several months or years before the planned delivery. Reserving flexibility months or years ahead might hinder the FSP from participating in short-term markets. However, one can overcome this drawback via the activation process where FSP gets remunerated for responding to activation signals close to real-time. This process is described in the sequence diagram of Section 4.4. In addition, FSP is motivated to participate continuously in the short-term markets by aggregating resources or when the volume is big enough to better impact price. Therefore, we select this option of long-term congestion management to allow many small FSPs to enter the market as they only need to participate several times a year.
In this case, DSO reserves flexibility months ahead but does not necessarily activate it since requirements may vary with the various circumstance of load, generation, etc., over time. DSO would pay only reservation fees to flexibility assets. After analyzing the distribution grid during the service period, if DSO sees congestion in the coming days or during the day. DSO will be paying reservation as well as activation fees. This activation of flexibility assets from the reserved list of assets is called operational congestion management. DSO may also decide to procure flexibility from other markets if the need remains unfulfilled e.g., short-term buying. To keep the implementation of the marketplace prototype simple during the pilot phase, we decided not to focus on short-term congestion management.

•
Flexibility services for long-term congestion management allowing more renewable connection without unreasonable DSO network investments The TSO-DSO coordination using Blockchain Figure 8 may serve several purposes (a) network reinforcement deferral, (b) congestion management in transmission and distribution network, (c) voltage control (d) network support during construction and planned maintenance (e) obtaining transparency in the activation of Distributed Energy Resources (DERs). There is substantial value in long-term planning by temporarily relieving constraints on a piece of hardware or even postponing or avoiding reinforcement. price. Therefore, we select this option of long-term congestion management to allow many small FSPs to enter the market as they only need to participate several times a year. In this case, DSO reserves flexibility months ahead but does not necessarily activate it since requirements may vary with the various circumstance of load, generation, etc., over time. DSO would pay only reservation fees to flexibility assets. After analyzing the distribution grid during the service period, if DSO sees congestion in the coming days or during the day. DSO will be paying reservation as well as activation fees. This activation of flexibility assets from the reserved list of assets is called operational congestion management. DSO may also decide to procure flexibility from other markets if the need remains unfulfilled e.g., short-term buying. To keep the implementation of the marketplace prototype simple during the pilot phase, we decided not to focus on short-term congestion management.

•
Flexibility services for long-term congestion management allowing more renewable connection without unreasonable DSO network investments The TSO-DSO coordination using Blockchain Figure 8 may serve several purposes (a) network reinforcement deferral, (b) congestion management in transmission and distribution network, (c) voltage control (d) network support during construction and planned maintenance (e) obtaining transparency in the activation of Distributed Energy Resources (DERs). There is substantial value in long-term planning by temporarily relieving constraints on a piece of hardware or even postponing or avoiding reinforcement. • Flexibility services for operational congestion management, reducing the impact of outage events or forecast deviations.
For example, load-based reinforcement schemes can defer capital expenditures by channeling the savings to increase flexibility, with the main advantage being increasing network security. By enabling customers to reconnect faster after an outage or reducing outages due to work on the grid or incidents, there is a strong value for operation management i.e., reduced cost of unserved energy.

Identified Coordination Schemes
ENTSO-E and four other European DSO associations have proposed nine TSO-DSO coordination schemes. The coordination schemes range from separate TSO-DSO congestion management to combined TSO-DSO congestion management, to advanced level of

•
Flexibility services for operational congestion management, reducing the impact of outage events or forecast deviations.
For example, load-based reinforcement schemes can defer capital expenditures by channeling the savings to increase flexibility, with the main advantage being increasing network security. By enabling customers to reconnect faster after an outage or reducing outages due to work on the grid or incidents, there is a strong value for operation management i.e., reduced cost of unserved energy.

Identified Coordination Schemes
ENTSO-E and four other European DSO associations have proposed nine TSO-DSO coordination schemes. The coordination schemes range from separate TSO-DSO congestion management to combined TSO-DSO congestion management, to advanced level of combined balancing bids and congestion management (Figure 9). Depending on current market development, each country will opt for a suitable coordination scheme. For the case of Bulgaria, Option 1C-Separate TSO and DSO Congestion Management with the balancing market fully integrated with TSO CM market is a proposed option for ESO (TSO) and CEZ BG (DSO). The focus is for DSO to test alternative solutions guaranteeing the same quality of service as grid reinforcement and achieve data exchange between DSO and TSO related to balancing services.
For the case of Romania, TRANS (TSO) and DEO (DSO) prefers Option 2A-Combined TSO-DSO congestion management with overlapping MOLs and separate balancing. The DSO focuses on voltage level preservation, and TSO concentrates its operation on frequency preservation by prioritizing the balance between generation and demand. This fundamental difference in the objective function makes the constant dialogue between TSO and DSO inefficient. Therefore, future data exchange between these two entities will be limited to a handful of commonly critical parameters, such as voltage, power flow, power factor, and energy.

Step-by-Step Implementation
Most TSOs in Europe have their congestion management platform when it comes to congestion management. In contrast, designated trading platforms for DSOs have been non-existent. Reaching a consensus among TSO-DSO on detailed coordination, data exchange, or merit order list is challenging at the start of the project. In addition, the limited duration of the project requires us to be flexible and agile in building the platform stepby-step. The four identified steps are illustrated as follows: 1. A platform for market-based procurement of DSO (EFLEX) flexibility will be built as a designated DSO marketplace. Such a marketplace will provide main functions: identifying flexibility and showcasing availability of DER assets, pooling resources, matching of requests and offers, and settlement of transactions. 2. The marketplace will be further supported by Blockchain-based flexibility asset registration, smart contracts approving workflows, calculating pay-outs, and processing payments. 3. EFLEX will integrate TSO congestion management and thus streamline the needs of both TSO and DSO on the same platform. The needs may overlap and can be resolved using an upgraded matching engine facilitating dispatch based on predefined rules. Depending on current market development, each country will opt for a suitable coordination scheme. For the case of Bulgaria, Option 1C-Separate TSO and DSO Congestion Management with the balancing market fully integrated with TSO CM market is a proposed option for ESO (TSO) and CEZ BG (DSO). The focus is for DSO to test alternative solutions guaranteeing the same quality of service as grid reinforcement and achieve data exchange between DSO and TSO related to balancing services.
For the case of Romania, TRANS (TSO) and DEO (DSO) prefers Option 2A-Combined TSO-DSO congestion management with overlapping MOLs and separate balancing. The DSO focuses on voltage level preservation, and TSO concentrates its operation on frequency preservation by prioritizing the balance between generation and demand. This fundamental difference in the objective function makes the constant dialogue between TSO and DSO inefficient. Therefore, future data exchange between these two entities will be limited to a handful of commonly critical parameters, such as voltage, power flow, power factor, and energy.

Step-by-Step Implementation
Most TSOs in Europe have their congestion management platform when it comes to congestion management. In contrast, designated trading platforms for DSOs have been nonexistent. Reaching a consensus among TSO-DSO on detailed coordination, data exchange, or merit order list is challenging at the start of the project. In addition, the limited duration of the project requires us to be flexible and agile in building the platform step-by-step. The four identified steps are illustrated as follows:

1.
A platform for market-based procurement of DSO (EFLEX) flexibility will be built as a designated DSO marketplace. Such a marketplace will provide main functions: identifying flexibility and showcasing availability of DER assets, pooling resources, matching of requests and offers, and settlement of transactions.

2.
The marketplace will be further supported by Blockchain-based flexibility asset registration, smart contracts approving workflows, calculating pay-outs, and processing payments. 3.
EFLEX will integrate TSO congestion management and thus streamline the needs of both TSO and DSO on the same platform. The needs may overlap and can be resolved using an upgraded matching engine facilitating dispatch based on predefined rules.

4.
The coordination between DSO and TSO will be carried out using Blockchain-based distributed ledger technology (DLT). Through EFLEX, flexible resources and operators can trade collaboratively without giving power to a single entity.

Sequence of Flexibility Market Model
Flexibility Asset Registration ( Figure 10): buyers need to verify ownership, and owners need to be able to demonstrate their ownership. The flexibility asset registry is currently handled through complex processes and documents executed by rigorous background checks professionals. Flexibility Providers should register themselves and create an account with the marketplace. Blockchain technology will be used to create a registry of assets in this process, allowing users to co-create a blockchain system that can be trusted and consulted by interested parties. This step establishes a foundation for offering payments, messaging, asset management, multi-user accounts and a naming system implemented with blockchain technology. We demonstrate (a) the visibility of flexibility characteristics and congestion on the marketplace and (b) the settlement of transactions between various players facilitated through Blockchain based smart contracts. The coordination between TSO and DSO is also facilitated using Blockchain-based distributed ledger technology. One aspect that we focused on improving is the rapid identification of the location of the congestion on the grid. In addition, we aim at bringing improved efficiency to the trading process.

Sequence of Flexibility Market Model
Flexibility Asset Registration ( Figure 10): buyers need to verify ownership, and owners need to be able to demonstrate their ownership. The flexibility asset registry is currently handled through complex processes and documents executed by rigorous background checks professionals. Flexibility Providers should register themselves and create an account with the marketplace. Blockchain technology will be used to create a registry of assets in this process, allowing users to co-create a blockchain system that can be trusted and consulted by interested parties. This step establishes a foundation for offering payments, messaging, asset management, multi-user accounts and a naming system implemented with blockchain technology. We demonstrate (a) the visibility of flexibility characteristics and congestion on the marketplace and (b) the settlement of transactions between various players facilitated through Blockchain based smart contracts. The coordination between TSO and DSO is also facilitated using Blockchain-based distributed ledger technology. One aspect that we focused on improving is the rapid identification of the location of the congestion on the grid. In addition, we aim at bringing improved efficiency to the trading process.  (Figure 11): a dynamic grid prequalification process is envisioned to be initiated on the TSO/DSO coordination platform after bid collection for the purpose of avoidance of potentially harmful effects caused by flexibility activations. It might be so that the flexibility need of a DSO at a particular location coincides with the need for TSO. Therefore, both needs can be merged. In contrast, the opposite needs of a DSO and TSO can be addressed if TSO chooses another location belonging to a nearby DSO for flexibility procurement because the flexibility need of TSO is less location-dependent than a DSO. Product qualification and Pre-delivery test (Figure 12): if the information is insufficient for a decision, the DSO CM platform (EFLEX) can issue a request for additional information. If the provided information is sufficient to establish that the Flexibility Provider cannot provide the particular product, a rejection decision for the product prequalification can be issued. Finally, the flexibility provider shall provide to DSO reasonable evidence of satisfaction of the post-auction milestones. For example, the provider's ability to (a) receive and respond to instructions from the DSO (b) deliver its flexible kW or MW by the response time (c) sustain its flexible kW or MW for an agreed fixed period. Grid Prequalification (Figure 11): a dynamic grid prequalification process is envisioned to be initiated on the TSO/DSO coordination platform after bid collection for the purpose of avoidance of potentially harmful effects caused by flexibility activations. It might be so that the flexibility need of a DSO at a particular location coincides with the need for TSO. Therefore, both needs can be merged. In contrast, the opposite needs of a DSO and TSO can be addressed if TSO chooses another location belonging to a nearby DSO for flexibility procurement because the flexibility need of TSO is less location-dependent than a DSO.

Sequence of Flexibility Market Model
Flexibility Asset Registration ( Figure 10): buyers need to verify ownership, and owners need to be able to demonstrate their ownership. The flexibility asset registry is currently handled through complex processes and documents executed by rigorous background checks professionals. Flexibility Providers should register themselves and create an account with the marketplace. Blockchain technology will be used to create a registry of assets in this process, allowing users to co-create a blockchain system that can be trusted and consulted by interested parties. This step establishes a foundation for offering payments, messaging, asset management, multi-user accounts and a naming system implemented with blockchain technology. We demonstrate (a) the visibility of flexibility characteristics and congestion on the marketplace and (b) the settlement of transactions between various players facilitated through Blockchain based smart contracts. The coordination between TSO and DSO is also facilitated using Blockchain-based distributed ledger technology. One aspect that we focused on improving is the rapid identification of the location of the congestion on the grid. In addition, we aim at bringing improved efficiency to the trading process.  (Figure 11): a dynamic grid prequalification process is envisioned to be initiated on the TSO/DSO coordination platform after bid collection for the purpose of avoidance of potentially harmful effects caused by flexibility activations. It might be so that the flexibility need of a DSO at a particular location coincides with the need for TSO. Therefore, both needs can be merged. In contrast, the opposite needs of a DSO and TSO can be addressed if TSO chooses another location belonging to a nearby DSO for flexibility procurement because the flexibility need of TSO is less location-dependent than a DSO. Product qualification and Pre-delivery test (Figure 12): if the information is insufficient for a decision, the DSO CM platform (EFLEX) can issue a request for additional information. If the provided information is sufficient to establish that the Flexibility Provider cannot provide the particular product, a rejection decision for the product prequalification can be issued. Finally, the flexibility provider shall provide to DSO reasonable evidence of satisfaction of the post-auction milestones. For example, the provider's ability to (a) receive and respond to instructions from the DSO (b) deliver its flexible kW or MW by the response time (c) sustain its flexible kW or MW for an agreed fixed period. Product qualification and Pre-delivery test (Figure 12): if the information is insufficient for a decision, the DSO CM platform (EFLEX) can issue a request for additional information. If the provided information is sufficient to establish that the Flexibility Provider cannot provide the particular product, a rejection decision for the product prequalification can be issued. Finally, the flexibility provider shall provide to DSO reasonable evidence of satisfaction of the post-auction milestones. For example, the provider's ability to (a) receive Flexibility Reservation and Matching ( Figure 13): DSOs define constraint areas and publish call auction phase to reserve flexibility on EFLEX. The objective is to a) procure longterm, flexible capacity to avoid congestions b) avoid inefficient investments into physical network infrastructure c) manage network risk, gain visibility of DERs as they come online, and coordinate DER dispatch. In response to the DSO request, flexibility providers and flexibility units respond to the localized requests by committing themselves to reserve flexibility services. Flexibility service providers can already indicate their availability without committing to reserve flexibility services. After the call auction phase ends, there is a call auction freeze phase. Flexibility Providers can enter new orders (or quotes) or modify their existing orders until the call auction freeze phase. Finally, marketplace smart contract aggregates and sorts the flexibility offered in ascending order. The matching of offers against requests takes place automatically following matching rules. Flexibility Activation (Figure 14): After analyzing the distribution grid close to realtime, The DSO issues a flexibility activation request to avoid congestion. DSO instructs Flexibility Provider/s or Flexibility Unit/s via marketplace to deliver its Flexible MW. Since DSO calls for activation of flexibility resources from the reserved list close to real-time, we call this service as operational congestion management. Flexibility Reservation and Matching ( Figure 13): DSOs define constraint areas and publish call auction phase to reserve flexibility on EFLEX. The objective is to a) procure longterm, flexible capacity to avoid congestions b) avoid inefficient investments into physical network infrastructure c) manage network risk, gain visibility of DERs as they come online, and coordinate DER dispatch. In response to the DSO request, flexibility providers and flexibility units respond to the localized requests by committing themselves to reserve flexibility services. Flexibility service providers can already indicate their availability without committing to reserve flexibility services. After the call auction phase ends, there is a call auction freeze phase. Flexibility Providers can enter new orders (or quotes) or modify their existing orders until the call auction freeze phase. Finally, marketplace smart contract aggregates and sorts the flexibility offered in ascending order. The matching of offers against requests takes place automatically following matching rules. Flexibility Reservation and Matching ( Figure 13): DSOs define constraint areas and publish call auction phase to reserve flexibility on EFLEX. The objective is to a) procure longterm, flexible capacity to avoid congestions b) avoid inefficient investments into physical network infrastructure c) manage network risk, gain visibility of DERs as they come online, and coordinate DER dispatch. In response to the DSO request, flexibility providers and flexibility units respond to the localized requests by committing themselves to reserve flexibility services. Flexibility service providers can already indicate their availability without committing to reserve flexibility services. After the call auction phase ends, there is a call auction freeze phase. Flexibility Providers can enter new orders (or quotes) or modify their existing orders until the call auction freeze phase. Finally, marketplace smart contract aggregates and sorts the flexibility offered in ascending order. The matching of offers against requests takes place automatically following matching rules. Flexibility Activation (Figure 14): After analyzing the distribution grid close to realtime, The DSO issues a flexibility activation request to avoid congestion. DSO instructs Flexibility Provider/s or Flexibility Unit/s via marketplace to deliver its Flexible MW. Since DSO calls for activation of flexibility resources from the reserved list close to real-time, we call this service as operational congestion management. Flexibility Activation (Figure 14): After analyzing the distribution grid close to real-time, The DSO issues a flexibility activation request to avoid congestion. DSO instructs Flexibility Provider/s or Flexibility Unit/s via marketplace to deliver its Flexible MW. Since DSO calls for activation of flexibility resources from the reserved list close to real-time, we call this service as operational congestion management. Verification of delivery ( Figure 15): DSO should be able to monitor, function of a Flexible Unit, the Provider's progress in achieving the Service Period, Capability Parameters and Service Requirements. The objective is to verify the delivery and allocation of funds to the Flexibility Provider accounts/wallets. Settlement ( Figure 16): It is not necessary to have centralization due to the transparency of the conditions. It is not necessary to synchronize the processes, but rather to focus on Blockchain. The objective is to test the state-of-the-art digital technologies, such as Blockchain-based smart contracts for peer-to-peer energy transactions that promote local markets and smart asset management. Smart contracts automated execution aims to reduce transaction costs and ensure higher contractual security, as subsequent actions which deviate from what was agreed upon are rendered impossible or highly difficult. The financial settlement of flexibility reservation and activation will be carried out through the market platform based on predefined contracts and agreed-on prices.  Verification of delivery ( Figure 15): DSO should be able to monitor, function of a Flexible Unit, the Provider's progress in achieving the Service Period, Capability Parameters and Service Requirements. The objective is to verify the delivery and allocation of funds to the Flexibility Provider accounts/wallets. Settlement ( Figure 16): It is not necessary to have centralization due to the transparency of the conditions. It is not necessary to synchronize the processes, but rather to focus on Blockchain. The objective is to test the state-of-the-art digital technologies, such as Blockchain-based smart contracts for peer-to-peer energy transactions that promote local markets and smart asset management. Smart contracts automated execution aims to reduce transaction costs and ensure higher contractual security, as subsequent actions which deviate from what was agreed upon are rendered impossible or highly difficult. The financial settlement of flexibility reservation and activation will be carried out through the market platform based on predefined contracts and agreed-on prices.  Settlement ( Figure 16): It is not necessary to have centralization due to the transparency of the conditions. It is not necessary to synchronize the processes, but rather to focus on Blockchain. The objective is to test the state-of-the-art digital technologies, such as Blockchain-based smart contracts for peer-to-peer energy transactions that promote local markets and smart asset management. Smart contracts automated execution aims to reduce transaction costs and ensure higher contractual security, as subsequent actions which deviate from what was agreed upon are rendered impossible or highly difficult. The financial settlement of flexibility reservation and activation will be carried out through the market platform based on predefined contracts and agreed-on prices. Verification of delivery ( Figure 15): DSO should be able to monitor, function of a Flexible Unit, the Provider's progress in achieving the Service Period, Capability Parameters and Service Requirements. The objective is to verify the delivery and allocation of funds to the Flexibility Provider accounts/wallets. Settlement ( Figure 16): It is not necessary to have centralization due to the transparency of the conditions. It is not necessary to synchronize the processes, but rather to focus on Blockchain. The objective is to test the state-of-the-art digital technologies, such as Blockchain-based smart contracts for peer-to-peer energy transactions that promote local markets and smart asset management. Smart contracts automated execution aims to reduce transaction costs and ensure higher contractual security, as subsequent actions which deviate from what was agreed upon are rendered impossible or highly difficult. The financial settlement of flexibility reservation and activation will be carried out through the market platform based on predefined contracts and agreed-on prices.  all of the above steps will be extended for TSO. Coordination of flexibility deployment between the transmission and distribution system operators is carried out to ensure their mutual activation will not cause conflicts. The conflicts will be resolved using an upgraded matching engine facilitating dispatch based on predefined rules.

TSO-DSO Coordination
If both the TSO and the DSO seek flexibility in the same direction, the aggregator (FSP) applies to the largest bid, and if the TSO is significant, the DSO does not pay the penalty because it is assumed that the DSO's requests are to improve balance, which is helpful for TSO. In Bulgaria and Romania, residential loads do not yet pose congestion risks. However, partner system operators in those regions see the necessity of arranging a regulatory framework to be able to cope with these congestion risks.
If pre-qualified, one flexibility asset might be able to provide a product for congestion management in the DSO grid, congestion management in the TSO grid, or balancing performed by the TSO. So, there is a need to ensure coherence between congestion management and balancing bids. Properly communicating their needs in different timeframes and thus require interaction between two Merit Order Lists (MOL's) to avoid double activation of the same asset. Here, we see the value of Blockchain-based distributed ledger technology (DLT). DLTs are implicitly designed for multiple parties (or a subset of the party) to read/write the information on the ledger and to be able to validate the integrity of the ledger using cryptographic techniques. Other solutions such as web-based applications based on relational databases require considerable development and operational effort to achieve equivalent results. There is no need for each party to develop their API when using the functionality offered by a distributed ledger; the standard API and the ledger save the party the work involved in sharing data and the partner's effort connected with interfacing multiple-party APIs. Therefore, building a shared database with multiple writers (all participants forced to read or write data in precisely the same format) is extremely important.
The TSO-DSO communication of matching results through distributed ledger is explained in Figure 17. The identified steps are described below: (1) Buyer-seller matching results are represented as a block on a shared ledger. This block is automatically broadcasted to all authorized participants (TSO and DSO); (2) The single most updated chain is available to all authorized participants (in case of overlaps or conflicts, smart contracts will be activated to decide the course of action); (3) Block is added to the chain in a permanent and unalterable way; (4) All participants approve the transaction as valid, providing consensus. Thus, a seamless synchronization between multiple nodes represented by different platforms or system operators is achieved, enabling them to plan reliably and giving them security when managing activations and agreements.

Prototype Summary TSO-DSO Flexibility Market
It uses a 3-phase approach using Blockchain, smart contract and smart charging. The first phase covers the development of a web-based decentralized marketplace UI proto-

Prototype Summary TSO-DSO Flexibility Market
It uses a 3-phase approach using Blockchain, smart contract and smart charging. The first phase covers the development of a web-based decentralized marketplace UI prototype which can be broken down into four functions: onboarding, visibility, trading, and coordination. These functions will be explained in detail subsequently. The setting of various technical and economic parameters is included.
In phase two of setting up technical requirements, we obtained data layers for DER assets (generation, electrical load, storage, and EV charging stations) and transmission and distribution network maps (shapefiles) from TSO and DSO partners Romania and Bulgaria.
Flexibility service providers (FSPs/DSOs/TSOs) install Metamask wallet extension to their browser (Chrome or Firefox). This step enables simple and smart token-based micropayments, reducing the intrinsic market entry barriers for distributed generators and other flexibility assets (electrical loads, storage, EVs) and increasing overall market efficiency.
Once the wallet extension is added, the users can register themselves on the EFLEX marketplace, conFigure their needs, and submit request/offers in Figures 18 and 19.

Prototype Summary TSO-DSO Flexibility Market
It uses a 3-phase approach using Blockchain, smart contract and smart charging. The first phase covers the development of a web-based decentralized marketplace UI prototype which can be broken down into four functions: onboarding, visibility, trading, and coordination. These functions will be explained in detail subsequently. The setting of various technical and economic parameters is included.
In phase two of setting up technical requirements, we obtained data layers for DER assets (generation, electrical load, storage, and EV charging stations) and transmission and distribution network maps (shapefiles) from TSO and DSO partners Romania and Bulgaria.
Flexibility service providers (FSPs/DSOs/TSOs) install Metamask wallet extension to their browser (Chrome or Firefox). This step enables simple and smart token-based micropayments, reducing the intrinsic market entry barriers for distributed generators and other flexibility assets (electrical loads, storage, EVs) and increasing overall market efficiency.
Once the wallet extension is added, the users can register themselves on the EFLEX marketplace, conFigure their needs, and submit request/offers in Figures 18 and 19.  Once registration is complete, we make it possible for flexibility service providers and asset owners to visualize the evolution of congestion five years ahead in Bulgaria and Romania as well as for TSOs/DSOs to visualize the availability of flexibility assets five years ahead in Bulgaria and Romania. Once registration is complete, we make it possible for flexibility service providers and asset owners to visualize the evolution of congestion five years ahead in Bulgaria and Romania as well as for TSOs/DSOs to visualize the availability of flexibility assets five years ahead in Bulgaria and Romania.
In Figure 20 is given an example of the opening of "on-demand" locational order books on the market using flexibility. Here DSO/TSO or any buyer can filter flexible assets based on search criteria and preferred options. Followed by this, DSO/TSO or buyer can place a request on the marketplace. At the same time, flexible asset owners or flexibility service providers can visualize on the marketplace whether a DSO or a buyer has placed an offer requesting flexibility for a current or future period- Figure 21. Once registration is complete, we make it possible for flexibility service providers and asset owners to visualize the evolution of congestion five years ahead in Bulgaria and Romania as well as for TSOs/DSOs to visualize the availability of flexibility assets five years ahead in Bulgaria and Romania.
In Figure 20 is given an example of the opening of "on-demand" locational order books on the market using flexibility. Here DSO/TSO or any buyer can filter flexible assets based on search criteria and preferred options. Followed by this, DSO/TSO or buyer can place a request on the marketplace. At the same time, flexible asset owners or flexibility service providers can visualize on the marketplace whether a DSO or a buyer has placed an offer requesting flexibility for a current or future period- Figure 21.  DSOs/TSOs can currently select or filter available offers on the market and purchase these offers manually. Matching algorithms will be integrated into the later phase. Figures  22 and 23 present an example of how Blockchain-based wallets are used to facilitate micropayments between buyers and sellers. DSOs/TSOs can currently select or filter available offers on the market and purchase these offers manually. Matching algorithms will be integrated into the later phase.  DSOs/TSOs can currently select or filter available offers on the market and purchase these offers manually. Matching algorithms will be integrated into the later phase. Figures  22 and 23 present an example of how Blockchain-based wallets are used to facilitate micropayments between buyers and sellers. After the transaction is successful, the DSO/TSO wallet balance will be debited, and the corresponding flexibility service providers' (FSPs) wallet balance will be credited.

Discussion
It is commonly recognized that congestion management of distribution grids is rather locational and could benefit significantly from more locational information. Participation of distributed generators and flexibility assets on the distribution grid level will be enabled via a decentralized marketplace to ensure system stability. Marketplace (EFLEX) digitizes the procurement process to make it easier for aggregators and flexibility providers to view the local opportunities and participate in the procurement process. There are several aspects of the trading process where we aim to bring efficiency (e.g., asset registration, validating assets' metering data, and settling the associated financial operations could be performed end to end using Blockchain-based smart contracts and distributed ledger technology) The forthcoming demonstration of flexible marketplace will help network operators in Bulgaria and Romania with the following: After the transaction is successful, the DSO/TSO wallet balance will be debited, and the corresponding flexibility service providers' (FSPs) wallet balance will be credited.

Discussion
It is commonly recognized that congestion management of distribution grids is rather locational and could benefit significantly from more locational information. Participation of distributed generators and flexibility assets on the distribution grid level will be enabled via a decentralized marketplace to ensure system stability. Marketplace (EFLEX) digitizes the procurement process to make it easier for aggregators and flexibility providers to view the local opportunities and participate in the procurement process. There are several aspects of the trading process where we aim to bring efficiency (e.g., asset registration, validating assets' metering data, and settling the associated financial operations could be performed end to end using Blockchain-based smart contracts and distributed ledger technology).
The forthcoming demonstration of flexible marketplace will help network operators in Bulgaria and Romania with the following: (1) Long-term and operational congestion management: provide a solution to reduce network overload resulting in reduced investment in costly hardware/network upgrades or even power outages in the short term. (2) Active demand generation management: • deal with occasional peak loads that far exceed their current grid capacity; • provide the ability to absorb large volumes of decentralized generation; • enable participation of distributed generators and other flexibility assets (electrical loads, storage, EV's) on the distribution-grid level to ensure system stability; • transfer demand response value to the end-users.
(3) TSO-DSO coordination: avoid double activation of flexibility asset by TSO and DSO through matching engine facilitating dispatch based on predefined rules and effective signaling using Blockchain-based distributed ledger technology.

Expected Impact
Thanks to the dynamic network usage tariff (DNUT) facilitating transactions which result in desired flows according to the actual state of the distribution grid, several measures which describe the efficiency of operation are expected to improve during the simulated operation of the local market: The loss compared to total trading volume is expected to be reduced. Line congestions and near overload of system components (e.g., transformers) are expected to be alleviated. In the ideal case, the load of the network will be more balanced.
Voltage regulation measures are expected to improve (in the case of the corresponding DNUT calculation-the DNUT does not always include elements related to voltage stability.
Following the module's aim, the system components will be monitored more closely, and their load ability limits will be determined mode precisely compared to traditional methods-this way, their capacity may be utilized more effectively.
The proposed local energy market provides an opportunity for participants to translate their flexibility potential to local transactions financially beneficial for them both. If a consumer participant is ready to reschedule some of its peak load and energy is available at the local market at a fair price, the peak-shaving of overall consumption patterns may be realized via the result of such transactions.
As power flows become more intermittent and unpredictable, networks will have to tackle congestion-related issues such as feeder overload management and voltage management. If balancing power is required, it can currently be distributed between up to 10 generators. If this power is needed after five years, it can be distributed among up to 1000 generators, and storage technologies used by households can be added. With flexibility control in the hand of multiple owners, documentation, transparency, and automation are crucial. Here, Blockchain-based TSO-DSO congestion management at the grid level will support the complex communication and cooperation of many stakeholders or assets to avoid bottlenecks at the distribution grid level.
Based on the survey conducted, we know that the product requirements keep aggregators out of markets when it comes to small-scale flexibility. Therefore, there is a solid need to empower small and medium players to participate in the marketplace through flexibility services. Here, the automated storage of transactions on Blockchain will enable simple billing, which otherwise would be complex to achieve manually. Payment to small/medium-sized generators or load centers for their services in the form of tokens would increase overall market efficiency. Tokens stimulate behavior beneficial to the grid in the form of flexibility and allow it to be quantified and billed simultaneously. Additionally, the involvement of prosumers opens up the value of their assets, thus reducing intrinsic market entry barriers.
Finally, the marketplace (EFLEX) digitizes the procurement process to make it easier for aggregators and flexibility providers to view the local opportunities and participate in the procurement process. There are several aspects of the trading process where we aim to bring efficiency (e.g., asset registration, validating assets' metering data, and settling the associated financial operations will be performed end to end using Blockchain-based smart contracts and distributed ledger technology).
The present paper documents the results of the combined efforts of the partners of INTERRFACE project. We elaborate on the various activities as part of the "Blockchainbased TSO-DSO flexibility demo". Several requirements definition, validation, and revision rounds were employed, with partners contributing to the process using their own technical expertise. As a result, we successfully map the data layers on EFLEX marketplace and showcase visibility of DERs and RES locations and characteristics through a flexible marketplace.
We enabled distributed generators and flexibility providers to view the local opportunities and participate in trading as part of the procurement process through the web-based decentralized marketplace UI prototype.
Through Blockchain, we successfully coordinated dispatch of flexibility assets and managed network risks. We already envisage improvements for the flexibility marketplace and focus on testing and validating our prototype in real-life operating conditions or simulated environments. It will eventually progress to achieving the pragmatic view and objectives of the INTERRFACE project and connection with IEGSA architecture.

Conclusions
Several requirements for definition, validation, and revision rounds were employed, with partners contributing to the process using their technical expertise. We elaborate on the technical and functional requirements of the "TSO-DSO flexibility demo" with a particular focus on demonstration activities in the pilot sites.
The rapid growth of new hotspots for large-scale solar and wind farms, EV charging, data centers is causing congestion-related issues such as feeder overload management, constraints (voltage and current) on the infrastructure. DSO partners in Romania and Bulgaria see the uptake of RES/DERs in the next five years in their region and therefore would like to investigate alternative solutions guaranteeing the same quality of service as grid reinforcement. They would also like to test the viability of data transfer between TSO and DSO for the future cases in which the electricity markets will require flexibility. Flexibility could be used to manage congestion, balance individual portfolios, control and restore voltage of the grid.
Our approach to proof-of-concept development is to build in small, iterative pieces following lean and agile methodology with the primary objective of learning whether the intended functionalities and features provide the targeted outcome. Based on our survey on flexibility marketplace, the conclusion is that TSO is likely to procure flexibility via existing routes (ancillary services, power exchanges), while the DSO is starting to explore flexibility procurement via other means (e.g., marketplaces or via flexibility tendering). The marketplace demo can be seen as a DSO-focused platform with a TSO interface.
The business use cases identified were long-term congestion management and operational congestion management. While keeping a realistic view of the matter on market design options, we assigned priority to separate DSO and TSO congestion management and separate balancing; we gradually made progress towards options that align with market evolvement in Bulgaria and Romania. We have also defined the sequence diagram, which establishes the flow of information between various stakeholders and system use cases that describe the underlying processes in detail.
Outputs of this paper provide design components for integrated architecture. This architecture acts as a basis for the demonstration activities to be performed in the pilot sites.
Simultaneously, as part of the setting-up of the testbed, we started obtaining several data layers from partner DSO and TSO regions in Bulgaria and Romania. The objective is to map these data layers on the EFLEX marketplace and showcase DERs and RES locations and characteristics through a flexible marketplace. We enable distributed generators and flexibility providers to view the local opportunities and participate in the procurement process through the web-based decentralized marketplace UI prototype. Through Blockchain, we aim to test the coordinated dispatch of flexibility assets and help manage network risks.
As further development, the intention is to achieve a more flexible marketplace and in the next phase of the implementation. For example, the PoC can be extended for prosumers and consumers to trade electricity peer-to-peer.