Calculation method
How MoonMath calculates market cap
Market Cap Simulator — What would it take to reach a target?
The formula
For each observed constant-product pool, the inflow required is quoteReserveUsd × (√(targetPrice ÷ poolSpotPrice) − 1), summed across pools and grossed up for fees. Price impact is measured against a no-impact notional computed from the same reserves.
What it reads
- The token's current price, circulating supply and market cap as observed
- Pool-level reserves: base reserve, quote reserve and the quote asset's price
- The target market caps to reach
- Optionally a holding, to state what the target would mean for it
What it assumes
- Every pool is pushed to the same target price independently and the inflows are added, with no arbitrage or routing between them
- The fee rate is a per-chain default rather than the pool's actual fee, and is labelled as estimated
- A pool already at or above the target contributes no inflow rather than a negative one
- It is a static snapshot: no other trader, no order flow, and no path through time
What this does not establish
- It is not a downside model — a target at or below the current market cap is refused rather than answered
- Order-book depth from centralised venues is reported separately and never merged into the constant-product maths
- Concentrated-liquidity, stable-swap and reserve-less pools cannot enter the invariant and are counted as excluded
- The inflow is what the arithmetic requires, not a prediction that it will arrive
Run it
Calculate token price at different market caps and estimate the liquidity-aware AMM inflow required to move one observed pool. Market cap is a valuation measure, not an amount of cash stored in the token.
Open the Market Cap calculatorHow 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