The _mint() function in ERC20Internals.sol does not emit a Transfer event from address(0) as required by the ERC20 standard.
According to the ERC20 specification: "A token contract which creates new tokens SHOULD trigger a Transfer event with the _from address set to 0x0 when tokens are created."
The current implementation mints tokens and updates balances correctly but fails to emit the required event, making mints invisible to off-chain systems.
Note: The function updates state correctly but never emits the required Transfer(address(0), to, value) event.
Likelihood: High
Every mint operation is affected. This is not an edge case - it affects 100% of token creation operations.
Impact: High
ERC20 Non-compliance: The token does not meet the ERC20 standard
Broken integrations: Block explorers, wallets, and DeFi protocols cannot track mints
Audit failures: Token will fail formal ERC20 compliance audits
Exchange listing issues: Centralized exchanges require ERC20 compliance
The exploit was confirmed using a Foundry test that demonstrates no Transfer event is emitted during minting.
Setup:
Deploy the Token contract
Set up event recording using vm.recordLogs()
Action:
Call token.mint(alice, 100e18) to mint 100 tokens to alice
Retrieve all emitted logs
Result:
No Transfer event found in logs
Tokens were successfully minted and balance updated
Off-chain systems have no visibility into this mint
Supporting Code:
Test Results:
Add the Transfer event emission to the _mint() function after updating the balance and total supply.
This ensures the token emits the standard Transfer event for all minting operations, restoring ERC20 compliance and enabling off-chain tracking.
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.