📚
EigenPhi Classroom
EigenPhiTwitterAlertSubstack
  • A Brief Introduction about EigenPhi Classroom
  • Glossary
    • MEV
    • MEV Contract
    • Malicious Token
    • Trading Volume
    • Trading Volume Change%
    • Transaction Profit Distribution (percentile)
    • Arbitrage ID
    • 1D/7D/30D
    • Liquidity Pool
    • Smart Contract
    • Protocol
    • Profit%
    • TFIDF
    • Asset, Liquidation
    • Borrower, Liquidation
    • Liquidator, Liquidation
    • Collateral, Liquidation
    • LTV, Liquidation
    • Liquidation Threshold, Liquidation
  • MEV Types
    • Arbitrage
      • Arbitrage Using 2 Tokens Between 2 Trading Venues
      • Arbitrage Involving 3 Tokens Among 3 Trading Venues
      • Arbitrage Requiring More Tokens and More Trading Venues
      • Arbitrage package
    • Sandwich MEV
    • Liquidation
      • Liquidation transaction with Aave V2 involved
  • Users of EigenPhi
    • Researcher
    • Searcher
    • Retail Investor
  • Communities & Channels
    • Our MEV Daily Report
      • Overview Section of Daily Report
      • Summary Data by MEV Types of Daily Report
      • MEV-Bot Data by MEV Types of Daily Report
      • Hot Liquidity Pools and Hot Tokens of Daily Report
      • MEV Transaction Profit Leaderboard of Daily Report
      • Download And Share Daily Report Data
    • Our Sandwich Daily Report
      • Overview Section of Sandwich Daily Report
      • Sandwich MEV Trends of Last 24 Hours and 7 Days
      • What Were the Sandwich Searchers Capable of Yesterday?
      • The 5 Most Delicious Sandwiches
      • Watch Out When Using These Protocols, Routers, and Proxies!
      • Top Attackers and Victims
      • Download And Share Sandwich Daily Report Data
    • Our Data Sources
    • Our Content and Social Channels
  • EigenPhi's Methodologies
    • Do You Have These Questions When Doing DeFi Trading?
    • 2 Biggest Concerns That Haven't Been Properly Addressed
    • 3 Pillars of DeFi: Structure, Behavior, and Network
    • The EigenPhi Way
    • Why MEV?
    • How EigenPhi Identifies MEV
      • Recognizing Atomic Arbitrage MEV Transactions
        • Implementation
        • A Typical Arbitrage Example
      • Recognizing Cross-Transaction Sandwich MEV
        • Example
Powered by GitBook
On this page
  1. EigenPhi's Methodologies
  2. How EigenPhi Identifies MEV
  3. Recognizing Atomic Arbitrage MEV Transactions

A Typical Arbitrage Example

PreviousImplementationNextRecognizing Cross-Transaction Sandwich MEV

Last updated 2 years ago

A typical Arbitrage example involves 3 tokens and 3 liquidity pools identified by EigenPhi:

We use the six steps mentioned earlier to determine whether a transaction is an Arbitrage:

Steps 1 & 2: Parse the transfers in the transaction and draw a directed graph based on the transfers.

Step 3: Identify the strongly connected components in the graph and create a combined transfer table based on it.

The result is that the original graph is the strongly connected components.

Then we can create a combined transfer table based on the graph above.

From

To

Asset

Amount

MEV Bot 0x80d

SushiSwap USDC 0x397

USDC

76860.06

SushiSwap USDC 0x397

SushiSwap USDT 0x06d

WETH

38.232

SushiSwap USDT 0x06d

MEV Bot 0x80d

USDT

77666.66

Uniswap V3 USDC-USDT 0x785

MEV Bot 0x80d

USDC

77406.53

MEV Bot 0x80d

Uniswap V3 USDC-USDT 0x785

USDT

77666.66

The TransferTable of the transaction:

USDC

WETH

USDT

MEV Bot 0x80d

-76860.06

SushiSwap USDC 0x397

+76860.06

SushiSwap USDC 0x397

-38.232

SushiSwap USDT 0x06d

+38.232

SushiSwap USDT 0x06d

-77666.66

MEV Bot 0x80d

+77666.66

Uniswap V3 USDC-USDT 0x785

-77406.53

MEV Bot 0x80d

+77406.53

MEV Bot 0x80d

-77666.66

Uniswap V3 USDC-USDT 0x785

+77666.66

The resulted CombinedTransferTable:

Address

USDC

WETH

USDT

Trade?

SushiSwap USDC 0x397

76860.06

-38.232

True

SushiSwap USDT 0x06d

38.232

-77666.66

True

Uniswap V3 USDC-USDT 0x785

-77406.53

77666.66

True

MEV Bot 0x80d

546.47

False

Step 4: Find the closest point to the "from" or "to" address of the transaction in the above strongly connected components.

In view that the "to" address is already in the graph, the closest point is the "to" address itself.

Steps 5 & 6: Calculate the profit of the point (Address) in Step 4, and determine whether it is positive.

(77,406.53 - 76,860.06) USDC + (77,666.66 - 77,666.66) USDT > 0

Therefore, we identify this transaction as an Arbitrage.

Transaction page on EigenPhi
Token Flow and Details on EigenTx
Transaction page on EtherScan
Example: Directed Graph
Example: SCC of "Directed Graph"