The recoverToken function in the DaiGoldAuction contract can be called to recover auction tokens from the current auction as long as it has not started yet. When the token being recovered is Temple Gold, the function also deletes the current auction by deleting epochs[epochId] and moving the leftover auction amount to nextAuctionGoldAmount to be used for the next auction. The problem is that the _currentEpochId state variable, which is incremented when an auction is enabled, is not decremented when the current auction is deleted.
The _currentEpochId is not decremented when an auction is deleted, leading to inconsistencies in the auction state.
Manual analysis
To resolve this issue, ensure that the _currentEpochId is decremented when the current auction is deleted in the recoverToken function.
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.