Skip to main content

    Calculation method

    How MoonMath calculates lp net return

    LP Net Return CalculatorDid providing liquidity outperform holding?

    The formula

    The position is valued as size × √r against holding it as size × (1+r) ÷ 2 for a price ratio r, plus fee income of daily volume × days × fee rate × the provider's retained share × the pool share, minus gas.

    What it reads

    • The position size and the pool's total liquidity, which set the pool share
    • The entry price and the current price
    • Daily volume, the fee rate and the protocol's share of it
    • The period in days, plus any incentives and gas costs

    What it assumes

    • The pool share is fixed at entry and never re-derived as the pool or the position changes
    • Daily volume is constant for the whole period
    • Fees accrue outside the invariant: they are added on top and never compounded back into the position
    • The position is full-range and 50/50

    What this does not establish

    • It does not model a price path — only the start and end prices matter, so every route between them gives the same answer
    • A break-even volume is what the arithmetic requires, not a forecast that such volume will occur
    • It excludes the price impact of entering and exiting the position
    • The protocol's fee cut shown is the whole pool's, not the provider's share of it

    Run it

    Compare liquidity-provider returns against holding after impermanent loss, earned trading fees, incentives and gas costs. Fees can offset impermanent loss, but they do not guarantee LP outperformance.

    Open the LP Net Return 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