SpiceAuction.recoverToken() is meant to be used for recovering tokens before startAuction
has been called. The check for this condition is wrong.
recoverToken
takes the available tokens before an epoch auction has started and sends them to a chosen address.
There are several comments in the code indicating it's meant to be used before startAuction
has been called.
``
However, as we can see from the second code snippet, the function will always revert when info.startTime == 0
. This is opposite to the original intention.
In result, the function will not allow tokens to be retrieved before startAuction
has been called and will allow it after that which can mess up accounting.
Manual Review
Flip the condition
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.