TempleGold

TempleDAO
Foundry
25,000 USDC
View results
Submission Details
Severity: low
Invalid

recoverToken function has a condition of amount > 0 that is not necessary and can cause inconvenience to execution flow

Summary

In the recoverToken() function there is a condition that the amount recovered must be greater than zero ( 0 ). Than condition is unnecessary and can be detrimental to execution flow - when it comes to canceling the upcoming auction.

One assumption we've made is that this function can and will be used for canceling auctions - for whatever reason - before they start

Impact

Auction starting can be delayed in situation when:
DaiGoldAuction contract has the auctionMinimumDistributedGold on it and the admin wants to cancel the upcoming auction due to whatever reason. He can do that only by calling recoverToken() but he must provide amount argument greater than zero ( 0 ).
In doing so he strips the contract balance below the auctionMinimumDistributedGold amount. Therefore he must wait to start another auction until there is MINIMUM_MINT amount on TempleGold contract to be distributed.

Tools Used

Manual review

Recommendations

Remove said condition from function. The function is access restricted so no faulty arguments are expected OR can break contract functionality.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.