Liquidation Dynamics in DeFi and the Role of Transaction Fees
Agathe Sadeghi, Zachary Feinstein
TL;DR
The paper addresses how DeFi liquidations can be vulnerable to MEV-driven price manipulation when using CPMM spot oracles. It develops a dynamic-programming framework to characterize the liquidator's optimal liquidation strategy within a single block and analyzes how transaction fees on AMMs influence the profitability of sandwich attacks (OEV/MEV). A key finding is that CPMM fees not only compensate liquidity providers but can endogenously harden the oracle by reducing or eliminating profitable manipulation once a threshold fee is exceeded. The work provides practical guidance on configuring AMM fees to deter predatory liquidations while preserving liquidity and solvency protections for lending protocols. Overall, it demonstrates that carefully chosen on-chain AMM fees can serve as a robust design lever for DeFi resilience against intra-block price manipulation.
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.
