RebateFi Hook

First Flight #53
Beginner FriendlyDeFi
100 EXP
View results
Submission Details
Severity: low
Valid

Incorrect Event Parameter Ordering in withdrawTokens Causes Corrupted Logs and Breaks Off-Chain Monitoring

Root + Impact

Description

  • The event is defined as:

    event TokensWithdrawn(address indexed token, address indexed to, uint256 amount);

    But the function emits the event in the wrong parameter order:

    emit TokensWithdrawn(to, token, amount);

Risk

Likelihood:

  • This code executes every time tokens are withdrawn. Any external indexer or monitoring system relying on this event will receive incorrect data.

Impact:

  • Corrupted event logs

Proof of Concept

None required

Recommended Mitigation

Correct emission should be:

emit TokensWithdrawn(token, to, amount);
Updates

Lead Judging Commences

chaossr Lead Judge 12 days ago
Submission Judgement Published
Validated
Assigned finding tags:

Swapped token and to parameters in TokensWithdrawn event.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!