Table of Contents
Fetching ...

Riemannian Geometry of Optimal Rebalancing in Dynamic Weight Automated Market Makers

Matthew Willetts

Abstract

In Temporal Function Market Making (TFMM), a dynamic weight AMM pool rebalances from initial to final holdings by creating a series of arbitrage opportunities whose total cost depends on the weight trajectory taken. We show that the per-step arbitrage loss is the KL divergence between new and old weight vectors, meaning the Fisher--Rao metric is the natural Riemannian metric on the weight simplex. The loss-minimising interpolation under the leading-order expansion of this KL cost is SLERP (Spherical Linear Interpolation) in the Hellinger coordinates $η_i = \sqrt{w_i}$, i.e.\ a geodesic on the positive orthant of the unit sphere traversed at constant speed. The SLERP midpoint equals the (AM+GM)/normalise heuristic of prior work (Willetts & Harrington, 2024), so the heuristic lies on the geodesic. This identity holds for any number of tokens and any magnitude of weight change; using this link, all dyadic points on the geodesic can be reached by recursive AM-GM bisection without trigonometric functions. SLERP's relative sub-optimality on the full KL cost is proportional to the squared magnitude of the overall weight change and to $1/f^2$, where $f$ is the number of interpolation steps.

Riemannian Geometry of Optimal Rebalancing in Dynamic Weight Automated Market Makers

Abstract

In Temporal Function Market Making (TFMM), a dynamic weight AMM pool rebalances from initial to final holdings by creating a series of arbitrage opportunities whose total cost depends on the weight trajectory taken. We show that the per-step arbitrage loss is the KL divergence between new and old weight vectors, meaning the Fisher--Rao metric is the natural Riemannian metric on the weight simplex. The loss-minimising interpolation under the leading-order expansion of this KL cost is SLERP (Spherical Linear Interpolation) in the Hellinger coordinates , i.e.\ a geodesic on the positive orthant of the unit sphere traversed at constant speed. The SLERP midpoint equals the (AM+GM)/normalise heuristic of prior work (Willetts & Harrington, 2024), so the heuristic lies on the geodesic. This identity holds for any number of tokens and any magnitude of weight change; using this link, all dyadic points on the geodesic can be reached by recursive AM-GM bisection without trigonometric functions. SLERP's relative sub-optimality on the full KL cost is proportional to the squared magnitude of the overall weight change and to , where is the number of interpolation steps.
Paper Structure (49 sections, 11 theorems, 53 equations, 11 figures, 3 tables, 2 algorithms)

This paper contains 49 sections, 11 theorems, 53 equations, 11 figures, 3 tables, 2 algorithms.

Key Result

Proposition 1

[Retention Ratio] For an $N$-asset G3M pool with weights changing from $\boldsymbol{\mathbf{w}}^{\mathrm{start}}$ one block to $\boldsymbol{\mathbf{w}}^{\mathrm{end}}$ the next block, with zero fees, perfect arbitrage and, constant prices, the ratio of initial value to final value of the pool is the

Figures (11)

  • Figure 1: Why weight interpolation reduces rebalancing cost. (a) For a G3M pool, rebalancing cost is quadratic in the weight change $\Delta w$, so splitting into $f$ equal sub-steps of $\Delta w/f$ reduces total cost by a factor of $f$. (b) The quadratic cost curve is flat near the origin: small weight changes cost almost nothing, while a single large change incurs a disproportionately high arb loss.
  • Figure 2: The Hellinger embedding maps the weight simplex $\Delta^{N-1}$ to the positive orthant of the unit sphere $S^{N-1}_+$ via $\eta_i = \sqrt{w_i}$. Under this isometry, the Fisher--Rao metric becomes a scaling of the standard round metric, and geodesics (shortest paths under the arbitrage cost) become great circles, computable in closed form via SLERP.
  • Figure 3: Visual proof that the SLERP midpoint equals (AM+GM)/normalise (in the N=3 case). To return to weight space we undo the Hellinger embedding $\eta_i = \sqrt{w_i}$, i.e. square. Each square decomposes $(\sqrt{w_i^{\mathrm{s}}} + \sqrt{w_i^{\mathrm{e}}})^2 = (w_i^{\mathrm{s}} + w_i^{\mathrm{e}}) + 2\sqrt{w_i^{\mathrm{s}}\, w_i^{\mathrm{e}}} = 2(\mathrm{AM}_i + \mathrm{GM}_i)$. Red diagonal blocks contribute $2\,\mathrm{AM}_i$; blue off-diagonal blocks contribute $2\,\mathrm{GM}_i$. The factor of 2 cancels with normalisation, giving us the (AM+GM)/normalise heuristic exactly.
  • Figure 4: Recursive bisection on the positive orthant of $S^{N-1}_+$. At each depth $d$, the (AM+GM)/normalise midpoint is inserted between every pair of adjacent points (bright green: newly inserted; dark green: inherited from previous depth). By depth 3, the $2^d+1 = 9$ points densely trace the geodesic arc, all computed without trigonometric functions.
  • Figure 5: Per-step arbitrage loss $-\log r_k$ across 1000 steps, $N=3$ setup. Left to right: linear (std/mean $= 0.32$), (AM+GM)/normalise ($0.086$), SLERP ($0.0002$). SLERP achieves near-perfect uniformity, orders of magnitude better than other methods.
  • ...and 6 more figures

Theorems & Definitions (24)

  • Proposition 1
  • proof
  • Theorem 1: Arbitrage loss as KL divergence
  • proof
  • Corollary 1
  • proof
  • Corollary 2: SLERP optimality
  • proof
  • Theorem 2
  • proof
  • ...and 14 more