Next Article in Journal
Correction: Tuzzio et al. Widespread Microplastic Pollution in Central Appalachian Streams: Implications for Freshwater Ecosystem Sustainability. Sustainability 2025, 17, 2926
Next Article in Special Issue
Multi-Layered Open Data, Differential Privacy, and Secure Engineering: The Operational Framework for Environmental Digital Twins
Previous Article in Journal
How to Motivate Green Action Among Small Farmers: Evidence from China
Previous Article in Special Issue
Sustainable Development of Smart Regions via Cybersecurity of National Infrastructure: A Fuzzy Risk Assessment Approach
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Security Analysis of Double-Spend Attack in Blockchains with Checkpoints for Resilient Decentralized Energy Systems in Smart Regions

by
Lyudmila Kovalchuk
1,
Andrii Kolomiiets
2,
Oleksandr Korchenko
3 and
Mariia Rodinko
4,*
1
Pukhov Institute for Modelling in Energy Engineering of NAS of Ukraine, 03164 Kyiv, Ukraine
2
Department of Mathematical Methods of Information Protection, National Technical University of Ukraine “Igor Sikorsky Kyiv Polytechnic Institute”, 03056 Kyiv, Ukraine
3
Computer Engineering and Cybersecurity Academic Department, University of the National Education Commission, 30-084 Krakow, Poland
4
Department of Intelligent Software Systems and Technologies, V. N. Karazin Kharkiv National University, 61022 Kharkiv, Ukraine
*
Author to whom correspondence should be addressed.
Sustainability 2026, 18(3), 1673; https://doi.org/10.3390/su18031673
Submission received: 17 December 2025 / Revised: 22 January 2026 / Accepted: 3 February 2026 / Published: 6 February 2026

Abstract

The transition from centralized power systems to decentralized infrastructures with a high share of renewable energy sources calls for reliable settlement in P2P electricity trading across “smart” regions. Blockchain platforms can enhance transparency and facilitate automated settlement; however, double-spend attacks still pose a threat to transaction finality and, consequently, undermine trust in the payment layer. This paper quantifies this risk through a probabilistic analysis of classical double-spend scenarios for Proof-of-Work (PoW) and Proof-of-Stake (PoS) blockchains augmented with periodic checkpoints, which render the chain history prior to the latest checkpoint effectively irreversible. We develop attack models for both consensus mechanisms and derive explicit formulas for the attacker’s success probability as a function of the adversarial share, the spacing between checkpoints, and the number of confirmation blocks. On this basis, we compute the minimum confirmation depth needed to satisfy a predefined risk threshold. Numerical evaluation using the derived expressions shows that checkpoints consistently reduce double-spend probability relative to checkpoint-free baselines; in the evaluated settings, the reduction reaches up to 44% and becomes more pronounced as the adversarial share increases. Finally, the analysis yields practical guidance for energy trading applications: accept a payment after the computed number of confirmations when it fits within a single checkpoint interval; otherwise, treat finality as reaching the next checkpoint.

1. Introduction

1.1. Motivation

The foundation of a modern smart region’s sustainable development rests squarely on the resilience and security of its integrated energy infrastructure systems (EISs). This imperative is driven by a fundamental shift away from outdated centralized energy models toward a highly decentralized system, characterized by the proliferation of Distributed Energy Resources (DERs), such as rooftop solar and residential batteries. This transition, while essential for sustainability and decarbonization, introduces the following unprecedented security and complexity challenges.
  • Increased attack surface. The sheer volume of interconnected devices (smart meters, sensors, and actuators) in a decentralized system dramatically expands the attack surface, creating countless new entry points for malicious actors.
  • Lack of central trust. Managing transactions and coordinating these diverse, autonomous DERs securely without a single, trusted central authority is difficult and expensive under traditional IT security models.
Blockchain technology provides an essential, trust-minimized framework to solve these challenges. A blockchain allows direct, verified peer-to-peer (P2P) energy transactions between producers and consumers. This reduces transaction costs, minimizes the reliance on intermediaries, and fosters a truly democratic and autonomous energy market. By serving as an immutable, distributed ledger, a blockchain ensures that critical operational data (e.g., smart meter readings, usage patterns, and transaction settlements) cannot be tampered with. This enhances the overall resilience of the EIS against data manipulation and denial-of-service attacks.
However, the efficacy of distributed ledger technology (DLT) itself is threatened by sophisticated attacks like the double-spend attack (DSA), which can undermine the finality of transactions crucial for real-time grid operation. Therefore, our study, by analyzing and quantifying the security gains offered by checkpoints within Proof-of-Work (PoW) and Proof-of-Stake (PoS) architectures, directly contributes to fortifying the DLT layer. This strengthening of the core trust mechanism is a non-negotiable prerequisite for ensuring the long-term stability, security, and economic viability of the decentralized energy infrastructure, thereby securing the very basis of sustainable growth within the smart region.

1.2. Contribution and Paper Organization

Our impact. This manuscript contributes a security analysis of classical double-spend attacks for blockchains used as a settlement layer in decentralized energy trading. The key novelty of our results is incorporating periodic checkpoints into the security analysis, which limits the attacker’s window and refines the practical notion of transaction finality. We develop probabilistic attack models for both Proof-of-Work (PoW) and Proof-of-Stake (PoS) consensus protocols, derive explicit analytical formulas for the attack success probability as a function of network parameters (adversarial ratio and checkpoint distance), and provide a practical procedure for computing the minimum number of confirmations required to satisfy a predefined risk threshold. We further compare checkpoint-based blockchains with checkpoint-free ones and use the analytical findings to form actionable acceptance rules for payment finalization.
Paper organization. This paper is organized as follows. In the Introduction, we explain the motivation and describe our contribution. Then Section 2 (Related Work) reviews prior research on blockchain-enabled P2P energy trading and on consensus-layer security, positioning double-spend risk and the checkpoint mechanism within the broader literature. Section 3 (Materials and Methods) introduces the checkpoint mechanism, formalizes the PoW/PoS attack models, and derives the main formulas for attack probability together with the method for defining the number of confirmation blocks. Section 4 (Results) presents numerical results obtained according to the derived formulas and comparisons across representative parameter settings. Section 5 (Discussion) interprets the findings in the context of resilient decentralized energy systems and outlines practical implications for deployment. Section 6 (Conclusions) summarizes the main outcomes, limitations, and directions for future work.

2. Related Work

2.1. Blockchain in Decentralized Energy Trading/Smart Regions

The sustainable development and functional integrity of modern smart regions fundamentally depend on the perfection, resilience (sustainability) and security of their integrated energy infrastructure systems as a whole and the individual components within them [1,2].
The stability, resilience and overall security of the EIS are increasingly defined not only by the physical infrastructure but also by the security of its information infrastructure and the effective participation of that infrastructure in enabling “smart” capabilities [3,4]. This shift is catalyzed by the transition away from centralized utility models, where energy is generated at large state-owned power plants, towards increasingly decentralized systems, often referred to as “distributed generation” [5,6]. This transition, fueled by the increasing contribution of distributed renewable energy sources (e.g., rooftop solar panels and wind turbines [7]), requires new paradigms for the secure, decentralized management and distribution of energy.
Blockchain systems and distributed ledger technologies, which have gained wide popularity since the launch of Bitcoin in 2009, provide inherent advantages in environments where trust minimization is required. Energy companies were quick to recognize the immense potential of this technology. A blockchain offers an effective tool that allows consumers to sell surplus energy to local utilities or neighbors (known as peer-to-peer or P2P trading) without relying on a centralized intermediary or trusted third party [8]. Due to its decentralized model and its ability to reliably store information and protect it from tampering, the blockchain ensures the secure and reliable transfer of energy. This P2P energy trading model is realized through smart contracts that operate exclusively within the blockchain environment. Moreover, this decentralized approach to generation and distribution significantly enhances the resilience of the energy infrastructure against widespread threats, such as the destruction of large centralized power stations.
It should also be noted that in wartime, such P2P electricity sales gain additional relevance. For example, as the war in Ukraine showed, Russia has significant resources at its disposal to destroy and disable large power plants, creating a blackout throughout the country. But at the same time, it is impossible to destroy all conventional households that are scattered throughout the country and generate electricity from renewable sources for themselves and their neighbors. Therefore, in the coming years, such a decentralized approach to electricity generation and distribution will develop even faster, and the task of governments is to ensure the safe and reliable use of blockchains and smart contracts for P2P electricity trading for decentralized energy systems, which, in turn, ensure the resilience of the energy structure to the implementation of various threats.
As was stated by Ariel Cohen in [9], “Blockchain (BC) is moving beyond cryptocurrencies”, and energy companies were one of the first to see immense potential in this technology. Nowadays, “the market for BC in the energy sector is set to exceed $1.5 billion—a massive leap from just $127.5 million in 2018”.
However, for blockchain technologies to successfully underpin EIS resilience and “smartness”, their own security and correct functioning are paramount. Only a secure and correct blockchain operation can ensure the secure and correct functioning of the smart contract and the corresponding decentralized energy system. This dependency establishes a critical link between the stability of the EIS and the integrity of the underlying informational infrastructure.
Starting around 2020, the scientific literature has seen a gradual increase in the number of papers devoted to the use of blockchains and smart contracts to create a decentralized electricity market. Thus, the work [10] highlights increasing demand for clean, sustainable, and reliable energy sources that are secure and stable and states that BC is a promising technology that can provide secure and verifiable transactions for P2P energy trading and promote energy conservation. The work also proposes a distributed trading framework and smart contracts for future versions of BC and integration with other energy products. The article [11] continues such research, analyzing the key technological difficulties that arise in the electricity market when applying smart contracts for network enterprises that carry out electricity transactions and tariff settlements based on blockchain technology. It also proposes a trading model using smart contracts, which allows these problems to be overcome to some extent.
The work [12] concentrates on the problems with the security and fairness of energy trading when using blockchain-based smart contracts because they execute the trading and payment rules without intermediaries. It proposes a method that solves the problems associated with a lack of trust in P2P energy trading and utilizes blockchain technology that makes it impossible to tamper with data. The proposed method is validated using realistic data with the Ethereum Virtual Machine (EVM) and is expected to be useful to designers who need to integrate renewable energy in a microgrid system.
The paper [13] gives an overview of different techniques and areas to be considered for implementing smart contracts for energy transactions, emphasizing the advantages of blockchains and smart contracts in energy trading. In [14], the authors propose a blockchain-based model for distribution and P2P transactions in the energy market, which provides the possibility of registering low-cost instant transactions at the power grid in any specific period of time, without periodic payments. Such a method reduces the transaction fees and speeds up electricity trading. A more recent article [15] also concentrates on improving transaction efficiency and reducing costs in power markets. It provides a comparative analysis of three models: centralized trading, blockchain-based decentralized trading, and smart contract-driven automated trading. The results of the analysis, including simulation experiments, demonstrate that the smart contract-driven model outperforms the others by increasing market efficiency and stability, lowering transaction costs, reducing price fluctuations, and improving resource allocation. A similar question, connected with the construction of a distributed power trading model, is considered in [16]. One of the main contributions of this work is the design of a power trading smart contract tailored to the trading mechanism, enabling the automatic and efficient operation of distributed power trading. The authors state that such a design ensures the security, transparency, and trading efficiency of power trading. The work [17] proposed a novel Decentralized Energy Trading Framework via Blockchain Smart Contracts, which essentially uses hashes and asymmetric cryptography tools for transaction security and to preserve the integrity of data stored in blocks.
We also cannot help but mention several survey articles [18,19] of the last two years, which provide a comprehensive and detailed analysis of recent academic articles. The review [18] concentrates on the application of blockchain technology and smart contracts in the rapidly evolving energy market, analyzing their advantages, limitations, and challenges, providing the reader with a comprehensive view of the field’s potential in the near future. The article [19] is devoted to a detailed analysis of smart contracts’ characteristics and functionalities. This analysis reveals a significant gap in the transaction approach involving multiple sellers and buyers, underscoring the need for further exploration. This gap presents an exciting opportunity for future research and development in energy management, particularly in the context of blockchain technology’s potential to facilitate local energy transactions.
Recent studies have examined blockchain-enabled electricity market mechanisms and prosumer scheduling, including an architecture for hourly electricity rights and yield derivatives and a planning model for prosumer operation in the retail electricity market [20,21].

2.2. Security of the Blockchain Layer: A Double-Spend Attack

All the work mentioned above considers energy trading using secure blockchains and does not pay significant attention to how its security depends on network parameters and the consensus protocol. It is worth noting that only the safe and correct functioning of the blockchain can ensure the safe and correct functioning of the smart contract and the corresponding decentralized energy system. Therefore, along with the analysis of attacks directed directly at smart contracts [22,23], it is necessary to analyze attacks on the blockchain, the most dangerous of which are the double-spend attack [24] and the splitting attack [25]. In this case, the double-spend attack is more dangerous, since when it is executed, the attacker generates their branch hidden from other miners. Therefore, unlike the splitting attack, the double-spend attack cannot be detected at an early stage. In addition, the attacker posts the generated branch only in the case of a successful attack, when it is no longer possible to counteract it. Therefore, there is no other way to counteract this attack than to prevent it. That is, network users must take into account the possibility of the constant presence of the attacker and implement appropriate countermeasures. The specifics of the execution of this attack and the methods of protection against it significantly depend on both the consensus protocol and the network parameters. There are a lot of consensus protocols, including special modifications, used in different blockchains. One can find detailed surveys in [26,27]. Different consensus protocols have different advantages and disadvantages, and to decide what type of consensus is more preferable, one needs first of all to define its application, as was done in [28,29,30,31].
In decentralized systems, there is no trusted authority or third party that may solve conflicts and prevent fraud caused by malicious participants. Moreover, some part of the network participants may be well coordinated by an adversary who attacks the system. At the same time, honest nodes have no ability to detect the malicious behavior until the attack is finished (with any result).
In such conditions, transaction security in the blockchain is of great importance. Therefore, almost all articles analyzing certain features of blockchains necessarily pay sufficient attention to transaction security issues [32,33,34]. Users of the distributed system must decide whether to accept the transaction (and provide the corresponding services or goods for the accepted price) or whether they should wait for a higher confirmation assurance. So, for given input parameters, it is important to define concrete criteria for when a transaction may be securely accepted with a low risk of being removed from the final history of the blockchain.
Thus, the special case of persistence, as one of two major ledger properties [35], needs to be analyzed—the security against a double-spend attack. The essence of this attack does not depend on the type of consensus protocol: the attacker tries to spend the same coin twice. Technically, it is an attack aimed at replacing one block in the blockchain with another.
The attack is provided in two stages and can be described as follows. In the first stage of the attack, the vendor is waiting for the required number, say z, of confirmation blocks to appear after the block with the initial transaction and does not send goods until that time. During this stage, the adversary is trying to generate an alternative chain with an alternative transaction, starting from the block before the initial transaction. If they managed to generate a longer chain and share it after the vendor sends goods, the spent coin would be sent to another address or wallet, and the vendor would lose it.
The first stage of the attack continues until the moment when the supplier sends the goods. If during this time the adversary could not create the longer chain, they would run the second stage of the attack and try to “catch up” to the existing chain. Suppose that while six confirmation blocks are being generated, the adversary is able to create four blocks of the alternative chain. Now they are two blocks behind, and if they can ever generate enough blocks to “catch up” to the existing chain, which is also growing, then the attack will be successful. Note that in a classical double-spend attack, we assume that the adversary has unlimited time to catch up.
To determine how many confirmation blocks are sufficient to reduce the probability of a double-spend attack to a sufficiently low level, we need to derive a formula for this probability as a function of network parameters and the number of confirmation blocks. For the first time, such a formula was obtained in [24] by Nakamoto (with serious mistakes; see [36] for a detailed explanation) for the Proof-of-Work (PoW) consensus protocol.
After [24], the probability of the attack was analyzed in papers [37,38], but the results obtained lacked proofs. For the first time the problem gets a fully correct solution in [39], where the authors prove that the block generation process in the network is described with the Erlang distribution and the probability of attack with a negative binomial distribution. It was first proved in this paper, using special functions [40,41], that the fork probability decreases exponentially with growth of its length.
The work [42] generalized the results obtained in [39], adding to the model a new parameter—network synchronization time. In [36] analytical estimates for the probability of the double-spend attack for a Proof-of-Stake (PoS)-based blockchain were obtained in some simplified model, under the assumption that each non-empty timeslot has exactly one slot leader. Note that this assumption is standard (see, for example, ref. [43,44]) and does not cause serious restrictions, only simplifying the description of the model. The obtained results are strict (not asymptotic) and allow us to use them to define the necessary number of confirmation blocks to make the transaction irreversible with overwhelming probability (e.g., 1 10 3 ). It turns out that estimations obtained in [36] for the PoS protocol are very similar to corresponding results for PoW protocols from [37,39], though methods for obtaining such estimations were completely different.
It should be noted that a blockchain for P2P electricity sales can be created specifically for this application. For example, using an existing blockchain, such as Ether [45] or even its sidechains [46,47], to host smart contracts can make P2P electricity sales unprofitable. Therefore, one possible solution is to use a two-level blockchain, such as the PoP protocol [48]. In this case, a security-inherent blockchain designed for trading will provide an acceptable transaction cost and good throughput, and its stability will be ensured by a security-providing blockchain using a checkpointing mechanism [49].
Gap statement and rationale. Despite the practical relevance for energy trading settlement, the literature provides limited quantitative guidance on how to parameterize confirmation policies under realistic adversarial conditions, especially when additional finality mechanisms such as periodic checkpoints are employed. In particular, prior studies that analyze blockchain attacks and derive attack success probabilities (e.g., refs. [24,25,35,36,37,38,39] and related works) primarily focus on checkpoint-free blockchains, where finality is determined solely by confirmation depth. This motivates our research direction: we model classical double-spend scenarios for PoW and PoS blockchains with periodic checkpoints, derive explicit success probability expressions, and use them to compute the minimum confirmation depth required to keep the attack probability below a preset risk threshold. The resulting formulas translate directly into deployable acceptance rules for blockchain-based payments in decentralized energy systems.

2.3. Objectives and Contributions

In the present work, we investigate the security of both PoW- [24] and PoS-based [50,51,52,53,54] blockchains against double-spend attacks, but with the additional condition of checkpoints.
Adding checkpoints, on the one hand, restricts the adversary in time for attack realization and, on the other hand, requires more serious attack analysis. Attack probability estimations, obtained below, are much more complicated in comparison with [36], but may still be used to obtain numerical results for the block confirmation number, in dependence on the adversary’s ratio and distance between checkpoints.
The results of this paper can also be applied to such protocols, provided that the inter-checkpoint (or inter-finalization) distance can be bounded from below and above in terms of an equivalent number of blocks or timeslots. This situation arises, for example, in quorum-driven finality mechanisms where a block becomes final once a sufficient fraction of validators has committed to it (e.g., Tendermint-based BFT systems) or in protocols with threshold-style convergence to a finalized decision (e.g., Avalanche/Snowman). In these cases, one may treat “checkpointing” as the event of finalization/commit and work with the corresponding block/slot bounds implied by the protocol and network conditions. A systematic adaptation of our framework to these alternative consensus mechanisms, including protocol-specific bounding techniques and tighter estimates, is an important direction for future research.
Therefore, this paper investigates the core security mechanisms necessary to secure the blockchain infrastructure used for P2P energy trading. This work aims to derive explicit formulas for the probability of success of the double-spend attack (DSA) in both Proof-of-Work (PoW)- and Proof-of-Stake (PoS)-based blockchains. Critically, we introduce the additional condition of checkpoints into the analysis, as this mechanism can enhance security and throughput, particularly in blockchains tailored for energy transactions. These formulas can also be used to define how many confirmation blocks are enough to guarantee that the attack probability is less than some small preset value, like 0.001. We also compare our results with the corresponding results for classical PoW- and PoS-based blockchains without checkpoints and show that adding checkpoints decreases the attack probability. As examples, a lot of numerical results are given to understand the behavior of the attack probability. Based on numerical results, we can state that adding checkpoints in blockchains reduces the probability of attack by up to 40%, and the larger the adversary’s stake, the larger the probability of reduction.
By defining the necessary number of confirmation blocks required to secure a transaction against the DSA, this research directly contributes to ensuring the fundamental security layer needed for reliable decentralized energy systems and, consequently, the enhanced stability of smart regions. The methodologies used (deriving complex probability estimations and numerical results) trace the proposed motivation by addressing the resilience required at the informational core of the smart EIS.

3. Materials and Methods

In this section, we firstly formalize the models for PoW- and PoS-based blockchains with checkpoints and for the double-spend attack on them. In these models, we obtain explicit formulas (depending on network parameters) for attack probability estimates and give numerical examples, which allow us to compare the attack probability for blockchains with checkpoints and without them. Such protocols are the appropriate solutions for P2P energy trading applications using blockchains for the sustainable functionality of smart regions.
We assume that the reader is sufficiently familiar with the main definitions and properties of blockchains and main consensus protocols (if not, it is enough to read [50,55] and/or the first sections in [51]).

3.1. Checkpoint Mechanism

To increase the security of the blockchain, a mechanism of control points in the chain, i.e., checkpoint mechanism, is proposed, whose purpose is to restrict the time of the attack [50,56]. This means that in the blockchain, after a certain number of blocks or timeslots, some special blocks are created, which we call checkpoints. They are aimed at synchronizing the state of the history of the chain until the previous checkpoint. Once the chain history is synced, it cannot be changed, even in case of a longer alternative chain.
According to this mechanism, any attack can be carried out only between two checkpoints. If the attack was started just after the checkpoint with numbers l, it should be finished before the checkpoint with number l + 2 , because in the opposite case the longest chain created by the adversary cannot change the history containing the block with the transaction under attack. The number of possible blocks built between chain history synchronization points is limited. The concept is that the network will accept all transactions up to a checkpoint as valid and irreversible. After the checkpoint, the history of the chain is saved and cannot be changed in any way.
Checkpoints in a blockchain with the PoS consensus protocol occur at the moment of the end of an epoch, i.e., after a fixed number of timeslots. But for PoW-based blockchains, they occur after a fixed number of blocks, and this is the main difference for these two protocols. Usually the number of timeslots or blocks allocated between two checkpoints is about 1000–2000 units, but some deviations may occur: Bitcoin (1000 blocks) [57], Bitcoin-Cash (10 blocks) [58], Etherium 2.0 (64 timeslots) [59], Polkadot (64 timeslots) [60], and Cardano and Solana (432,000 timeslots) [61].

3.2. Description of a Double-Spend Attack

We will mostly use the same designations and basic model of attack as in [36] and briefly formulate the adversary’s strategy.
Define a block sequence as B 0 , B 1 , , B n and assume that the adversary’s transaction was included in block B i for some i N . Then the vendor waits until z blocks have been created after this block to be sure that the transaction will not be canceled.
At the same time, the adversary (sender) wants to replace a transaction in some block B i with some alternative transaction, which sends the same coin to a transaction in some other wallet. For this purpose, they try to organize a branch point in block B i 1 , just before the block with the transaction, and create an alternative branch, which is longer than the one created by honest miners.
The main difference between the current model and [36] is that the adversary has only a limited time to provide the attack due to checkpoints.
In what follows, we make the following assumptions. As in [36,39,42] we assume, for simplicity, that each timeslot has exactly one slot leader. Note that it is possible to get rid of such an assumption, making new assumptions in favor of the adversary, resulting in inflated probability estimates. Next, we assume a stable distance between checkpoints (measured in blocks or in timeslots) and a stable adversary’s ratio during the attack. Also, we assume that the number of confirmation blocks is less than double the distance between the checkpoints, because in the opposite case, it is enough to wait until the checkpoint.
The adversary does not add blocks to the chain with the initial transaction; instead they form an alternative chain. After z confirmation blocks B i + 1 , B i + 2 , , B i + z are formed by honest slot leaders, the adversary tries to replace the initial chain with the alternative one they formed, with a branch point in B i 1 , where block B i is pruned: B 1 , , B i 1 , B i , B i + 1 , As the adversary does not form their blocks in the initial chain, all blocks in it, including B i 1 and B i , are formed by honest parties.
Note that the first stages of a double-spend attack for PoW- and PoS-based blockchains with checkpoints and for PoW- and PoS-based blockchains without them are completely identical.
To describe the difference in the second stage of attack for PoW- and PoS-based protocols, we use the following game analogy. Assume two players play a game in which they move chips according to the result of coin tossing: if heads (tails) came up, the 1st (2nd) player moves their chip one step. The player wins if at the end of the game they are ahead. From the words “at the end of the game” we may assume two possibilities: after a certain number of coin tosses (as an analog of the PoS protocol) or after achieving a certain number of steps (as an analog of the PoW protocol). In this model, the problem of success probability in the second stage of the double-spend attack may be formulated as follows. Assume the 1st player is k steps behind. What is the probability that they will win at the end of the game?

3.3. Designations and Auxiliary Results

Define p as the total stake ratio of honest stakeholders and q as the total stake ratio of malicious stakeholders (for the PoS-based blockchain) or the total computational powers of honest miners and the adversary (for the PoW-based blockchain), p + q = 1 , and assume q < p . According to the PoW/PoS conception (see, for example, refs. [24,51]), this implies that in each block/timeslot, the probability that the block/slot is created by an honest miner/slot leader is p and the probability that it is created by a malicious one is q. Based on these designations, we may formulate an auxiliary lemma for which the detailed proof may be found in [36] for PoS-based and in [39] for PoW-based blockchains.
Lemma 1.
Define P z k as the probability of the event E k = { malicious slot leaders create exactly k blocks during the first stage of attack} (i.e., during the time when honest stakeholders create exactly z confirmation blocks). Then in our designations
P z k = z + k 1 l · p z · q k .
Proof. 
To give an informal explanation of the correctness of Lemma 1 for PoS-based blockchains, it is enough to note that in this case the total number of timeslots is z + k , and the last of them is occupied by an honest slot leader. For PoW-based blockchains the correctness is not so obvious (see [39]). □
To succeed in an attack, the adversary must build an alternative chain that is longer than the initial one. Hence, the necessary and sufficient condition for the successful attack for PoS-based blockchains is the existence of such a sequence of timeslots, where the number of “malicious” slots is not less than the number of “honest” slots. For PoW-based blockchains this condition may be formulated as “the malicious miners managed to create a number of blocks that is not less than the honest ones created”. Then, using (1), the probability of succeeding in the first stage of attack (i.e., creating a longer chain while honest slot leaders/miners create z confirmation blocks) may be described with the next lemma.
Lemma 2.
Let z < n . Then for the adversary, the probability P z ( I ) of succeeding in the first stage of attack does not depend on n and is equal to
P z ( I ) = l = z z + l 1 l · p z · q l = 1 l = 0 z 1 z + l 1 l · p z · q l .
Here we use the fact that we add the probabilities for the negative binomial distribution, so
l = 0 z + l 1 l · p z · q l = 1 .
The next two Lemmas 3 and 4 are the very important points in this paper. While Lemma 3 is auxiliary to Lemma 4, Lemma 4 plays the same role in a blockchain model with checkpoints as the lemma about the Game Ruin Problem [62] plays in a blockchain model without them. This result describes the main difference in calculating the probability of a double-spend attack for blockchains with checkpoints and without them (see [36,39,42]).
Before we formulate and prove the Lemmas, we need to introduce some auxiliary designations and explain their interconnections. We make an assumption in favor of the adversary and assume that they started the attack just after a timeslot with a checkpoint. Let them include their main transaction with payment to the vendor in block B, which refers to the block with the checkpoint. In such a case the adversary has more time to provide the attack. Define B l o c k n and B l o c k 2 n as the next two blocks with checkpoints. We will call the branch with block B, in which the main transaction is included, the main branch. To succeed, the adversary has to catch up to the main branch before block B l o c k 2 n creation. Simultaneously with block B, the adversary creates block B , which also refers to block B l o c k 0 . They include their alternative transaction in block B . This is the block that starts the alternative branch. Assume that at the moment when the z-th block of the main branch was created, the adversary created k blocks on their alternative chain, so they are u = z k > 0 blocks behind. Next, let us use the term “block height”, where the height of the z-th confirmation block is equal to 0, the height of the next block is 1, and so on. Analogically define the height of the blocks on the alternative branch.
Let the adversary be k blocks behind after the first stage of attack. We say that the adversary caught up to the main branch at the height i N { 0 } if at some moment both of the branches are of the same length z + i (starting from blocks B and B ). Define the corresponding event as
B i = at some moment both of the branches are of the same length z + i .
Next, we say that the adversary caught up to the main branch for the first time at the height i N { 0 } if at some moment both of the branches are of the same length z + i , but before that moment the alternative branch was always shorter than the main one. We define the corresponding event as
A i = { at some moment both of the branches are of the same length z + i , but before the moment the alternative branch was all the time shorter } .
Note that, according to these definitions, A i A j = for i j .
It should be mentioned that probabilities P ( A i ) and P ( B i ) also depend on the value k, which was fixed above. However, to simplify designations, we do not add the index k to these events A i and B i .
For fixed k define A PoW ( k ) and A PoS ( k ) as the event (for PoW and PoS consensuses, correspondingly), which may be defined as “the alternative (adversary’s) branch managed to catch up to the main branch before B l o c k 2 n creation”.
Then in the case of PoW consensus we have A P o W ( k ) = i = 0 2 n z A i because in this case the alternative adversary’s branch has to catch up to the main branch at a height that is not larger than 2 n z or before the moment of creation of a block with checkpoint B l o c k 2 n (which refers to the previous checkpoint B l o c k n and after which the attack is not possible).
Unlike the PoW-based blockchain, for the PoS-based one we have
A P o S ( k ) = i = 0 n z A i .
Indeed, in this case the number of timeslots that may be used for attack is 2 n z k (as there are exactly 2 n timeslots between B l o c k 0 and B l o c k 2 n , and z + k blocks out of them are occupied by honest slot leaders and the adversary); see Figure 1.
Next, as the attacker is z k blocks behind, they may catch up only in one of the following cases: When two alternative chains become equal at the height of z + i , i = 0 , n z ¯ , starting from the branch point. Indeed, if z > n , then the adversary cannot catch up because the majority of possible timeslots are occupied by honest slot leaders. Next, to catch up at the height z + i , both the adversary and honest slot leaders need to have z + i timeslots before the timeslot with number 2 z + i , starting from the branch point. In this case, after the timeslot with the block at height k, the adversary should have z k + i timeslots, and honest slot leaders should have i timeslots, so the total number of timeslots is z k + 2 i .
As A i A j = ,
P ( A P o W ( k ) ) = i = 0 2 n z P A i and P ( A P o S ( k ) ) = i = 0 n z P A i
So, to calculate probability (3) it is enough to calculate probability P ( A i ) .
Lemma 3.
Let us define q i ( k ) = P ( A i ) , i = 0 , 2 n z ¯ . In our designations, the following equalities hold:
q 0 ( k ) = p M u ;
q i ( k ) = u + 2 i i · p H i · p M u + i j = 0 i 1 P ( A j ) · 2 i 2 j i j · ( p H · p M ) i j ,
where u = z k .
Proof. 
According to the definitions of events A i and B i , we may write the following equalities:
P B 0 = P A 0 = p M u ;
P B i = u + 2 i i · p M u + i · p H i .
Indeed, if the branches are equal at height i, then they have the same length, and their total number of blocks is u + 2 i , from which i blocks were created and included in the main branch by honest slot leaders, and the rest of blocks were generated by malicious ones and included in the alternative branch.
Next, note that A 1 = B 1 A 0 ; then
P ( A 1 ) = P ( B 1 ) P ( B 1 A 0 ) .
The probability P ( B 1 A 0 ) may be expressed as follows:
P B 1 A 0 = P B 1 / A 0 · P A 0 ,
where
P B 1 / A 0 = 2 1 · p M · p H .
Indeed, if two branches are equal at height 0, then for them to also be equal at height 1 it is necessary and sufficient that one of the next two blocks belongs to the main branch and the other to the alternative one.
So we may write the following:
P ( A 1 ) = P ( B 1 ) P ( B 1 A 0 )
= u + 2 1 · p M u + 1 · p H 2 1 · p M · p H · p M u
= u + 2 1 · p M u + 1 · p H 2 1 · p H · p M u + 1 .
Analogically,
P A 2 = P B 2 P B 2 A 1 P B 2 A 0
= P ( B 2 ) P ( B 2 / A 1 ) · P ( A 1 ) P ( B 2 / A 0 ) · P ( A 0 )
and so on, where in the general case we have
P A i = P B i j = 0 i 1 P B i / A j · P A j ,
and
P B i / A j = 2 ( i j ) i j · ( p M · p H ) i j .
Now the statement of Lemma 3 follows from the equalities (5)–(8). □
From Lemma 3, Formula (3) and the considerations above, we immediately get Lemma 4, which is an analog of the Game Ruin Problem lemma.
Lemma 4.
The probability of the adversary catching up being z k blocks behind may be calculated as
P ( A P o W ( k ) ) = i = 0 2 n z q i ( k )
for the PoW-based blockchain with checkpoints and as
P ( A P o S ( k ) ) = i = 0 n z q i ( k )
for the PoS-based blockchain with checkpoints, where u = z k and n is the distance between two checkpoints (measured in blocks or timeslots, correspondingly).
Since q i ( k ) 0 , it immediately follows from Lemma 4 that P ( A P o W ( k ) ) P ( A P o S ( k ) ) for the same parameters, which explains why the PoS case yields a slightly lower double-spend success probability in our model.
Lemma 5
(probability of success in the 2nd stage of attack). Let n be the distance between checkpoints and z the number of confirmation blocks. Then the probability P n ( z ) ( I I ) that the adversary has no success in the 1st stage of attack, but has success in the 2nd stage, is
P n z II = p H z · k = 0 z 1 z + k 1 k · p M k · q k ,
where q k = P A P o W ( k ) for the PoW-based blockchain and q k = P A P o S ( k ) for the PoS-based blockchain.
Proof. 
If the adversary has no success in the 1st stage of attack, then in the 1st stage they manage to create k blocks for some 0 k z 1 . Define corresponding events E k = {the adversary creates exactly k blocks in the 1st stage of attack}. Then the event E ( I ) = {the adversary has no success in the 1st stage of attack} may be written as E ( I ) = k = 0 z 1 E k .
Next, define the event E ( I I ) ={the adversary has success in the 2nd stage of attack}. We need to find the probability P E ( I ) E ( I I ) :
P E ( I ) E ( I I ) = P E ( I I ) k = 0 z 1 E k = P k = 0 z 1 E k E ( I I )
= k = 0 z 1 P E k E ( II ) = k = 0 z 1 P E ( II ) / E k · P E k .
To win the 2nd stage under the condition E k is the same as to catch up being z k blocks behind. Then P ( E ( I I ) / E k ) = q k , and this was calculated in Lemma 4. The probability P ( E k ) was calculated in Lemma 1. So we may rewrite (9) as
P E I E I I = k = 0 z 1 q k · z + k 1 k · p H z · p M k
= p H z · k = 0 z 1 q k · z + k 1 k · p M k ,
and the lemma is proved. □
Now we can formulate and prove the main result about the probability of a double-spend attack for both PoW- and PoS-based blockchains with checkpoints.
Theorem 1
(for both PoW- and PoS-based blockchains with checkpoints). Let n be distance between checkpoints. Then the probability P n z of a double-spend attack after z confirmation blocks is equal to
P n z = P z ( I ) + P n z ( I I )
Proof. 
As the attack success consists of success in the 1st stage or in the second stage, we may write
P n z = P E I E I I = P E I + P E I I ,
as these two events are mutually exclusive, according to their definition above (see proof of Lemma 5). □

4. Results

Due to the limited number of blocks or timeslots between checkpoints, the attacker cannot build an alternative chain during the unlimited time, like for blockchains without checkpoints. To prevent the double-spend attack, the vendor should wait for a certain number of confirmation blocks, which guarantees that the probability of attack is less than some preset value, like 0.001 or even smaller. The explicit formulas for attack probability, obtained it this paper, help them to decide whether they should wait for a certain number of confirmation blocks or wait until the corresponding checkpoint. But if checkpoint occurs, for example, once a day, it is more suitable to calculate the number of confirmation blocks that corresponds to the desired probability.
In the tables below we give a lot of numerical results, obtained according to analytical formulas of double-spend attack probability from Theorem 1 for different parameters (distance between checkpoints, adversary’s ratio, and number of confirmation blocks). The behavior of these results, when parameters change, is rather expected, so the numerical results may be considered as additional confirmation of the correctness and practical applicability of analytical ones.
The numerical results of probabilities of the double-spend attack on PoS-based blockchains with different distances n between checkpoints, obtained according to Theorem 1, are given in Table 1 (for n = 50 , 100 , 150 , 200 , 250 ) and Table 2 (for n = 300 , 350 , 400 , 450 , 500 ). Note that for the PoW-based blockchain the results are very similar, so we have no need to give them. For comparison, in the tables we also give the same results for blockchains without checkpoints.
As we can see from the tables, the difference between these two probabilities for the same number of confirmation blocks (for blockchains with checkpoints and without them) increases with an increase in the adversary’s ratio and decreases with an increase in the distance between checkpoints, as expected. As we can see from Table 1 and Table 2, when the adversary’s ratio is q = 0.45 , the differences between these two probabilities reach more than 42–44%. For relatively small n, like n = 50 , the difference becomes essential even for q = 0.25 .
The corresponding charts for the function P n z from Theorem 1 are also given for the different ratios of malicious stakeholders q in Figure 2 (for n = 50 ), Figure 3 (for n = 150 ), and Figure 4 (for n = 300 ). As we can see, all these functions drop exponentially with an increase in the number of confirmation blocks, like in the case of “classical” blockchains without checkpoints.
Table 1 and Table 2 illustrate how the proposed analytical expressions translate into practical acceptance rules. As expected, the minimum required confirmation depth increases with the adversarial share and decreases when checkpoints are introduced, yielding a noticeable reduction in the double-spend success probability compared with the checkpoint-free baseline. In particular, for moderate adversarial participation (e.g., 25%), the required depth remains small, on the order of 20 blocks, which corresponds to about several minutes for usual PoS-based blockchains and is typically compatible with time-sensitive energy trading settlement. Overall, the checkpoint mechanism provides a clear security benefit, especially as the adversarial share approaches the honest-majority boundary.

5. Discussion

The analytical formulas derived in this work quantify the security gains achieved by implementing checkpoints in PoW and PoS blockchains. This provides a crucial, quantifiable security metric directly applicable to the decentralized energy infrastructure of modern smart regions. Our numerical results confirm the correctness of the analytical framework and illuminate key architectural decisions necessary for building a resilient and sustainable EIS.
The fundamental finding that the double-spend attack probability is smaller for blockchains with checkpoints is an operational necessity for the EIS. Real-time P2P energy trading and critical smart meter data exchange cannot tolerate transactional ambiguity. Checkpoints establish a hard finality layer, effectively neutralizing the threat of retroactive transactional changes. This mechanism is vital for maintaining the trust and functional integrity of the entire distributed energy market within a smart region.
The observed correlation—the smaller the distance between checkpoints, the smaller the attack probability—offers direct engineering guidance. For high-frequency events in the grid (e.g., automated load balancing or instant micro-transactions between prosumers), the system demands near-instantaneous finalization. While exponential decay of the attack probability is helpful, frequent checkpoints provide a deterministic security assurance much faster. This allows architects to optimally tune the protocol: a shorter checkpoint distance means higher security assurance for the grid’s most critical, latency-sensitive functions, directly supporting the resilience goals of the smart region.
The analysis shows that the security difference provided by checkpoints increases significantly when the ratio of malicious participants is larger. This highlights checkpoints’ role as a robust defense mechanism for the public or consortium DLTs underpinning P2P energy markets, especially in volatile periods.
Furthermore, the finding that PoS-based blockchains exhibit a marginally lower DSA probability reinforces the push for sustainable consensus models. For smart regions prioritizing environmental sustainability, this result validates the choice of PoS. It confirms that PoS not only consumes vastly less energy than PoW but also provides marginally superior security against DSA, making it the preferred economic and ecological choice for decentralized EIS governance.
The results provide a quantifiable security protocol for utility operators and energy trading vendors. Instead of relying on a heuristic number of confirmation blocks, they are advised to wait until a checkpoint is achieved. This rule transforms risk management into a deterministic process: once the corresponding checkpoint is finalized, the transaction is cryptographically irreversible, securing the financial integrity of the energy trade. This practical guidance is essential for ensuring the stability and trustworthiness of the commercial layer in the smart region’s energy market.
Checkpointing introduces a security–efficiency trade-off. Shorter checkpoint spacing reduces double-spend risk but may increase operational cost (especially in anchored designs where each checkpoint is an on-chain transaction on a base ledger) and can increase perceived finality latency if applications wait for checkpoint-based finalization. In L2/L3 deployments anchored to a base chain (e.g., Ethereum), checkpoints can be realized by periodically committing the application ledger’s state hash, shifting most durability guarantees to the base chain while adding checkpoint transaction fees. Quantifying the exact latency/throughput overhead is deployment-specific and depends on block times, anchoring frequency, fee conditions, and confirmation policy.
Checkpointing may introduce additional system-level risks. In anchored deployments, where a checkpoint is realized as an on-chain commitment (e.g., a state hash transaction) to a resilient base blockchain, the correctness of an already published checkpoint inherits the base chain’s security assumptions. However, practical threats such as checkpoint centralization, censorship/DoS against checkpoint submitters, or fee/congestion spikes may delay checkpoint publication and thus increase the effective inter-checkpoint window. These issues can be mitigated by multi-party checkpoint submission, redundant anchoring, and conservative confirmation policies during checkpoint delays; a detailed analysis of liveness-oriented attacks is left for future work.
Energy system constraints and parameter selection. In decentralized energy applications, the choice of checkpoint distance and the number of confirmation blocks should be aligned with the allowable payment finality latency, settlement frequency, and grid stability/operability requirements. Shorter checkpoint intervals and/or deeper confirmations reduce double-spend risk, but may increase time to finality and operational costs. Therefore, for a given set of energy constraints and a target risk threshold, our formulas can be applied to compute the minimum required confirmation depth and then verify whether it fits within a single inter-checkpoint interval and the acceptable latency; if not, finality should be tied to the next checkpoint, or the checkpoint spacing should be reduced.
Checkpoint enforcement and trust model. In this work, checkpoints serve as a finality anchor, making pre-checkpoint history practically irreversible. In a realistic energy trading deployment, this can be realized by operating the application ledger as an L2/L3 chain and periodically anchoring checkpoints (e.g., a state hash or block hash) to a resilient base blockchain such as Ethereum or widely used Ethereum-compatible sidechains. Under this design, the immutability of pre-checkpoint history inherits the base chain’s economic security assumptions. In consortium deployments, checkpoints can instead be certified through governed finality (e.g., a supermajority of validator signatures). A detailed analysis of governance, incentives, and liveness-related threats (e.g., checkpoint delays) is deployment-specific and left for future work.
Independent validation. The numerical results reported in this paper are intended to demonstrate how the derived closed-form expressions can be used and to confirm expected qualitative trends, while the correctness of the main results follows from the analytical derivations and proofs. Independent corroboration through protocol-specific simulation (e.g., Monte Carlo experiments) or empirical evaluation on a concrete testnet is left for future work and is highly dependent on the target deployment and networking assumptions.

6. Conclusions

In this paper, for the first time explicit formulas were obtained for calculating the probability of the double-spend attack for PoW- and PoS-based blockchains with checkpoints. Using the obtained analytical results, we got a large number of numerical results and built charts, which confirmed the correctness of the analytical ones.
The numerical results and charts, built according to corresponding analytical results, indicate the following:
1.
The probability of the double-spend attack for a blockchain with checkpoints is smaller than for a blockchain without them;
2.
The smaller the distance between checkpoints, the smaller the probability of attack;
3.
The larger the ratio of malicious participants, the larger the difference between probabilities of attack for a blockchain with checkpoints and for a blockchain without them;
4.
The probability of the attack decrease exponentially with an increase in block confirmation number, like in the case of a classical blockchain without checkpoints;
5.
As we can see from Formula (3), the probability of a double-spend attack is a bit larger for PoW-based blockchains than for PoS-based ones.
Based on the analytical and numerical results of our work, for various financial transactions with cryptocurrencies, the vendor should wait for a certain number of confirmation blocks, if this number does not exceed the distance between corresponding checkpoints. In the opposite case, they should wait until the corresponding checkpoint, which makes the attack impossible.
Our findings hold profound implications for the construction of resilient and secure decentralized energy systems within smart regions. The mechanism of checkpoints offers the deterministic finality required for reliable automated energy transactions, smart metering data integrity, and securing tokenized energy assets. By quantifying the security gains, this work provides system architects with the tools necessary to achieve the following:
  • Optimize protocol parameters: Determine the most secure and efficient distance between checkpoints to guarantee transaction finality for various EIS applications;
  • Enhance operational trust: Offer quantitative assurance to utilities and consumers regarding the integrity of decentralized energy transactions;
  • Support sustainable security: Justify the adoption of PoS protocols for decentralized energy management based on both their superior energy efficiency and demonstrably better security profile against double-spend attacks.
Our closed-form analysis assumes a constant adversarial share and fixed checkpoint spacing. For time-varying adversarial participation, the formulas can be used with the maximal adversary’s ratio in this period to obtain conservative bounds (PoW) or evaluated epoch by epoch under the standard PoS assumption of an epoch-wise constant stake. For variable checkpoint spacing, the analysis can be applied by bounding the inter-checkpoint distance and deriving upper/lower bounds on attack probability; a full treatment of arbitrary interval sequences is left for future work.
Practical impact. The analytical results transform the abstract concept of blockchain security into a concrete, quantifiable recommendation for energy vendors or utility operators engaging in cryptocurrency transactions (e.g., purchasing Renewable Energy Credits or settling peer-to-peer trades). They should not solely rely on a fixed number of confirmations. Instead, the waiting time must be explicitly tied to the checkpoint distance. This approach drastically simplifies risk assessment: the vendor can confidently trust the transaction once the corresponding checkpoint has been achieved, as the attack becomes practically impossible after that point.

Future Research Directions

In this work, we considered a simplified model of the PoS consensus protocol, assuming only one slot leader per timeslot. Additionally, for both PoW and PoS protocols, we assumed zero synchronization time. These simplifications were adopted to clearly isolate and analyze the impact of checkpoints on blockchain resilience against double-spending attacks. It should be noted that even under these assumptions, the proofs remain quite complex and the resulting formulas are relatively cumbersome. In our view, these simplifying assumptions could be relaxed by employing a mathematical framework similar to that presented in [63]. In particular, this could involve the use of the so-called “dominant distribution” [52], derived under worst-case assumptions in favor of the adversary.
The approach used in this paper can also be applied to such protocols, provided that the inter-checkpoint (or inter-finalization) distance can be bounded or expressed in terms of an equivalent number of blocks/timeslots. This situation arises, for example, in quorum-driven finality mechanisms where a block becomes final once a sufficient fraction of validators has committed to it (e.g., Tendermint-based BFT systems) or in protocols with threshold-style convergence to a finalized decision (e.g., Avalanche/Snowman). In these cases, one may treat “checkpointing” as the event of finalization/commit and work with the corresponding block/slot bounds implied by the protocol and network conditions. A systematic adaptation of our framework to these alternative consensus mechanisms, including protocol-specific bounding techniques and tighter estimates, is also an important direction for future research.

Author Contributions

Conceptualization, L.K.; methodology, L.K. and A.K.; software, A.K.; validation, M.R.; formal analysis, L.K.; investigation, L.K. and O.K.; resources, A.K. and M.R.; data curation, A.K.; writing—original draft preparation, L.K. and A.K.; writing—review and editing, O.K. and M.R.; visualization, A.K.; supervision, L.K. All authors have read and agreed to the published version of the manuscript.

Funding

The funding for this study was provided by the research project of the University of the National Education Commission (Poland).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data can be available on request.

Acknowledgments

The authors express their gratitude to the University of the National Education Commission (Poland) for financial support of the research project. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Dashkevych, O.; Portnov, B.A. Criteria for smart city identification: A systematic literature review. Sustainability 2022, 14, 4448. [Google Scholar] [CrossRef]
  2. Mehmood, R.; Yigitcanlar, T.; Corchado, J.M. Smart technologies for sustainable urban and regional development. Sustainability 2024, 16, 1171. [Google Scholar] [CrossRef]
  3. Wright, M.; Chizari, H.; Viana, T. A systematic review of smart city infrastructure threat modelling methodologies: A Bayesian focused review. Sustainability 2022, 14, 10368. [Google Scholar] [CrossRef]
  4. da Silva Tomadon, L.; do Couto, E.V.; de Vries, W.T.; Moretto, Y. Smart city and sustainability indicators: A bibliometric literature review. Discov. Sustain. 2024, 5, 143. [Google Scholar] [CrossRef]
  5. Barros, P.; Agupugo, C.P.; Ejichukwu, E.; Ogunmoye, K.A.; Hayden, M.D. Decentralized energy security: Cybersecurity challenges and opportunities in distributed renewable energy. World J. Adv. Res. Rev. 2025, 26, 1256–1272. [Google Scholar] [CrossRef]
  6. Kumar, N.M.; Chand, A.A.; Malvoni, M.; Prasad, K.A.; Mamun, K.A.; Islam, F.; Chopra, S.S. Distributed energy resources and the application of AI, IoT, and blockchain in smart grids. Energies 2020, 13, 5739. [Google Scholar] [CrossRef]
  7. Iweh, C.D.; Gyamfi, S.; Tanyi, E.; Effah-Donyina, E. Distributed generation and renewable energy integration into the grid: Prerequisites, push factors, practical options, issues and merits. Energies 2021, 14, 5375. [Google Scholar] [CrossRef]
  8. Coll-Mayor, D.; Notholt, A. Distributed Ledger Technologies for the energy sector: Facilitating interoperability analysis. IEEE Open Access J. Power Energy 2023, 10, 593–604. [Google Scholar] [CrossRef]
  9. Cohen, A. The Blockchain Revolution in the Energy Market. 2024. Available online: https://www.forbes.com/sites/arielcohen/2024/12/06/the-blockchain-revolution-in-the-energy-market/ (accessed on 18 December 2025).
  10. Aloqaily, M.; Boukerche, A.; Bouachir, O.; Khalid, F.; Jangsher, S. An Energy Trade Framework Using Smart Contracts: Overview and Challenges. IEEE Netw. 2020, 34, 119–125. [Google Scholar] [CrossRef]
  11. Lu, J.; Wu, S.; Cheng, H.; Song, B.; Xiang, Z. Smart contract for electricity transactions and charge settlements using blockchain. Appl. Stoch. Model. Bus. Ind. 2021, 37, 442–453. [Google Scholar] [CrossRef]
  12. Kajaan, N.A.M.; Amidi, N.H.N.; Salam, Z.; Radzi, R.Z.R.M. Blockchain-Based Smart Contract for P2P Energy Trading in a Microgrid Environment. Proc. J. Phys. Conf. Ser. 2022, 2312, 012020. [Google Scholar] [CrossRef]
  13. Preetha, P.; Nair, M.G. Smart contract based energy trading-an overview. In Proceedings of the 2022 IEEE 19th India Council International Conference (INDICON); IEEE: Piscataway, NJ, USA, 2022; pp. 1–7. [Google Scholar]
  14. Su, X.; Hu, Y.; Liu, W.; Jiang, Z.; Qiu, C.; Xiong, J.; Sun, J. A blockchain-based smart contract model for secured energy trading management in smart microgrids. Secur. Priv. 2024, 7, e341. [Google Scholar] [CrossRef]
  15. Shao, C.; Liu, X.; Li, D.; Chen, X. Optimizing power system trading processes using smart contract algorithms. Energy Inform. 2024, 7, 146. [Google Scholar] [CrossRef]
  16. Zhang, L.; Huang, R.; Jiao, M.; Lu, Q.; Yang, Y. Distributed Power Trading Mechanism Based on Blockchain Smart Contracts. Energies 2025, 18, 2040. [Google Scholar] [CrossRef]
  17. Gurjar, G.; Nikose, M.D. Smart contract framework for secure and efficient P2P energy trading with blockchain. J. Electr. Eng. Technol. 2025, 20, 255–269. [Google Scholar] [CrossRef]
  18. Vionis, P.; Kotsilieris, T. The potential of blockchain technology and smart contracts in the energy sector: A review. Appl. Sci. 2023, 14, 253. [Google Scholar] [CrossRef]
  19. Santos, L.; Gomes, A.; Rupino, P. Energy trading using blockchain: Smart contracts functionalities—A systematic review. Energy Strategy Rev. 2025, 61, 101825. [Google Scholar]
  20. Evdokimov, V.; Kudin, A.; Chikhladze, V.; Artemchuk, V. A Blockchain Architecture for Hourly Electricity Rights and Yield Derivatives. FinTech 2025, 5, 2. [Google Scholar] [CrossRef]
  21. Blinov, I.V.; Parus, Y.V.; Artemchuk, V.O. Prosumer Operation Planning Model in the Retail Electricity Market. Electrodynamics 2026, 1, 50–61. [Google Scholar] [CrossRef]
  22. Kovalchuk, L.; Vykhlo, A. Estimation of the probability of success of a frontrunning attack on smart contracts. Cybern. Syst. Anal. 2024, 60, 881–890. [Google Scholar] [CrossRef]
  23. Vykhlo, A.; Kovalchuk, L. Estimation of the Probability of Success of a Suppression Attack. Theor. Appl. Cybersecur. 2025, 7, 65–70. [Google Scholar] [CrossRef]
  24. Nakamoto, S. A Peer-to-Peer Electronic Cash System. 2008. Available online: https://bitcoin.org/bitcoin.pdf (accessed on 18 December 2025).
  25. Kovalchuk, L.; Kaidalov, D.; Shevtsov, O.; Nastenko, A.; Rodinko, M.; Oliynykov, R. Analysis of splitting attacks on Bitcoin and GHOST consensus protocols. In Proceedings of the 2017 9th IEEE International Conference on Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications (IDAACS); IEEE: Piscataway, NJ, USA, 2017; Volume 2, pp. 978–982. [Google Scholar]
  26. Nijsse, J.; Litchfield, A. A Taxonomy of Blockchain Consensus Methods. Cryptography 2020, 4, 32. [Google Scholar] [CrossRef]
  27. Johar, S.; Ahmad, N.; Asher, W.; Cruickshank, H.; Durrani, A. Research and Applied Perspective to Blockchain Technology: A Comprehensive Survey. Appl. Sci. 2021, 11, 6252. [Google Scholar] [CrossRef]
  28. Rathod, T.; Jadav, N.; Alshehri, M.; Tanwar, S.; Sharma, R.; Felseghi, R.A.; Raboaca, M. Blockchain for Future Wireless Networks: A Decade Survey. Sensors 2022, 22, 4182. [Google Scholar] [CrossRef]
  29. Pincheira, M.; Antonini, M.; Vecchio, M. Integrating the IoT and Blockchain Technology for the Next Generation of Mining Inspection Systems. Sensors 2022, 22, 899. [Google Scholar] [CrossRef]
  30. Susanto, H.; Kemaluddin, N. Innovative Blockchain-Based Tracking Systems, A Technology Acceptance for Cross-Border Runners during and Post-Pandemic. Sustainability 2023, 15, 6519. [Google Scholar] [CrossRef]
  31. Auhl, Z.; Chilamkurti, N.; Alhadad, R.; Heyne, W. A Comparative Study of Consensus Mechanisms in Blockchain for IoT Networks. Electronics 2022, 11, 2694. [Google Scholar] [CrossRef]
  32. Huang, H.; Yin, Z.; Chen, Q.; Zheng, J.; Luo, X.; Ye, G.; Peng, X.; Zheng, Z.; Guo, S. BrokerChain: A Blockchain Sharding Protocol by Exploiting Broker Accounts. IEEE Trans. Netw. 2025, 33, 1930–1945. [Google Scholar] [CrossRef]
  33. Jie, W.; Qiu, W.; Koe, A.S.V.; Li, J.; Wang, Y.; Wu, Y.; Li, J.; Zheng, Z. A Secure and Flexible Blockchain-Based Offline Payment Protocol. IEEE Trans. Comput. 2024, 73, 408–421. [Google Scholar] [CrossRef]
  34. Badertscher, C.; Maurer, U.; Tschudi, D.; Zikas, V. Bitcoin as a Transaction Ledger: A Composable Treatment. J. Cryptol. 2024, 37, 18. [Google Scholar] [CrossRef]
  35. Garay, J.; Kiayias, A.; Leonardos, N. The Bitcoin Backbone Protocol: Analysis and Applications; Springer: London, UK, 2015; pp. 281–310. [Google Scholar] [CrossRef]
  36. Karpinski, M.; Kovalchuk, L.; Kochan, R.; Oliynykov, R.; Rodinko, M.; Wieclaw, L. Blockchain Technologies: Probability of Double-Spend Attack on a Proof-of-Stake Consensus. Sensors 2021, 21, 6408. [Google Scholar] [CrossRef]
  37. Rosenfeld, M. Analysis of Hashrate-Based Double Spending. arXiv 2014, arXiv:1402.2009. [Google Scholar] [CrossRef]
  38. Pinzón, C.; Rocha, C. Double-spend Attack Models with Time Advantage for Bitcoin. Electron. Notes Theor. Comput. Sci. 2016, 329, 79–103. [Google Scholar] [CrossRef]
  39. Grunspan, C.; Pérez-Marco, R. Double Spend Races. Int. J. Theor. Appl. Financ. 2017, 21, 1850053. [Google Scholar] [CrossRef]
  40. Incomplete Gamma Function. Available online: https://en.wikipedia.org/wiki/Incomplete_gamma_function (accessed on 18 December 2025).
  41. Khamis, S. Some Basic Properties of the Incomplete Gamma Function Ratio. Ann. Math. Stat. 1965, 36, 926–937. [Google Scholar] [CrossRef]
  42. Kovalchuk, L.; Kaidalov, D.; Nastenko, A.; Rodinko, M.; Shevtsov, O.; Oliynykov, R. Decreasing security threshold against double spend attack in networks with slow synchronization. Comput. Commun. 2020, 154, 75–81. [Google Scholar] [CrossRef]
  43. Naz, S.; Siddiqui, M.J.; Lee, S.U.J. S&SEM: A Secure and Speed-Up Election Mechanism for PoS-Based Blockchain Network. Mathematics 2024, 12, 3263. [Google Scholar] [CrossRef]
  44. Li, W.; Deng, X.; Liu, J.; Yu, Z.; Lou, X. Delegated Proof of Stake Consensus Mechanism Based on Community Discovery and Credit Incentive. Entropy 2023, 25, 1320. [Google Scholar] [CrossRef]
  45. Buterin, V. Ethereum white paper. GitHub Repos. 2013, 1, 5–7. [Google Scholar]
  46. Kalodner, H.; Goldfeder, S.; Chen, X.; Weinberg, S.M.; Felten, E.W. Arbitrum: Scalable, private smart contracts. In Proceedings of the 27th USENIX Security Symposium (USENIX Security 18); USENIX Association: Berkeley, CA, USA, 2018; pp. 1353–1370. [Google Scholar]
  47. Armstrong, M. Ethereum, Smart Contracts and the Optimistic Roll-Up; University of Dublin: Dublin, Ireland, 2021. [Google Scholar]
  48. Kovalchuk, L.; Kostanda, V.; Marukhnenko, O.; Pozhylenkov, O. Achieving security in Proof-of-Proof protocol with non-zero synchronization time. Mathematics 2022, 10, 2422. [Google Scholar] [CrossRef]
  49. Chorey, P. Checkpoint-Based Blockchain Approach for Securing Online Transaction; Springer: London, UK, 2022; p. 12. [Google Scholar] [CrossRef]
  50. King, S.; Nadal, S. Ppcoin: Peer-to-Peer Crypto-Currency with Proof-of-Stake. Available online: https://bitcoin.peryaudo.org/vendor/peercoin-paper.pdf (accessed on 18 December 2025).
  51. Kiayias, A.; Russell, A.; David, B.; Oliynykov, R. Ouroboros: A provably secure proof-of-stake blockchain protocol. In Proceedings of the 37th Annual International Cryptology Conference, Santa Barbara, CA, USA, 20–24 August 2017; Volume 10401, pp. 357–388. [Google Scholar]
  52. David, B.M.; Gazi, P.; Kiayias, A.; Russell, A. Ouroboros Praos: An Adaptively-Secure, Semi-Synchronous Proof-of-Stake Protocol. IACR Cryptology ePrint Archive. 2017. Available online: https://eprint.iacr.org/2017/573 (accessed on 18 December 2025).
  53. Badertscher, C.; Gazi, P.; Kiayias, A.; Russell, A.; Zikas, V. Ouroboros Genesis: Composable Proof-of-Stake Blockchains with Dynamic Availability. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security; ACM: New York, NY, USA, 2018. [Google Scholar]
  54. Badertscher, C.; Gazi, P.; Kiayias, A.; Russell, A.; Zikas, V. Ouroboros Chronos: Permissionless Clock Synchronization via Proof-of-Stake. IACR Cryptology ePrint Archive 2019. Available online: https://eprint.iacr.org/2019/838 (accessed on 18 December 2025).
  55. Daian, P.; Pass, R.; Shi, E. Snow White: Provably Secure Proofs of Stake. 2016. Available online: https://eprint.iacr.org/2016/919 (accessed on 18 December 2025).
  56. Gencer, A.; Van Renesse, R.; Sirer, E. Short Paper: Service-Oriented Sharding for Blockchains; Springer International Publishing: Cham, Switzerland, 2017. [Google Scholar] [CrossRef]
  57. Bitcoin. BlockChain.Checkpoint. 2013. Available online: https://hackage.haskell.org/package/bitcoin-hs-0.0.1/docs/Bitcoin-BlockChain-Checkpoint.html (accessed on 18 December 2025).
  58. Bitcoin Cash ABC’s Rolling 10 Block Checkpoints. 2018. Available online: https://blog.bitmex.com/bitcoin-cash-abcs-rolling-10-block-checkpoints/ (accessed on 18 December 2025).
  59. The Beacon Chain Ethereum 2.0 Explainer You Need to Read First. 2022. Available online: https://ethos.dev/beacon-chain (accessed on 18 December 2025).
  60. Transaction Construction Guides. 2022. Available online: https://wiki.polkadot.network/docs/build-transaction-construction (accessed on 18 December 2025).
  61. Core Concepts. Introduction to Cardano: The Big Picture. 2025. Available online: https://developers.cardano.org/docs/stake-pool-course/introduction-to-cardano/ (accessed on 18 December 2025).
  62. Feller, W. An Introduction to Probability Theory and Its Applications; Wiley: Hoboken, NJ, USA, 1991; Volume 1. [Google Scholar]
  63. Kovalchuk, L.; Oliynykov, R.; Rodinko, M. Probability of Double Spend Attack for PoS Consensus with Ouroboros Praos Slot Leader Election Procedure. In Proceedings of the 24th Central European Conference on Cryptology, Warsaw, Poland, 20–21 June 2024; pp. 46–49. [Google Scholar]
Figure 1. Illustration of an attack for the PoS-based blockchain.
Figure 1. Illustration of an attack for the PoS-based blockchain.
Sustainability 18 01673 g001
Figure 2. Double-spend attack probabilities for blockchain with checkpoints ( n = 50 ).
Figure 2. Double-spend attack probabilities for blockchain with checkpoints ( n = 50 ).
Sustainability 18 01673 g002
Figure 3. Double-spend attack probabilities for blockchain with checkpoints ( n = 150 ).
Figure 3. Double-spend attack probabilities for blockchain with checkpoints ( n = 150 ).
Sustainability 18 01673 g003
Figure 4. Double-spend attack probabilities for blockchain with checkpoints ( n = 300 ).
Figure 4. Double-spend attack probabilities for blockchain with checkpoints ( n = 300 ).
Sustainability 18 01673 g004
Table 1. Double-spend attack probability comparison of confirmation block number in classic blockchain system vs blockchain system with checkpoints (for n = 50 , 100 , 150 , 200 , 250 ).
Table 1. Double-spend attack probability comparison of confirmation block number in classic blockchain system vs blockchain system with checkpoints (for n = 50 , 100 , 150 , 200 , 250 ).
Adversary’s RatioA Classic Case of a Blockchain SystemA Blockchain System Containing CheckpointsCompare
nqz Attack Probabilities z Attack Probabilities Difference in Percent
500.160.00059141216000060.000591412160000
500.1590.00059005801748490.000590058017480
500.2130.000738096069111130.000738096068490
500.25200.000747285192981200.000747281353530.00051
500.3320.000875915224973320.000873053411560.32672
500.35500.002188394725421500.0014505614765633.71573
500.4500.043860884260170500.0270991977570138.21557
500.45500.317304397874194500.1827281846861442.41234
1000.160.00059141216000060.000591412160000
1000.1590.00059005801748490.000590058017480
1000.2130.000738096069111130.000738096069110
1000.25200.000747285192981200.000747285192980
1000.3320.000875915224973320.000875915086570.00002
1000.35580.000965098041430580.000963857105850.12858
1000.41000.0043201898761011000.0026354033561838.99797
1000.451000.1567758654244051000.0887006155616543.42202
1500.160.00059141216000060.000591412160000
1500.1590.00059005801748490.000590058017480
1500.2130.000738096069111130.000738096069110
1500.25200.000747285192981200.000747285192980
1500.3320.000875915224973320.000875915224960
1500.35580.000965098041430580.000965092625660.00056
1500.41330.0009942045542141310.000992691002230.15224
1500.451500.0827480032540181500.0464704392921043.84101
2000.160.00059141216000060.000591412160000
2000.1590.00059005801748490.000590058017480
2000.2130.000738096069111130.000738096069110
2000.25200.000747285192981200.000747285192980
2000.3320.000875915224973320.000875915224970
2000.35580.000965098041430580.000965098011180
2000.41330.0009942045542141330.000988168133740.60716
2000.452000.0450941071370972000.0252178916255244.07719
2500.160.00059141216000060.000591412160000
2500.1590.00059005801748490.000590058017480
2500.2130.000738096069111130.000738096069110
2500.25200.000747285192981200.000747285192980
2500.3320.000875915224973320.000875915224970
2500.35580.000965098041430580.000965098041240
2500.41330.0009942045542141330.000993697631050.05099
2500.452500.0250540060603462500.0139724646541944.23062
Table 2. Double-spend attack probability comparison of confirmation block number in classic blockchain system vs. blockchain system with checkpoints (for n = 300 , 350 , 400 , 450 , 500 ).
Table 2. Double-spend attack probability comparison of confirmation block number in classic blockchain system vs. blockchain system with checkpoints (for n = 300 , 350 , 400 , 450 , 500 ).
Adversary’s RatioA Classic Case of a Blockchain SystemA Blockchain System Containing CheckpointsCompare
nqz Attack Probabilities z Attack Probabilities Difference in Percent
3000.160.00059141216000060.000591412160000
3000.1590.00059005801748490.000590058017480
3000.2130.000738096069111130.000738096069110
3000.25200.000747285192981200.000747285192980
3000.3320.000875915224973320.000875915224970
3000.35580.000965098041430580.000965098041430
3000.41330.0009942045542141330.000994157002560.00478
3000.453000.0141031722178583000.0078499701806844.33898
3500.160.00059141216000060.000591412160000
3500.1590.00059005801748490.000590058017480
3500.2130.000738096069111130.000738096069110
3500.25200.000747285192981200.000747285192980
3500.3320.000875915224973320.000875915224970
3500.35580.000965098041430580.000965098041430
3500.41330.0009942045542141330.000994199805330.00048
3500.453500.0080145688415293500.0044545073375744.41988
4000.160.00059141216000060.000591412160000
4000.1590.00059005801748490.000590058017480
4000.2130.000738096069111130.000738096069110
4000.25200.000747285192981200.000747285192980
4000.3320.000875915224973320.000875915224970
4000.35580.000965098041430580.000965098041430
4000.41330.0009942045542141330.000994204059940.00005
4000.454000.0045875695931624000.0025468935670744.48273
4500.160.00059141216000060.000591412160000
4500.1590.00059005801748490.000590058017480
4500.2130.000738096069111130.000738096069110
4500.25200.000747285192981200.000747285192980
4500.3320.000875915224973320.000875915224970
4500.35580.000965098041430580.000965098041430
4500.41330.0009942045542141330.000994204501220.00001
4500.454500.0026409479617554500.0014648535505144.53304
5000.160.00059141216000060.000591412160000
5000.1590.00059005801748490.000590058017480
5000.2130.000738096069111130.000738096069110
5000.25200.000747285192981200.000747285192980
5000.3320.000875915224973320.000875915224970
5000.35580.000965098041430580.000965098041430
5000.41330.0009942045542141330.000994204548400
5000.455000.0015273578790584970.0009742572729736.21290
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.

Share and Cite

MDPI and ACS Style

Kovalchuk, L.; Kolomiiets, A.; Korchenko, O.; Rodinko, M. Security Analysis of Double-Spend Attack in Blockchains with Checkpoints for Resilient Decentralized Energy Systems in Smart Regions. Sustainability 2026, 18, 1673. https://doi.org/10.3390/su18031673

AMA Style

Kovalchuk L, Kolomiiets A, Korchenko O, Rodinko M. Security Analysis of Double-Spend Attack in Blockchains with Checkpoints for Resilient Decentralized Energy Systems in Smart Regions. Sustainability. 2026; 18(3):1673. https://doi.org/10.3390/su18031673

Chicago/Turabian Style

Kovalchuk, Lyudmila, Andrii Kolomiiets, Oleksandr Korchenko, and Mariia Rodinko. 2026. "Security Analysis of Double-Spend Attack in Blockchains with Checkpoints for Resilient Decentralized Energy Systems in Smart Regions" Sustainability 18, no. 3: 1673. https://doi.org/10.3390/su18031673

APA Style

Kovalchuk, L., Kolomiiets, A., Korchenko, O., & Rodinko, M. (2026). Security Analysis of Double-Spend Attack in Blockchains with Checkpoints for Resilient Decentralized Energy Systems in Smart Regions. Sustainability, 18(3), 1673. https://doi.org/10.3390/su18031673

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop