Skip to main content

Value Leakage: The Accounting Problem Hidden Inside AMMs

· 11 min read
Eric Forgy
Founder of CavalRe

Uniswap changed the world.

It made liquidity permissionless. It proved that an automated market maker could replace an order book with a simple invariant and still create deep, always-on markets.

But the same mechanism that made Uniswap elegant also introduced a structural cost to LPs.

That cost is usually called impermanent loss or LVR.

At CavalRe, we call the trade-level accounting expression of this cost:

Value Leakage

Value Leakage is the hidden subsidy paid by LPs to traders when an AMM executes inventory changes away from post-trade fair value.

Multiswap removes this subsidy at the accounting source.

Then it uses dynamic weights for extreme capital efficiency.

This article explains the idea.


1. Start with the accounting

Assume a pool begins with:

aa

units of asset AA.

At the beginning of the period, the price of AA is:

P0=P(0)P_0 = P(0)

At the end of the period, the price is:

PT=P(T)P_T = P(T)

During the period, the pool buys:

dada

additional units of AA at effective price:

PeffP_{\text{eff}}

After the trade, the pool owns:

a+daa + da

units of AA.

Under fair-value accounting, the pool’s income from asset AA is:

NI=(a+da)PTaP0daPeffNI = (a+da)P_T - aP_0 - daP_{\text{eff}}

Equivalently:

NI=a(PTP0)+da(PTPeff)NI = a(P_T-P_0) + da(P_T-P_{\text{eff}})

This separates the period result into two pieces.

The first term:

a(PTP0)a(P_T-P_0)

is the gain or loss on the opening inventory.

The second term:

da(PTPeff)da(P_T-P_{\text{eff}})

is the gain or loss on inventory acquired during the period.

That second term is where the AMM story lives.


2. From the AMM’s perspective, buying means price moves down

When an AMM buys asset AA, the user is selling AA into the pool.

By the AMM’s own pricing math, this increases the pool’s inventory of AA and moves the AMM price of AA down.

So for an AMM buying AA:

P0PeffPTP_0 \ge P_{\text{eff}} \ge P_T

The pool loses value on the inventory it already held:

a(PTP0)0a(P_T-P_0) \le 0

and it can also lose value immediately on the inventory it just bought:

da(PTPeff)0da(P_T-P_{\text{eff}}) \le 0

The total income is still:

NI=a(PTP0)+da(PTPeff)NI = a(P_T-P_0) + da(P_T-P_{\text{eff}})

The crucial question is:

What is the effective price?

That is where Uniswap and Multiswap diverge.


3. Uniswap: path-average execution

For a constant-product AMM, measured in the LP token / pool-equity numeraire, the AMM’s effective purchase price is exactly the arithmetic midpoint between the pre-trade and post-trade prices:

Peff,uni=P0+PT2P_{\text{eff,uni}} = \frac{P_0 + P_T}{2}

So Uniswap’s income is:

NIuni=a(PTP0)+da(PTP0+PT2)NI_{\text{uni}} = a(P_T-P_0) + da\left(P_T-\frac{P_0+P_T}{2}\right)

Simplifying:

NIuni=a(PTP0)+da2(PTP0)NI_{\text{uni}} = a(P_T-P_0) + \frac{da}{2}(P_T-P_0)

Therefore:

NIuni=(a+da2)(PTP0)NI_{\text{uni}} = \left(a+\frac{da}{2}\right)(P_T-P_0)

Since the AMM is buying on a down move:

PT<P0P_T < P_0

the additional term is negative.

Uniswap buys the falling asset above terminal fair value.

That is the subsidy.


4. Multiswap: post-trade fair-value execution

Multiswap uses post-trade pricing:

Peff,multi=PTP_{\text{eff,multi}} = P_T

So Multiswap’s income is:

NImulti=a(PTP0)+da(PTPT)NI_{\text{multi}} = a(P_T-P_0) + da(P_T-P_T)

The acquired-inventory term disappears:

NImulti=a(PTP0)NI_{\text{multi}} = a(P_T-P_0)

The pool still has price exposure on the inventory it already held.

But the new inventory enters at post-trade fair value.

That means the trade creates no immediate unrealized loss on acquired inventory.


5. Value Leakage

Now compare Uniswap and Multiswap:

NImultiNIuniNI_{\text{multi}} - NI_{\text{uni}}

Using the expressions above:

NImulti=a(PTP0)NI_{\text{multi}} = a(P_T-P_0)

and:

NIuni=a(PTP0)+da2(PTP0)NI_{\text{uni}} = a(P_T-P_0) + \frac{da}{2}(P_T-P_0)

So:

NImultiNIuni=da2(PTP0)NI_{\text{multi}} - NI_{\text{uni}} = -\frac{da}{2}(P_T-P_0)

Since PT<P0P_T < P_0, this is positive:

NImultiNIuni=da2(P0PT)NI_{\text{multi}} - NI_{\text{uni}} = \frac{da}{2}(P_0-P_T)

We call this amount Value Leakage:

Value Leakage=NImultiNIuni\boxed{ \text{Value Leakage} = NI_{\text{multi}} - NI_{\text{uni}} }

For a Uniswap-style constant-product AMM:

Value Leakage=da2(P0PT)\boxed{ \text{Value Leakage} = \frac{da}{2}(P_0-P_T) }

Equivalently:

Value Leakage=da(Peff,uniPeff,multi)\text{Value Leakage} = da(P_{\text{eff,uni}} - P_{\text{eff,multi}})

with:

Peff,uni=P0+PT2P_{\text{eff,uni}} = \frac{P_0+P_T}{2}

and:

Peff,multi=PTP_{\text{eff,multi}} = P_T

So:

Value Leakage=da(P0+PT2PT)\text{Value Leakage} = da\left(\frac{P_0+P_T}{2}-P_T\right)

which simplifies to:

Value Leakage=da2(P0PT)\text{Value Leakage} = \frac{da}{2}(P_0-P_T)

This is the accounting expression of the LP-to-trader subsidy embedded in the curve.


6. Fees try to recover the subsidy

Uniswap charges trading fees.

Those fees are intended to compensate LPs for making markets and absorbing inventory risk.

But the structural accounting is:

Net LP impact=feesValue Leakage\text{Net LP impact} = \text{fees} - \text{Value Leakage}

LPs are whole only when:

feesValue Leakage\text{fees} \ge \text{Value Leakage}

The problem is that the leakage is structural.

Fees are a reimbursement attempt after the subsidy has already been paid.

Multiswap removes the subsidy before reimbursement is needed.

The distinction is simple:

MechanismWhat happens
UniswapLPs subsidize traders, fees try to recover the subsidy
MultiswapThe subsidy is removed at the accounting source

7. Post-trade pricing alone is not enough

Post-trade pricing has been tried before.

The usual failure mode is constant weights.

If an AMM uses post-trade pricing but holds weights constant, then it removes Value Leakage by making traders pay the full terminal price impact.

For an AMM buying AA, the price moves down:

PT<P0P_T < P_0

Uniswap gives the trader the path-average price:

Peff,uni=P0+PT2P_{\text{eff,uni}} = \frac{P_0+P_T}{2}

Constant-weight post-trade pricing gives the trader the terminal price:

Peff=PTP_{\text{eff}} = P_T

Since:

PT<P0+PT2P_T < \frac{P_0+P_T}{2}

the trader receives worse execution.

That means constant-weight post-trade pricing can eliminate LP leakage while reducing capital efficiency.

This is why post-trade pricing alone is incomplete.

The breakthrough is:

Post-trade pricing removes Value Leakage. Dynamic weights control the post-trade price.


8. Dynamic weights for extreme capital efficiency

In Multiswap, the post-trade price is not just a passive consequence of reserves.

It depends on post-trade balances and post-trade weights.

The weights are dynamic.

That creates a deterministic control surface for price impact.

Instead of treating every trade as a movement along a fixed curve, Multiswap can ask a better question:

Does this trade improve or worsen the pool’s balance sheet?

The genesis pool introduces a simple and intuitive concept:

Target weights

A target weight defines the pool’s desired composition.

Trades that move the pool toward target weights improve the pool’s balance sheet.

Trades that move the pool away from target weights worsen it.

In the genesis dynamic-weight model:

Trades that move weights toward target weights, without overshooting, receive precisely zero price impact.

That is the capital-efficiency unlock.


9. The genesis price-impact model

Let:

r=daar = \frac{da}{a}

be the relative trade size.

Let:

rtr_t

be the relative trade size required to move the relevant weight to its target.

The price-impact ratio is:

P(T)P(0)=11+κ(r,rt,n)r\frac{P(T)}{P(0)} = \frac{1}{1+\kappa(r,r_t,n)r}

where:

nn

is the stableness parameter.

The genesis pool uses a piecewise definition for κ\kappa.

More explicitly:

κ(r,rt,n)={0,0<r<rt0,0>r>rtrrt1+rtn,otherwise\kappa(r,r_t,n) = \begin{cases} 0, & 0 < r < r_t \\ 0, & 0 > r > r_t \\ \left|\frac{r-r_t}{1+r_t}\right|^n, & \text{otherwise} \end{cases}

In the zero-impact regions:

P(T)P(0)=1\frac{P(T)}{P(0)} = 1

So:

P(T)=P(0)P(T)=P(0)

That is zero price impact.

The intuition is direct:

Trade typeEffectPrice impact
Moves toward targetImproves pool compositionZero
Lands exactly on targetAchieves desired compositionZero
Overshoots targetImproves then goes too farPositive
Moves away from targetWorsens pool compositionPositive

This is the genesis version of dynamic weights.

The broader design space is much larger.


10. Stableness

The final parameter in the genesis model is:

nn

We call this parameter stableness.

Stableness controls how quickly price impact turns on as a trade deviates from the target-rebalancing trade.

Recall the price-impact formula:

P(T)P(0)=11+κ(r,rt,n)r\frac{P(T)}{P(0)} = \frac{1}{1+\kappa(r,r_t,n)r}

Outside the zero-impact region, the genesis model uses:

κ(r,rt,n)=rrt1+rtn\kappa(r,r_t,n) = \left| \frac{r-r_t}{1+r_t} \right|^n

Define the normalized distance from target:

x=rrt1+rtx = \left| \frac{r-r_t}{1+r_t} \right|

Then:

κ=xn\kappa = x^n

That means stableness controls the shape of the price-impact curve around the target.

When nn is low, price impact turns on quickly.

When nn is high, price impact stays low near the target and turns on meaningfully only as the trade moves farther away.

This matters a lot.

If:

n=0n=0

then, outside the zero-impact region:

κ=x0=1\kappa = x^0 = 1

so price impact becomes:

P(T)P(0)=11+r\frac{P(T)}{P(0)} = \frac{1}{1+r}

That is a very conservative model.

It gives up the main capital-efficiency advantage because price impact activates immediately once a trade leaves the zero-impact corridor.

This was the failed beta design.

The new Multiswap genesis model uses:

n=10n=10

With stableness 1010, near-target deviations become dramatically less punitive.

For example:

Normalized distance from target xxx1x^1x10x^{10}
0.100.100.100.100.00000000010.0000000001
0.250.250.250.250.000000950.00000095
0.500.500.500.500.000980.00098
0.750.750.750.750.05630.0563
1.001.001.001.001.001.00

That is the difference between ordinary price impact and extreme capital efficiency.

Stableness 1010 lets Multiswap keep prices stable across a wide range of near-target flow while still charging price impact for trades that move too far away from the pool’s balance-sheet objective.

In plain English:

Stableness controls the pool’s tolerance for near-target flow.

Higher stableness means the pool is more willing to absorb trades near the target with low price impact.

Lower stableness means the pool becomes defensive sooner.

So the tradeoff is:

StablenessBehavior
Low stablenessMore conservative, price impact turns on sooner
High stablenessMore capital efficient, price impact stays low near target
Stableness 00Failed beta behavior: price impact activates immediately outside the zero-impact corridor
Stableness 1010New Multiswap behavior: prices remain stable across a wide near-target region

This is why dynamic weights matter.

Post-trade pricing removes Value Leakage.

Target weights define the pool’s desired balance-sheet direction.

Stableness determines how much low-impact capacity exists around that target.

Together, they produce the core Multiswap mechanism:

Zero Value Leakage. Zero price impact for rebalancing flow. Low price impact for near-target flow.


11. Why this changes the AMM story

Uniswap says:

Bigger trade, more price impact.

Multiswap says:

Flow that improves the pool’s balance sheet can receive zero price impact. Flow that worsens the pool’s balance sheet pays price impact.

That is a fundamentally different market structure.

A rational dealer does not penalize flow that improves inventory.

A rational balance sheet welcomes it.

Multiswap brings that logic onchain.


12. The full mechanism

The Multiswap story has three parts.

1. Post-trade pricing

Multiswap sets:

Peff=PTP_{\text{eff}}=P_T

This removes the acquired-inventory leakage term:

da(PTPeff)=0da(P_T-P_{\text{eff}})=0

So the trade creates no immediate unrealized loss on acquired inventory.

2. Dynamic weights

The post-trade price PTP_T depends on deterministic post-trade weights.

That means price impact becomes a design parameter rather than a hardwired consequence of a fixed invariant.

3. Target weights

The genesis pool uses target weights to identify desirable flow.

Trades that move the pool toward target receive zero price impact.

Trades that move the pool away from target pay price impact.

4. Stableness

Stableness determines how wide the low-impact region is around the target.

Higher stableness makes Multiswap more tolerant of near-target flow.

Lower stableness makes the pool more conservative.

Together:

Post-trade pricing removes Value Leakage. Dynamic weights unlock extreme capital efficiency. Target weights define the pool’s desired balance-sheet direction. Stableness controls how much low-impact capacity exists around that target.


13. The punchline

Uniswap LPs subsidize traders through path-average execution.

Fees attempt to claw back that subsidy.

Multiswap removes the subsidy at the accounting source.

Then it uses dynamic weights to control price impact.

The result is a new AMM accounting model:

Value Leakage removed.\boxed{ \text{Value Leakage removed.} }

and a new market structure:

Zero price impact for rebalancing flow.\boxed{ \text{Zero price impact for rebalancing flow.} }

and a new capital-efficiency dial:

Stableness controls low-impact capacity around the target.\boxed{ \text{Stableness controls low-impact capacity around the target.} }

This is the convergence of capital markets and capital management.

Multiswap is not just another AMM curve.

It is an onchain balance sheet that trades.