Liquidity & price impact

Read pool reserves as quantities before interpreting dollar liquidity

Read token reserves and their units before converting pool liquidity into dollars or estimating trade capacity.

Start with the quantity of each asset and identify which reserve receives your input and which supplies your output. Dollar liquidity is a valuation of those quantities; it is not the quantity of either token available at a fixed exchange rate.

A reserve table before a dollar total

Take a hypothetical full-range pool with 50,000 units of Token A and 100,000 units of Token B. The local reserve ratio is two B per A. If A is valued at $2 and B at $1 for this illustration, each side is worth $100,000 and combined TVL is $200,000.

A sale of A for B adds A and removes B. The relevant starting input reserve is 50,000 A, not the $200,000 headline. The output reserve is 100,000 B, but a finite input cannot generally withdraw all of it under a constant-product curve.

Check units before ratios

Normalize raw balances by the tokens' decimal conventions before presenting human-readable quantities. A six-decimal token and an eighteen-decimal token can have raw integer balances that differ enormously even when their economic values match.

The Uniswap v2 reference library explicitly maps reserves to token order for calculations. Reversing input and output reserves changes the quoted direction and invalidates the result.

Know which model the reserves belong to

Do not apply a two-reserve constant-product calculation directly to a concentrated-liquidity pool's total token balances. Active ranges and virtual curve parameters require different treatment. A contract balance can also differ from an implementation's cached pricing reserve.

Preserve pool identity, token order, quantities and observation state. Then calculate the size-specific output using the appropriate model or obtain an executable quote. Converting reserves to dollars is useful after those checks; doing it first can conceal the information that actually determines execution.

Sources & verification (2)

Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.

  1. UniswapV2Library.sol

    Reference amount-out and amount-in arithmetic; integer rounding.

    https://github.com/Uniswap/v2-periphery/blob/master/contracts/libraries/UniswapV2Library.sol
  2. ERC-20: Token Standard

    Integer balances, decimals display field, allowance and transfers.

    https://eips.ethereum.org/EIPS/eip-20

Continue reading

Why LP-token value is not a usable swap-size limit How a token price move can change TVL without changing token counts Can a high-volume pool still give a poor large-trade quote?