The _transfer function is intended to move tokens from one address to another by decreasing the sender's balance and increasing the recipient's balance.
The implementation loads both balances into stack variables before writing any storage updates; in a self-transfer scenario where from equals to, the second storage write (the addition) overwrites the first (the subtraction), resulting in a net increase of the user's balance equal to the transfer amount.
Likelihood:
Any user executes a self-transfer transaction transfer(msg.sender, amount) to trigger this logic aliasing.
Impact:
A malicious user can infinitely mint tokens to their own address, completely destroying the token economy.
The protocol becomes insolvent immediately as total supply invariants are broken.
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.