The ERC20 core implementation contains a critical arithmetic safety flaw in the token burning logic.
The _burn() function inside ERC20Internals.sol performs raw subtraction inside inline assembly without any underflow protection.
If the burn amount exceeds the current user balance or total token supply, the subtraction wraps around due to unchecked EVM arithmetic, producing extremely large values. This permanently corrupts both the global supply accounting and individual balances.
Although _burn() is marked as internal, the contract is explicitly designed to be inherited. Any child contract can expose this functionality through a public or external wrapper, unintentionally or maliciously.
This creates a condition where attackers can inflate balances and destroy supply invariants by exploiting arithmetic wraparound.
Likelihood: High
The contract is designed for inheritance.
Assembly arithmetic bypasses Solidity 0.8+ safety checks.
No balance or supply validation exists.
Impact: Critical
Total supply corruption via underflow.
User balance inflation through arithmetic wraparound.
Broken token economics and permanent protocol integrity loss.
The following PoC demonstrates that burning more tokens than available causes underflow and corrupts both balance and total supply.
The test passes, confirming that unchecked subtraction causes state corruption.
Add explicit underflow protection before subtraction.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.