SpiceAuction
contract has the functionality to remove auction config
until auction becomes active. Due to this, auctionTokens
added in the contract will be locked forever in the contract and can't be recovered. This specifically applies to the auction for which startAuction
is called and they are removed before it's cooldown period is over.
SpiceAuction
contract has the function removeAuctionConfig
which can be used to remove the auction config for which startAuction
is called but auction is yet in cooldown. However, to start the auction, amount > config.minimumDistributedAuctionToken
auction tokens need to be sent to the contract. Once startAuction
is called and auction is in cooldown, it's config can be removed. Once the auction config of such auction is removed, the amount
of auction tokens for that config will not be recovered and will be locked forever in the contract. The reason for this is recoverToken
can't recover tokens of deleted auction configs because _totalAuctionTokenAllocation
is not updated on removal of auction config for which startAuction
was called.
Relevant code snippets:
config.starter = address(1)
, config.minimumDistributedAuctionToken = 1000
, config.isTempleGoldAuctionToken = true
1) daoExecutor
calls setAuctionConfig
and sets the auctionConfig
for epochId = 1
.
2) address(1)
starts auction by calling startAuction
and transferring 1000 TGLD
token. _totalAuctionTokenAllocation[TGLD] = 1000
. auction with epochId 1
started. After cooldown it become active.
3) user starts bidding
4) auction with epochId 1
is over now.
Following is the auctionConfig
for next auction.
config.starter = address(2)
, config.minimumDistributedAuctionToken = 5000
, config.isTempleGoldAuctionToken = true
5) daoExecutor
calls setAuctionConfig
and sets the auctionConfig
for epochId = 2
.
6) address(2)
starts auction by calling startAuction
and transferring 5000 TGLD
token. _totalAuctionTokenAllocation[TGLD] = 6000
auction with epochId 2
in cooldown.
7) daoExecutor
calls removeAuctionConfig
and auctionConfigs[2]
gets removed while auctionToken
corresponding to epochId = 2
is still in the contract. This are PERMANANTLY LOCKED in the contract and can't be recovered
8) daoExecutor
calls recoverToken
. maxRecoverAmount = 6000(balance) - 6000(totalAuctionTokenAllocation[TGLD] = 0
. Hence, no amount can be recovered
Funds for deleted auction will be permanantly locked in the contract
Manual Review
Update the totalAuctionTokenAllocation
of auction tokens once auction config corresponding to cooldown auction is removed.
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.