🤖 AI Summary
This study addresses the vulnerability of decentralized finance (DeFi) lending protocols to price manipulation and maximal extractable value (MEV) attacks, which threaten systemic solvency. From the perspective of a profit-maximizing liquidator, the authors integrate a constant-product market maker (CPMM) oracle model with an oracle-extractable value (OEV) framework, employing dynamic programming and game-theoretic analysis to derive closed-form solutions for optimal liquidation strategies and liquidation boundaries. The key contribution lies in formally demonstrating—for the first time—that CPMM trading fees not only compensate liquidity providers but also endogenously enhance the oracle’s resilience to manipulation. Specifically, appropriately calibrated fees can render sandwich attacks and similar manipulative strategies unprofitable, thereby improving DeFi protocol security without relying on latency-inducing mechanisms such as time-weighted average prices.
📝 Abstract
Liquidation of collateral are the primary safeguard for solvency of lending protocols in decentralized finance. However, the mechanics of liquidations expose these protocols to predatory price manipulations and other forms of Maximal Extractable Value (MEV). In this paper, we characterize the optimal liquidation strategy, via a dynamic program, from the perspective of a profit-maximizing liquidator when the spot oracle is given by a Constant Product Market Maker (CPMM). We explicitly model Oracle Extractable Value (OEV) where liquidators manipulate the CPMM with sandwich attacks to trigger profitable liquidation events. We derive closed-form liquidation bounds and prove that CPMM transaction fees act as a critical security parameter. Crucially, we demonstrate that fees do not merely reduce attacker profits, but can make such manipulations unprofitable for an attacker. Our findings suggest that CPMM transaction fees serve a dual purpose: compensating liquidity providers and endogenously hardening CPMM oracles against manipulation without the latency of time-weighted averages or medianization.