1. Introduction
The rapid development of blockchain technology has accelerated the popularization of the Internet of Things (IoT). Along with the increasing scale of IoT, the blockchain technology based on directed acyclic graph (DAG) structure has attracted more and more attention in IoT with its high concurrency and high scalability. At present, the most representative one is IOTA (Internet of Things application) [
1,
2,
3].
IOTA is a revolutionary new cryptocurrency system specially designed for IoT. It overcomes the inefficiency in the existing blockchain design by replacing the sequence distributed ledger with the distributed ledger based on the DAG structure, named the Tangle, and creates a new method for reaching the consensus of the decentralized P2P system. IOTA realizes zero transaction fees, high concurrency, and unlimited scalability to complete the free transaction between machines and provide the underlying public chain technology for IoT. IoT architecture based on IOTA Tangle is shown in
Figure 1. The left part in the figure is the IoT device layer (composed of sensors, bar codes and radio frequency electronic tags, etc.), which is responsible for receiving user requests and collecting information in real-time and transmitting them to the client layer (composed of IOTA wallets or applications running on computers or smartphones). After a transaction is packaged and generated by the client, it is sent to the IOTA node (composed of the IoT device with a node software to read and write access to the Tangle) for processing. If the transaction is valid and follows the protocol standards, the IOTA node first updates the local ledger (the right part in the figure) after verification and then broadcasts the updated ledger to other IOTA nodes through P2P protocol to complete the consensus process [
4].
However, due to the particularity of the DAG structure, the security of IOTA will face major challenges. IOTA is subject to a variety of attacks [
1], among which the parasite chain (PC) attack is the most common. If the attack is successful, Tangle’s historical records will be tampered with, and the attacker will realize double-spending. In this paper, we focus on the PC attack. Similar to selfish mining by nodes in the single-chain architecture [
5,
6,
7,
8], malicious nodes privately create parasite chains and broadcast them when the opportunities are ripe, in order to replace the corresponding legal branches in the main tangle; however, so far, few people look for the cause of PC attacks from IOTA nodes themselves. There is an obvious game relationship between IOTA nodes. As a player, each node will choose its strategy to maximize its utility when given the strategies of other players. It should be noted that the cost of launching a PC attack is an important part of building a game revenue matrix; a survey found that there is no expression to calculate the cost of the PC attack directly now [
9,
10,
11,
12,
13]. In addition, in the actual scenario of IoT, the node’s malicious behavior is studied through the classical game theory based on the assumption of “complete rationality” [
14,
15,
16,
17], but the static results cannot meet the actual needs of IOTA, nor can they reflect the dynamic change of IOTA node’s strategic behavior and the evolution process that eventually tends to be stable; therefore, it is necessary to analyze PC attacks using game theory, but it is particularly important to find a game method more suitable for IOTA scenarios. In light of the above observations and given literature [
1], we study what circumstances IOTA nodes actively launch PC attacks; therefore, we should design a scheme that can effectively detect and prevent parasite chain attacks.
It is challenging to achieve the above goal in that: (1) Nodes can join or exit the IOTA network at any time. We must ensure that enough nodes can synchronize the Tangle, but it is difficult to determine the number of effective working nodes. (2) The distributed ledger based on the DAG structure solves the problems of high concurrency and high scalability of IoT and increases the growth randomness of the ledger with time. The randomness raises the complexity of the cost of PC attacks launched by computing nodes. (3) Affected by the dynamic change of the Tangle, the initial behavior choices of nodes are not necessarily optimal, so it is hard to analyze and obtain the final evolutionary stability strategies of nodes.
In this paper, for the first time, we solve the problem of PC attacks in IOTA blockchain networks by introducing epidemic dynamics models and evolutionary game theory. With the help of the improved epidemic model, our proposed scheme can determine the number of nodes that synchronize the Tangle, and provide a guarantee for the normal operation of IOTA by monitoring the change of the number of nodes in real-time. Evolutionary game theory is a combination of game theory analysis and dynamic evolutionary process analysis. It studies how bounded rational individuals evolve in dynamic processes, how to learn adaptively in repeated games, and choose the optimal strategy to maximize their interests [
18]. In this study, the dynamic evolution process of IOTA nodes’ behavior strategies was analyzed through evolutionary game, and the key factors inducing nodes to launch PC attacks were found. To realize this scheme, the main contributions of this paper are as follows:
- (1)
We introduce an improved epidemic model TG_SEI. IOTA can effectively synchronize the number of nodes in the Tangle estimated by using the TG_SEI model, which is not only an important indicator to measure whether IOTA is running normally, but also an important part of the PC attack cost.
- (2)
We propose a computational expression for the PC attack cost. The transaction involves multiple key links, from creation to issuance. If a malicious node wants to successfully launch a PC attack, an additional cost must be paid. We used the method of dividing the time according to the key points of events to complete the cost accounting of each stage.
- (3)
We designed the parasite chain attack prevention algorithms based on price splitting. Using evolutionary game theory to analyze the behaviors of IOTA nodes, it was found that the commodity prices are the main factor that triggers PC attacks. Moreover, we predicted the concentrated time slot of PC attacks, which makes it more efficient to resist PC attacks.
The rest of this paper is organized as follows.
Section 2 describes the related work.
Section 3 presents the background.
Section 4 introduces the improved epidemic model TG_SEI.
Section 5 gives the details of the evolution game analysis of nodes in IOTA, followed by the proposed algorithm in
Section 6.
Section 7 concludes the whole paper.
2. Related Work
The emergence of blockchain technology has accelerated the development of decentralization, privacy protection, and encrypted search of IoT [
19,
20,
21,
22,
23], especially in crowdsensing systems [
24], fog computing [
25,
26], privacy protection [
27,
28,
29], and crowdsourcing [
30,
31,
32]. On this basis, the blockchain system based on DAG provides a guarantee for the high concurrency, high scalability, and zero handling fee of IoT. The most representative is IOTA.
After the IOTA project was launched in 2015, Serguei Popov [
1] explained the working principle of the Tangle in the relevant white paper, proposed an MCMC algorithm to provide an attachment strategy for new transactions arriving, and finally listed a variety of possible attack scenarios. Among them, the PC attack, as a common double-spending attack, has attracted extensive attention.
2.1. PC Attack
In [
1], the authors first described the formation and attack principle of the parasite chain. Cai, D [
9] pointed out that the coordinator still played a major role in IOTA. Once removed, it would face security problems caused by parasite chain attacks. In the parasite chain attack scenario, Yixin Li et al. [
10] used the Markov chain model to describe the consistency process behavior of the DAG ledger under dynamic load and tested the probability of a successful attack under different network load modes. Philip Staupe [
11] studied the method to reduce the risk of a double-spending attack by analyzing the probability absorbed by the parasite chain in the MCMC random walk. A. Cullen et al. [
12] analyzed the effectiveness of the Markov chain Monte Carlo (MCMC) algorithm by using a matrix model and proposed an extended MCMC algorithm to improve the resistance of the distributed ledger to these attacks. Andreas Penzkofer et al. [
13] proposed a detection mechanism for parasite chain attacks. Honest nodes improved the tip selection algorithm by detecting the structure of the parasite chain to prevent the parasite chain from successfully launching attacks. The above studies fully show that the parasite chain attack is one of the major security risks of IOTA and show that further research on the parasite chain attack has practical significance. Observing these studies, it is found that no one has analyzed the impact of node behavior strategies on PC attacks from the perspective of the IOTA nodes themselves.
2.2. Blockchain and Game Theory
At present, game theory is mainly used to analyze the mining behaviors of nodes in the blockchain, the computing power competition between mining pools, and the blockchain consensus and incentive mechanisms. Liu Z et al. [
14] summarized the application of game theory in blockchain and pointed out that game theory was a mathematical model for studying the strategic interaction between rational decision makers, which was naturally applicable to the decision making of all consensus nodes in the blockchain network. Changbing Tang et al. [
15] understood and analyzed the PoW consensus algorithm from the perspective of game theory, providing new ideas and methods for further designing consensus algorithms based on game theory. Lihua Song et al. [
16] analyzed some problems in the design of the bitcoin incentive mechanism and used the idea of game theory to design an anti-collusion smart contract for clients in cloud computing. Shi H et al. [
17] gave the mining pool the power to unilaterally control the miners’ income using the zero-determinant theory and stimulated the miners’ cooperation through the proposed zero determinant incentive mechanism. Xuan S et al. [
33] proposed a data-sharing incentive model of smart contract blockchain based on evolutionary game theory. Their model was proposed to solve the challenges of establishing mutual trust and improving user participation in data sharing. According to the increasing demand for blockchain scalability and sustainability in various fields, Shashank Motepalli et al. [
34] proposed a reward mechanism framework. Then, they further analyzed how participants’ behavior evolved with the reward mechanism by using evolutionary game theory.
The above research shows that it is feasible and a research hotspot to analyze the behavior of blockchain nodes through game theory, but IOTA, as a blockchain based on the DAG structure, is rarely involved in game methods. Serguei Popov et al. [
35] have proved that there is a Nash equilibrium in IOTA, but it is necessary to conduct in-depth analysis on the malicious behavior of nodes in IOTA to resist attacks.
However, the current literature has not paid too much attention to the impact of IOTA nodes’ own behaviors on IOTA security, and no one has analyzed IOTA nodes’ behavior strategies through evolutionary game theory. Under the premise of “bounded rationality” of participants, we put forward the cost calculation method of launching a PC attack, construct the payoff matrix to analyze the dynamic behaviors of IOTA nodes, calculate the evolutionary stable strategy, and finally find an effective algorithm to prevent PC attacks.
4. Improved Epidemic Model TG_SEI
The number of effective nodes in the synchronous ledger (hereinafter referred to as the number of synchronous nodes) reaches a certain threshold (below the threshold, IOTA cannot operate normally. The threshold is set according to the actual situation of IOTA), that can ensure the normal operation of IOTA. Monitoring the number of synchronization nodes in IOTA regularly can reflect the service level of the network to a certain extent. If the synchronization node is seriously missing, the service quality of IOTA will be reduced; therefore, regular monitoring, timely warning, and troubleshooting must be carried out. In addition, the number of synchronization nodes is also an important part of calculating the attack cost; therefore, it is very important to find a method to solve the number of synchronization nodes. The process of the IOTA node synchronizing to the Tangle is very similar to the spread of some viruses in the infectious disease model [
38,
39,
40]; therefore, we adopt the improved epidemic model TG_ SEI to estimate the number of synchronization nodes at any time period. IOTA nodes have three statuses: invalid synchronization status S, the Tangle synchronization delay status E, and effective synchronization status I. Nodes in the S status have not synchronized the Tangle yet. The nodes in the E status synchronize the Tangle but fail to forward it to other nodes in time due to delay. The delay is generally related to the actual network delay threshold. For example, if it is greater than 50 ms, the E status will appear. Nodes in the I status synchronize the Tangle and immediately forward it to other nodes. Assuming that the nodes in the S status connect the nodes in the I status, the Tangle is synchronized.
In the beginning, only one node G is in the I status (that is, the node issuing the Genesis transaction) while the other IOTA nodes are in the S status. After node G issues the transaction, it starts broadcasting the Tangle to the whole network. The nodes directly connecting to node G to synchronize the Tangle will change status S to status I or E. Due to network delay, some of the nodes that synchronized the Tangle are temporarily in the E status. When the delay is alleviated, the nodes in the E status will continue to forward the Tangle to other nodes. With the continuous spread of the Tangle ledger, the connectivity scale between nodes will gradually expand until the whole IOTA network. Most of the nodes that finally synchronized the Tangle are in the I status. In this spreading process, due to natural disasters, equipment failures, crashes, and other factors, a few nodes will not keep the ledger synchronized with node G’s and they are removed from the network.
Suppose that at any time t, denotes the number of nodes that have not synchronized the Tangle (also known as the number of invalid synchronization nodes). The movement of invalid synchronization nodes is random. During this period, very few nodes may not work or crash and be removed from the network. denotes the number of delayed nodes synchronizing the Tangle. Due to the uncertainty in the network link, there will be a certain delay in forwarding the Tangle. During this period, very few nodes may not work or crash and be removed from the network. denotes the number of nodes that fully synchronize to the Tangle and forward it (also known as the number of effective synchronization nodes). During this period, very few nodes may not work or crash and be removed from the network.
Let
M denote the total number of nodes in the IOTA at time
t. To simplify the calculation, the rate at which new nodes join or exit the IOTA is
; therefore,
is constant.
represents the average spreading rate of the IOTA Tangle, which is related to the average degree of the network.
represents the average delay rate of the synchronizing Tangle and meets
.
is related to the actual situation of the network. The greater the network delay, the larger the value of
.
indicates the conversion rate from status E to status I. Most nodes will synchronize the Tangle after delay. The improved epidemic model TG_SEI iteration form is as follows,
The evolution process of the synchronous nodes’ number is the same as that of
, that is, the final result of
evolution is the number of synchronous nodes in IOTA denoted as
X,
According to Equation (
3), two groups of possible equilibrium points of the equations are obtained, which are
and
,
. Because only when the basic reproduction number
, the Tangle of node G can be synchronized and forwarded by most other nodes; therefore, the equilibrium point
is the only asymptotically stable equilibrium point. When
and
,
, we can obtain
where parameters
,
,
, and
are greater than 0 and less than 1. For example, when
,
,
,
, and
, the probability curve of the number of synchronization nodes with time evolution based on the TG_SEI model is shown in
Figure 3. The red point line indicates the changing trend of the number of invalid synchronization nodes with time, which is decreasing. The blue dotted line indicates the changing trend of the number of effective synchronization nodes with time, which is increasing. The solid line indicates the changing trend of the number of synchronization delay nodes. After a certain delay, most of the nodes in E status will become nodes in I status.
To simplify the calculation, we set the number of nodes joining and exiting IOTA per unit time equal. In a real scenario, they may not be equal. The values of
,
,
, and
in the TG_SEI model can be obtained by (1) prediction of supervised learning model in machine learning or (2) analysis of the propagation mechanism and dynamics of the complex network [
41,
42].
5. Evolution Game Analysis of Nodes in IOTA
In IOTA, all nodes form a node group. Each node has an initial strategy about whether to choose a parasite chain attack. Nodes repeatedly randomly select other nodes from the group to play the game. In this process, nodes with a low payoff will change the strategy to imitate the high-payoff nodes, while low-payoff strategies will be gradually eliminated. After such continuous learning and adjustment, the node group will eventually reach an equilibrium state, which is that all nodes in the group will choose the ESS.
Creating transactions to issuing the transactions to the Tangle is a complex process. In this process, the Tangle is vulnerable to malicious attacks. One of the most-common attacks is PC attacks. In
Figure 4, a parasite chain is “generated” under a transaction in the Tangle where the red site is a conflict transaction. The parasite chains formed in the actual scene have different shapes and sizes, and the attacker can freely choose the number of transfers of the PC and decide which transfers the attacker confirms; therefore, this paper makes some restrictions on the PC. We only study the simple PC because it does not affect the generality.
5.1. Research Hypothesis and Parameter Description
We make the following assumptions.
Assumption 1. IOTA nodes are bounded rationality, that is, they cannot find the optimal strategy at the beginning of the game. It needs to learn constantly in the process of the game.
Assumption 2. The computational power cost consumed by node attack is large enough to enable the successful completion of the attack; the computational power cost of two nodes is the same.
Assumption 3. Each node purchases the same commodity at the same price.
Assumption 4. The change of node payoff caused by the change of market price of the currency is not considered.
Since the payoff matrix of the repeated game model is closely related to the specific payoff parameters of each game participant, the parameters are described as shown in
Table 1.
5.2. Transaction Number, Cumulative Weight, Time to Successfully Launch Parasite Chain Attack, and Its Cost Function
Let A be any node in IOTA. Node A may launch a parasite chain attack. If node A has a parasite chain at time t, before node A broadcasts the parasite chain to IOTA, the average rate of new transactions reaching the main Tangle is and the average rate of new transactions arriving at the parasite chain is .
- (1)
If node A launches a parasite chain attack successfully, the number of transactions issued is
If node A does not launch a parasite chain attack, the number of transactions issued is
- (2)
Cumulative weight
Suppose that node A issues a transaction tran1 to the main Tangle at time and waits for the merchant’s confirmation. At the same time, node A starts to build a parasite chain privately and generates a transaction tran2. Node A transfers the money used to transaction tran1 to the corresponding account of transaction tran2 in the parasite chain. That is, transaction tran1 and transaction tran2 have the same money but correspond to different accounts of node A. When the cumulative weight of tran1 reaches the merchant’s weight threshold at , the merchant accepts the transaction and delivers the goods. Once the difference between the cumulative weights of transaction tran2 and transaction tran1 is greater than , that is, , then node A can successfully launch a parasite chain attack and realize double spending. is the Tangle robustness level, which is related to AR. reflects the difficulty of the node to implement the malicious attack successfully. For and , see below for details.
At time
, the merchant accepts the cumulative weight threshold expression of transaction tran1 issued by node
A in the main Tangle is
At time
t, the cumulative weight of transaction tran1 in the main Tangle is
where
is the probability that the transaction is absorbed by the parasite chain after the honest node runs the MCMC algorithm [
11],
. It is worth noting that after the parasite chain is broadcast to the whole network, the parasite chain can no longer reference the transactions in the main Tangle. Because the honest node will check the historical consistency and will not accept the double-spending transaction as a valid transaction. At time
t, node A issues the cumulative weight of the corresponding double-spending transaction in the parasite chain as follows
- (3)
Time of successful parasite chain attack
Combined with Equations (
8)–(
10), the relationship expression of time
t is
Let ; is obtained by simplification.
- (4)
Cost function
Assuming that the actual number of effective synchronization nodes in IOTA at time
t is
X and the number of malicious nodes is
n, the cost function required for node
A to successfully launch a parasite chain attack is expressed as
If the node does not launch an attack, the cost function is
where
is the average cost of generating and issuing a transaction for the node and
is the average cost of verifying and disseminating an incoming transaction, and
,
.
5.3. Constructing Evolutionary Game Model and Results
The following two cases are discussed. One is that malicious nodes conspire to create the PC, and the attack cost is halved after malicious nodes cooperate. The other is that malicious nodes create PCs alone.
5.3.1. Nodes Conspire to Create the Parasite Chain
Analyze the payoff of node i and node j at time
t to construct the payoff matrix of the evolutionary game model shown in
Table 2.
For node
i (Note: the analysis method of node
j is the same as that of node
i, which will not be repeated later), the expected payoff of adopting the “attack” strategy is
Take the “no attack” strategy and the expected payoff is
The overall average expected payoff of node i is
From Equations (
15)–(
17), the replicator dynamics equation of the subject proportion of actors adopting the “attack” strategy is
When
, we can obtain three stable states
According to the value of , the ESS is discussed in three cases below.
- (1)
The ESS when
The condition of
is
Because of
, the replicator dynamics at this time only have two stable states
and
. The ESS
has the characteristics of resisting small interference. When the interference makes
, there is
. When the interference makes
, there is
. In the phase diagram of the replicator dynamics equation, the curve intersects the abscissa at several points. If the tangent slope at the intersection is negative, it is the ESS of the replicator dynamics in the evolutionary game; therefore, according to the above conditions,
and
, its ESS
. The replicator dynamics equation phase diagram is shown in
Figure 5. Nodes tend to launch parasite chain attacks.
- (2)
The ESS when
The condition of
is
At this time, the replicator dynamics only have two stable states
and
. Since
and
, its ESS is
. The replicator dynamics equation phase diagram is shown in
Figure 6. Nodes tend not to launch parasite chain attacks.
- (3)
The ESS when
The condition of
is
At this time, the replicator dynamics have three stable states. Since
and
, the corresponding replicator dynamics phase diagram is shown in
Figure 7.
When , its ESS is .
When , its ESS is .
The analysis shows that when the commodity price provided by the merchant is satisfied , that is, the commodity price is higher than the difference between the cost paid by the node to launch a parasite chain attack and the cost paid by not launching an attack, the node will choose to launch a parasite chain attack, because, compared with the original, the node will increase revenue and be profitable. When the commodity price provided by the merchant is satisfied , the node will not launch a parasite chain attack, because the attack cost is higher than the payoff, which will damage its interests and outweigh the loss. When the commodity price provided by the merchant is satisfied , if is included in , the node chooses not to attack because the probability of successfully launching a parasite chain attack is small. If falls in , the node will choose to launch an attack because the probability of successfully launching a parasite chain attack increases. Next, Matlab 2020a was used to simulate the above evolutionary game process.
- (1)
Assuming
,
, and
takes 2, 4, and 6, respectively, the strategy selection of node
i changes as shown in
Figure 8.
- (2)
Assuming
,
, and
takes 2,
, and
, respectively, the strategy selection of node
i changes as shown in
Figure 9.
Figure 8 shows the evolution trend of probability
x with
when
and
remain unchanged.
Figure 9 shows the evolution trend of probability
x with
when
and
remain unchanged. The analysis shows that if other conditions are certain, increasing the attack cost will reduce the probability of nodes choosing parasite chain attacks. Similarly, other conditions are certain, the lower the commodity price, the lower the probability of nodes successfully launching parasite chain attacks.
5.3.2. Each Node Will Make Its Parasite Chain
If a node launches a PC attack, it needs to create a parasite chain alone. The payoff matrix of the evolutionary game model is shown in
Table 3.
Moreover,
and
represent the price of goods purchased by node
i and node
j, respectively. The analysis process is the same as
Section 5.3.1, and two stable states
and
are obtained. The analysis results also reflect the relationship between commodity price and cost. For node i, when
, the node will launch a parasite chain attack. When
, the node will not launch an attack. The analysis method of node
j is the same as that of node
i and will not be repeated.