DEX Specs: A Mean Field Approach to DeFi Currency Exchanges (2404.09090v1)
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.
- Uniswap v3 core.
- Improved price oracles: Constant function market makers. In Proceedings of the 2nd ACM Conference on Advances in Financial Technologies, AFT ’20, page 80–91, New York, NY, USA. Association for Computing Machinery.
- An analysis of Uniswap markets.
- Aoyagi, J. (2020). Liquidity provision by automated market makers.
- Uniswap liquidity provision: An online learning approach.
- High-roller impact: A large generalized game model of parimutuel wagering. Market Microstructure and Liquidity.
- Advances in blockchain and crypto economics. Management Science, 69(11):6417–6426.
- Brown, G. W. (1951). Iterative solution of games by fictitious play. In Koopmans, T. C., editor, Activity Analysis of Production and Allocation. Wiley, New York.
- The adoption of blockchain-based decentralized exchanges: A market microstructure analysis of the automated market maker.
- Liquidity provision on blockchain-based decentralized exchanges.
- The paradox of just-in-time liquidity in decentralized exchanges: More providers can sometimes mean less liquidity.
- Decentralised finance and automated market making: Predictable loss and optimal liquidity provision.
- Strategic liquidity provision in Uniswap v3.
- Credible decentralized exchange design via verifiable sequencing rules. In Proceedings of the 55th Annual ACM Symposium on Theory of Computing, STOC 2023, page 723–736, New York, NY, USA. Association for Computing Machinery.
- Harsanyi, J. C. (1968). Games with incomplete information played by “Bayesian” players, I-III. Part II. Bayesian equilibrium points. Management Science, 14(5):320–334.
- Risks and returns of Uniswap v3 liquidity providers. In 4th ACM Conference on Advances in Financial Technologies (AFT), Cambridge, Massachusetts, USA.
- The potential of self-regulation for front-running prevention on decentralized exchanges. In 22nd Workshop on the Economics of Information Security (WEIS), Geneva, Switzerland.
- Behavior of liquidity providers in decentralized exchanges.
- Eliminating sandwich attacks with the help of game theory. In Proceedings of the 2022 ACM on Asia Conference on Computer and Communications Security, ASIA CCS ’22, page 153–167, New York, NY, USA. Association for Computing Machinery.
- Large population stochastic dynamic games: closed-loop McKean-Vlasov systems and the Nash certainty equivalence principle. Communications in Information & Systems, 6(3):221 – 252.
- Optimal trading in automatic market makers with deep learning.
- Disentangling decentralized finance (DeFi) compositions. ACM Trans. Web, 17(2).
- Mean field games. Japanese Journal of Mathematics, 2(1):229–260.
- A mean field games model for cryptocurrency mining. Management Science (Ahead of Print).
- Mas-Colell, A. (1984). On a theorem of Schmeidler. Journal of Mathematical Economics, 13(3):201–206.
- Nash, J. (1951). Non-cooperative games. Annals of Mathematics, 54(2):286–295.
- Obadia, A. (2020). Flashbots—frontrunning the MEV crisis.
- Park, A. (2023). The conceptual flaws of decentralized automated market making. Management Science, 69(11):6731–6751.
- Computing pure Bayesian-Nash equilibria in games with finite actions and continuous types. Artificial Intelligence, 195:106–139.
- Private information and pure-strategy equilibria. Mathematics of Operations Research, 7(3):401–409.
- Demystifying Just-in-Time (JIT) liquidity attacks on Uniswap V3. In 2023 5th Conference on Blockchain Research & Applications for Innovative Networks and Services (BRAINS), pages 1–8.
- High-frequency trading on decentralized on-chain exchanges. In 2021 IEEE Symposium on Security and Privacy (SP), pages 428–445.