sellProfits allows users to swap tokens but lacks the capability to specify an effective deadline check by the user.
The sellProfits function uses Uniswap to swap tokens. Using block.timestamp
as a deadline is an ineffective way to protect the user from the unexpected execution of the transaction in the future, leaving users vulnerable to the potential loss of their tokens.
This is possible because whenever the miner decides to include the transaction in a block, it will be valid at that time, since block.timestamp
will be the current timestamp.
The user's transaction can be unexpectedly executed at any convenient time, which can lead to a loss of funds.
Manual review
To mitigate the risks, allow users to specify a deadline parameter.
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.