Published in


Distributed Energy Networks

Distributed renewable energy is fueling a deep transformation within power markets the world over. We’ll discuss the case of an electric utility company that is already embracing digitally enabled disruptive change in Brazil, in a bid to stay a step ahead of the curve.

Net metering A.K.A Net Energy Metering or NEM allows consumers to net off consumption of the energy with generation of energy produced by a stake in the output of the power plant attributable to the consumer. In this article we discuss a use case where the blockchain enables NEM with distant solar plants that consumers have taken a stake in.

Energias de Portugal SA (ELI:EDP) has become the first company in the Brazilian energy sector to test the transformative potential of blockchain technology on electricity distribution, deploying the technology to manage NEM processes, as proposed by new Brazilian regulation No 482/2012. EDP partnered with RIDDLE&CODE, an Austrian innovator in the blockchain space developing blockchain solutions. The vendor’s vision is to bridge the digital-physical divide by enabling identity management and the transactions of physical devices in the digital realm.

The project is in its Proof-of-Concept (PoC) phase. It supports the new Brazilian legislation on remote consumption of distributed energy by consumers from solar farms located far away from the end consumer . One key objective of the project is to simplify a highly complex settlement process for remote consumption. According to Livia Brando, EDP’s executive innovation manager, it will deliver “something simple, effective and safe for all parties involved, encouraging the use of distributed energy in Brazil”.

Brazil’s legislative initiative: concept v practice

Brazil’s new remote consumption and net metering legislation is creating a sustainable ecosystem to promote growth in the renewable energy sector. By allowing consumers to acquire a stake in the outputs of solar panel farms that can be located outside of the consumer’s area, the new legislation creates a demand for the energy supplied by the plants that can now be built on under-utilized land. This encourages the growth of distributed energy networks and provides consumers with access to cheaper energy sources and/or alternative electrification options.

The legislative change is progressive and is in line with decentralization ideas gaining traction within the energy sector. In practice, however, there are still some stumbling blocks to the implementation of the legislation.

During the set-up process, the acquisition and change of ownership in the stake of the PV panel requires a visit to the plant to physically reset the smart meter. The NEM process (netting between the energy produced and consumed) requires the development of an additional, and typically burdensome, reconciliation and settlement mechanism that needs to be integrated into legacy IT infrastructures. Further still, most households in Brazil are still equipped with mechanical meters that rely on labour- and time-intensive manual handling to collect information needed for NEM calculations.

Blockchain-backed solution to facilitate implementation of legislation

The project had to address the implementation challenges of managing remote consumption of distributed energy. We leveraged blockchain technology to implement straightforward steps to set-up and manage the NEM process in the context of Brazil’s innovative regulation — which is likely to become a blueprint for solar energy distribution systems globally. The solution developed by EDP and RIDDLE&CODE captures and translates regulatory objectives into practical advantages independently of existing software and hardware of the energy network and technical proficiency of users. The concept proposed here can be universally used by distributed energy adopters all over the world.

How it works

At the core of the solution is a blockchain-backed tamper-evident crypto chip, that is affixed to a piece of hardware, in this case the mechanical meter of an energy consumer. The crypto chip drastically reduces the number of operations needed to set-up and perform end-to-end net metering (NEM) involving the energy company, the plant and the customer, to just a few clicks that need to be performed by a customer.

This is what the entire customer journey looks like:

Set-up phase (once)


Net metering process (once a month)

The conversion of an otherwise complex process to a simple, easy-to-implement solution is powered by a crypto chip. The purpose and tasks performed by the crypto chip at different phases of the distribution process are described below.

Set-up phase

Energy company (EDP)

Crypto chips, underwritten by the blockchain, are delivered to the energy supplier for initial customer provisioning.

As the very first step, the energy company gives a unique identity to the chip. This is done by running an embedded algorithm to assign a key pair (private and public key) to the chip. The private key is connected to the chip itself. The public key is stored on the blockchain.

In the next step, the energy company ‘provisions’ the crypto chip by creating a linkage between the chip and the customer. The identity of the chip is tied to an identity of the end-customer by adding relevant customer-specific information at the moment the key pair is created. Typically, the customer-specific data will be a CRM-based identification number of the energy contract or example a stake in the solar panels owned. The data is recorded on the blockchain and is used as a reference database for future NEM calculations. There are no restrictions on the type of data used to link the customer to the chip, which could be extended to include biometric data and other personal information such as address, telephone number, etc.

The public key containing customer data that is stored on the crypto chip is also used to generate a QR Code that is printed on the face of the crypto chip. This allows a crypto chip to later be read with consumer phones either via NFC or QR code scanners. Such functionality considers the fact that not all consumers have phones with NFC capabilities, whereas QR code scanning functionality is very common and can be installed on most phones.

Beyond giving a connected object a unique identity, the crypto chip uses its key pair to allow the object to sign transactions carried out on the blockchain, for example sending data inputs (meter readings) for NEM computations. Blockchain protocols ensure that if the crypto chip is tampered with, the transactional features of the connected object are deactivated as the crypto chip would no longer be able to identify on the blockchain backend.

Provisioned crypto chips are now ready to be sent to customers that hold a stake in the output of solar plants managed by the energy company.

Power plant

Processes managed at the power plant remain intact and do not require modification to reflect the transition to new settlement system. The existing smart meters installed on the solar panels continue to supply energy generation data to the reconciliation systems maintained by the energy company, as before.


Consumers receive a crypto chip together with a letter describing an initial onboarding process in a few simple steps. Customers first complete a ‘digital meter association’ process.

‘Digital meter association’ requires customers to:

· Affix the crypto chip they received to the mechanical meter in immediate
proximity to the reading window;

· Download and activate a dedicated EDPSOLAR app developed by
RIDDLE&CODE, which will execute the final stage of set-up process and
subsequent net metering processes;

· Scan the crypto chip using NFC or QR code options and upload a picture of
the QR code and the meter’s reading window to certify that the chip sent to a
particular customer is attached to their mechanical meter;

· Enter the current meter reading shown in the reading window (Day 0).
Day 0 reading will mark the baseline for energy consumption underlying
future net metering calculations;

· Press the app’s ‘send’ button to complete the transaction. The data is then
registered and stored on the blockchain.

The set-up process is completed in these few simple steps. The mechanical meter is cost-effectively converted into a blockchain-enabled smart meter.

Blockchain underwriting that gave a digital identity to the mechanical meter is leveraged further for the execution of net metering process — described below.

Net metering process

A net metering process involves settlement between solar plant, energy company and end-consumer and requires the following data inputs:

· Stake in the output of a solar plant attributable to the customer and the
respective fare. The fare represents the energy that a customer is entitled to
and insured to receive. Unless the individual stake in the output of the plant
changes, the fare remains constant for the duration of the contract

· Energy consumed by the end-consumer

NEM deducts the energy consumed from the energy produced by the stake in the solar plant at specified time intervals (usually once a month). If consumption and production are equal (Scenario 1), the fare agreed per contract is withheld. In case of excess consumption (Scenario 2), additional payment is made by the customer. In case of lower consumption (Scenario 3), credits are carried forward for a period of 60 months. In that period, credits can be used to decrease the liability in case of excess consumption (Scenario2).

Integrating the net energy metering process into legacy IT systems is highly complex as we have already seen:

· need to track the stake of the customer in the plant,

· integrating NEM computation into the existing CRM and other legacy IT

· manual readings from the mechanical customers meter,

· new time-consuming processes needed to support remote distribution.

Leveraging the blockchain to facilitate net metering process

At the set-up phase we use blockchain-backed crypto chips to give smart identity and transactional functionality to mechanical meters. In the next step, transactional functionality facilitates the net metering process.

Facilitation is performed by the automation of the net metering calculation using smart contracts — self-executing algorithms performed on the blockchain. Below we describe how this automated process is performed in practice and is with data inputs accumulated from various data sources (energy company, solar plant, consumer).

Energy company

The energy company supplies power plant and customer-specific information in the blockchain backend to enable the execution of automated net metering transactions.

No calculations need to be carried out by the energy company that only needs to provide data inputs. Outsourcing net metering computation to the smart contracts alleviates pressure on the legacy systems to handle additional processes.

Solar plant

No changes are made to the plant, as the power generation data continues to be fed into the energy company’s legacy IT system.


Consumers scan the crypto chip using NFC or a QR code and enter meter readings. A picture is taken of the reading to provide additional evidence. The transaction is registered on the blockchain and the smart contact running a net metering transaction is executed in real time.

Consumers receive invoices documenting the net metering calculation.

The entire net metering settlement process is complete.


The integration of the RIDDLE&CODE solution with EDP provides an elegant, user-friendly solution based on cutting-edge technology that is seamlessly integrated into an existing energy generation and distribution system.

According to Alexander Koppel, CEO of RIDDLE&CODE: “Together with EDP, we have implemented a secure, cost-effective and scalable solution combining state-of-the-art blockchain technology and legacy IT. Our architecture creates minimal adherence, so the new features can simply be bolted on to exiting systems. We are excited to be enabling completely new approaches to business with our Brazilian client and contributing in our modest way to the fight on global warming”.

Find out more on https://www.riddleandcode.com/



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store