Events should be emitted with parameters in the exact order and types declared in the event definition, so off‑chain indexers and analytics (e.g., The Graph, dune scripts, monitoring bots) can reliably parse and attribute the fields (token, to, amount) to the correct values.
The TokensWithdrawn event is declared as (address token, address to, uint256 amount), but the emit statement swaps the first two arguments and emits (to, token, amount). This causes off‑chain systems to misinterpret the token and to fields, leading to incorrect attribution of withdrawals.
Likelihood: High
Occurs every time the owner calls withdrawTokens (routine administrative operation).
Triggers consistently across all tokens and amounts; no edge case needed.
Impact: Low
Analytics and compliance errors: Indexers will record the recipient address as the token contract and vice versa, corrupting dashboards, auditing reports, and alert systems.
Operational confusion: Off‑chain monitoring that relies on token and to fields may alert on the wrong token or misreport who received funds, complicating incident response and treasury bookkeeping.
The following test will pass due to wrong ordering.
Emit parameters in the declared order:
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.