Mock tokens should follow real-world ERC20 patterns for accurate testing. Most production tokens mint their total supply in the constructor and use transfer functions for distribution, rather than having public mint functions with non-standard behavior.
The mock tokens implement a confusing mint function that automatically multiplies input values by decimals, which differs from both standard ERC20 behavior and production token patterns.
Likelihood:
Developers expect standard ERC20 behavior during testing
Integration teams may misunderstand token amounts due to the automatic multiplication
Impact:
Confusion during development when mint(1)
creates 1e18
tokens
Test results that don't reflect real token distribution patterns
Potential integration errors due to unexpected behavior
Follow standard ERC20 patterns used in production:
Benefits:
Follows real-world token distribution patterns
Eliminates confusing automatic decimal multiplication
Makes test setup clearer: weth.transfer(alice, 1e18)
instead of weth.mint(alice, 1)
Better represents how users actually receive tokens in production
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.