The ReFiSwapRebateHook::TokenWithdraw event is emitted with incorrectly ordered parameters, causing a mismatch between the event declaration and the actual emitted values.
The emitted event reverses the token and to parameters, resulting in inaccurate event logs.
Likelihood:
The incorrect parameter ordering is deterministic and will occur every time withdrawTokens is invoked.
Impact:
Off-chain consumers (indexers, analytics systems, monitoring tools, or integrators) relying on event logs will interpret the event data incorrectly.
This can lead to:
Misidentification of the token being withdrawn.
Incorrect attribution of withdrawal recipients.
Potential downstream logic errors in systems that consume these events to trigger automated processes.
In on-chain contexts, event logs may also be used by other contracts during optimistic or proof-based systems. Incorrect logs reduce auditability and can complicate debugging, forensics, or state reconstruction.
Using the existing test suite, the failing behavior can be reproduced by including the following test:
Run with forge test --match-test test_WithdrawTokens_Event -vvvv
The test output confirms the mismatch:
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.