to and token params swapped indexers, subgraphs, off-chain analytics, and incident responders relying on logs will attribute withdrawals to the wrong token/recipient, breaking monitoring/accountingDescription
On owner-triggered withdrawals, the contract should emit TokensWithdrawn(token, to, amount) so that (a) token indexed is the token address and to indexed is the recipient. This keeps on-chain logs aligned with the event ABI and consumer expectations.
The emit statement swaps the first two arguments, so the first indexed param actually contains the recipient and the second contains the token, contradicting the event signature. This silently corrupts downstream consumers.
Likelihood:
Reason: Every successful withdrawTokens call will emit this event, so the condition is met whenever withdrawals occur.
Impact:
Impact: Off-chain accounting/alerting tools will attribute withdrawals to the wrong token/recipient, causing false positives/negatives in monitoring.
Paste the following into RabateFiHookTest.t.sol
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.