The Fees::sellProfits()
does not set an expiration deadline, resulting in losing a lot of funds when swapping tokens.
The deadline
parameter in the sellProfits()
is set to block.timestamp
. That means the function will accept a token swap at any block number (i.e., no expiration deadline).
https://github.com/Cyfrin/2023-07-beedle/blob/658e046bda8b010a5b82d2d85e824f3823602d27/src/Fees.sol#L36
Without an expiration deadline, a malicious miner/validator can hold a transaction until they favor it or they can make a profit. As a result, the Fees
contract can lose a lot of funds from slippage.
Manual Review
I recommend setting the deadline
parameter with a proper timestamp.
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.