First Flight #18: T-Swap

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

`TSwappPool::deposit` is missing deadline check, causing transactions to complete even after the deadline has passed

TSwappPool::deposit is missing deadline check, causing transactions to complete even after the deadline has passed

Description: The deposit function accepts a deadline parameter, which according to the documentation is "The deadline for the transaction to be completed by". But, it is never used in the function, as a consequence, transactions can be completed even after the deadline has passed, in market conditions where deposit rate is unfavorable.

Impact: Transactions could be sent when market conditons are unfavorable to deposit, even when adding a deadlie parameter.

Proof of Concept: The deadline parameter is unused.

Recommended Mitigation:

function deposit(
uint256 wethToDeposit,
uint256 minimumLiquidityTokensToMint,
uint256 maximumPoolTokensToDeposit,
uint64 deadline
)
external
+ revertIfDeadlinePassed(deadline)
revertIfZero(wethToDeposit)
returns (uint256 liquidityTokensToMint)
Updates

Appeal created

inallhonesty Lead Judge 12 months 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.