Abstract
Traditional systems in real life lack transparency and ease of use due to their reliance on centralization and large infrastructure. Furthermore, many sectors that rely on information technology face major challenges related to data integrity, trust, and counterfeiting, limiting scalability and acceptance in the community. With the decentralization and digitization of energy transactions in smart grids, security, integrity, and fraud prevention concerns have increased. The main problem addressed in this study is the lack of a secure, tamper-resistant, and decentralized mechanism to facilitate direct consumer-to-prosumer energy transactions. Thus, this is a major challenge in the smart grid. In the blockchain, current consensus algorithms may limit the scalability of smart grids, especially when depending on popular algorithms such as Proof of Work, due to their high energy consumption, which is incompatible with the characteristics of the smart grid. Meanwhile, Proof of Stake algorithms rely on energy or cryptocurrency stake ownership, which may make the smart grid environment in blockchain technology vulnerable to control by the many owning nodes, which is incompatible with the purpose and objective of this study. This study addresses these issues by proposing and implementing a hybrid framework that combines the features of private and public blockchains across three integrated layers: user interface, application, and blockchain. A key contribution of the system is the design of a novel consensus algorithm, Proof of Energy, which selects validators based on node roles and randomized assignment, rather than computational power or stake ownership. This makes it more suitable for smart grid environments. The entire framework was developed without relying on existing decentralized platforms such as Ethereum. The system was evaluated through comprehensive experiments on performance and security. Performance results show a throughput of up to 60.86 transactions per second and an average latency of 3.40 s under a load of 10,000 transactions. Security validation confirmed resistance against digital signature forgery, invalid smart contracts, race conditions, and double-spending attacks. Despite the promising performance, several limitations remain. The current system was developed and tested on a single machine as a simulation-based study using transaction logs without integration of real smart meters or actual energy tokenization in real-time scenarios. In future work, we will focus on integrating real-time smart meters and implementing full energy tokenization to achieve a complete and autonomous smart grid platform. Overall, the proposed system significantly enhances data integrity, trust, and resistance to counterfeiting in smart grids.
1. Introduction
The energy sector is vital in the modern community, serving as the backbone, a fundamental foundation for the development and progress of all sectors. Over the years, we have seen clear shifts from the conventional power grids (CFG) to more responsive, digital smart grids. The old system still carries much of the load, but smart grids are being integrated with more adaptable and tech-driven methods to handle electricity more smartly.
In CFG, electricity is usually produced using energy sources such as coal, gas, or nuclear power in centralized facilities run by either private or public organizations [1]. These generation techniques were initially developed to meet the energy demands of the community when fossil fuels were the preferred means of supplying electricity to a world that was expanding quickly [2].
Because of its centralized nature, the CFG may be susceptible to equipment failures or natural disasters that produce outages, which might result in service interruptions and power outages. To address these issues, the phrase “smart grid” was created [3]. Unlike CFG, which guarantees a one-way flow of energy to consumers, a smart grid allows energy to flow both ways between consumers and prosumers who create their own energy and may sell excess energy to the grid or other customers [4].
Researchers have been actively exploring smart grids. Rapid advances in computer technology have made the concept of a smart grid possible. The transformation of energy distribution from a centralized to a distributed energy system is a crucial feature of a smart grid [5]. Although the advantages of smart grids, such as facilitating the integration of renewable energy sources by improving the sustainability, efficiency, and reliability of the electricity sector [6], balancing the production and consumption of electricity, and lowering the carbon footprint associated with energy production and consumption [7], they have also encountered a number of difficulties, such as a lack of trust and transparency amongst parties involved, risks of hacking, data breaches, or manipulation, and the difficulty of integrating disparate technologies and systems.
To overcome the challenges facing smart grid systems, particularly regarding enhancing trust and preventing fraud, a key challenge in smart grids is the process of verifying the generators’ electricity connection after the consumer pays the producer is a major challenge in smart grids, especially with the presence of multiple producers and consumers within the grid. It also raises concerns about who will authenticate the transaction and how it is conducted [6]. To address these challenges, consumers must be able to exchange electricity with each other in a peer-to-peer manner. In practice, this cannot be implemented centrally due to the high cost and the need for a large and complex infrastructure [8].
To solve these issues, the use of one of the techniques or mechanisms that enhance trust and prevent counterfeiting is necessary to address the key challenges in smart grid systems, especially in terms of enhancing trust and preventing counterfeiting. One of these techniques is called Blockchain technology [9], which underlies cryptocurrencies like Bitcoin [10]. This technology shows promise in enhancing trust and security within the smart grid system. BC technology operates as a decentralized and distributed ledger, ensuring secure and transparent transaction records. Through cryptography and consensus algorithms, BC technology establishes an unalterable and auditable transaction history that all parties can verify [11]. Additionally, blockchain technology minimizes reliance on intermediaries, thereby improving transaction speed and efficiency [12].
Based on this, we conclude that transactions conducted in smart grids may not be secure or fully transparent, as they may be fraudulent and invalid. Furthermore, these transactions require significant cost and time and require a third party to complete the agreement between the producer and the consumer. Traditional smart grid transactions may also face availability issues due to their centralized nature, as transactions cannot be processed without access to the database.
Although many studies have explored the integration of blockchain technology into smart grid systems, these studies have fallen into three categories: survey studies, which lacked frameworks or concrete solutions and merely provided future recommendations; studies that proposed frameworks without implementation; and studies that presented frameworks that were implemented without evaluation. Furthermore, current models often rely on consensus algorithms such as Proof of Work (PoW) and Proof of Stake (PoS), which may not be compatible with the operational requirements of smart grids due to their high energy consumption or the risk of partial centralization. This study addresses this gap by proposing a new framework and consensus algorithm specifically designed to meet these needs.
This study aims to enhance trust and prevent counterfeiting in the smart grid between the producer and consumer. In this system, consumers are guaranteed access to energy in exchange for payment, whereas producers are guaranteed access to the money for the energy sold. Consequently, the demand for energy trading in smart grids rises, and selling prices become more transparent, which fuels more competition in the smart grid energy market.
The contribution of this study is to combine blockchain technology and the smart grid by designing and implementing a new framework and a new consensus algorithm. This contribution provides a secure and efficient solution for enhancing trust and preventing counterfeiting issues in peer-to-peer transactions between consumers and prosumers in the smart grid system.
The organization of the paper is as follows: Section 2 provides a review of relevant applications, proposed models, and existing projects in the smart grid sector utilizing blockchain technology. Section 3 presents the design of the proposed hybrid framework and the novel consensus algorithm developed to enhance trust and prevent counterfeiting in smart grids. Section 4 details the experimental setup, results, and evaluation of the system’s performance and security. Finally, the conclusion and future work of the paper are presented in Section 5.
2. Literature Review
In this section, we review and discuss the previous applications, proposed models, and projects based on blockchain in the smart grid sector.
In [6], an architecture that uses blockchain to manage transactions between consumers and generators was proposed. A mobile app for consumer-system interactions was developed. Ref. [13] discussed blockchain technology from the point of view of its possible efficacy and benefits in smart grid environments, especially in the field of cybersecurity. A new system was developed for peer-to-peer energy exchange based on blockchain [14].
A new framework for the Local Energy Market (LEM) was presented, specifically designed to exchange electricity generated by household solar panels based on blockchain and implemented based on an open-source project [15]. In [16], the Energy Chain system was developed for secure and decentralized energy trading using Blockchain. A new framework called Brooklyn Microgrid was proposed for trading self-produced energy in a peer-to-peer manner within a community [17]. A new framework for managing the interaction between electric vehicles (EVs) and smart grids through EV charging processes was introduced, with an emphasis on enhancing reliability and efficiency [18].
In [19], the impact of blockchain technology on smart energy systems was investigated, highlighting both positive and negative factors. The researchers discussed the integration of blockchain technology into the smart grid by studying and reviewing many use cases in the literature related to this field [20]. In [21], a systematic analysis of blockchain applications in the energy sector was provided. Researchers in [22] introduced a comprehensive survey of the blockchain-based smart grid sector. In [23], the researcher proposed a distributed demand-side management system for a community microgrid integrating smart meters, renewable energy sources, and Blockchain. In [24], researchers proposed a new model based on interconnected, energy self-sufficient households with prosumer communities.
In [25], the authors proposed a peer-to-peer energy trading scheme within a smart grid framework. The proposed model employs an auction-based approach for energy trading. The blockchain technology for self-sovereign identification and authentication in the smart grid was implemented [26]. Prior authors [27] proposed an advanced system (TESTBED2) that uses blockchain technology to operate smart grids. Researchers focused on a privacy-centric blockchain-based electricity auction scheme for Vehicle-to-Grid (V2G) in smart grids [28]. Researchers introduced a comprehensive survey, critically analyzed 92 research publications, and provided a comprehensive view of the impact of blockchain technology on smart grids and distributed energy resources [29]. The researcher in [30] presented a new study that included a large-scale bibliometric analysis that included more than 1000 scientific documents published on the Scopus and WoS databases during the period from 2015 to 2022.
In [31], a comprehensive review was conducted on the application of blockchain in demand response (DR) management within smart grids. The study categorized recent works based on blockchain architecture, consensus algorithms, and integration with DR mechanisms. It highlighted how blockchain can improve transparency, decentralization, and automation in DR, while also identifying limitations such as scalability, latency, and regulatory challenges. The paper emphasized the need for more tailored blockchain models that can address the dynamic and heterogeneous nature of smart grid environments.
Finally, there is clearly growing interest in blockchain technology to enhance various aspects of smart grid systems, from energy trading to privacy and authentication. However, some studies focus on specific aspects, specific contexts, or partial solutions, lacking a unified framework that ensures trust and prevents counterfeiting in all transactions. Other studies have only conducted a survey without providing concrete solutions or a clear framework. The main goal of our research is to bridge this gap by proposing a comprehensive blockchain-based framework specifically designed for the unique challenges of peer-to-peer energy trading in smart grids, as well as a new consensus algorithm to ensure fairness among nodes in the verification mechanism. Table 1 compares previous studies in terms of framework, protocol used, consensus mechanism, performance, scalability, and other comparison criteria.
Table 1.
Comparison between the previous frameworks.
3. Proposed Framework and Methodology
In this section, we propose a new framework and consensus algorithm for a smart grid based on blockchain. This aims to enhance trust and prevent counterfeiting issues in the smart grid system using blockchain technology, in addition to ensuring the unique features of the blockchain, such as transparency, distributed ledger, impenetrability, and decentralization. Also, the proposed consensus algorithm validates the transactions that occur between consumers and prosumers before electricity or money is delivered to either party. Thus, our proposed approach provides a decentralized and secure platform for consumer-to-prosumer transactions in a peer-to-peer manner, making it possible to achieve efficient and reliable energy trading.
3.1. Hypothetical Scenario
The proposed framework is explained through a hypothetical scenario involving a community of buildings equipped with renewable energy sources. Prosumers can offer excess energy for sale on a blockchain platform, while consumers can browse available offers and engage in transactions by accepting the smart contract, which controls each sale or buy, ensuring automated execution once conditions are met. Transactions are validated by nodes and permanently recorded, allowing secure, traceable, and decentralized energy exchange.
3.2. The Evolutionary Approach for the Proposed Framework
The proposed system includes several technical components that enhance trust and prevent counterfeiting issues. In more detail, the technical components of the proposed framework contain numerous elements, which are the blockchain network, smart contracts, nodes, validators, and transactions, as these components work together to provide a decentralized, secure, and transparent system for the smart grids.
In particular, the blockchain network assumes the primary role, serving as the bedrock of the entire system. Its distinguishing features include the provision of an immutable distributed database that records all transactions and events within the system. This ensures data immutability, thereby assuring transparency, enhancing trust, and countering counterfeiting issues within the smart grid system. In our study, the framework uses a consortium-type Blockchain (Hybrid BC) as shown in Figure 1.
Figure 1.
High-level architecture of the proposed blockchain smart grid framework.
Furthermore, the blockchain network can represent various types of stakeholders, such as home consumers, home prosumers, commercial consumers, commercial prosumers, industrial consumers, industrial prosumers, and public and private electricity companies. All stakeholders are represented in a cluster as shown in Figure 1. These stakeholders in the blockchain network are called nodes. Nodes within this network interconnect and collaborate to validate transactions, maintaining the blockchain’s integrity. Transactions are conducted peer-to-peer among three parties, as shown in Figure 2, typically referred to as consumers, prosumers, and producers. All network nodes can see these transactions because they are recorded on the blockchain network. They are automatically executed by smart contracts and undergo validation and consensus processes within the network.
Figure 2.
Roles of each type of node.
In our proposed system, transactions made by smart contracts are separated into two parts; They are off-chain, in which the rules, conditions, and agreements for the smart contract are defined, and contracts are approved between the two parties, while on-chain, the transactions that take place through these contracts are verified and added to the blockchain after verification. Figure 3 shows Smart contracts stages as off-chain and on-chain, and Figure 4 shows the stages of preparing smart contracts.
Figure 3.
Smart contract implementation stages within the proposed framework.
Figure 4.
Stages of Smart Contract Preparation.
When the encoded conditions and rules within the smart contracts are met, these contracts are executed automatically in transactions in the smart grid system. The execution process is discussed based on the type of node to which multiple stakeholders belong.
Nodes in our proposed framework can be either normal nodes that carry out buying and selling transactions or nodes that verify and confirm transactions carried out by normal nodes across the blockchain network platform. Therefore, the main task of the normal nodes is to create or accept smart contracts and thus broadcast them across the blockchain network, while the main task of the validator node is to receive these transactions that take place between normal nodes and then add them to the blockchain.
To add a new block to the blockchain, one of the consensus algorithms must be used. There are many consensus algorithms, such as PoW and PoS algorithms. However, these consensus algorithms have limitations in the smart grid context. As PoW consumes a lot of power, it is not suitable for an energy-friendly environment. At the same time, PoS relies on token ownership, which may not accurately represent a participant’s contribution to the power grid.
In our proposed framework, we introduce a new algorithm called Proof of Energy (PoE), as described in Figure 5. In the Proof of Energy (PoE) algorithm, participants add new transactions to the transaction pool according to the block type they belong to, as mentioned in Figure 2. This algorithm randomly selects validators based on the node type, such that each node type in the proposed framework is represented by one validator.
Figure 5.
Proof of Energy (PoE) Algorithm.
PoE ensures that the transaction validation process represents the diverse participants in the network, and randomization helps to prevent some nodes from gaining unfair control over the verification process, which is crucial to maintaining a decentralized and fair network. Figure 6 shows the pseudocode of the proposed algorithm.
Figure 6.
PoE Pseudocode.
In our proposed framework, as shown in Figure 7, transactions between parties are conducted by accepting a smart contract. A transaction is then created based on this contract’s acceptance after verifying that the smart contract’s conditions are met. These transactions are stored in an area known as a transaction pool. This pool contains all unconfirmed transactions within the blockchain. Transactions are removed from the transaction pool after they are included in a block and confirmed.
Figure 7.
Transaction Lifecycle in our Proposed Framework.
Each transaction contains a set of attributes that are essential components of each transaction. These attributes typically include the consumer’s address, the prosumer’s address, the energy amount, the amount paid, and a timestamp. Using these attributes, the transaction can be efficiently processed and verified across the network.
A digital signature is used to verify a user’s identity and validate transactions. The digital signature is created and encrypted using private keys. In our proposed framework, to ensure the authenticity and integrity of transactions, we use the private key to create a digital signature for each transaction. The public key represents the user’s address, allowing all platform users to verify the user’s purchase and sale transactions. This ensures transparency while maintaining user privacy. Figure 8 illustrates the digital signature mechanism in our proposed framework.
Figure 8.
Digital Signature Process.
The current block’s hash is calculated using a hash function. Hashes are used to uniquely identify and secure the block. Any slight change to the block’s content will completely change the hash, making it difficult to tamper with the data. In our proposed framework, the SHA256 hash function is used to hash block data before the block is broadcast across the network. The hash value is used to verify the integrity of the block by comparing it with a newly generated hash of the block’s content. Figure 9 illustrates the hash function in block addition.
Figure 9.
Hash Function in Block Creation.
Blockchain technology consists of many blocks linked together based on verified transactions between two parties. In general, a block consists of a header and body, where the header contains metadata, and the body contains a list of transactions.
Since we have identified and classified stakeholders into several types (producer, consumer, and consumer-producer) and the possible operations in terms of buying and selling, as shown in Figure 2, in our proposed framework, the type of block in the chain is distinguished by classifying blocks into two types, where the transactions that take place are grouped according to the type of operation performed by the user, whether it is buying or selling. Figure 10 shows the proposed blocks. This classification helps to organize transactions more effectively, eliminating the randomness of transaction storage. This facilitates the ability to track transactions and analyze user activities, enhancing the clarity and effectiveness of the proposed framework.
Figure 10.
Specialized Block Types in our Proposed Framework.
In any case of the block type, each block contains a set of data divided into two parts: the header and the body. The header contains metadata, particularly the index, the previous hash, the timestamp, and other data, as shown in Figure 11. The body contains the list of transactions, a long list of validated data, which occupies the largest part of the block.
Figure 11.
Proposed Block Structure.
Integrating blockchain technology with smart grids is a complex topic that requires a clear, organized, and streamlined approach. In our proposed framework, we implement this by dividing the work into several layers: the interface layer, the application layer, and the blockchain layer. These layers contribute to a comprehensive understanding of the proposed system and ease of implementation. Figure 12 illustrates the structure and task of each layer.
Figure 12.
Shows three layers of a blockchain-based smart grid system.
4. Implementation, Results, and Evaluation
This section demonstrates the practical application of the proposed blockchain-based smart grid framework, translating the conceptual framework into a practical and functional system. It describes the tools and techniques used in the development environment, the system architecture, the experimental setup, and the evaluation metrics applied to assess system performance. Evaluating the experiment and implementation is a crucial step in determining the performance and applicability of our framework in smart grids and energy trading. It also provides an analysis of the results obtained and discusses the challenges encountered during the implementation phase.
4.1. Development Environment and Tools
The proposed framework was developed and deployed on a single deploy machine with the following specifications: Intel Core i7 processor (3.2 GHz), 16 GB DDR4 RAM, 1 TB SSD storage, and Windows 10 Enterprise (64-bit) operating system. The system’s backend was fully implemented from scratch using Python 3.9.1, which was used to build the blockchain structure, manage p2p transactions, and implement essential security functions. For the frontend, JavaScript, HTML5, CSS3, Bootstrap, and jQuery were used to create an interactive and user-friendly interface that allows users to perform and track energy transactions seamlessly.
4.2. Node Architecture and Synchronization
In our proposed approach, each blockchain node is deployed within a separate Docker container, hosting its own distributed database and transaction pool, as displayed in Figure 13. These nodes communicate through a p2p architecture and synchronize using the Gossip protocol, which enables rapid transaction propagation, reduces communication costs, and maintains fairness by dynamically reordering peer connections.
Figure 13.
The structure of the node containers for the nodes in our system.
4.3. System Architecture Implementation
The system was implemented using a modular three-layer architecture comprising the user interface, application, and blockchain layers, each evaluated for responsiveness, reliability, and scalability. The blockchain layer forms the foundation of our system. However, requiring users to interact directly with blockchain components can pose a challenge, as it demands a strong technical background, something not all stakeholders possess. To address this limitation and improve usability, our system abstracts the complexity of blockchain operations, where users can interact with each other, creating/accepting smart contracts and completing buy and sell transactions with ease.
- The user interface layer provides users with an interactive dashboard for creating and monitoring transactions. Manual tests showed immediate response under normal network conditions, with minor synchronization delays observed under load. Despite this, the interface remained functional even during partial node failures.
- The application layer works as a bridge between the interface and the blockchain. It separates operations into off-chain (validation, business logic, signing) and on-chain (smart contract execution, ledger update). Evaluation showed this design significantly reduced blockchain load and rejected invalid inputs before they reached the ledger, enhancing system security and processing efficiency.
- The blockchain layer manages immutable data recording, user authentication through digital signatures, and transaction validation through smart contracts. Users interact with the system through a permissioned mechanism based on role and verified identity. The blockchain layer was designed to ensure secure, transparent, and autonomous energy transactions. To simplify user interaction, blockchain operations were abstracted behind a user-friendly interface, while core logic was handled through structured smart contracts and a custom-built consensus algorithm. A permissioned access mechanism governs network participation, requiring users to apply and undergo identity verification, as shown in Figure 14, before being assigned cryptographic keys. Each transaction is digitally signed using the user’s private key and verified against predefined smart contract rules before execution.
Figure 14.
Request to join the network.
4.4. Smart Contract Execution and Traceability
Smart contracts in the proposed system operate autonomously, evaluating each transaction according to a set of predefined conditions, including offer validity, pricing constraints, and contract expiration. Similar to self-executing contracts, these contracts automatically approve or reject transactions without any external intervention. This behavior was verified through structured testing using various types of transactions.
As demonstrated in Figure 15, the system is classified into transaction states from both the buyer and seller perspectives. For buyers: pending, rejected, and completed; and for sellers: available, reserved, and sold. These statuses reflect the real-time progression of smart contracts based on rule compliance. For example, during the evaluation, a transaction marked as pending shifted to completed only after validator approval, while rejected transactions failed due to price mismatches or expired conditions.
Figure 15.
Client-side interface that displays the transaction status based on compliance with smart contract conditions.
Importantly, the system does not alter the original transaction status if the transaction status changes; rather, each status change is recorded as a new transaction that references the previous transaction. This design ensures transactional stability and complete traceability. Using transaction identifiers, the system accurately reconstructs transaction records, demonstrated by tracing a three-step transaction cycle: initial offer → reservation → successful completion. This traceability is confirmed by querying the blockchain and validating the results through the user interface and backend system logs. Figure 16 illustrates a transaction history by searching for IDs.
Figure 16.
Displays related transactions by searching for IDs.
Moreover, each transaction is linked to its originating smart contract, allowing participants and auditors to review the exact conditions under which decisions were made. This level of transparency reinforces trust and makes the system audit-ready for energy market regulation and compliance.
4.5. Experimental and Evaluation Results
The results of the tests and experiments carried out to assess the suggested system’s performance are shown and examined in this part. In a variety of experimental settings, the methods employed in our designed system are evaluated for system performance. Security, latency, resilience, privacy, and throughput are all considered while analyzing performance to give a thorough understanding of the system’s efficacy and its capacity to adjust to different circumstances and demands to accomplish the intended goals.
4.5.1. Smart Contract Reliability
The reliability of smart contracts depends on the accuracy of their transaction execution according to predefined conditions. Therefore, comprehensive testing is essential to evaluate their performance and ensure proper interaction under various conditions. To verify compliance with the predefined terms of the smart contract, we conducted a series of manual tests under multiple scenarios, as presented in Table 2. When a valid transaction is submitted, it is successfully processed and added to the blockchain after verification. If the contract has expired, it is deemed void, and any associated transactions are rejected, ensuring that expired contracts are not displayed or executed. To enforce adherence to financial constraints, transactions with values falling outside the specified price range are automatically rejected. Furthermore, to enhance auditability and transparency, every action executed within the smart contract is systematically logged, as previously illustrated in Figure 15. These tests were performed manually through the client-side application to ensure close monitoring of smart contract behavior under different conditions and to verify their reliability and adherence to the intended functionality.
Table 2.
Smart Contract Reliability Test Scenarios.
4.5.2. Security Testing Against Malicious and Invalid Transactions
The system was exposed to simulated attacks through the Postman tool, including missing fields, altered digital signatures, and tampered data. Across 30 test cases involving signature misuse and invalid transaction formatting, the system achieved a 100% detection and rejection rate. This confirms that digital signature validation and input sanitization effectively protect transaction integrity. As summarized in Table 3, the system successfully detected all invalid transactions (100% detection rate), including signature tampering and data alteration attempts.
Table 3.
Experimental Test Cases Evaluating Blockchain Transaction Validation Under Different Attack/Failure Conditions.
4.5.3. Race Condition and Double-Spending
The system was tested for concurrent access using Postman Runner, submitting multiple requests against the same energy asset. Only the first valid transaction was accepted, while all others were rejected appropriately, as summarized in Table 4.
Table 4.
Concurrent Transaction Test Results: System Response to Race Condition Scenarios (Identical Timestamps).
4.5.4. Performance Evaluation
The basic performance metrics for measuring the performance of blockchain networks vary depending on the type of system and application, but they generally include important points such as throughput (the number of transactions that the network can process within one second), latency (the time taken from sending a transaction until it is confirmed (included in a block)), and CPU and RAM resource usage.
Accordingly, we conducted a series of tests using various transaction types and node configurations to evaluate the proposed blockchain-based system’s performance in the smart energy grid. To simulate a controlled environment, the system was deployed in a single-machine environment, where inter-node communication was simulated locally and fully dependent on the machine’s internal resources, including memory and CPU. Our approach relied on sending transactions in five batches, with the first batch containing 500 transactions, the second 1000, the third 2000, the fourth 5000, and finally 10,000. Table 5 presents the recorded results based on multiple performance dimensions.
Table 5.
Blockchain System Performance Metrics.
As the number of transactions increased, the system showed a slight improvement in throughput with an increase in latency, in contrast to the typical performance degradation under high loads. As more transactions were processed simultaneously, the system maintained stable performance, with resource utilization remaining within acceptable limits, particularly regarding memory, demonstrating efficient transaction processing and data management.
The experimental results presented in Table 5 provide a detailed summary of the system’s behavior under varying transaction loads. As the number of concurrent requests between nodes increases, a slight improvement in throughput is observed based on the amount of data sent to the nodes. As shown in Figure 17, the TPS increased from 49.02 at 500 transactions to 60.86 at 5000 transactions before declining slightly to 57.05 at 10,000 transactions.
Figure 17.
Throughput vs. Number of Transactions.
Latency shows an evident growth with increasing transaction load due to processing delays caused by competition for resources and queuing of concurrent transactions, which become more severe as the system nears its maximum capability. Latency increased gradually, as shown in Figure 18, from 1.85 s at 500 transactions to 3.40 s at 10,000 transactions, with the maximum latency recorded at 9.20 s.
Figure 18.
Min, Max, and AVG Latency vs. Number of Transactions.
Although RAM usage remained stable at approximately 40% even under high loads, a noticeable rise is observed in CPU utilization as transaction volume increases, exceeding 65% under maximum load because of the increased effort needed to handle concurrent transactions, but it stayed within sustainable operating limits. Figure 19 illustrates CPU and RAM Utilization vs. the Number of Transactions.
Figure 19.
CPU and RAM Utilization vs. Number of Transactions.
Based on the above, the results of this evaluation reflect the system’s ability to manage and verify transaction lists without causing significant delays, even under heavy loads.
- Fault Tolerance:
The system is designed to withstand node failures, especially in synchronization or communication situations, thanks to the Gossip protocol, consensus algorithm, and distributed blockchain technology. Tests have confirmed that even if a node temporarily fails to connect or synchronize with other nodes, the system remains capable of processing transactions efficiently without significant disruption.
Due to the system being developed on a single deployment machine, the preliminary test was conducted manually on a 9-node network representing different user types, evaluating the system’s fault tolerance under various failure scenarios. In each scenario, specific nodes were disconnected to assess the system’s response and recovery behavior. Table 6 summarizes the impact of node failure on the network state. Whereas Figure 20 displays the system’s performance under varying numbers of node failures.
Table 6.
Impact of node failures on network status.
Figure 20.
System Performance Under Node Failure.
5. Conclusions & Future Work
This study presents a blockchain-based smart grid framework that aims to enhance trust and prevent counterfeiting in smart grids by addressing key issues such as data security and transparency between different stakeholders. In our study, a framework was proposed based on a modular, three-layered architecture, consisting of a user interface layer, an application layer, and a blockchain layer. Furthermore, stakeholders are divided into clusters: consumer, prosumer, and producer, to facilitate the identification of each group’s roles within this proposed framework.
The main contributions of this study include a hybrid blockchain model that balances transparency and privacy, and a new consensus mechanism specifically designed for smart grids called Proof of Energy (PoE), which ensures fair transaction verification across different types of nodes to limit the possibility of a single node controlling the network’s verification process and reduces human intervention by automating smart contracts.
To ensure scalability, efficiency, and ease of maintenance, the proposed system was independently developed from scratch based on a three-layered architecture. It was tested from a security and performance perspective. Security evaluations demonstrated the system’s effectiveness in mitigating threats such as invalid transactions, forged digital signatures, race conditions, and double-spending attacks. Also, performance testing was conducted in various scenarios to evaluate performance metrics such as transaction validation time, latency, throughput, and system resilience. Performance testing showed the framework can handle up to 10,000 transactions, achieving 60.86 TPS with acceptable latency levels, which confirms its baseline scalability and operational integrity.
Compared to existing frameworks, the proposed framework presents a different approach by relying on complete development from scratch rather than relying on decentralized platforms like Ethereum, facilitating customization, development, maintenance, and easy integration with other sectors.
In future work, we look forward to integrating the proposed system with smart meters using IoT technologies. This integration will involve deploying IoT-enabled smart meters that periodically transmit consumption and generation data to the blockchain system. Data will be collected in real time through secure communication protocols (e.g., MQTT over TLS), and the blockchain will be used to log and verify each energy transaction. The effectiveness of this integration will be evaluated based on metrics such as data latency, transaction integrity, energy trading throughput, and system scalability under real-world scenarios. We also aim to assess how the Proof of Energy algorithm performs when handling live energy data, ensuring timely validation and preventing fraudulent activities.
Author Contributions
Conceptualization, A.S., M.Q. and B.E.; methodology, A.S. and M.Q.; software, A.S. and B.E.; validation, A.S., M.Q. and B.E.; formal analysis, A.S. and M.Q.; investigation, A.S. and M.Q.; resources, A.S. and B.E.; data curation, A.S.; writing—original draft preparation, A.S. and M.Q.; writing—review and editing, A.S., M.Q. and B.E.; visualization, A.S.; supervision, M.Q. and B.E. All authors have read and agreed to the published version of the manuscript.
Funding
The authors declare that this research received no external funding, and the Article Processing Charge (APC) was not supported by any funding agency.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author(s).
Conflicts of Interest
The authors declare no conflict of interest.
References
- Rogalev, N.; Rogalev, A.; Kindra, V.; Zlyvko, O.; Osipov, S. An Overview of Small Nuclear Power Plants for Clean Energy Production: Comparative Analysis of Distributed Generation Technologies and Future Perspectives. Energies 2023, 16, 4899. [Google Scholar] [CrossRef] [Scilit]
- Molokomme, D.N.; Chabalala, C.S.; Bokoro, P.N. A review of cognitive radio smart grid communication infrastructure systems. Energies 2020, 13, 3245. [Google Scholar] [CrossRef] [Scilit]
- Dileep, G. A survey on smart grid technologies and applications. Renew Energy 2020, 146, 2589–2625. [Google Scholar] [CrossRef] [Scilit]
- Anthony, B.; Petersen, S.A.; Ahlers, D.; Krogstie, J.; Livik, K. Big data-oriented energy prosumption service in smart community districts: A multi-case study perspective. Energy Inform. 2019, 2, 1–26. [Google Scholar] [CrossRef] [Scilit]
- Hasankhani, A.; Hakimi, S.M.; Bisheh-Niasar, M.; Shafie-khah, M.; Asadolahi, H. Blockchain technology in the future smart grids: A comprehensive review and frameworks. Int. J. Electr. Power Energy Syst. 2021, 129, 106811. [Google Scholar] [CrossRef] [Scilit]
- Agung, A.A.; Handayani, R. Blockchain for smart grid. J. King Saud Univ.-Comput. Inf. Sci. 2022, 34, 666–675. Available online: https://www.journals.elsevier.com/journal-of-king-saud-university-computer-and-information-sciences (accessed on 20 April 2025). [CrossRef] [Scilit]
- Butt, O.M.; Zulqarnain, M.; Butt, T.M. Recent advancement in smart grid technology: Future prospects in the electrical power network. Ain Shams Eng. J. 2021, 12, 687–695. [Google Scholar] [CrossRef] [Scilit]
- Musleh, A.S.; Yao, G.; Muyeen, S.M. Blockchain applications in smart grid–review and frameworks. IEEE Access 2019, 7, 86746–86757. [Google Scholar] [CrossRef] [Scilit]
- Al-Maaitah, S.; Quzmar, A.; Qatawneh, M. Blockchain-based e-voting system for elections in Jordan. J. Theor. Appl. Inf. Technol. 2022, 100, 1584–1593. [Google Scholar]
- Al-Maaitah, S.; Qatawneh, M.; Quzmar, A. E-voting system based on blockchain technology: A survey. In Proceedings of the 2021 International Conference on Information Technology (ICIT), Amman, Jordan, 14–15 July 2021; IEEE: Toulouse, France, 2021; pp. 200–205. [Google Scholar] [CrossRef] [Scilit]
- Qatawneh, M. Use of blockchain in the internet of things: A survey. arXiv 2023, arXiv:2303.06035. [Google Scholar]
- Alhasan, B.; Qatawneh, M.; Almobaideen, W. Blockchain technology for preventing counterfeit in health insurance. In Proceedings of the 2021 International Conference on Information Technology (ICIT), Amman, Jordan, 14–15 July 2021; IEEE: Toulouse, France, 2021; pp. 935–941. [Google Scholar]
- Waseem, M.; Khan, M.A.; Goudarzi, A.; Fahad, S.; Sajjad, I.A.; Siano, P. Incorporation of blockchain technology for different smart grid applications: Architecture, prospects, and challenges. Energies 2023, 16, 820. [Google Scholar] [CrossRef] [Scilit]
- Tanaka, K.; Nagakubo, K.; Abe, R. Blockchain-based electricity trading with Digitalgrid router. In Proceedings of the 2017 IEEE International Conference on Consumer Electronics-Taiwan (ICCE-TW), Taipei, Taiwan, 12–14 June 2017; IEEE: Toulouse, France, 2017; pp. 201–202. [Google Scholar]
- Mengelkamp, E.; Notheisen, B.; Beer, C.; Dauer, D.; Weinhardt, C. A blockchain-based smart grid: Towards sustainable local energy markets. Comput. Sci.-Res. Dev. 2017, 33, 207–214. [Google Scholar] [CrossRef] [Scilit]
- Aggarwal, S.; Chaudhary, R.; Aujla, G.; Jindal, A.; Dua, A.; Kumar, N. Energychain: Enabling energy trading for smart homes using blockchains in smart grid ecosystem. In Proceedings of the 1st ACM MobiHoc Workshop on Networking and Cybersecurity for Smart Cities, Los Angeles, CA, USA, 25 June 2018; Association for Computing Machinery: New York, NY, USA, 2018; pp. 1–6. [Google Scholar]
- Mengelkamp, E.; Gärttner, J.; Rock, K.; Kessler, S.; Orsini, L.; Weinhardt, C. Designing microgrid energy markets: A case study: The Brooklyn Microgrid. Appl. Energy 2018, 210, 870–880. [Google Scholar] [CrossRef] [Scilit]
- Liu, C.; Chai, K.K.; Zhang, X.; Lau, E.T.; Chen, Y. Adaptive blockchain-based electric vehicle participation scheme in smart grid platform. IEEE Access 2018, 6, 25657–25665. [Google Scholar] [CrossRef] [Scilit]
- Erturk, E.; Lopez, D.; Yu, W.Y. Benefits and risks of using blockchain in smart energy: A literature review. Contemp. Manag. Res. 2019, 15, 205–225. [Google Scholar] [CrossRef] [Scilit]
- Alladi, T.; Chamola, V.; Rodrigues, J.J.; Kozlov, S.A. Blockchain in smart grids: A review on different use cases. Sensors 2019, 19, 4862. [Google Scholar] [CrossRef] [Scilit]
- O’Donovan, P.; O’Sullivan, D.T. Systematic analysis of real-world energy blockchain initiatives. Future Internet 2019, 11, 174. [Google Scholar] [CrossRef] [Scilit]
- Andoni, M.; Robu, V.; Flynn, D.; Abram, S.; Geach, D.; Jenkins, D.; Peacock, A. Blockchain technology in the energy sector: A systematic review of challenges and opportunities. Renew. Sustain. Energy Rev. 2019, 100, 143–174. [Google Scholar] [CrossRef] [Scilit]
- Afzal, M.; Huang, Q.; Amin, W.; Umer, K.; Raza, A.S.; Naeem, M. Blockchain enabled distributed demand-side management in community energy system with smart homes. IEEE Access 2020, 8, 37428–37439. [Google Scholar] [CrossRef] [Scilit]
- Swain, A.; Salkuti, S.R.; Swain, K. An optimized and decentralized energy provision system for smart cities. Energies 2021, 14, 1451. [Google Scholar] [CrossRef] [Scilit]
- Doan, H.T.; Cho, J.; Kim, D. Peer-to-peer energy trading in smart grid through blockchain: A double auction-based game theoretic approach. IEEE Access 2021, 9, 49206–49218. [Google Scholar] [CrossRef] [Scilit]
- Dehalwar, V.; Kolhe, M.L.; Deoli, S.; Jhariya, M.K. Blockchain-based trust management and authentication of devices in smart grid. Clean. Eng. Technol. 2022, 8, 100481. [Google Scholar] [CrossRef] [Scilit]
- Falahi, M.; Vasilateanu, A.; Goga, N.; Suciu, G.; Sachian, M.-A.; Florescu, R. An Innovative Blockchain System for Smart Grids. In Proceedings of the 2022 IEEE International Conference on Blockchain, Bucharest, Romania, 24–25 October 2022; Smart Healthcare and Emerging Technologies (SmartBlock4Health): Bucharest, Romania, 2022; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
- Zhang, W.; Yang, W.; Chen, C.; Li, N.; Bao, Z.; Luo, M. Toward Privacy-Preserving Blockchain-Based Electricity Auction for V2G Networks in the Smart Grid. Secur. Commun. Netw. 2022, 10, 6911463. [Google Scholar] [CrossRef] [Scilit]
- Khan, H.; Masood, T. Impact of Blockchain Technology on Smart Grids. Energies 2022, 15, 7189. [Google Scholar] [CrossRef] [Scilit]
- Lampropoulos, G. Blockchain in Smart Grids: A Bibliometric Analysis and Scientific Mapping Study. J Multidiscip. Sci. J. 2024, 7, 19–47. [Google Scholar] [CrossRef] [Scilit]
- Koukaras, P.; Afentoulis, K.D.; Gkaidatzis, P.A.; Mystakidis, A.; Ioannidis, D.; Vagropoulos, S.I.; Tjortjis, C. Integrating blockchain in smart grids for enhanced demand response: Challenges, strategies, and future directions. Energies 2024, 17, 1007. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).



















