First Flight #18: T-Swap

First Flight #18
Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: medium
Valid

Unused deadline in `deposit` function

Summary

No deadline check in deposit function

Vulnerability Details

The uint64 deadline param of the deposit function is not used by the modifiers, therefore a deposit with no time limit could be executed.

Impact

Alice wants to deposit some amount of tokens and sends a transaction to the mempool, but with a very low has fee. Validators see the transaction but the fee is not attractive, so the transaction will be pending for a long time of period. Let's say that after a week the average gas fees drop low enough for the validators to execute the transaction but the price of the assets will has changed drastically.

Tools Used

Manual Review

Recommendations

Add the revertIfDeadlinePassed(deadline) modifier.

Updates

Appeal created

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

`deposit` is missing deadline check causing transactions to complete even after the deadline

Support

FAQs

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