DEX Specs: A Mean Field Approach to DeFi Currency Exchanges

ArXiv ID: 2404.09090 “View on arXiv”

Authors: Unknown

Abstract

We investigate the behavior of liquidity providers (LPs) by modeling a decentralized cryptocurrency exchange (DEX) based on Uniswap v3. LPs with heterogeneous characteristics choose optimal liquidity positions subject to uncertainty regarding the size of exogenous incoming transactions and the prices of assets in the wider market. They engage in a game among themselves, and the resulting liquidity distribution determines the exchange rate dynamics and potential arbitrage opportunities of the pool. We calibrate the distribution of LP characteristics based on Uniswap data and the equilibrium strategy resulting from this mean-field game produces pool exchange rate dynamics and liquidity evolution consistent with observed pool behavior. We subsequently introduce Maximal Extractable Value (MEV) bots who perform Just-In-Time (JIT) liquidity attacks, and develop a Stackelberg game between LPs and bots. This addition results in more accurate simulated pool exchange rate dynamics and stronger predictive power regarding the evolution of the pool liquidity distribution.

Keywords: decentralized exchange, Uniswap v3, liquidity providers, Maximal Extractable Value, mean-field game

Complexity vs Empirical Score

  • Math Complexity: 7.5/10
  • Empirical Rigor: 7.0/10
  • Quadrant: Holy Grail
  • Why: The paper employs advanced mathematical frameworks like mean-field games and Stackelberg equilibrium, which are computationally dense. However, it also demonstrates strong empirical rigor by calibrating models with real Uniswap v3 data and validating simulated dynamics against observed pool behavior.
  flowchart TD
    A["Research Goal: Model & Calibrate LP Behavior<br>in Uniswap v3 & MEV JIT Attacks"] --> B["Key Methodology: Mean-Field Game &<br>Stackelberg Game Theory"]
    B --> C["Input: Historical Uniswap Data<br>Calibrates LP Characteristics Distribution"]
    C --> D["Computational Process: Simulate<br>Liquidity & Exchange Rate Dynamics"]
    D --> E{"Outcome 1: Base Model Validation<br>Consistent with Observed Pool Behavior"}
    D --> F["Input: MEV Bot Parameters"]
    F --> G["Computational Process: Stackelberg Game<br>LPs vs. JIT Liquidity Attacks"]
    G --> H{"Outcome 2: Enhanced Model<br>Accurate Dynamics & Stronger Predictions"}