ERC20 standard requires: _mint() emits Transfer(address(0), to, amount)
_burn() emits Transfer(from, address(0), amount)
balanceOf(address(0)) returns 0 (used by Uniswap, Aave, Compound, etc.)
The ERC20 standard mandates that minting increases total supply and emits a Transfer from zero, while burning decreases supply and emits a Transfer to zero, enabling accurate tracking by external tools.
In this implementation, _mint() and _burn() only update internal storage slots via assembly and completely ot the Transfer events, causing total supply to appear as 0 on all indexers and breaking DeFi integrations.
Likelihood:
Every mint/burn will lack events.
Every protocol that calls balanceOf(address(0)) will revert (Uniswap V2/V3, Aave, Compound, Balancer, etc.)
Impact:
Token appears dead (totalSupply = 0 on Etherscan, Dune, DeFiLlama, wallets.
Cannot be added to any major DEX or lending protocol — pools permanently brick.
function testCriticalBugs() public {
vm.expectEmit(true, true, false, true);
emit Transfer(address(0), address(1), 1e18);
token.mint(address(1), 1e18);
// FAILS — no event emitted
vm.expectRevert();
token.balanceOf(address(0));
// FAILS — reverts instead of returning 0
}
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.