First Flight #18: T-Swap

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

deadline does not take effect in deposit()

Summary

deadline parameter does not take effect in deposit()

Vulnerability Details

When users deposit tokens to get some LPs, they will set one deadline, the deposit transaction will be expected to be executed before the deadline. The vulnerability is that function deposit() does not process the deadline parameter.

function deposit(
uint256 wethToDeposit,
uint256 minimumLiquidityTokensToMint,
uint256 maximumPoolTokensToDeposit,
// @audit, deadline does not work
uint64 deadline
)

Impact

The transaction may exist in the mempool for a long time. The related pool's share price changes a lot, maybe depositors don't want to deposit based on this case. This will be unfair for the depositors.

Tools Used

Manual

Recommendations

Add one modify check revertIfDeadlinePassed(deadline).

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.