Leitura rápida
Comece pela explicação mais curta e útil antes de aprofundar.
A family of Rust arithmetic methods — including checked_add, checked_sub, checked_mul, checked_div, and their saturating_* counterparts — that return an Option<T> (None on overflow/underflow) instead of silently wrapping, allowing Solana programs to propagate an error rather than continue with corrupted values. Because Rust's default integer arithmetic panics on overflow only in debug builds and wraps silently in release builds (the mode used for on-chain deployments), all financial and security-sensitive arithmetic in Solana programs should use these methods. Anchor's declare_program! macro and many audit checklists explicitly require checked math on all token amount calculations.