First Flight #18: T-Swap

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

Input parameter `deadline` in `TSwapPool::deposit` was not checked, resulting the deposit process being executed without considering `deadline` specified by user

Summary

The deposit function takes in input parameter deadline which according to natspec referring to the deadline for the transaction to be completed by. However, there is no conditional check related to deadline within the deposit function itself. This causes the deposit function can still be executed as long as all other conditions within the function are met.

Vulnerability Details

Input parameter deadline is included in function TSwapPool::deposit but it is not used within the function to implement deadline check

Impact

The deposit function can still be implemented as long as all other conditions are met, disregard the input deadline specified by user

Tools Used

Manual review

Recommendations

To include modifier revertIfDeadlinePassed to deposit function

function deposit(
uint256 wethToDeposit,
uint256 minimumLiquidityTokensToMint,
uint256 maximumPoolTokensToDeposit,
uint64 deadline
)
external
revertIfZero(wethToDeposit)
+ revertIfDeadlinePassed(deadline)
returns (uint256 liquidityTokensToMint)
{}
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.