src/helpers/ERC20Internals.solNormal Behavior: When transferFrom spends allowance, many ERC20 implementations (e.g., OpenZeppelin) emit an Approval event reflecting the new allowance. Off-chain systems (wallets, explorers, The Graph, monitoring bots) rely on these events to track and alert on allowance changes.
Specific Issue: Token-0x reduces allowance inside _spendAllowance but does not emit an Approval event. As a result, off-chain views of allowances can become stale and security alerts will not fire on allowance reductions.
Likelihood:
High: Allowance usage (transferFrom) is common in DeFi and wallets; many protocols rely on off-chain event-based allowance tracking rather than frequent on-chain reads.
Impact:
High: Security monitoring fails to detect allowance changes promptly, enabling stealthy drain patterns or misconfigured approvals to go unnoticed. Users and protocols get incorrect UI/integrations for allowances.
Operational Risk: Indexers and analytics relying on events will show stale approvals, affecting audits, dashboards, and automations.
MissingApprovalOnSpend.t.sol expects emit Approval(owner, spender, newAllowance) after spending; fails due to missing event.
Emit an Approval event in _spendAllowance after updating the allowance.
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.