Blockchain In Energy Trading - Smart Solar Nepal

Blockchain In Energy Trading

Blockchain is the digital ledger of transactions that is distributed across the entire network of computer system. It is decentralized data network system in which each node can transact with the all other available nodes in the decentralized ledger platform in which datas are continuously updated and secure through encryption. The P2P (peer-to-peer) trading system allows any unit of generated electricity to be recorded in a blockchain allowing the owner of this generated energy to sell it to others.

Each node of blockchain is a smart home consisting of Internet Of Things (IoT) devices, energy storage device, home miner and solar panel only for prosumers that produce renewable energy itself. IoT devices are connected via WiFi, so they exchange data with home miner by wireless communication. The data generated in the smart home is called transactions. The transactions are added to the block by adding parameter including ID of device, ID of home owner, transaction type by the home miner after being authorized.

Energy trading using blockchain technology includes the writing of smart contracts which are digital agreements without the intervention of the third party. The energy trading has to be autonomous in nature, transparent and reliable. This would allow prosumers to engage in trading electric energy in a decentralized manner. Once an agreement has been reached between prosumers and consumers, the agreed price will be locked on the consumer’s account. For example, if a seller announces the price per unit of energy is $0.3 and another seller announces it as $0.25. In this situation, the buyer has two different options that he can buy power from any one of them obviously from the second one due to a lesser price. Trading happens in this way automatically and autonomously due to the smart contracts. There are various trading models depending on the different blockchain algorithms.

Smart Contract

Smart contracts are written in digital form as the name suggests. A Smart Contract is a contract, suitably coded, which automatically verifies the certain pre-defined conditions and executes actions when the conditions between the parties are verified. Smart contracts represent the responsibilities and conditions of the participant for the execution of contract. Smart contracts are programs that are built on the blockchain ledger and execute independently after the validation of transactions.

The main advantage of adopting smart contracts is its secured nature. When a smart contract between two parties is finalized, this information must be added to the blockchain. Once the new block is added to blockchain, a copy of new block is shared with all the other nodes (peers) in the network. Remaining nodes validate the new block and it is added to their local copies of blockchain through consensus mechanism.

Consensus Model

It is a process that leads to an understanding between people in the peer-to-peer network. This understanding is required in Blockchain Technology to validate a block and if it can be added to the block of blocks, this being done by miners, being rewarded for adding a block in the chain.

Consensus prevents malicious actors from manipulating data. Different blockchain implementations follow different consensus algorithms like Proof of Work, Proof of Stake etc. A transaction in the P2P network can be performed by any node and broadcast into the network. The nodes which perform Proof Of Work (PoW) are called miners and the node which successfully completes Proof of Work first is authorized to add a new block of transactions to the blockchain. After the successful completion of POW, they are paid incentives. Miners invest more CPU computational power to solve the PoW. The new authenticated block created by the miner is broadcasted to other nodes in the network to get consensus of majority of nodes. Proof Of Stake (PoS) is another consensus model that eliminates the need of investing more computational power as in the case of PoW.


As the prosumer receives payment in the trading, this will encourage the distributed renewable energy prosumers and increase the usage of distributed renewable energy based generations. It enhances the long term energy security. This will play a important role in reducing the losses in the network and improves the stability of the power system. As the power sources are dispersed, the possibility to supply of electricity will be more stable and transfer renewable energy more efficient. By stimulating local energy production and consumption, the transmission losses are reduced.

The time-stamped chain of blocks with combined cryptographic hashes provides an immutable record of all the transactions in the blockchain network. Each block is identified by a hash, and carries a list of transactions. Hence, a chain of blocks is formed, and tampering of the previous blocks from attackers can be prevented.  This immutability feature of blockchain is achieved through the use of cryptography and hashing which makes the distributed ledger permanent and unalterable.


Blockchain technology is comparatively new and lacks standardization. Some features of Blockchain are contradictory to some of the existing regulations of ‘right to be forgotten’, for the privacy of the data. However, Blockchain’s immutability feature does not allow any data to be erased. Thus, regulations need to be modified to use the features of Blockchain.

Blockchain users do not have the privilege to stay completely anonymous. Moreover, due to the transparency nature of the blockchain systems, every transaction is available publicly.  Details like the sender, receiver, and transaction information can be seen by all the parties of the network.  This will lead to the problems on the privacy of the user.

Since, blockchain work on a P2P network, there are chances of it to be vulnerable to a variety of security threats that includes hacks and viruses. It also can face various security attacks like the eclipse attack, block discarding attack etc. The 51% attack is the major challenge that the blockchain network can face. In this attack, a combination of miners controls more than half of the mining hash rate of the network. This allows the attackers to stop payments among a few or all of the users and also reverse the transactions.

The existing techniques used for consensus such as Proof of Work (PoW) are computationally expensive and consume considerable electrical energy. Along with these challenges, the opposition of the distribution utilities in the implementation of the blockchain in energy sector is also a recent challenge to overcome.


Blockchain technology is receiving the attention of power system utilities due to its flexibility in distributed control and more robust structure against attacks and data tampering. In parallel, cybersecurity concerns are increasing and researchers are exploring different cryptographic techniques to provide security and trust in the power utilities communication.

Blockchain is considered as the most disruptive technology ever born. It has the potential to eliminate the role of middle-man service in the supply chain. This will reduce the operational cost of the smart grid making electricity cheaper. Blockchain reduces cost associated with labor, data management, data visibility and inter system communication. Thus, the system is much inevitable for the grid management.


 [1] R.K. Kodali, S. Yerroju, B.Y. Krishna Yogi, “Blockchain Based Energy Trading” TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018).
 [2] A. Salian, S. Shah, J. Shah, K Samdani, “Review of Blockchain Enabled Decentralized Energy Trading Mechanisms”, International Conference on system computation, Automation and Networking 2019.
 [3] E. Shaikh, N. Mohammad, “Applications of Blockchain Technology for Smart Cities”, Fourth International Conference on Inventive Systems and Control (ICISC 2020) IEEE Xplore.
 [4] S. Jae Pee, J. G. Song, E. S. Kang, J. W. Jang, “Blockchain based smart energy trading platform using smart contract”, ICAIIC 2019.
 [5] S.M. Suhail Hussain, S. M. Farooq, T. S. Ustun, “Implementation of Blockchain technology for Energy Trading with Smart Meters”, 2019 Innovations in Power and Advanced Computing Technologies (i-PACT).
 [6] ‘TransActive Grid, LO3 energy and consenSys’,, accessed on 24-02-2019.

More from Us


Renewable energy, also called alternative energy, usable from replenishable sources such as the sun (solar energy), wind(wind energy)river(hydroelectric energy), hot…


Significant energy disparities exist in the world, both between and within individual states as well as between affluent and poor…

Solar PV in Nepal: A Bright Future For Clean Energy 

Around 20% of Nepal's total energy consumption is made up of modern energy sources including electricity, petroleum, and renewables, and…