Leitura rápida
Comece pela explicação mais curta e útil antes de aprofundar.
A class of arithmetic vulnerabilities where an integer computation produces a result outside the bounds of its fixed-width type, wrapping around silently in Rust's release builds (since Rust panics on overflow only in debug mode), yielding an incorrect value that can corrupt token balances, borrow limits, or access control counters. For example, subtracting a larger u64 from a smaller one wraps to near u64::MAX (~1.8 × 10^19), which could be interpreted as an enormous balance. Solana programs must use Rust's checked_add, checked_sub, checked_mul, and checked_div methods (or the saturating_* / wrapping_* variants with deliberate intent) on all financial arithmetic to eliminate this class of bugs.