In SpiceAuction
, removeAuctionConfig
is used to remove the auction config. But it is not working as intended and it's behaviour varies in removing the auction config depending on whether the current auction is in cooldown or is active(started).
The function removeAuctionConfig
is not only used to remove the current auction config(under certain scenarios) but can also be used to remove the next auction config(denoted by configSetButAuctionStartNotCalled
in the function). However, due to following check added in the function removeAuctionConfig
, the next auction can be removed in certain cases only.
https://github.com/Cyfrin/2024-07-templegold/blob/main/protocol/contracts/templegold/SpiceAuction.sol#L115-L118
if configSetButAuctionStartNotCalled
is true, it removes the next auction config from auctionConfigs
array. However, this can only be removed if current ongoing auction is in cooldown but not active because the function will revert if info.isActive()
is true
. This condition is not necessary to be checked when removing the next auction config. The daoExecutor
will need to wait till current auction is over to remove the next auction config due to these cases.
Different behaviour in removeAuctionConfig
in removing next auction config depending on different phase(cooldown or active) of current ongoing auction.
Manual review
The check info.isActive()
should not revert when configSetButAuctionStartNotCalled
because removing next auction config doesn't depend on current ongoing auction state.
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.