When the Pool Fights Back (Part I): Modeling Liquidity with Transaction Costs
Exploring how a simple tweak such as adding transaction costs turns a tractable mean field game into a complex dance of strategic interaction.
Introduction: From Idealized Pools to Frictional Markets
In our previous blog,
we explored a model where agents interact with a liquidity pool through strategic trading, optimizing their behavior over time in response to market dynamics and each other. That model was a mean field game (MFG): elegant, solvable, and insightful, but ultimately frictionless.
Yet real-world markets are rarely so clean. Traders face frictions (fees, slippage, and operational costs) that penalize large or frequent trades. These costs matter. They shape liquidity, drive agent behavior, and, crucially, affect how stable or manipulable a pool may be.
This new model introduces explicit transaction costs into the MFG framework. Agents still control how much they trade over time, but now every action carries a penalty. The math becomes richer, the solutions more elusive, and the implications for DeFi more grounded in reality.
In what follows, we’ll walk through this more realistic model, highlight the mathematical challenges it poses, and reflect on what it teaches us not just about agents in a pool, but about the growing gap between elegant theory and messy market design.
Model Formulation
We now introduce a refined mean field game model for liquidity provision that incorporates transaction costs into the decision-making process of agents. The new setting retains the general structure of the previous model in which agents choose trading strategies to maximize their individual utility while jointly determining the dynamics of a liquidity pool, but introduces a crucial modification in the way price impact and market frictions are modeled.
Each agent controls a trading strategy
where α^i_t denotes the trading rate, positive for purchases and negative for sales. The agent’s state variables are:
X^i_t: the agent’s inventory of the risky asset,
Y^i_t: the agent’s inventory of the stablecoin,
These evolve as:
where instead of using the equilibrium price we use the mid-price
with
the ask and bid price resp., τ is the pool’s fee and φ = 1- τ.
The final dynamic of the inventory of stablecoins is given by
The novelty of the model lies in the new structure of the objective function J to be maximized. Remember that the limit problem is to find the control α = (α_t)_t such that
where
and
where the costs h and l are measurable.
Compared to the previous model the coupling between agents is more intricate since now both the control α and the mean field term appears inside the cost utility function in a multiplicative fashion.
This formulation sets the stage for a deeper investigation into whether the resulting MFG still admits a solution and how its structure compares to simpler models.
Do We Still Have a Mean Field Game Solution?
In the original model without transaction costs, the mean field game (MFG) had a structure that allowed for a relatively clean solution. The optimal control problem satisfied some assumptions that allowed us to invoke Theorem 3.5 of the article “A probabilistic weak formulation of mean field games and applications” by R. Carmona and D. Lacker.
In the new model, unfortunately one of those assumptions is not True anymore. Specifically, is not true that the function f is of the form
Now, the function cannot be separated into a function of the control and a function of the law of controls, due to the new term that involves the control and the mean field term in a multiplicative form, mentioned in the previous section, which breaks a key structural assumption.
This leads to two major consequences:
No guaranteed solution: The lack of separability makes it difficult to prove that a fixed point for the mean field exists. We cannot directly apply the classical results used in the first model.
Higher coupling: The cost functional now tightly couples the behavior of each agent to the instantaneous average action of the entire population and the current state of the reserves. This adds complexity not only in the analysis, but also in potential numerical implementations.
In summary, while the model is more realistic and captures transaction costs, it pushes the boundaries of existing MFG theory. Proving the existence (or even approximating) solutions for this setting requires new ideas, and may depend heavily on numerical evidence rather than theoretical guarantees.
Conclusion (Part I)
The inclusion of transaction costs adds a deceptively small twist to the liquidity pool model but its implications are profound. By modifying the reward structure to penalize trading intensity, we no longer get to ignore the endogenous price dynamics, and the entire optimization landscape shifts.
While the core ingredients (an AMM price rule, strategic traders, and mean field aggregation) remain in place, the analytical machinery starts to creak. What was once an elegant, decoupled system becomes tangled in its own feedback loops.
In Part II, we explore these consequences in full. Can we still talk about equilibria in the usual sense? And how close can we get using approximations when exact solutions fail?
Stay tuned.