Skip to main content

Rounding Logic Flaw

Definition

A rounding logic flaw is a programming error where imprecise rounding of numerical values in code leads to unintended outcomes or vulnerabilities. This flaw occurs when calculations involving fractions or decimals are not handled with sufficient precision, causing small discrepancies that can accumulate or be exploited. In smart contracts, a rounding logic flaw might result in an attacker siphoning off minute amounts of tokens repeatedly, or it could cause incorrect distribution of funds. It is a specific type of precision error that can have significant financial consequences.