Integer Overflows/Underflows
Integer Overflows and Underflows occur when mathematical operations exceed the storage limits of a variable, causing unexpected behavior. These vulnerabilities allow attackers to manipulate values in ways that can break contract logic.
How They Work
Integer Overflow: When a value exceeds the maximum limit of its data type, it wraps around to the minimum value. Example:
Integer Underflow: When a value is reduced below the minimum limit of its data type, it wraps around to the maximum value. Example:
Real-Life Impact
Attackers exploit overflows/underflows to:
Mint extra tokens.
Bypass balance checks.
Gain unauthorized access to funds.
Last updated