Using Topological Data Analysis to Identify Distinct MEV Behavior

November 4th, 2022

```
1 - Introduction
2 - Mapper Algorithm
3 - Six Distinct MEV Behaviors
4 - Conclusion
```

Topological data analysis (TDA) is a powerful data analytics technique that uses the underlying topological and geometric structures of data to create non-trivial, meaningful categories. The Mapper algorithm is a TDA tool that transforms data, which lives in a continuous Reeb space, to a simplicial complex, a topological combinatorial graph which lives in a discrete space. TDA started to turn heads when the Mapper algorithm was used to identify a highly treatable cluster of breast cancer patients from a highly dimensional dataset in 2011.

Although the TDA technique persistent homology has been applied to study some financial asset bubbles, this is the first application of Mapper to MEV and blockchain in general. We review the results in this post, leaving technical details out. A full paper draft is available on github.

Previously we created a MEV dataset that contains historical MEV trading data from Olympus Sushiswap POL. In this new research, we add multi-chain liquidation events from Ethereum based Rari and Arbitrum based Vesta obtained via Playground Analytics Subgrounds.

Simply put, the Mapper algorithm is the transformation from a continuous subspace of data to a discrete graph with topological data embedded combinatorially. Mapper algorithm inputs a point cloud of on-chain historical data as shown in Figure 1 and outputs a simplicial complex, as seen in Figure 2.

Intuitively, these distinct MEV behaviors can be considered as MEV emotions. For example the emotions happiness and excitement are both distinct, but positive emotions. In contrast, happiness and despair are contrasting emotions - positive and negative. Emotions that are closer in similarity will also appear closer together as seen in Figure 4.

Figure 3 shows six statistically distinct MEV behaviors where node 0 is called the “base node” and represents the default MEV behavior.

Nodes 1,2, and 3 all have positive MEV mean volume. Positive MEV volume should be considered a desirable MEV behavior because it implies MEV bots are buying OHM and pushing the price up. Indeed Nodes 1,2, and 3 show that the positive MEV volume is counteracting the negative non-MEV volume.

Nodes 4 and 5 are more troublesome. They have very large negative MEV mean volumes. Fortunately they appear to be outlier MEV behaviors because they account for a small amount of data points, a mere 10. Node 4 has the largest mean and standard deviations for liquidations, indicating negatively volatile days due to liquidations.

In contrast, node 5’s negative MEV volume is more correlated with negative non-MEV volume as opposed to liquidations which indicates in general, a lot of negative selling during those days, but not directly a result of OHM liquidations.

Figure 4 shows how the Figure 3 statistical properties of each behavior are visually represented. Looking at 2(b) Daily MEV vs non-MEV Volume scatterplot, each cluster of node points exists within a distinct area. The 2(b) Daily MEV vs Liquidation Volume chart shows similar geometric separation, but appears more cluttered. These geometric distinctions create new ways to categorize heavily connected DeFi data and allows a distinct classification of MEV behavior based on daily data as well as offering a rich area of research to further understand how to incentivize more positive MEV behaviors such as Nodes 1, 2 and 3 and avoid negative behaviors such as Nodes 4 and 5.

In conclusion, we have identified six distinct MEV behaviors that exist within the OHM MEV dataset. These behaviors can be thought of as MEV emotions that react to economic incentives within the blockchain multiverse. This is the first application of the Mapper algorithm to MEV data and blockchain data in general. Data is all fully available on-chain and source code is freely available.

Subscribe to 0xEvan

Receive the latest updates directly to your inbox.

Mint this entry as an NFT to add it to your collection.

Verification

This entry has been permanently stored onchain and signed by its creator.

Arweave Transaction

KQSRjyUB8MWhjpQ…0esOH6suWszOhIo

Author Address

0x829Ceb00fC74bD0…ec628a90894cD52

Content Digest

Xb8XRL7nD-ORyeX…TmKfOxEfMEpBae0