The recoverToken()
function uses an incorrect check to verify that the auction has started. Because of this, it is possible that Temple Gold tokens cannot be recovered.
In DaiGoldAuction.sol
we have recoverToken()
function:
This function recover auction tokens for last but not started auction.
From NatSpec comments we can see: "Recover auction tokens for last but not started auction. Any other token which is not Temple Gold can be recovered too at any time".
For recovering Temple Gold we have the following checks:
isActive
: Checks if the auction is ongoing, which means it has started and has not ended.
We can see that the function uses the wrong check. Instead of isActive()
it should use the hasStarted()
function.
hasStarted
: Checks if the auction has begun, regardless of whether it is still ongoing or already ended.
Due to incorrect check, tokens may not be recoverable.
Visual Studio Code
By changing info.isActive()
to info.hasStarted()
, the function correctly prevents token recovery if the auction has already started, which is aligned with the intended functionality described in the comment.
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.