DoS
Solidity Attack Vector #13: Strict Equalities
SecurityInfinity Research•6 min read
Solidity Attack Vector #13: Strict Equalities
Smart contracts that use == for balances can be easily bricked. An attacker can force-send 1 wei to the contract, changing the balance and making the equality check always fail.
Fix
Use >= or <= for all balance or supply checks.