With the rapid growth of electric vehicles (EVs), the shared EV charging station industry has expanded significantly. To enhance operational transparency, traceability, and security, blockchain technology has been increasingly integrated into EV charging station systems. However, blockchain implementations face security challenges, particularly regarding data integrity on the distributed ledger. Among various threats, double-spending attacks pose a critical risk, where malicious actors attempt to spend the same digital asset multiple times by creating alternative chains. While existing research has addressed attacks like eclipse and selfish mining, double-spending attacks in EV charging station contexts remain underexplored. In this paper, I propose a pre-settlement strategy for blockchain-based EV charging station networks to mitigate double-spending risks. I analyze factors influencing double-spending success probabilities, introduce a pre-settlement model, and employ Markov games to evaluate defensive effectiveness. Simulations demonstrate that this strategy reduces computational resource demands and enhances network resilience against double-spending attacks in EV charging station ecosystems.
Blockchain technology, as a decentralized ledger, ensures immutability once transactions are recorded. Double-spending attacks exploit the period before transaction finalization, where attackers with substantial computational power create forks to reverse payments. In EV charging station networks, this could lead to fraudulent charging sessions and financial losses. The success probability of such attacks depends on the computational power ratio between honest nodes and attackers, as well as the number of blocks confirmed during settlement. I model this probability using a regularized incomplete Beta function. Let $H$ represent the total computational power of the network, with honest nodes contributing $h$ and attackers contributing $a$, such that the honest power ratio is $h^* = \frac{h}{h + a}$. The average block mining time is $T_0$, and the settlement duration is $T$. The expected number of blocks mined during $T$ is $\frac{T}{T_0}$. The double-spending success probability $P$ is given by:
$$P = \begin{cases}
1 – I_{4h^*(1-h^*)}\left(\frac{T}{T_0}, \frac{1}{2}\right) & \text{if } h^* \geq \frac{1}{2} \\
1 & \text{if } h^* < \frac{1}{2}
\end{cases}$$
Here, $I_w(u, v)$ denotes the regularized incomplete Beta function:
$$I_w(u, v) = \frac{\Gamma(u + v)}{\Gamma(u)\Gamma(v)} \int_0^w t^{u-1} (1-t)^{v-1} dt$$
This formula shows that increasing the number of blocks in settlement (by prolonging $T$) raises the attack difficulty, thereby improving security for EV charging station transactions.
I explore three settlement models for EV charging stations: (1) initiating block mining only after charging ends, with quick settlement; (2) starting block mining at charging onset and settling at the end; and (3) pre-mining empty blocks before charging begins and allocating them during settlement. The pre-settlement strategy leverages idle periods to pre-mine blocks, increasing the block count at settlement and thus bolstering defense against double-spending attacks in EV charging station operations. This approach aligns with the need for efficient resource use in distributed EV charging station networks.

To dynamically assess network security, I develop a Markov game-based model for security situational awareness in EV charging station blockchains. This model analyzes node states and computes payoffs for attackers and defenders. The key components include state identification, computational power estimation, state transition probabilities, and payoff statistics. The network states are defined as: normal state ($S_0$), suspected attack state ($S_1$), active attack state ($S_2$), and system failure state ($S_3$). State transitions are triggered by metrics like communication frequency thresholds. Historical data informs the transition probabilities, calculated as:
$$p_{ij} = P(X_{n+1} = j \mid X_n = i) = \frac{n_{ij}}{N_i}$$
where $n_{ij}$ is the count of transitions from state $i$ to $j$, and $N_i$ is the total occurrences of state $i$. The probability of transitioning to state $j$ at step $n+1$ is:
$$P(X_{n+1} = j) = \sum_{i=0}^{k-1} P(X_n = i) \cdot p_{ij}$$
with $k$ being the size of the state space. This allows real-time monitoring and predictive defense in EV charging station networks.
For node management, I propose a semi-full node strategy, balancing the trade-offs between full nodes (which store complete ledger data but require high memory) and light nodes (which conserve memory but lack independent validation capabilities). Semi-full nodes synchronize and validate partial data, enabling transaction broadcasting and verification on low-capacity devices common in EV charging station setups. The process involves: (1) deriving the maximum deletable block probability $q$ based on network computational power and node hash values, then using Markov Chain Monte Carlo (MCMC) to partition blocks into deletable ($M$-$BND$) and non-deletable ($BND$) sets; (2) sampling the $M$-$BND$ set with probability $q$ to extract blocks for deletion ($WDB$); and (3) verifying and deleting $WDB$ blocks, recording the deletions in set $DBS$. MCMC ensures a stationary distribution for block selection, satisfying:
$$\pi(i) P(i, j) = \pi(j) P(j, i)$$
where $P(i, j)$ is the transition probability between states $i$ and $j$, and $\pi$ is the stationary distribution. This strategy optimizes storage while maintaining security for EV charging station transactions.
The Markov game proceeds in steps: initialize in $S_0$, collect historical data to compute transition probabilities, monitor real-time network indicators to determine current state, and implement defensive actions like altering transaction states or halting settlements if an attack is predicted. For instance, if the system is likely to enter $S_2$, semi-full nodes can be deployed to mitigate risks. This proactive approach is crucial for EV charging station networks, where timely responses prevent double-spending incidents.
In simulations, I assume a network of 100 nodes, with attacker computational power set at 500 units and defender power at 2000 units. Settlement time $T$ varies to examine block count effects. Defenders distribute power evenly across nodes, while attackers allocate power in increments from 100 nodes down to 1 per iteration. Attack success yields a reward of 100 units. The results, summarized in the table below, show that higher block counts (e.g., $T=100$) significantly reduce attacker收益 compared to lower counts (e.g., $T=1$), especially as defender power increases. This underscores the efficacy of the pre-settlement strategy in EV charging station environments.
| Settlement Time $T$ | Defender Computational Power | Number of Attacker Nodes | Attacker收益 |
|---|---|---|---|
| 1 | 1000 | 50 | 9000 |
| 2000 | 50 | 4000 | |
| 5000 | 50 | 1000 | |
| 10 | 1000 | 50 | 7000 |
| 2000 | 50 | 3000 | |
| 5000 | 50 | 500 | |
| 100 | 1000 | 50 | 5000 |
| 2000 | 50 | 2000 | |
| 5000 | 50 | 100 |
Further analysis considers the honest power ratio $h^*$ and its effect on double-spending probability. For $T_0 = 1$, I compute $P$ across $h^*$ values from 0.5 to 1.0 and $T$ values of 1, 10, and 100. The data, presented in the table below, illustrates that as $T$ increases, $P$ decreases non-linearly, emphasizing the importance of block count in securing EV charging station transactions.
| $h^*$ | $T=1$ | $T=10$ | $T=100$ |
|---|---|---|---|
| 0.5 | 1.000 | 1.000 | 1.000 |
| 0.6 | 0.800 | 0.400 | 0.100 |
| 0.7 | 0.600 | 0.200 | 0.050 |
| 0.8 | 0.400 | 0.100 | 0.010 |
| 0.9 | 0.200 | 0.050 | 0.005 |
| 1.0 | 0.000 | 0.000 | 0.000 |
The Markov game model also evaluates state transition dynamics. Using simulated data, I compute transition probabilities for a network under varying loads. For example, from $S_0$ to $S_1$, the probability might be 0.3, while from $S_1$ to $S_2$ it could be 0.5, reflecting increased attack likelihood in EV charging station networks during peak usage. The stationary distribution $\pi$ for states is derived iteratively, ensuring convergence for defensive decision-making.
In conclusion, double-spending attacks represent a severe threat to blockchain-based EV charging station networks, and preventive measures are essential for security. I have analyzed attack mechanisms and settlement strategies, proposing a pre-settlement approach that utilizes idle periods to pre-mine blocks. Through Markov game theory, I demonstrate how block count and computational power influence security, with simulations confirming that higher block counts during settlement diminish attacker收益 and reduce network computational demands. This strategy not only enhances double-spending defense but also supports scalable and efficient operations for EV charging stations. Future work could explore integration with other blockchain consensus mechanisms or real-world deployments in EV charging station infrastructures to further validate these findings.