Skip to content
Open access

A Secure Decentralized Blockchain and Machine Learning Based Peer-to-Peer Energy Trading in a Smart Grid

Aug 2026 · Sustainability · 0 citations · 161 references

TL;DR

A decentralized P2P trading framework that implements a fully functional blockchain-based trading system with smart grid simulation and demonstrates a prototype machine learning forecasting module (Random Forest, 84% accuracy) designed for future integration is presented.

Abstract

The growing adoption of renewable energy and small-scale power producers has increased the need for reliable and transparent peer-to-peer (P2P) energy trading. Traditional centralized markets often struggle with high transaction fees, limited transparency, and a greater risk of manipulation, which restrict efficient energy distribution. To overcome these issues, this study presents a decentralized P2P trading framework that implements a fully functional blockchain-based trading system with smart grid simulation and demonstrates a prototype machine learning forecasting module (Random Forest, 84% accuracy) designed for future integration. The trading mechanism is developed using Ethereum smart contracts and a custom ERC-20 token, the TUM Energy Coin (TEC), enabling secure and traceable energy exchange. System security is strengthened through dual confirmation steps, role-based access control, and consensus-driven market clearing. A double-sided auction model is used to match buyers and sellers fairly. Real-time grid behavior such as fluctuating loads, prosumer generation, and consumer demand is modeled using MATLAB Simulink to reflect realistic operating conditions. To enhance decision-making, a Random Forest model is integrated for load forecasting and dynamic pricing, achieving an accuracy of 84%. The simulation results show improved transaction throughput, more stable pricing, and strong resilience against false-data injection attacks. The primary novelty of this work lies in (1) an entirely operational and validated blockchain-trading system simulation with synchronized time using Simulink, (2) a working Random Forest forecasting tool demonstrating feasibility for incorporation in the future, and (3) an analysis of the system’s robustness in the case of FDIA attacks. The authors point out that the ML component used is a prototype and not yet integrated into the functioning block chain.

Read PDF

Similar papers

#federated learning Review Open access Sep 2026

Machine Learning and Blockchain in Peer-to-Peer Energy Trading: A Cross-Layer Review of Functional Roles, Market Operation, Trust, and Privacy

Peer-to-peer (P2P) energy trading combines local energy resources, market coordination, data-driven decisions, and transaction management. This review examines how machine learning (ML) and blockchain are used across these functions and separates market and ledger processes from physical electricity delivery. A structu...

Pouya Paidar, Hüseyin Temuçin, Kamran Taghizad-Tavana et al. · 0 citations
Open access Sep 2026

A Data Sharing Platform for Green Electricity Trading and Trusted Energy Under Blockchain Technology

A blockchain-based design for green power trade and data sharing that addresses sustainability, privacy, trust, and scalability is presented and shows that the system may be used in the future for decentralized power markets that need to be scalable, protect privacy, and use less energy.

Hai-Fei Yuan, Nan Jiang · 0 citations
Open access Aug 2026

Blockchain-Based Clean Energy Trading: Security Architecture and Operational Risk Mitigation in Decentralized Energy Markets

Traditional clean energy trading systems faces severe inefficiencies due to lengthy centralized clearing cycles, which lead to exorbitant administrative friction and intermediary fees. Centralized clearing houses are highly vulnerable to technical outages, data tampering, and manual delays, creating catastrophic operat...

Ai-Xin Cai · 0 citations
Conference Aug 2026

A Zero-Trust Layer-2 Blockchain Architecture for Privacy-Preserving and Scalable Peer-to-Peer Energy Trading

Blockchain technology is transforming peer-to-peer (P2P) energy trading by providing secure, decentralized, and auditable infrastructure. However, native on-chain implementations face significant challenges, including limited transaction throughput, high computational costs, and privacy risks related to prosumer energy...

Bimal Ghimire, Het Patel, Danda B. Rawat et al. · 0 citations
Conference Open access Sep 2026

Shardvpp: A blockchain-based sharded power data trading framework for cross-regional virtual Power plants

Cross-regional electricity trading among virtual power plants (VPPs) requires the trustworthy circulation of heterogeneous power data, including generation forecasts, flexible-load capacities, demand-response commitments, metering records, delivery evidence, and settlement documents. Conventional centralized trading pl...

Tao Liang, Xin-Yi Guo, Qiu-Ying Li · 0 citations
Conference Aug 2026

Data-driven pricing and trusted trading mechanism for park-level flexible resources under energy-carbon coupling

The coupling of electricity and carbon markets presents new challenges for the operation of industrial park integrated energy systems. This paper proposes a comprehensive framework to address inaccurate response modeling, scalability limitations in pricing, and a lack of trust in distributed trading. A dynamic sensitiv...

Xiaotao Nie, Qiu Wang, Peng-Fei Wang et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.