TSwapPool::deposit
is missing deadline check causing transactions to complete even after the deadline
The deposit
function includes a deadline
parameter, which is documented as "The deadline for the transaction to be completed by." However, this parameter is not utilized within the function. As a result, operations that add liquidity to the pool may be executed at unintended times, potentially under market conditions that are unfavorable for the deposit rate.
Transactions could be executed under adverse market conditions, leading to unfavorable deposit rates, even when a deadline parameter is specified. This misalignment can cause financial losses or missed opportunities for users expecting their transactions to occur within a specified time frame.
Manual review
To ensure the deadline parameter is honored, the function should include a check to revert the transaction if the current time has surpassed the specified deadline. This can be implemented by adding a call to revertIfDeadlinePassed(deadline) within the function. The updated function is shown below:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.