Reconfigurable Smart Contracts for Renewable Energy Exchange with Re-Use of Verification Rules
Source abstract
Abstract
Smart contracts constitute the foundation for blockchain distributed applications. These constructs enable transactions in trustless environments using consensus algorithms and software-controlled verification rules. In the current state of the art, there is a shortage of works on the adaptability of smart contracts, and the re-use of their source code is limited mainly to cloning. The paper discusses the pattern of smart contract design and implementation with the overt declaration of verification rules. The author introduces two advantages of the pattern: Firstly, run-time reconfigurability of the list of smart contract verification rules to adjust for various transaction types. Secondly, the re-use of verification rules between different configurations of the smart contract, and among diverse smart contracts. The paper uses blockchain platform-independent stereotypes from a dedicated Unified Modeling Language (UML) profile for designing smart contracts and verification rules. The implementation of the pattern is developed in object-oriented Java language. The pattern exploits polymorphism and controls inheritance by using sealed classes with permission for specialization only for selected final ones. Thus, the pattern ensures two recently highly desired properties in smart contract design and development: re-use and security. Moreover, the declared verification rules list facilitates test automation and reduces test preparation effort due to the re-use of test classes among smart contract configurations. The pattern usage is illustrated in the example of renewable energy exchange within the prosumers community and amid various communities.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Blockchain Technology Applications and Security · Auction Theory and Applications · Smart Grid Security and Resilience
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Department of Computer Science, Polish Naval Academy of the Heroes of Westerplatte (PNA), Śmidowicza 69, 81-127 Gdynia, Poland
References (47)
Show source-provided references
1. A systematic literature review of blockchain-based applications: Current status, classification and open issues10.1016/j.tele.2018.11.006 ↗
2. Xu, X., Weber, I., and Staples, M. (2019). Architecture for Blockchain Applications, Springer.10.1007/978-3-030-03035-3 ↗
3. Permissioned blockchain frameworks in the industry: A comparison10.1016/j.icte.2020.09.002 ↗
4. Digital Livestock Farming10.1016/j.sbsr.2021.100408 ↗
5. Lucas, A., Geneiatakis, D., Soupionis, Y., Nai-Fovino, I., and Kotsakis, E. (2021). Blockchain Technology Applied to Energy Demand Response Service Tracking and Data Sharing. Energies, 14.10.3390/en14071881 ↗
6. (2022, April 18). Java v.18 Documentation. Available online: https://docs.oracle.com/en/java/javase/18/.
7. Blockchain-based event processing in supply chains—A case study at IKEA10.1016/j.rcim.2020.101971 ↗
8. (2022, April 18). Solidity v.0.8.13 Documentation. Available online: https://docs.soliditylang.org/en/v0.8.13/.
9. (2022, April 15). Hyperlegder Fabric. Available online: https://www.hyperledger.org/use/fabric.
10. (2022, April 15). Corda. Available online: https://www.corda.net.
11. (2022, April 15). Quorum. Available online: https://consensys.net/quorum/.
12. Survey on blockchain for future smart grids: Technical aspects, applications, integration challenges and future research10.1016/j.egyr.2021.09.112 ↗
13. Wu, H., Cao, J., Yang, Y., Tung, C.L., Jiang, S., Tang, B., Liu, Y., Wang, X., and Deng, Y. (August, January 29). Data management in supply chain using blockchain: Challenges and a case study. Proceedings of the 2019 28th International Conference on Computer Communication and Networks (ICCCN), Valencia, Spain.10.1109/ICCCN.2019.8846964 ↗
14. Jiang, S., Cao, J., Wu, H., Yang, Y., Ma, M., and He, J. (2018, January 18–20). BlocHIE: A BLOCkchain-Based Platform for Healthcare Information Exchange. Proceedings of the 2018 IEEE International Conference on Smart Computing (SMARTCOMP), Taormina, Sicily, Italy.10.1109/SMARTCOMP.2018.00073 ↗
15. Blockchain and energy: A bibliometric analysis and review10.1016/j.rser.2020.110597 ↗
16. When Blockchain Meets Smart Grids: A Comprehensive Survey10.1016/j.hcc.2022.100059 ↗
17. Smart contracts in energy systems: A systematic review of fundamental approaches and implementations10.1016/j.rser.2021.112013 ↗
18. Energy Crowdsourcing and Peer-to-Peer Energy Trading in Blockchain-Enabled Smart Grids10.1109/TSMC.2019.2916565 ↗
19. Park, L.W., Lee, S., and Chang, H. (2018). A Sustainable Home Energy Prosumer-Chain Methodology with Energy Tags over the Blockchain. Sustainability, 10.10.3390/su10030658 ↗
20. Blockchain as Key Enabling Technology for Future Electric Energy Exchange: A Vision10.1109/ACCESS.2020.3036994 ↗
21. Participative Renewable Energy Community—How Blockchain-Based Governance Enables a German Interpretation of RED II10.3390/electricity2040028 ↗
22. Yahaya, A.S., Javaid, N., Alzahrani, F.A., Rehman, A., Ullah, I., Shahid, A., and Shafiq, M. (2020). Blockchain Based Sustainable Local Energy Trading Considering Home Energy Management and Demurrage Mechanism. Sustainability, 12.10.3390/su12083385 ↗
23. A Permissioned Blockchain System to Reduce Peak Demand in Residential Communities via Energy Trading: A Real-World Case Study10.1109/ACCESS.2020.3047885 ↗
24. Peer-to-Peer Energy Trading Mechanism Based on Blockchain and Machine Learning for Sustainable Electrical Power Supply in Smart Grid10.1109/ACCESS.2021.3060457 ↗
25. Son, Y.B., Im, J.H., Kwon, H.Y., Jeon, S.Y., and Lee, M.K. (2020). Privacy-Preserving Peer-to-Peer Energy Trading in Blockchain-Enabled Smart Grids Using Functional Encryption. Energies, 13.10.3390/en13061321 ↗
26. Fairness-Based Packing of Industrial IoT Data in Permissioned Blockchains10.1109/TII.2020.3046129 ↗
27. Trends in software reuse research: A tertiary study10.1016/j.csi.2019.04.011 ↗
28. Measuring the reusability of software components using static analysis metrics and reuse rate information10.1016/j.jss.2019.110423 ↗
29. Implementation-independent function reuse10.1016/j.future.2019.10.006 ↗
30. Two-level clustering of UML class diagrams based on semantics and structure10.1016/j.infsof.2020.106456 ↗
31. Debugging and maintaining pragmatically reused test suites10.1016/j.infsof.2018.05.001 ↗
32. Pierro, G.A., Tonelli, R., and Marchesi, M. (2020). An Organized Repository of Ethereum Smart Contracts’ Source Codes and Metrics. Future Internet, 12.10.3390/fi12110197 ↗
33. Code cloning in smart contracts: A case study on verified contracts from the ethereum blockchain platform10.1007/s10664-020-09852-5 ↗
34. Smart Contract Development: Challenges and Opportunities10.1109/TSE.2019.2942301 ↗
35. Model-Based Software Design and Testing in Blockchain Smart Contracts: A Systematic Literature Review10.1109/ACCESS.2020.3021502 ↗
36. Hu, K., Zhu, J., Ding, Y., Bai, X., and Huang, J. (2020). Smart Contract Engineering. Electronics, 9.10.3390/electronics9122042 ↗
37. iContractML 2.0: A domain-specific language for modeling and deploying smart contracts onto multiple blockchain platforms10.1016/j.infsof.2021.106762 ↗
38. A Formal Specification Smart-Contract Language for Legally Binding Decentralized Autonomous Organizations10.1109/ACCESS.2021.3081926 ↗
39. A survey on the practical use of UML for different software architecture viewpoints10.1016/j.infsof.2020.106275 ↗
40. Solidity Code Generation From UML State Machines in Model-Driven Smart Contract Development10.1109/ACCESS.2022.3162227 ↗
41. Górski, T. (2021). The 1+5 Architectural Views Model in Designing Blockchain and IT System Integration Solutions. Symmetry, 13.10.3390/sym13112000 ↗
42. (2022, April 15). UML Profile for Smart Contracts. Available online: https://github.com/drGorski/UMLProfile4SmartContracts.
43. (2022, April 15). The SCDP Implementation in Java. Available online: https://github.com/drGorski/SmartContractDesignPattern.
44. Pender, T. (2003). Customizing UML using profiles. UML Bible, Wiley Publishing, Inc.
45. (2022, April 18). OpenJDK JDK 18 General-Availability Release. Available online: https://jdk.java.net/18/.
46. Trace-Based Dynamic Gas Estimation of Loops in Smart Contracts10.1109/OJCS.2020.3039991 ↗
47. Górski, T. (2021). Towards Continuous Deployment for Blockchain. Appl. Sci., 11.10.3390/app112411745 ↗