Defensive Rebalancing for Automated Market Makers
Sam Devorsetz, Maurice Herlihy
TL;DR
This work tackles arbitrage-driven value leakage in CFMM networks by introducing defensive rebalancing, a mechanism that directly transfers assets between CFMM pools to reach arbitrage-free, Pareto-efficient configurations. It formalizes CFMMs as a network of pool states governed by invariants $F_i$, and shows arbitrage-free states coincide with Pareto efficiency under rebalancing. The core method recasts the search for optimal rebalancings as a convex optimization problem when the trading functions are log-concave, maximizing the concave objective $\sum_i \log F_i(x'_{i,1},x'_{i,2}')$ under linear and convex constraints, with extensions to mixed populations and price oracles. The framework also accommodates practical considerations like transaction costs, security and deployment issues, and a trading-only alternative, providing a rigorous foundation for AMM protocols to proactively defend liquidity providers against arbitrage.
Abstract
This paper introduces and analyzes \emph{defensive rebalancing}, a novel mechanism for protecting constant-function market makers (CFMMs) from value leakage due to arbitrage. A \emph{rebalancing} transfers assets directly from one CFMM's pool to another's, bypassing the CFMMs' standard trading protocols. In any \emph{arbitrage-prone} configuration, we prove there exists a rebalancing to an \textit{arbitrage-free} configuration that strictly increases some CFMMs' liquidities without reducing the liquidities of the others. Moreover, we prove that a configuration is arbitrage-free if and only if it is \emph{Pareto efficient} under rebalancing, meaning that any further direct asset transfers must decrease some CFMM's liquidity. We prove that for any log-concave trading function, including the ubiquitous constant product market maker, the search for an optimal, arbitrage-free rebalancing that maximizes global liquidity while ensuring no participant is worse off can be cast as a convex optimization problem with a unique, computationally tractable solution. We extend this framework to \emph{mixed rebalancing}, where a subset of participating CFMMs use a combination of direct transfers and standard trades to transition to an arbitrage-free configuration while harvesting arbitrage profits from non-participating CFMMs, and from price oracle market makers such as centralized exchanges. Our results provide a rigorous foundation for future AMM protocols that proactively defend liquidity providers against arbitrage.
