Mixed-decimals math without explicit scaling
Orca'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 #
Whirlpools handles SPL tokens with varying decimal counts. The sqrt_price math framework uses Q64.64 fixed-point representation as the canonical unit, providing explicit scaling across all token decimal configurations. Neodyme audit (2022-05-05) and OtterSec audit (2024-08-21) both covered mathematical correctness. No findings on decimal scaling errors reported in available summaries. Rust's type system and the audited fixed-point math library provide strong structural protection.
Sources #
- AuditNeodyme Orca Whirlpools Audit 2022-05-05https://dev.orca.so/.audits/2022-05-05.pdfretrieved 2026-05-16
- Whirlpool program lib.rs (Anchor/Rust — confirms non-EVM substrate)https://github.com/orca-so/whirlpools/blob/main/programs/whirlpool/src/lib.rsretrieved 2026-05-16
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 →