Skip to content


  • Research
  • Open Access

Design and implementation of a blockchain multi-energy system

Energy Informatics20181 (Suppl 1) :17

  • Published:


The growing adoption of photovoltaic panels on roof-tops increases the pressure on grid operators for offsetting surplus or deficiency in generation. A multi-carrier energy system allows energy to be converted and stored using different energy carriers, thus relieving the stress from grid operators. However, these systems require efficient operation to unfold their full potential.

This paper proposes a novel blockchain-enabled process to coordinate, allocate, and settle intra-day energy transactions in a district multi-carrier energy system with electricity and heating sub-networks. An incentive mechanism is designed for an optimal allocation of local green energy generation. The mechanism is implemented for the Ethereum blockchain and operates fully on-chain. The design leaves energy producers the freedom to choose their preferred pricing strategy for profit maximization while restricting them to behavior favoring the common good. We test three pricing strategies, with different levels of knowledge on users’ pricing behaviors, that energy producers may adopt. The price-availability-based allocation system guarantees consumers the lowest possible cost.


  • Blockchain
  • Multi-energy system
  • Game theory
  • Dynamic pricing


To mitigate climate change and increase energy efficiency, Europe envisions to have at least 27% of the power produced by renewable energy by 2030 (European Commission 2014). Renewable energy integration, system operation, transparent billing, and data integrity, are common challenges for grid operators when adopting new solutions (Intergovernmental Panel on Climate Change 2015; Dell and Rand 2001). A holistic view of those technologies in operation (i.e., on district or community level) still has many aspects to be investigated and optimized.

One kind of Distributed Ledger Technologies (DLTs), blockchain, has been flourishing for the past decade. It has advantages in securing immutability and guaranteeing transparency of transactions. Its decentralized nature and integrated computing feature bring the potential of adding value in the energy sector, especially regarding energy dispatching, billing, as well as energy financing.

This paper offers three main contributions: (i) We propose a novel process to coordinate, allocate and settle intra-day energy transactions in a multi-carrier energy system. (ii) The introduced mechanism offers optimal energy allocation that empowers the role of the community. (ii) The system is implemented for the Ethereum blockchain and evaluated. It operates in a decentralized way, fully on-chain.


A multi-carrier energy system (MES) combines multiple energy carriers, whereby electricity, heating, cooling, etc. optimally interact with each other on various levels (for instance, within a district, a city, or on a regional level). In terms of energy consumption, heating and electricity are the two major subsystems (Gierek 2016). An MES with distributed generation of multiple energy sources is a key option to decarbonize the energy sector while improving the technical, economic, and environmental performance (Mancarella 2014). With the increasing adoption of renewable energies by end-users, distributed MESs require more flexible power and ancillary services to prevent potential operation failure derived from their high variability and volatility.

To efficiently operate such a system, one solution is to segment the energy network and control the sub-networks asynchronously on a distribution network level (Stöcker 2018). A district-level distributed MES is an ideal representative of such a sub-network, because the complexity of its operation is reduced in comparison to a system that involves management of a higher voltage electricity network. A district heating network and other bi-directional distributed energy resources (DERs), such as electric vehicles, batteries and hydrogen storages, could also be added on top to form a district MES. Another solution to answer the increasing demand for flexible power is a Transactive Energy System (TES). Via a set of economic and controllable mechanisms, in particular price signals (Perez-Arriaga and Bharatkumar 2014), which balance the supply and demand of power over time across an entire electrical infrastructure, a TES enhances the value for transacting parties while being consistent with the overall system reliability (Tesfatsion 2018). Our project combines the said two solutions together for efficient operation of MES. We integrate the pricing-based TES methods to a district-level MES, to optimize the technical operation as well as maximize the utility function for each consumer. As consumers demand constant and real-time transparency as well as accurate billing on their energy consumption for a sustained demand reduction (Darby 2006), blockchain technology is adopted here for instant and transparent settlement.

Blockchain is one kind of Distributed Ledger Technology (DLT), which is a novel approach to recording and sharing data spread across a distributed network of participants (Natarajan et al. 2017). Globally distributed nodes are linked by a peer-to-peer (P2P) communication network with its own layer of protocol messages for node communication and peer discovery (Glaser 2017). Without the use of a central server, blockchain technology eliminates the risk of having one node with superior power that may influence or manipulate the process of consensus establishment in the network. New data can only be added when consensus is reached among a majority of participants. Some commonly used consensus mechanisms are Proof-of Authority (PoA), Proof-of-Work (PoW), Proof-of-Stake (PoS), and Practical Byzantine Fault Tolerance (PBFT). Tschorsch et al. (Tschorsch and Scheuermann 2016) conducted a comprehensive review on Proof-of-X algorithms. With smart contracts, i.e. scripts running on the blockchain, inputs can be processed automatically based on the predefined logical calculation.


This paper proposes an innovate process to seamlessly coordinate, allocate and settle near real-time energy transactions in a district MES that includes electricity and heating sub-systems. The process operates in a decentralized way, fully on-chain. The mechanism aims at (i) forging the solidarity of the community, where participants act for common good. (ii) increasing the penetration of renewable energies, where participants are willing to purchase as much renewable energy as possible. (iii) minimizing the cost of energy consumption, by building the best possible portfolio for consumers to optimize their energy bill.

The energy transaction is matched according to the criteria of (i) connectivity: physical connection by cable or tunnel in the energy network, (ii) availability: real-time energy supply and demand, and (iii) priority: community generated green energy has higher priority for usage than energy from the grid, or other customized whitelist or blacklist.

The system architecture (as shown in Fig. 1) and testing data are derived from the eHub demonstrator of EMPA in Dübendorf, Switzerland.
Fig. 1
Fig. 1

Layout of the interconnected electricity (left) and heating (right) sub-networks with 3 households, 3 solar panels, 1 storage system, 3 medium−/high-temperature (MT/HT) heat pumps, and 4 MT/HT water tanks

In intraday trading, energy and financial transactions are resolved in a 15 min interval. We propose a 5-step settlement mechanism, where each step has an allocated period, globally coordinated by a single smart contract. Figure 2 illustrates the sequence of actions in one trading interval. Activities take place in both networks at the same time.
Fig. 2
Fig. 2

Timeline of the 5-step trading mechanism. (Left: for electricity network; Right: for heating network)

In the first step, all the devices register basic information for the upcoming 15 min. In the second step, all the consumers send out price queries to renewable energy producers or to storage units of the community. After all queries have been responded to, consumers sort all possible offers according to the updated unit prices. The received responses are sorted by the following guidelines: (i) Sort from the lowest price to the highest price. (ii) Rank down the unresponsive devices. At the same time, heat pumps receive the demand of hot water from their connected water tanks. Heat pumps convert the requested volume into needed electricity and broadcast the demand to connected devices. Meanwhile, water tanks calculate their new averaged unit price of the stored hot water for the upcoming trading period. In the third step, producers ask for the sorted result from their connected consumers and make their own list of ranks based on the preference of consumers. The guideline for producers to sort their connected consumers follows: (i) Outdated information is not considered for sorting. (ii) Sort all consumers based on their Rank. The smallest Rank is placed highest in the list. (iii) For two items with the same Rank, the smaller Total ranks up. (iv) Devices with larger consumption are ranked down. In the heating network, the water tanks query houses for the hot water consumption at this step. At stage four, nodes with negative energy load initiate energy transactions based on the sorted rank list. If one heat pump receives energy during this stage, it immediately initiates another transaction in the heating network to the connected water tank, as it consumes electricity to produce heat. Similarly, in the heating grid, each water tank transacts hot water to corresponding households. If there are still residues of generation or lack of supply, at the final clearing step five, producers and consumers act at the same time with storage or grid to offset the surplus or deficiency. It is possible for devices in the community to define “blacklists” for some connected devices. The communication is cut off with the blacklisted device. This mechanism allows punishment against deceit or unaffordable energy price.

Energy producers can choose different pricing strategies that aim for various goals, such as maximum payoff or maximum selling volume. Here we adapt several pricing scenarios in three categories. First, zero-intelligence pricing, a basic Real-Time-Pricing (RTP) strategy where agents have little or no information on both the performance of their own and others’ devices. This makes the pricing strategy totally random and independent of any system impulses. Secondly, inversed-production pricing, where agents need to predict the production of their own devices for the next 15 min interval based on historical data and set up the price according to a general demand-supply relation. It is a Critical Peak Pricing (CPP) strategy. Each agent performs independently, relying only on the historical information of its own device. Thirdly, game-theory based pricing, where each energy producing agent can adjust the selling price based on the behavior of other energy producers who hold a similar role, to maximize their utility function in a collective non-cooperative way. Here we define the utility function as the portion of energy sold out to the community at each time interval. Agents firstly share necessary information with each other and make their own decisions in combination with the historical performance of their own device. Unit prices are set by energy producers. The adopted strategy affects the payoff of the energy producer.

The mechanism is deployed as a set of smart contracts written in Solidity on the local test Remote Procedure Call (RPC) Ethereum simulator using the Truffle framework. All tests were later run on Node.js using the Mocha testing framework. The input data, as shown in Fig. 3, that record full-day activities are collected from the sensors at eHub is firstly scaled and processed to cohere with the assumption of the project. Three pricing strategies, as shown in Fig. 4, are tested on three different layouts of the district system. Besides the layout shown in Fig. 1, one testing layout does not contain a battery, while in the other layout, the battery is connected to all other devices. Apart from the differences in layouts, the following operating conditions are applied identically in the tests: (i) No active purchase from the battery, (ii) the unit price for the battery is static, and (iii) the load capacity of the grid is ±100 kW.
Fig. 3
Fig. 3

Electricity and hot water consumption profile per household on a winter day

Fig. 4
Fig. 4

Price profiles of each PV under three types of pricing strategies


Figure 5 shows the composition of energy supply of each house under three pricing strategies, in the default system layout. The game-theory pricing strategy holds a clear advantage comparing to other strategies because more than 90% of energy is supplied by the locally produced green energy. By choosing a competitive pricing strategy, households pay significantly less than in a determined pricing case. In general, the price influence depends very much on the energy supply distribution. Game-theory based strategy provides a feedback loop for devices to make better decisions with limited information. The agility it provides is essential in the intra-day, high-frequency trading. Figure 6 shows how the behavior of devices affect the usage of grid capacity. Although a battery provides a certain degree of flexibility to the grid and the community energy system by shaving the peak, a good pricing strategy can effectively adjust the dispatch of energy and reduce the volatility of energy demand from the district energy system to the grid.
Fig. 5
Fig. 5

Electricity settlements of houses under each pricing strategy. Rows from top to bottom correspond to House0, House1, and House2. Energy supplied by local generation is marked in green, while the supply from the grid and battery is marked in yellow

Fig. 6
Fig. 6

Electricity flow between the district energy system and the grid under different pricing strategies


This project proposes a novel process to coordinate, allocate and settle energy transactions in a district multi-carrier energy system. The process operates in a decentralized way, fully on-chain. The mechanism allows a custom dynamic tariff setting model. It leaves producers the freedom to choose their preferred pricing strategy for profit maximization. A price-availability-based allocation system guarantees that consumers pay only the lowest possible cost for their energy. An incentive mechanism is introduced. Each device reacts for the common good of the community and follows the principle of relieving the operation burden of the grid. Game-theory based strategy provides a feedback loop for devices to make better decisions with limited information. The agility it provides is essential in the intraday trading. This design is implemented for the Ethereum blockchain and tested with real consumption and production profiles of electricity and heating systems. Three pricing strategies, namely zero-intelligence pricing, inversed-production pricing, and game-theory based pricing, are compared and evaluated. An analysis of the energy consumption and operation cost of such systems is performed in the end. The design incentivizes the access to local green energy with minimized cost. In general, the degree of price’s influence on energy consumers depends on their connectivity to energy suppliers. Consumers have more stable green supply from the community when they have a better connectivity. By choosing a competitive pricing strategy, households pay significantly less than in a determined pricing case. Battery plays an inevitable role in providing stability in the system shaving the peak. To make the operation more sustainable, the system needs more storage or other forms of renewable energy that do not share a similar production pattern with PVs.



Critical Peak Pricing


Distributed energy resource


Distributed Ledger Technology


Multi-carrier energy system




Practical Byzantine Fault Tolerance










Transactive Energy System



The authors would like to thank Dr. L. Andrew Bollinger and Philipp Heer from Urban Energy Systems Laboratory, Empa for helping with the coordination and the access to eHub demonstrator.


Publication costs for this article were sponsored by the Smart Energy Showcases - Digital Agenda for the Energy Transition (SINTEG) program.

Availability of data and materials

The code and data are open sourced, published at

About this supplement

This article has been published as part of Energy Informatics Volume 1 Supplement 1, 2018: Proceedings of the 7th DACH+ Conference on Energy Informatics. The full contents of the supplement are available online at

Authors’ contributions

All of the authors have read and approved the final manuscript.

Competing interests

The authors declare that they have no competing interests.

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors’ Affiliations

ETH Zürich, Zürich, Switzerland
University of St. Gallen, St. Gallen, Switzerland


  1. Change IP on C (2015) Climate change 2014: mitigation of climate change. Cambridge University Press, p 1457Google Scholar
  2. Darby S (2006) The effectiveness of feedback on energy consumption. Rev DEFRA Lit Meter Bill Direct Displays 22:1–21Google Scholar
  3. Dell RM, Rand DAJ (2001) Energy storage - a key technology for global energy sustainability. J Power Sources 100(1):2–17View ArticleGoogle Scholar
  4. European Commission (2014) 2030 climate and energy framework: DG CLIMA reaction to unfounded claims about the Commission’s economic analysis. Available from: [cited 18 Mar 2018]
  5. Gierek A (2016) Report on an EU strategy on heating and cooling (2016/2058(INI)) [Internet]. European Parliament, Committee on Industry, Research and Energy. p. 27. Report No.: A8-0232/2016. Available from: [cited 16 Mar 2018]
  6. Glaser F (2017) Pervasive Decentralisation of Digital Infrastructures: A Framework for Blockchain enabled System and Use Case Analysis. In: 50th Hawaii International Conference on System Sciences (HICSS-50), Waikoloa Village, Hawaii, January 4 - 7, 2017. AIS Electronic Library (AISeL). p. 1543–52.Google Scholar
  7. Mancarella P (2014) MES (multi-energy systems): an overview of concepts and evaluation models. Energy 65:1–17View ArticleGoogle Scholar
  8. Natarajan H, Krause SK, Gradstein HL (2017) Distributed Ledger Technology (DLT) and blockchain [Internet]. The World Bank. Report No.: 122140. Available from: [cited 8 Mar 2018]
  9. Perez-Arriaga I, Bharatkumar A (2014) A framework for redesigning distribution network use-of-system charges under high penetration of distributed energy resources, pp 1–33Google Scholar
  10. Stöcker C (2018) Software defined digital grid on a P2P network - on systems of autonomous energy cells [Internet]. Medium Available from: [cited 18 Mar 2018]
  11. Tesfatsion L (2018) Chapter 13 - Electric power markets in transition: agent-based modeling tools for transactive energy support. In: Economics B-H of C (ed). Elsevier. Available from: [cited 18 Mar 2018]
  12. Tschorsch F, Scheuermann B (2016) Bitcoin and beyond: a technical survey on decentralized digital currencies. IEEE Commun Surv Tutor 18(3):2084–2123View ArticleGoogle Scholar


© The Author(s) 2018