Skip to main content

Integer Overflow

What it detects

The detector analyzes addition and multiplication that can overflow when executed inside unchecked blocks or on Solidity versions prior to 0.8. Overflowed values wrap to zero or a small number, breaking contract logic.

Typical symptoms

  • Balances or counters jump to very small numbers after large operations
  • Arithmetic coded inside unchecked sections

Solidity snippet (v0.8.25)

pragma solidity ^0.8.25;

contract Overflow {
function add(uint256 a, uint256 b) external pure returns (uint256) {
unchecked {
// Wraps on overflow
return a + b;
}
}
}

Why it matters on EVM

Overflow can let attackers bypass limits or mint excess value, undermining financial calculations and supply constraints.