Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
125 tokens/sec
GPT-4o
53 tokens/sec
Gemini 2.5 Pro Pro
42 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

ZeroSwap: Data-driven Optimal Market Making in DeFi (2310.09413v3)

Published 13 Oct 2023 in cs.LG and cs.GT

Abstract: Automated Market Makers (AMMs) are major centers of matching liquidity supply and demand in Decentralized Finance. Their functioning relies primarily on the presence of liquidity providers (LPs) incentivized to invest their assets into a liquidity pool. However, the prices at which a pooled asset is traded is often more stale than the prices on centralized and more liquid exchanges. This leads to the LPs suffering losses to arbitrage. This problem is addressed by adapting market prices to trader behavior, captured via the classical market microstructure model of Glosten and Milgrom. In this paper, we propose the first optimal Bayesian and the first model-free data-driven algorithm to optimally track the external price of the asset. The notion of optimality that we use enforces a zero-profit condition on the prices of the market maker, hence the name ZeroSwap. This ensures that the market maker balances losses to informed traders with profits from noise traders. The key property of our approach is the ability to estimate the external market price without the need for price oracles or loss oracles. Our theoretical guarantees on the performance of both these algorithms, ensuring the stability and convergence of their price recommendations, are of independent interest in the theory of reinforcement learning. We empirically demonstrate the robustness of our algorithms to changing market conditions.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (45)
  1. Cowswap docs. https://docs.cow.fi/overview/coincidence-of-wants. Accessed: 2023-09.
  2. Discrimination of toxic flow in uniswap v3. https://crocswap.medium.com/discrimination-of-toxic-flow-in-uniswap-v3-part-1-fb5b6e01398b. Accessed: 2023-09.
  3. Dodo integrates chainlink live on mainnet, kickstarts the on-chain liquidity revolution. https://blog.dodoex.io/dodo-integrates-chainlink-live-on-mainnet-kickstarts-the-on-chain-liquidity-revolution-ee27e136e122. Accessed: 2023-09.
  4. Eigenlayer whitepaper. https://docs.eigenlayer.xyz/overview/whitepaper. Accessed: 2023-09.
  5. Flash loans aren’t the problem, centralized price oracles are. https://www.coindesk.com/tech/2020/11/11/flash-loans-arent-the-problem-centralized-price-oracles-are/. Accessed: 2023-09.
  6. https://cointelegraph.com/magazine/trouble-with-crypto-automated-market-makers/. Accessed: 2023-09.
  7. Optimism docs. https://community.optimism.io/. Accessed: 2023-09.
  8. Optimistic rollups. https://ethereum.org/en/developers/docs/scaling/optimistic-rollups/. Accessed: 2023-09.
  9. Order flow toxicity on dexes. https://ethresear.ch/t/order-flow-toxicity-on-dexes/13177. Accessed: 2023-09.
  10. Peter johnson and sai nimmagadda. the relentless rise of stablecoins. brevan howard digital. https://digify.com/a/#/f/p/ef09be008ee64ab68bda4f0a558302a2. Accessed: 2023-09.
  11. Random walk–1-dimensional, wolfram mathworld. https://mathworld.wolfram.com/RandomWalk1-Dimensional.html. Accessed: 2023-06.
  12. Uniswap v3 core. https://uniswap.org/whitepaper-v3.pdf. Accessed: 2023-09.
  13. Uniswap-v3 tvl comparison for stable coins vs non-stablecoins. https://defillama.com/protocol/uniswap-v3. Accessed: 2023-09.
  14. Constant function market makers: Multi-asset trades via convex optimization, 2021.
  15. Improved price oracles. In Proceedings of the 2nd ACM Conference on Advances in Financial Technologies. ACM, oct 2020.
  16. When does the tail wag the dog? curvature and market making, 2020.
  17. Jun Aoyagi. Liquidity provision by automated market makers, 2020.
  18. High frequency trading in a limit order book. Quantitative Finance, 8:217–224, 04 2008.
  19. An electronic market-maker. 01 2001.
  20. Qlammp: A q-learning agent for optimizing fees on automated market making protocols, 2022.
  21. Flash boys 2.0: Frontrunning, transaction reordering, and consensus instability in decentralized exchanges, 2019.
  22. Sanmay Das*. A learning market-maker in the glosten–milgrom model. Quantitative Finance, 5(2):169–180, 2005.
  23. Adapting to a market shock: Optimal sequential market-making. Advances in Neural Information Processing Systems, 21, 2008.
  24. SoK. In Proceedings of the 3rd ACM Conference on Advances in Financial Technologies. ACM, sep 2021.
  25. Optimal fees for geometric mean market makers, 2021.
  26. An axiomatic characterization of cfmms and equivalence to prediction markets. arXiv preprint arXiv:2302.00196, 2023.
  27. Bid, ask and transaction prices in a specialist market with heterogeneously informed traders. Journal of Financial Economics, 14(1):71–100, 1985.
  28. Finding the right curve: Optimal design of constant function market makers, 2023.
  29. Liquidity and market structure. The Journal of Finance, 43(3):617–633, 1988.
  30. Risks and returns of uniswap v3 liquidity providers. In Proceedings of the 4th ACM Conference on Advances in Financial Technologies. ACM, sep 2022.
  31. Thomas S. Y. Ho and Hans R. Stoll. The dynamics of dealer markets under competition. The Journal of Finance, 38(4):1053–1074, 1983.
  32. Stochastic variational inference, 2013.
  33. Arbitrum: Scalable, private smart contracts. In 27th USENIX Security Symposium (USENIX Security 18), pages 1353–1370, Baltimore, MD, August 2018. USENIX Association.
  34. Albert S. Kyle. Continuous auctions and insider trading. Econometrica, 53(6):1315–1335, 1985.
  35. Impermanent loss in uniswap v3, 2021.
  36. Diamonds are forever, loss-versus-rebalancing is not, 2022.
  37. Automated market making and arbitrage profits in the presence of fees, 2023.
  38. A myersonian framework for optimal liquidity provision in automated market makers, 2023.
  39. Automated market making and loss-versus-rebalancing, 2022.
  40. Playing atari with deep reinforcement learning, 2013.
  41. Vijay Mohan. Automated market makers and decentralized exchanges: a defi primer, 12 2020.
  42. Augmenting batch exchanges with constant function market makers, 2023.
  43. Generalizing impermanent loss on decentralized exchanges with constant function market makers, 2023.
  44. Q-learning. Machine learning, 8:279–292, 1992.
  45. Sok: Decentralized exchanges (dex) with automated market maker (amm) protocols. ACM Comput. Surv., 55(11), feb 2023.
Citations (3)

Summary

We haven't generated a summary for this paper yet.