The ERC20 standard expects that when a user transfers tokens to themselves, their balance should remain unchanged. The total supply should also remain constant.
In Token-0x's _transfer function, when from == to, the code reads both fromAmount and toAmount from the same storage slot (since they're the same address). It then writes sub(fromAmount, value) to the slot, immediately followed by add(toAmount, value). Since toAmount still holds the original value (not the decremented one), the second write overwrites the first, resulting in balance = original + value instead of balance = original.
Likelihood:
Any user can call transfer(msg.sender, amount) to trigger this vulnerability
This is a standard ERC20 operation that users may perform accidentally or maliciously
Impact:
Users can mint unlimited tokens by repeatedly transferring to themselves
Total supply accounting becomes incorrect (tokens created from nothing)
Complete destruction of the token's economic model
Any DeFi protocol integrating this token can be drained
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.