Table of Contents
Fetching ...

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.

Liquidation Dynamics in DeFi and the Role of Transaction Fees

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.
Paper Structure (19 sections, 3 theorems, 29 equations, 9 figures, 1 algorithm)

This paper contains 19 sections, 3 theorems, 29 equations, 9 figures, 1 algorithm.

Key Result

Lemma 1

Consider a lending protocol holding collateral $c$ and debt $b$ with closing factor $CF$ and liquidation threshold $\kappa$. Consider, also, a CPMM with initial reserves $(A,B)$ in the collateral and debt assets, respectively. The optimal profit eq:V obtained by the liquidator is given as the output

Figures (9)

  • Figure 1: Lending platform reserves Left initial state Right after liquidation state
  • Figure 2: Constant product hyperbola. $k$ is a constant.
  • Figure 3: Example \ref{['ex:strategies']}: Comparison of liquidation profit under two liquidation strategies. The x-axis shows the depth of the pool and the y-axis indicates the total profit of the strategy.
  • Figure 4: Example \ref{['ex:k_mults']}: Liquidation profit for different health factor levels
  • Figure 5: Example \ref{['ex:nofee_nodelta']}: Liquidation profit without sandwiching and transaction fees
  • ...and 4 more figures

Theorems & Definitions (16)

  • Remark 1
  • Lemma 1
  • proof
  • Remark 2
  • Example 1
  • Example 2
  • Example 3
  • Remark 3
  • Remark 4
  • Example 4
  • ...and 6 more