DeFi Security · Vulnerability class
Arithmetic, overflow and rounding
Numbers that do not fit their type, or that are cut or rounded in the wrong direction, create value that does not exist.
The concept
Truncation, overflow and rounding errors are small on their own and decisive when an attacker can repeat or choose the inputs.
Defensive lessons
- Use checked arithmetic and reject values that do not fit.
- Check both sides of a trade.
- Round in the protocol's favour and test the edges.
Stored incidents
2026-09-03 · reported loss $1.73M
Notional V1: integer overflow in a deprecated escrow contractOfficial statement