The function removeAuctionConfig forgets to reduce _totalAuctionTokenAllocation
, leaving the tokens stuck inside the contract.
When an auction is started, startAuction
calculates how many tokens this auction will allocate (epochAuctionTokenAmount
) and adds them to _totalAuctionTokenAllocation
.
If necessary, an auction can be stopped and removed using removeAuctionConfig
. However, the function's first if
case doesn't reverse everything that startAuction
or setAuctionConfig
do. It only deletes auctionConfigs
and epochs
but forgets to remove epochAuctionTokenAmount
from _totalAuctionTokenAllocation
.
Since the tokens allocated inside _totalAuctionTokenAllocation
are not accounted for (i.e., _totalAuctionTokenAllocation
is not reduced by epochAuctionTokenAmount
), they essentially become stuck inside the contract. This is because on every startAuction
, the new auction amount is calculated by balance - (totalAuctionTokenAllocation - _claimedAuctionTokens[auctionToken])
.
Auction tokens are left stuck inside the contract.
Manual review
Reduce _totalAuctionTokenAllocation
when deleting the epoch
.
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.