Mixed-decimals math without explicit scaling
Uniswap (v2 + v3)'s assessment for RD-F-017 — scored green on the v1.7.0 rubric. The evidence below is the curator's reasoning for this score.
Evidence summary #
V3: sqrtPriceX96 (Q64.96 fixed-point) and raw token amounts — decimal normalization is integrator responsibility. V2: Constant-product invariant uses raw token amounts; no cross-decimal arithmetic. No known mixed-decimals exploit in V2 or V3 core. Green.
Detail #
V3's core design deliberately avoids cross-token decimal arithmetic by using fixed-point price representation (sqrtPriceX96). The protocol does not normalize decimals internally — this is documented in the V3 whitepaper as intentional. V2 similarly uses raw token amounts in the constant-product formula without decimal normalization. Integrators are responsible for handling decimal differences.
Sources #
- DocsV3 whitepaper — sqrtPriceX96 fixed-point price representation designUniswap V3 whitepaper §3retrieved 2026-05-12
Methodology #
Determine whether shared numerator/denominator arithmetic operates over tokens with different decimals without WAD/RAY normalization or explicit decimal-adjustment.
See the full factor methodology and distribution across all protocols →