Skip to main content

    Calculation method

    How MoonMath calculates liquidity impact

    Liquidity Impact SimulatorHow does changing liquidity affect the pool?

    The formula

    Adding or removing liquidity scales both reserves proportionally, so the spot price is unchanged and only depth moves. Impermanent loss uses 2√r ÷ (1+r) − 1 for a price ratio r. Slippage splits a trade across pools by quote liquidity and applies the constant product to each. Pool health is 45% depth, 40% depth against market cap, 15% activity.

    What it reads

    • Observed pool reserves and total pool liquidity
    • The liquidity amount to add or remove
    • For impermanent loss: the entry price, the current price and the position size
    • For slippage: trade sizes as a share of the pool

    What it assumes

    • Liquidity is added or removed in exactly the existing reserve ratio
    • The impermanent-loss formula describes a full-range 50/50 constant-product position and excludes fee income
    • The slippage estimate applies no trading fee and splits across pools by quote liquidity rather than routing optimally
    • Depth and activity are separate signals: turnover does not mathematically predict slippage

    What this does not establish

    • Adding or removing liquidity does not move the price here — the price change is zero by construction, and depth is reported instead
    • The health score is an index over reported aggregate liquidity, not a measure of what a specific trade would execute at
    • Slippage estimates are sized against reported pool liquidity rather than routable reserves
    • Impermanent loss without fees is not the net outcome of providing liquidity

    Run it

    Simulate how adding or removing balanced AMM liquidity changes pool reserves and execution depth. Balanced liquidity changes tradable depth without mechanically changing the current pool price.

    Open the Liquidity Impact calculator

    How the market itself works

    This page describes MoonMath's arithmetic. The mechanics section describes the market: how an order book forms a price, why order-book depth is not the same thing as pool liquidity, and what a public book does and does not let you observe.

    Read the market mechanics