Quote denomination tells you which asset measures the value of another. A rate of B per A and a rate of A per B describe reciprocal relationships. Decimal formatting introduces another layer: the displayed amount must use the token's own unit scale.
Use dimensional arithmetic
In a hypothetical exchange, 20 A yields 50 B. The average output rate is 2.5 B per A. The inverse description is 0.4 A per B. Both are correct descriptions of that same exchange.
If another screen displays 0.4 A per B, it is not offering a worse rate merely because 0.4 is numerically smaller than 2.5. The units differ.
Token decimals are not market value
The ERC-20 standard defines optional decimal metadata for converting integer token units into a user representation. More decimal places do not make a token more valuable or create additional economic liquidity.
For example, 1,000,000 base units can represent one token for a six-decimal asset. The same integer would represent a very different displayed amount for an eighteen-decimal asset. A quote comparison must normalize each token according to its own metadata.
Dollar values add a reference assumption
A displayed fiat value depends on the conversion price used by the interface. Two screens can show the same token receipt but different dollar estimates because they use different references or timestamps. The token quantity and the valuation are separate observations.
For a direct token comparison, preserve input asset, input amount, output asset and output amount first. Calculate average rates and fiat estimates afterward with explicitly identified units.
Uniswap's pricing documentation concerns token amounts derived from reserves. It does not make an arbitrary external dollar conversion part of the pool's output promise.
Whenever numbers seem inconsistent, check direction, decimal scale and reference currency before concluding that execution differs. Unit errors can imitate large price discrepancies while describing identical underlying quantities.
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.
- ERC-20: Token Standard
Token transfer, allowance, optional symbol and decimals; standard is CC0.
https://eips.ethereum.org/EIPS/eip-20 - Uniswap v2 Pricing
Reserve pricing, invariant enforcement and exact swap modes.
https://developers.uniswap.org/docs/protocols/v2/concepts/pricing