# Liana Toderean & Dan Mitrea - Academic Research: Decentralized Energy Markets & Quantum Blockchain

- Channel: [ETHCluj Meetup](https://streameth.org/ethcluj-meetup)
- Date: 2026-02-09
- Duration: 33:15
- Watch: https://streameth.org/watch/yt-GHDNuHAE1Eo
- YouTube: https://www.youtube.com/watch?v=GHDNuHAE1Eo

## Description

This presentation explores the emerging role of decentralized energy markets within energy communities, focusing on how blockchain technologies can coordinate energy flexibility and peer-to-peer transactions among prosumers. It outlines the market architecture, main actors (producers, consumers, DSOs), and typical operational flows.

The presentation will highlight a use case involving energy coordination in residential buildings, where apartments and buildings trade energy flexibility. Considering this use case, the talk will continue with security improvements to the blockchain layer leveraging quantum technologies, such as quantum random number generators.

## Transcript

Okay, so I have been given the approval to start. Hello everyone. Uh my name is Dan and together with my colleague Lyanna, we are working in academic research projects funded by the European Union and we are both finishing our PhD here at Technical University of Kushnapoka in blockchain related energy markets. And today we'll present to you decentralized energy markets and quantum blockchain. Here is the list of content and to begin with in the energy domain uh traditional infrastructures rely on centralized architectures where large power plants generate electricity and transfer it to the consumers in a top-down approach. This approach has problems in integrating renewable energy sources. Moreover, centralization also has its problems by default because it represents single points of failure and can present uh data security issues due to the fact that uh many renewable energy sources have are appearing at the edge of the network. Decentralization is the trend. uh the goal is to integrate this renewable energy sources and alleviate the burden from the and the reliance on the main grid. However, integrating these energy sources at the edge of the network is difficult because we need to have a balance between the supply and demand and the consumption and production. So the goal is to enable smart homes which we will present as consumers who have capabilities of both producing and consuming energy to trade energy with their neighbors thus uh eliminating the need on the large power plants not at all but almost entirely. This brings its own set of challenges. Weather unpredictability might co might cause energy to have uh energy production to have sudden spikes which could damage the grid. Moreover, people might be reluctant to join such programs because of social uncertainty and contracts currently are rigid and offer high prices. We will present this work in the ecosystem in the model of an energy community here. Uh smart homes and small businesses collaborate in a at a local level in a neighborhood for example to produce, consume and share energy with their neighbors. These energies here the main actor is the consumer which is a smart home uh capable of producing energy as well as of course consuming it. And they also have sensors which accurately moni monitor the energy consumption and production. These energy communities are systems that democrat democratize energy systems because they the main advantage of them is that they enable the integration of renewable energy sources without expensive infrastructure updates. So if you want to enable consumers to trade energy with their neighbors, our goal is to eliminate intermediaries and centralized systems. As a result, we leverage blockchains in order to enable secure and traceable transactions in a peer-to-peer manner between neighbors in a community. Blockchain ensures trust without intermediaries also through consensus mechanisms. And smart contracts can automate and enforce rules by default. Uh so we how do we enable consumers to trade energy with their neighbors in a fair and distributed manner? We create energy markets enabling producers to sell energy, renewable energy and consumers to buy this energy. We have chosen Ethereum not only because we are at Ethereum Cl but also because it has a mature smart contract platform. We have studied energy markets in the literature and have identified three types, three main types. Day ahead energy markets enable energy to be traded one day before actual delivery. So we trade energy today and we deliver it tomorrow. This type of market offers the best prices. However, they require uh prediction mechanisms to be able to predict your energy consumption and production for the next day. There are also intraday and realtime markets which enable trading energy at a smaller time frame from hours to maybe a few minutes. However, these markets offer higher prices. Our work is focused on day ahead energy markets. So this these are the only types of markets that we develop here. So in an energy market, we will allow consumers to place buy and sell orders representing energy consumption and production and they we will allow them to associate prices of their will. Thus creating a system where matching and pricing is determined by supply and demand, not by centralized entities that can offer pricings that are not affordable for for the consumer. This will encourage the consumption of local and renewable energy. The this comes with a set of challenges because there will be a lot of participants in these markets each with their specific needs. So to match buy and sell orders in such a setting is difficult because we need to we cannot accurately compute the perfect matching. Thus we need to get to use algorithms as heristics. we have identified. So for example in current centralized ecosystems there are energy markets where people can trade energy but they are reserved for large amounts of energy. So only big entities that can trade a lot of energy can participate. And if you have a smart home and you want to sell some energy, you must do it through an intermediary which will set disadvantageous prices because they will want to acquire a profit from you through blockchain and energy markets. We we eliminate these big players and let consumers trade energy freely. We have identified some types of uh matching algorithms uh which are can be categorized in two classes. Price driven are those that focus solely on supply and demand economics and are limited in considering social factors in the community but they are easier to implement and usually get the job done. We have identified and also implemented uh game theoretic approaches which are better for modeling consumer strategies in these settings as well as computing better payoff distributions if they use more local renewable through cooperation. These models however are more difficult to implement are difficult to model the strategies accurately as well as to develop good payoff distributions in after the matching is done. So if we have an energy market where we want to trade we want to trade something what are we trading we are trading energy but because we are in a digital system we want to have a means to pay for this asset and as well to represent it digitally. So first we are leveraging ERC20 tokens to allow buyers to pay for the energy they are buying. Next we are also leveraging ERC 721 tokens which model nonf fungeible assets in order to allow sellers to tokenize their energy and transfer it when the matching is done such that when the energy is actually delivered the next day they can check the transaction and see exactly what they what transaction they made. then with whom considering all of this uh we present a general architecture of our system which we are losing. So at the bottom layer we have the smart grid which is the physical electrical system where the energy is produced and distributed among homes and renewable energy. Then we have the blockchain layer where we have peers that collaborate through consensus mechanisms ensuring trust and in each block they all have the same copy of the blockchain and they have energy transactions representing bids, offers and transactions. Then above it we implement energy market at as a distributed application uh through smart contracts on Ethereum. Here we have smart contracts for consumers which each proumer has their own smart contract which will operate on the market on their behalf. Then we have custom ERC 721 and custom ERC20 tokens through which we can pay for energy and tokenize energy for sellers. Finally, we have market specific smart contracts where we allow uh where we can store bids, offers and transactions as well as register consumers on in this market. Now there is one one challenge that we needed to address. We talked about matching algorithms which are which are complex and difficult to implement and we all know that implementing complex algorithms in smart contracts is unfeasible because of gas costs and execution times. As a result, you can see there we are using blockchain oracles to allow us to implement the matching as an off-chain process and then link it with the blockchain automatically ensuring trust while also running the algorithm offchain to increase the scalability. So every day there is a market session orders are placed for the next day because as I said it's a day ahead market. At the end of this session, the matching is automatically triggered by the oracle matching algorithm. Extracts bids and offers, matches them into transactions, then stores them in the blockchain. So we'll present here the main operational flow of the market implemented in smart contracts. First, proumers register on the market as buyers or sellers. Then a manager starts a market session each day. But as I said, the session is for the next day. Consumers publish bids and offers on the market. Bids and offers are representing the amount of energy they want to trade, to buy or to sell for each hour of the next day. That's how we model the market for both buyers and sellers. Uh they have to lock tokens. We have a custom ERC20 token that allows locking such that we prevent double spending. Otherwise, people would place uh crazy orders and they will be will get along with it. And as I said, sellers will mint ERC 721 tokens tokenizing the energy they are about to sell the next day. At the end of the market session, the matching algorithm extracts all bids and offers and matches them into energy transactions. When an energy transaction is generated, the the token the NFT representing the energy is automatically transferred from the seller to the buyer. This way we have a temper proof record of the transaction which can be verified later. So after transactions are registered on chain, it's the the last process begins which is the settlement part. What does it mean? Each prumer is equipped with smart sensors which monitor the energy they consumer produce. These smart sensors can send energy at variable rates. So we need to aggregate values into hourly values exactly how we have placed the bids and offers. These monitor values are stored on the blockchain and through smart contracts we compare the monitor values to the transactions from the previous day. We do this in order to motivate consumers to respect what they promise when the matching is done. So if you you want to trade X amount of energy, you have to place a realistic order so that you can do it. If a if two pro if a consumer doesn't respect what they have traded the previous day, they are penalized. So we discourage this this behavior. Similarly, if the consumer does what they promised, they are rewarded. Now, we will I will present you an improvement we made on the for this market. Here, as I said, we are using ERC20 to model funible tokens and to allow buyers to pay. However, this token is not suitable for representing unique assets. Similarly, ERC 721 is good for modeling nonfgeible tokens or NFTs. in our case energy. However, it's inefficient for managing multiple assets. So, we have identified ERC 1155 as the more modern token standard which allows in a single contract to represent both uh NFTs and fungeible tokens. Not only that, it supports batch transfers which allows us to make the market more efficient operationally because we can place multiple bids, multiple offers at once as well as trade multiple tokens at once. But how do we actually use this uh token standard? So within the same smart contract, we have two types of IDs. The ID which is zero is reserved for digital payments exactly how we were using the ERC20 token before. So we can lock these tokens uh pay with them so and so on and make settlements. On the other hand, any ID that is different than zero will be encoded with this formula which contains not only the minting address but also the hour energy type and the counter to make the ID always unique. These custom token ids will represent NFTs similar to how we used ERC 721 tokens before and these can be traded minted for sellers then traded to buyers when the transaction is made. And now I will leave the floor to my colleague Lyanna to continue the presentation. Thank you. I will continue the presentation with uh buildings energy flexibility trading uh and uh quantum enhanced blockchain in the context of of demand response programs. The flexibility trading it's a bit different than trading energy because here we actually trade how much of uh the consumer is willing to change their consumption based on available resources. Uh as was mentioned the renewable energy sources are unpredictable. So they are very difficult to be integrated in energy grids. uh program uh demand response programs are designed to uh adjust the consumption of energy in order to align it to the available supply. Uh the buildings have a high percentage of the energy community consumption. So they are a very important part of successful demand response programs. The objectives uh are to prioritize consumption of renewable energy whenever it is available by aligning the energy demand. Uh this is possible by efficient control and optimization of the building's flexibility. uh the building owners are motivated to participate in demand response programs to uh through economical and operational benefits. Uh the building owners have to aggregate energy flexibility from multiple residents, individual residents and motivate them to change their consumption behavior uh through rewards. The challenges in this um scenario are decentralization, increasing the resident's trust and design reward schemes that would actually motivate the resident to change their behavior. Uh this can be achieved through uh market mechanism and flexibility trading. Uh blockchain technology offers a platform for decentralization that enables uh residents to trade flexibility to the building owner and for the building owner to uh aggregate uh this flexibility and support demand response programs. However, with the rise of quantum computing, some security threats, especially um attacks that target the entropy and randomness of the blockchain system. Um such security threats are predictable wallet and key generation, manipulation of onchain randomness that can lead also to validator manipulation in proof of stake. Uh we will focus now on quantum random number generators that are better than the sudo random generators because they provide true entropy. Uh and this can be used in key generation and also in the hashing mechanism to prevent manipulation. Uh here we have the quantum enhance enhanced blockchain platform for energy flexibility trading between residents and the building owner. Uh each participant has uh their smart contract specific to its role and also has an energy wallet that enables the transaction. We introduce a quantum random number pool that is used uh for key generation in the wallet application and also for signing the transaction. Uh the architecture of the system is in this image on the quantum security component. Uh we use the quantum rand random number generator that feeds random bites to a secure pool. This pool is used uh by the energy wallet application and also it's used in the hashing function of the Ethereum blockchain. Uh the wallet provides u the users to create accounts uh and also initiate energy transactions to through their smart contracts. uh here is the al algorithm of the hashing function. The idea here is we modify the classical hashing function of Ethereum. Uh more specifically the in initialization phase the sponge of the function uh initially was um set to zeros and now we modified it to be set uh with random numbers from the quantum pool. Uh and here we have a flow of how the the energy platform user will interact with the system. it. Uh first he has to download and configure its wallet. Then uh he can generate blockchain account. The wallet will use uh random numbers to create the keys for for this account. Uh the wallet stores the the account information and also registers it uh on chain. uh the building owner has to uh deploy uh its smart contract and also the token smart contract that will be used both for payment and for flexibility representation. All the transaction are signed by the wallet using the um quantum uh hashing function. Uh similarly the residents will use their wallet to deploy uh their apartment smart contract that will also be registered with the corresponding building. The flexibility trading process has two steps. One for uh setting up the market and orders registration. The building owner place a request for flexibility through a bid order. Uh the smart contract will will automatically lock the tokens used for payment. Uh and the residents place their offer for flexibility. And in this step also the flexibility tokens will be minted. In the matching and commitment phase, the building owner generate trades based on the orders registered on chain and um this will automatically trigger the token transfer both for payment and for the uh flexibility tokens and their commitments will be updated. uh we validated this solution considering a small building with 10 apartments. Uh these apartments have uh different energy consumption levels and the flexibility is considered as a percentage according to to their consumption level. uh in the transaction gas consumption there are no changes as the hashing function doesn't affect uh this but is it is a small increase in the execution time as several steps are needed to u get the random number for from the pool and then validate the transaction. Uh here we have a list of research project in which this work uh was uh developed. Uh they are European European research project under horizon program. Uh also we have a list of publication uh in which our work is documented and that's thank you. And now if you have any questions regarding our presentation. Uh one by one please. Yes. &gt;&gt; Yeah. So I have a question. Um I'm a bit confused about the purpose of the uh quantum uh RNG. Um I'm trying to understand why this is much better than the current RNG we have or to kind of ask this differently. If I were to generate two numbers, one with QRNG and the other one with like a different RNG algorithm. Would you know which one is which? &gt;&gt; Uh the classic one, the Podo random can be uh cracked with rise of quantum computing. If you have quantum computers, there's a big risk of collision collision between the private private keys and you can deduct the private key from the public one. Uh this quantum random number generators are truly random and it's u it they can be u predicted. Can I ask a follow question? &gt;&gt; Sure. &gt;&gt; But I'm getting this random number generator from an external source and they know the number like how am I not putting trust in them in that case? Is it not worse? &gt;&gt; Yes. But the idea would be to use the rand random number generators to feed the secure pool and also the mic. &gt;&gt; Yes. &gt;&gt; Yes. Uh I wanted to ask a question about the matching algorithm. You said the offers are somehow offchain. The algorithm runs at the end of the day and submits the matches to this oracle. I meant to ask how does the oracle assure that the matches the bits and offers actually existed and is there a way in which it's guaranteed that the algorithm ran correctly or do we need to trust the oracle that he ran the computation right and that he did the matches correctly &gt;&gt; should I answer with the mic or without &gt;&gt; it's fine &gt;&gt; so uh I don't know if I will reiterate the process So the orders are placed onchain by each consumer and then the matching algorithm is executed automatically through the oracle at the end of the day. So it doesn't have the or they it just fetches the orders from the blockchain, matches them offchain and then stores the transactions. And regarding uh how do we know it was executed or not? Uh usually communities, energy communities require a manager, a community manager and they will have to make sure that the operations are executed in some way. Uh we don't have automatic checks to ensure that the oracle was triggered but the system is verified and is executed each day. So but to be sure that there are trans everything is perfect, I think the only the manager can uh can do this. Okay. Thank you. &gt;&gt; Yes. &gt;&gt; What what is happening with the research that you do? Who can use what you are producing right now? The privates can join you in this program or &gt;&gt; so uh there are layers of research projects in the horizon program. There are purely theoretical projects that just validate solutions. we are in the middle ground. Uh or may I say the the other extreme is that there are projects which are when they are finished they are used entirely in production and by companies. We are with these projects specifically we are somewhere in the middle. So we these projects research some ideas and some concepts and some of them are validated in real scenarios with real data and uh some modules from these uh pro research projects are actually leveraged then by companies and usually uh these projects are made up of multiple partners from a few to tens. We haven't reached hundreds yet but who knows. So uh which are both universities and uh as well companies which might provide data. Some companies might provide uh infrastructure for this uh research to be done and to validate. &gt;&gt; Now it's just the research. There's no way to test it or something like that. &gt;&gt; Yes. &gt;&gt; We tested it in pilots. the pilots in the project. &gt;&gt; I'm asking for us if we can test it out about you. I I I think you have a mockup or something like that. I don't know. But my curiosity is as a private can I test can I invest in that? How can I use it if I want to use it in my business? Can can I do it right now or &gt;&gt; Yes. I I don't think you can but uh we will need to Sorry power.io. &gt;&gt; Uh so these are the projects. I think you have the websites for each &gt;&gt; but I'm I don't think you can directly only if there are some actual &gt;&gt; okay &gt;&gt; but we will check again and &gt;&gt; I'm not trying to stress you. I'm just curious to see how &gt;&gt; Yes, we don't think there is. &gt;&gt; Thank you. &gt;&gt; Yes. Um I have another question. Uh there was a one point where you said that there are incentives for users or for proumers I'm not sure to change behavior in order to maybe uh generate more energy or consume uh less energy in order for others to have that. And I'm trying to kind of understand what the future of that becomes because I'm I'm a bit afraid that um you're going to get to the Uber model where you have like a base value which covers for everything and then you have hikes in price when so it becomes even worse already the cost of energy is pretty high in Romania and it's keep keeps going up. So like when you're going to apply this is it going to become worse for the users actually or how is that going to become better? So our aim is to make it better of course not to make it worse. We haven't tested it in great large scale production or in especially in Romania where the government and national companies are still reluctant to get involved in this especially due to to infrastructure and political reasons. uh but our goal is to make these mechanisms more affordable for people especially that as I mentioned and as you said uh currently especially in Romania uh trading between trading energy is available only for big entities that can trade large amounts of large volumes of energy and is unaccessible for the consumer. So our work aims to enable consumers to trade energy more cheaply and as you said about modeling we have used game theory models are better to model actual strategies and possible behaviors of consumers. Uh this is what I did for my PhD to encourage adoption of these uh programs through cooperation in the community. But I cannot tell you for sure if uh if we give it or it's if it's actually implemented the devil eye will make it more unaffordable for people but our goal is to make it better of course. &gt;&gt; Uh can I add something? &gt;&gt; Yes. &gt;&gt; Uh for example in the flexibility trading market the residents actually are paid. They offer their flexibility and the building owner that places the flexibility request will pay for them to change their behavior. In in practical, the building owner should also benefit from from the upper level demand response program and then offer rewards to the residents. &gt;&gt; Right? But you can you can pay them to change behavior or you can tax them less to change behavior. So if you get the same outcome in the end. &gt;&gt; Yes. But with uh that it's time of use demand response program and in that case the actual price of electricity is taxed based on the time of the day. &gt;&gt; Okay. So you have at least four questions on the app but we don't have any more time but we are going on rooftop and we will continue the discussion there if you're open. Okay thank you. &gt;&gt; I can tell you the answers on the rooftop. Thank you.
