The _mint and _burn functions do not emit Transfer events, which violates the ERC20 standard. According to the ERC20 specification, a Transfer event MUST be triggered when tokens are transferred, including zero value transfers. For minting, a Transfer event should be emitted with the 'from' address set to 0x0, and for burning, the 'to' address should be 0x0. This missing event emission breaks compatibility with wallets, DEXs, and blockchain explorers that rely on these events to track token supply changes.
\
Likelihood:
The issue can be observed by minting/burning tokens and checking that no Transfer events are emitted:
Deploy the contract
Call _mint through an inheriting contract
Check transaction logs - no Transfer event from 0x0
Call _burn through an inheriting contract
Check transaction logs - no Transfer event to 0x0
Token tracking services will show incorrect supply
Impact:
DEXs, wallets, and block explorers will not properly track minting and burning operations, leading to incorrect balance displays and supply calculations. This breaks the ERC20 standard compliance and could prevent the token from being listed on major exchanges or integrated with DeFi protocols.
Add to test.s.sol
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.