# Application of Graph Theory for Blockchain Technologies
## 5 Graph Theory Application in Blockchain Systems
### NFT Manipulation Mapping
#### 5.5.1 Buying and Selling NFTs to Create Fake Volume (Wash Trading)  
Identifying cycles where an NFT is repeatedly traded between the same set of accounts within a short time frame can indicate wash trading. High transaction volumes with minimal change in ownership could be flagged for further investigation [PERSON] et al. [92]. Wash trading in the NFT market is a significant concern that requires attention and monitoring to maintain market integrity [93]. Suspicious trading activities, such as wash trading, have been observed in the NFT ecosystem, emphasizing the need for robust detection mechanisms. By characterizing wash trading behaviors through graph theory analysis, it becomes possible to pinpoint irregularities and potential fraudulent activities in NFT transactions [94]. [PERSON] et al. [95] provides a lower bound estimation for suspicious trading behaviour on NFT markets.  
**Assumption 22**.:
* _Graph Model: The blockchain transaction network is modeled as a directed graph_ \(G=(V,E)\) _where:_
* \(V\) _is a set of vertices representing accounts participating in the NFT market._
* \(E\) _is a set of directed edges representing transactions of NFTs between accounts. Each edge_ \(e_{ij}\in E\) _from vertex_ \(i\) _to vertex_ \(j\) _represents a transaction and is associated with attributes such as transaction value_ \(v_{ij}\)_, timestamp_ \(t_{ij}\)_, and the specific NFT_ \(n_{ij}\) _involved._
* \(C\) _is a set of cycles within_ \(G\)_, where each cycle represents a sequence of transactions returning to the original account._
* \(A\) _short time frame_ \(T\) _is defined to identify rapid trading cycles indicative of wash trading._
* _The transaction volume_ \(V(C)\) _for a cycle_ \(C\) _is the sum of the transaction values_ \(v_{ij}\) _for all edges_ \(e_{ij}\) _in_ \(C\)_._  
**Application Statement 22**.:
* _For a given NFT marketplace transaction graph_ \(G\)_, cycles_ \(C\subseteq G\) _that complete within a short time frame_ \(T\) _and exhibit high transaction volumes_ \(V(C)\) _relative to the network average are indicative of wash trading._  
**Proof.**  
1. Cycle Detection. Detect all cycles \(C\) in \(G\), utilizing a depth-first search or other graph traversal algorithms capable of identifying cycles.  
* Temporal Analysis. For each cycle \(C\), calculate the duration \(D(C)\) as \[D(C)\ =\ \max(t_{ij})-\min(t_{ij})\] for all \(e_{ij}\in C\). Identify cycles where \(D(C)<T\).
* Volume Analysis. Calculate the transaction volume \(V(C)\) for each cycle \(C\) identified in step b as \[V(C)\ =\ \sum_{e_{ij}\in C}v_{ij}.\]
* Benchmarking. Define the network's average transaction volume \(V_{avg}\) and compare \(V(C)\) for each cycle \(C\) against \(V_{avg}\). Cycles with \(V(C)\gg V_{avg}\) are scrutinized for wash trading.
* Ownership Consistency. Verify the change in ownership for NFTs involved in cycles \(C\). Minimal change in ownership despite high \(V(C)\) reinforces the wash trading hypothesis.  
Figure 23 directed graph modeling of the NFT marketplace transactions. In this graph, Nodes (in skyblue) represent accounts participating in the NFT market. Directed edges (in black) symbolize transactions of NFTs between these accounts. Each NFT involved in a transaction is denoted by labels on the edges (in red). From this graph representation, we detected 37 cycles, which could potentially indicate wash trading activities where NFTs are repeatedly traded between the same set of accounts within a short timeframe.  
Through the mathematical formulation of detecting cycles \(C\) within a transaction graph \(G\), analyzing these cycles for short-duration \(D(C)\) and abnormally high transaction volumes \(V(C)\), and scrutinizing the consistency of ownership, we can effectively identify and quantify wash trading activities in the NFT marketplace. This methodological approach enhances our ability to maintain the integrity of blockchain platforms by pinpointing manipulative trading behaviors, thereby ensuring a more transparent and trustworthy NFT ecosystem.  
Figure 23: NFT marketplace transactions.