In a standard ERC20 token, minting new tokens must emit a Transfer event from the zero address to the recipient, and burning tokens must emit a Transfer event from the sender to the zero address. These events allow wallets, explorers, and DeFi protocols to track token movements and total supply changes.
The ERC20 specification explicitly states:
“A token contract which creates new tokens SHOULD trigger a Transfer event with the _from address set to 0x0 when tokens are created.”
In the current implementation, the _mint and _burn functions update balances and the total supply using inline assembly but do not emit any Transfer events, breaking ERC20 compliance. This can lead to inconsistencies in external applications that rely on events to track token balances.
Likelihood:
This occurs whenever _mint or _burn is executed, including during token distribution, rewards, or supply adjustments.
Any integration relying on ERC20 events rather than direct state reads will encounter this behavior.
Impact:
Wallets, explorers, and indexers may fail to display correct balances or supply changes.
DeFi protocols relying on Transfer events for accounting or hooks may malfunction or reject the token.
Explanation:
This test shows that minting and burning update balances and total supply correctly, but no Transfer event is emitted. Off-chain systems observing only events cannot detect these supply changes.
Emit ERC20-compliant Transfer events inside _mint and _burn.
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.