Skip to the article
Web3 News

Crypto markets, protocols and policy

How Token Decimals Shape Liquidity Pool Prices

Pools store token balances as integers, while each token’s decimals set its display scale; adjusting both reserves gives the price before fees and trade impact.

Web3 News Editorial2 min read

How Token Decimals Shape Liquidity Pool Prices

Automated market makers price tokens with different decimals by scaling each raw reserve into readable units before comparing the balances. EIP-20 defines decimals as optional metadata for displaying token amounts, and Uniswap’s pool documentation says reserves are held in raw token units.

How do decimals change a pool’s quoted price?

Decimals set the unit conversion, not the token’s value: divide a raw balance by 10 raised to that token’s decimal count. For example, if a pool holds 2 × 1018 units of an 18-decimal token and 6 × 106 units of a 6-decimal token, that is 2 and 6 whole tokens, respectively, or 3 units of the second token per first token.

The reverse quote is the inverse: 1/3 of the first token per second. For more on how route choice affects a swap, the publication’s thor swap guide goes into the comparison in detail.

Does a pool use the reserve ratio as its price?

In a classic constant-product pool, Uniswap describes reserves as x and y, with their product kept constant by trades; the spot price for small trades is the ratio of the adjusted reserves. A larger trade moves that ratio along the curve, so the average execution price differs from the starting quote, and fees reduce the amount received.

Concentrated-liquidity pools use a different representation. Uniswap’s v3 documentation derives price from the pool’s square-root price and applies token decimal scaling when converting that value into a human-readable quote.

What should you check before comparing pool prices?

Compare amounts in whole tokens and keep the quote direction explicit. To verify a displayed quote, identify the token order, read each token’s decimal metadata, and convert both balances before dividing.

  • Confirm the token addresses; symbols can be duplicated.
  • Check the decimal count for each token rather than assuming both use 18.
  • Compare the same quote direction and account for fees and trade size.

EIP-20 makes the decimals field optional, so a missing value cannot safely be treated as proof of an 18-decimal scale. The pool’s decimal-adjusted ratio gives a starting price; the execution quote also depends on pool design, available liquidity, fees and trade size.

For the next quote, check the token metadata and pool state at the time of the trade. The exact execution amount remains unconfirmed until the transaction is priced and submitted.