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.
翻译:自动做市商(AMMs)在去中心化金融(DeFi)中至关重要,它们将流动性供给与需求相匹配。其运作依赖于流动性提供者(LPs)将资产存入流动性池。然而,这些池中的资产交易价格往往滞后于更具动态性的中心化交易所,导致LPs面临潜在的套利损失。本研究基于Glosten和Milgrom的经典市场微观结构模型,通过使做市商绑定曲线适应交易者行为来解决此问题。我们的方法确保了做市商报价满足零利润条件。我们推导了最优自适应曲线应遵循的微分方程,以在保持竞争力的同时最小化套利损失。针对标准高斯和对数正态价格模型,利用卡尔曼滤波获得了该最优性方程的解。我们方法的一个关键特点是能够在不依赖价格或损失预言机的情况下估计外部市场价格。我们还给出了典型静态绑定曲线隐含动态的等效微分方程,并建立了其最优性条件。我们的算法对不断变化的市场条件和对抗性扰动表现出鲁棒性,并提供了使用Uniswap v4与链下AI协处理器的链上实现方案。