Abstract
A recently emerged microgrid system presents the concept of a prosumer that consumers can also become suppliers, instead of a one-way configuration with separate providers and consumers. The microgrid system allows users to produce electricity, sell it on demand, and purchase them from other users. Unlike conventional centralized power trading, this emerging system aims on providing decentralized, transparent, and secure power trading. In this paper, we introduce a transparent and safe power trading algorithm between users using blockchain. The proposed algorithm has been implemented with an executable distributed code (i.e., smart contract) in an Ethereum blockchain platform. It explores for the power trading with automated operations in a decentralized environment without user intervention. The proposed power trading algorithm is written in the Solidity language and tested on the Ethereum blockchain platform. We also provide the actual code of the power trading algorithm written in the Solidity language.
Similar content being viewed by others
References
Gungor V Cagri et al (2013) A survey on smart grid potential applications and communication requirements. IEEE Trans Ind Inf 9(1):28–42
Yan Ye et al (2013) A survey on smart grid communication infrastructures: motivations, requirements and challenges. IEEE Commun Surv Tutor 15(1):5–20
Serna-Suarez ID, Ordonez-Plata G, Carrillo-Caicedo G (2015) Microgrid’s energy management systems: a survey. In: 2015 12th International Conference on the European Energy Market (EEM). IEEE, Washington
Zhang Chenghua et al (2017) Review of existing peer-to-peer energy trading projects. Energy Procedia 105:2563–2568
Zhang Chenghua et al (2016) A bidding system for peer-to-peer energy trading in a grid-connected microgrid. Energy Procedia 103:147–152
Nakamoto S (2008) Bitcoin: a peer-to-peer electronic cash system. https://bitcoin.org/bitcoin.pdf. Accessed 2 Mar 2018
Buterin V (2018) A next-generation smart contract and decentralized application platform. https://github.com/ethereum/wiki/wiki/White-Paper. Accessed 2 Mar 2018
Klemperer Paul (1999) Auction theory: a guide to the literature. J Econ Surv 13(3):227–286
Solidity (2018). https://solidity.readthedocs.io/en/develop/. Accessed 2 Mar 2018
Ethereum JavaScript API (2018). https://github.com/ethereum/wiki/wiki/JavaScript-API. Accessed 2 Mar 2018
Mavridou A, Laszka A (2017) Designing secure Ethereum smart contracts: a finite state machine based approach. arXiv preprint arXiv:1711.09327
Acknowledgements
This research was supported by a Research Grant from Sangmyung University.
Author information
Authors and Affiliations
Corresponding author
Appendix
Appendix
We provide the smart contract code written in the Solidity language v0.4.25. The major variables have been defined at the beginning part of the code. The functions of the smart contract are then followed.
The magic global variables supported by the Solidity language are used such as now and msg. The magic global variable now is the timestamp that indicates the current time of the smart contract, whereas the magic global variable msg indicates the transaction. For instance, msg.sender refers to the address of the transaction sender and msg.value refers to the amount of the bidding sent in the transaction.
Rights and permissions
About this article
Cite this article
Myung, S., Lee, JH. Ethereum smart contract-based automated power trading algorithm in a microgrid environment. J Supercomput 76, 4904–4914 (2020). https://doi.org/10.1007/s11227-018-2697-7
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-018-2697-7