First Flight #18: T-Swap

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

Deadline Check Absent in `TSwapPool::deposit`, Allowing Transactions After Deadline

Summary

Although the deposit function includes a deadline parameter, specified as the transaction’s completion time, it is not implemented in the function. This oversight allows liquidity additions to happen at unintended times, risking execution under adverse market conditions.

Vulnerability Details

Proof of Concept: The deadline parameter is unused.

Impact

Transactions could be sent when market conditions are unfavorable to deposit, even when adding a deadline parameter.

Tools Used

Manual Review

Recommendations

Consider making the following change to the function.

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