The removeAuctionConfig function in the SpiceAuction contract allows the DAO executor to remove an auction configuration. This can occur in two scenarios:
When auctionStart is not triggered, and auctionConfig is set.
When auctionStart is triggered, and auctionConfig is set.
However, the second scenario is not handled correctly. Currently, the auctionConfigs[id] and epochs[id] are deleted, and the _currentEpochId is decremented by one. However, it fails to deduct totalAuctionTokenAmount from the _totalAuctionTokenAllocation[auctionToken], which tracks the reserved amount of tokens in the contract for claims from previous auctions.
Consequently, the _totalAuctionTokenAllocation for the canceled auction will still be reserved, but since the auction was canceled, these funds will be stuck in the contract forever.
The reserved tokens for the canceled auction remain locked in the contract, making them inaccessible for future claims. This results in a permanent loss of these funds
Manual analysis
Foundry
To resolve this issue, ensure that the removeAuctionConfig function correctly updates the _totalAuctionTokenAllocation when an auction is canceled. Specifically, deduct the info.totalAuctionTokenAmount from the _totalAuctionTokenAllocation[auctionToken] to release the reserved tokens.
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.