The fulfillSwap function checks the swap request’s deadline and then marks the request as processed. However, there is a potential race condition: after passing the deadline check but before swap execution, delays can occur that effectively execute swaps post-deadline.
Delayed Execution: A malicious keeper could intentionally delay the final swap execution after the deadline.
User Disadvantage: Users lose the opportunity to cancel or reclaim funds if the deadline is effectively bypassed by delays.
Manual review
Time-based simulation tests
Fuzz testing (Forge)
Reordering Operations: Perform all time-sensitive actions (or recheck the deadline) immediately before transferring funds.
Immediate Effects: Mark requests only after all external calls succeed, using a design that minimizes delay.
Timestamp Revalidation: Consider revalidating the deadline after critical state updates.
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.