Paper: arXiv 2406.13794

Abstract

Automated Market Makers (AMMs) are essential in Decentralized Finance (DeFi) as they match liquidity supply with demand. They function through liquidity providers (LPs) who deposit assets into liquidity pools. However, the asset trading prices in these pools often trail behind those in more dynamic, centralized exchanges, leading to potential arbitrage losses for LPs. This issue is tackled by adapting market maker bonding curves to trader behavior, based on the classical market microstructure model of Glosten and Milgrom. Our approach ensures a zero-profit condition for the market maker’s prices. We derive the differential equation that an optimal adaptive curve should follow to minimize arbitrage losses while remaining competitive. Solutions to this optimality equation are obtained for standard Gaussian and Lognormal price models using Kalman filtering. A key feature of our method is its ability to estimate the external market price without relying on price or loss oracles. We also provide an equivalent differential equation for the implied dynamics of canonical static bonding curves and establish conditions for their optimality. Our algorithms demonstrate robustness to changing market conditions and adversarial perturbations, and we offer an on-chain implementation using Uniswap v4 alongside off-chain AI co-processors.

Complexity vs Empirical Score

  • Math Complexity: 8.0/10
  • Empirical Rigor: 6.5/10
  • Quadrant: Holy Grail — high math complexity, high empirical rigor

Why this score: The paper employs advanced mathematical techniques like differential equations, stochastic models, and Kalman filtering, which is dense and complex. However, it includes robust theoretical comparisons, on-chain implementation with Uniswap v4, and adversarial robustness analysis, making it highly data/implementation-focused.

Research Flowchart

  flowchart TD
  A["Research Goal"] -->|Formulate| B["Adaptive Bonding Curves"]
  B -->|Methodology| C["Market Microstructure Model<br>Glosten-Milgrom"]
  C -->|Core Condition| D["Zero-Profit Condition"]
  D -->|Mathematical Form| E["Optimality Differential Equation"]
  E -->|Solve Using| F["Computational Process<br>Kalman Filtering"]
  F -->|Data Inputs| G["Off-chain AI Co-processors<br>No Price Oracles"]
  G -->|Implementation| H["On-chain: Uniswap v4"]
  H -->|Key Outcomes| I["Minimized Arbitrage Loss &<br>Adaptive Liquidity"]

Cited References (90)

  1. Computer Programming as an Art (1974) — link
  2. Letters to the editor: go to statement considered harmful (1968) — link
  3. Transaction Processing: Concepts and Techniques (1993)
  4. On Time versus Space and Related Problems (1975) — link
  5. 16th Annual Symposium on Foundations of Computer Science, Berkeley, California, USA, October 13-15, 1975 (1975)
  6. Axiom website
  7. Axiom Client Ciruit
  8. Brevis website
and 82 more
  1. Neural Kalman Filtering (2021) — link
  2. Hooks on Uniswap v4
  3. Aera website
  4. Centralized Exchange (CEX) vs Decentralized Exchange (DEX). Which is the best crypto exchange?
  5. Offchain compute is all you need
  6. 1inch DEX aggreagator
  7. Balancer WhitePaper
  8. Learning an Outlier-Robust Kalman Filter (2007)
  9. Kalman filtering with adversarial corruptions (2022)
  10. An approach to time series smoothing and forecasting using the EM algorithm (1982)
  11. Better blockchains lead to more profitable liquidity providers
  12. Probabilistic robotics (2005) — link
  13. Particle filters for positioning, navigation, and tracking (2002) — link
  14. Cybernetics: or Control and Communication in the Animal and the Machine (1948)
  15. Constant Function Market Makers: Multi-Asset Trades via Convex Optimization (2021) — link
  16. Forecasting with trending data (2006)
  17. Automated Market Making and Arbitrage Profits in the Presence of Fees (2023) — link
  18. Understanding Uniswap’s New Liquidity Aggregator (TL;DR at the End) (2023) — link
  19. DeFi liquidity management via Optimal Control: Ohm as a case study
  20. Understanding domain randomization for sim-to-real transfer (2021) — link
  21. A Bayesian Approach for Learning and Planning in Partially Observable Markov Decision Processes. (2011)
  22. Flash Loan Attacks: Risks And Prevention
  23. Finding the Right Curve: Optimal Design of Constant Function Market Makers (2023) — link
  24. Diamonds are Forever, Loss-Versus-Rebalancing is Not (2022) — link
  25. Impermanent Loss in Uniswap v3 (2021) — link
  26. Improved Price Oracles (2020) — link
  27. Liquidity Provider Returns in Geometric Mean Markets (2020) — link
  28. Cybernetics: or Control and Communication in the Animal and the Machine (1948)
  29. Robust and Optimal Control (1996) — link
  30. On the identification of variances and adaptive Kalman filtering (1970) — link
  31. A New Approach to Linear Filtering and Prediction Problems (1960)
  32. When does the tail wag the dog? Curvature and market making (2020) — link
  33. Adaptive Curves for Optimally Efficient Market Making — → 2406.13794
  34. ZeroSwap: Data-driven Optimal Market Making in DeFi (2023) — link
  35. Optimal Fees for Geometric Mean Market Makers (2021) — link
  36. Order flow toxicity on DEXes
  37. Uniswap v2 Core
  38. Block.Co trade volume comparisons
  39. Uniswap v3 Core
  40. Uniswap v4 Docs
  41. UniswapX Docs
  42. Optimism Docs
  43. Optimistic Rollups
  44. Eigenlayer Whitepaper
  45. CowSwap Docs
  46. Flash Loans Aren’t the Problem, Centralized Price Oracles Are
  47. Generalizing Impermanent Loss on Decentralized Exchanges with Constant Function Market Makers (2023) — link
  48. Front running, bots, slippage, oracle pricing errors: AMMs are great, but there are problems.
  49. Maximum Likelihood from Incomplete Data via the EM Algorithm (1977)
  50. SoK: Decentralized Exchanges (DEX) with Automated Market Maker (AMM) Protocols (2023) — link
  51. Automated Market Makers and Decentralized Exchanges: a DeFi Primer (2020) — link
  52. Augmenting Batch Exchanges with Constant Function Market Makers (2023) — link
  53. Risks and Returns of Uniswap V3 Liquidity Providers (2022) — link
  54. Arbitrum: Scalable, private smart contracts (2018) — link
  55. Flash Boys 2.0: Frontrunning, Transaction Reordering, and Consensus Instability in Decentralized Exchanges (2019) — link
  56. Discrimination of Toxic Flow in Uniswap V3
  57. Stablecoin Volume Hits Record High of $ 7.4T in 2022
  58. Stablecoin volume outpaces Mastercard, PayPal as digital payments wars loom
  59. The Relentless Rise of Stablecoins
  60. Uniswap-v3 TVL comparison for stable coins vs non-stablecoins
  61. DODO Integrates Chainlink Live on Mainnet, Kickstarts the On-Chain Liquidity Revolution
  62. Liquidity Provision by Automated Market Makers (2020) — link
  63. Automated Market Making and Loss-Versus-Rebalancing (2022) — link
  64. Stochastic Variational Inference (2013) — link
  65. An Electronic Market-Maker (2001)
  66. SoK (2021) — link
  67. A Myersonian Framework for Optimal Liquidity Provision in Automated Market Makers (2023) — link
  68. The Dynamics of Dealer Markets Under Competition (1983)
  69. Bid, ask and transaction prices in a specialist market with heterogeneously informed traders (1985) — link
  70. QLAMMP: A Q-Learning Agent for Optimizing Fees on Automated Market Making Protocols (2022) — link
  71. Adapting to a market shock: Optimal sequential market-making (2008)
  72. Playing Atari with Deep Reinforcement Learning (2013) — link
  73. A learning market-maker in the Glosten–Milgrom model (2005)
  74. Q-learning (1992)
  75. High Frequency Trading in a Limit Order Book (2008) — link
  76. An Axiomatic Characterization of CFMMs and Equivalence to Prediction Markets (2023) — link
  77. Strategic Bonding Curves in Automated Market Makers (2024) — link
  78. Predictable Losses of Liquidity Provision in Constant Function Markets and Concentrated Liquidity Markets (2023) — link
  79. Probabilistic Functions of Finite State Markov Chains (1969)
  80. Random Walk–1-Dimensional, Wolfram Mathworld
  81. Continuous Auctions and Insider Trading (1985)
  82. Liquidity and Market Structure (1988) — link

1 of 90 cited works are in the corpus; resolved via arXiv source bundles, Semantic Scholar and OpenAlex. Corpus-wide: 2518 linked papers.