The DaiGoldAuction contract allows bidders to bid DAI in exchange for TGLD when an auction is active. These Temple Gold tokens available for each auction are sent to the DaiGoldAuction contract prior to the auction starting. Once the startAuction function is called, the totalAuctionTokenAmount for the current auction is saved in the auction’s EpochInfo and nextAuctionGoldAmount is reset to zero.
The problem is if an auction goes with no bids, there is currently no way to recover the auction amount, and it will be locked up in the contract. The recoverToken function only handles cases where an auction is started but cooldown is pending, so it can’t be used here.
This scenario is correctly handled in the SpiceAuction contract, which includes the recoverAuctionTokenForZeroBidAuction function; however, this function is not present in the DaiGoldAuction contract.
If an auction receives no bids, the Temple Gold tokens allocated for that auction will be locked in the contract.
Manual analysis
Implement a function similar to recoverAuctionTokenForZeroBidAuction from the SpiceAuction contract in the DaiGoldAuction contract. This function should allow recovery of the auctioned tokens if an auction ends with no bids.
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.