# Application of Graph Theory for Blockchain Technologies
## 5 Graph Theory Application in Blockchain Systems
### Evaluating Security and Privacy
#### 5.2.2 Threat Modelling
:
* _Let us consider a graph_ \(G=(V,E)\) _where:_
* _V: Set of nodes, representing the blockchain participants._
* _E: Set of directed edges representing network connections between nodes._
* _We further categorize the nodes as:_
* _V\({}_{H}\): Set of honest nodes._
* _V\({}_{C}\): Set of compromised nodes controlled by the attacker._  
**Application Statement 9**. :
* _For a blockchain network represented by graph_ \(G\)_, an attacker can successfully conduct an Eclipse attack on a subset of honest nodes_ \(V_{EH}\subseteq V_{H}\) _by ensuring all connections to and from_ \(V_{EH}\) _are with nodes in_ \(V_{C}\)_, thus controlling the flow of information to the isolated nodes._  
Proof. :
* Isolation of Honest Nodes: The attacker infiltrates the network, adding or compromising nodes to become part of \(V_{C}\). The attacker then uses these nodes to form all direct connections with the target honest node \(h\in V_{EH}\). * Manipulation of Network Traffic: For each edge \(e=(u,v)\) where \(u\in V_{EH}\) and \(v\in V\), the attacker redirects \(e\) such that \(v\in V_{C}\), effectively controlling the communication channels. * Impact of Isolation: The information received by any \(h\in V_{EH}\) is now fully controlled by \(V_{C}\), leading to a scenario where \(h\) is eclipsed from the genuine blockchain network. This prevents \(h\) from receiving valid transactions and blocks, effectively isolating it from the true state of the blockchain. Figure 10 is a representation of a network that includes both honest and compromised nodes, illustrating a scenario of eclipse attack within a blockchain network. Blue nodes are labeled \"Honest_Node_x\" and represent the honest participants in the network, normal or secure status, meaning these nodes are functioning correctly and have not been compromised. Red nodes are labeled \"Compromised_Node_x\" and indicate nodes that have been compromised or are under the control of an attacker. Edges, the lines between the nodes represent connections or potential pathways for communication or data flow between the nodes. The graph could be used to understand the impact of the compromised nodes on the network, particularly how the honest nodes are influenced or isolated due to these compromised nodes. In an eclipse attack, the compromised nodes may be strategically positioned to control the communication of the honest nodes, effectively isolating them from the rest of the network. The goal of such an attack could be to feed false information or prevent honest nodes from accessing the true state of the blockchain. The model demonstrates that through an Eclipse attack, the adversary can control the information available to certain nodes in the blockchain network, which can have severe implications, such as facilitating double spending or denying service. The graph's theoretical approach to this proof provides a clear depiction of the attack's potential and highlights the importance of establishing secure and diverse peer-to-peer connections within blockchain networks to mitigate such risks. DDOS Attack on blockchain networks aims to overload the network by flooding nodes with a large number of requests or malformed transactions. When executed in tandem with a 51% attack, the malicious actor may also have enough control over the network to prevent legitimate transactions from being confirmed, effectively causing a denial of service. **Assumption 10**. :
* _We model the blockchain network as a graph_ \(G=(V,E)\) _where:_
* _V: Set of nodes in the blockchain network, where each node_ \(v\) _represents a participant (e.g., user, miner, full node)._
* _E: Set of edges representing connections or potential transaction paths between nodes._
* _Each node_ \(v\) _has a capacity_ \(c(v)\) _representing the maximum number of transactions it can process per time unit. A DDoS attack is modeled by increasing the demand_ \(d(v)\) _on the node's resources to exceed_ \(c(v)\)_._  
**Application Statement 10**.