The spiceAuction.sol
contract has a function recoverAuctionTokenForZeroBidAuction
that allows the DAOExecutor
to recover tokens from auctions with no bids. However, the function does not reset the totalAuctionTokenAmount
for the specified epoch, enabling the DAOExecutor
to repeatedly recover tokens from the same epoch if the totalAuctionTokenAllocation
is sufficient.
The recoverAuctionTokenForZeroBidAuction
function in spiceAuction.sol
is defined as follows:
The vulnerability arises because the function does not reset epochInfo.totalAuctionTokenAmount
to zero after transferring the tokens. This omission allows the DAOExecutor
to repeatedly invoke this function and recover the same tokens multiple times if _totalAuctionTokenAllocation[auctionToken]
is sufficient. There is also no way for the dao executor to know if the tokens for an epoch with zero bids has been recovered successfully due to the way the event is emitted without data of the epoch.
The impact of this vulnerability includes:
Repeated Token Recovery: The DAOExecutor
can continuously recover tokens from the same epoch, leading to potential depletion of auctionToken
or templeGold
tokens from the contract.
Reset totalAuctionTokenAmount
: Ensure that the totalAuctionTokenAmount
for the specified epoch is reset to zero after tokens are recovered and ensure amount isn't zero to prevent repeated recovery from the same epoch.
Example fix:
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.