Setting the recipient
in SpiceAuction::setAuctionConfig
to the contract's own address can cause BidTokens to be transferred back to the auction contract, leading to circular token transfers and compromising auction integrity. Although SpiceAuction::recoverToken
can extract these tokens, this situation is prone to operational errors and may inadvertently increase the total amount of tokens available in subsequent auctions using the same token.
The protocol only specifies a minimum total amount for each auction without setting a fixed quantity. The actual amount of tokens for auction is calculated in SpiceAuction::startAuction
:
The code reveals that the total amount for each auction is directly correlated with the contract's balance of that token. If TokenA is first used as a BidToken in one auction and then as an AuctionToken in a subsequent auction, failure to withdraw the TokenA proceeds from the previous auction promptly will result in these proceeds being automatically included in the next auction.
Unexpected Auction Volume Increase: The total volume of TokenA in subsequent auctions may exceed expectations due to the inclusion of previous auction proceeds.
Token Distribution Imbalance: This could lead to an over-distribution of TokenA compared to the original tokenomics plan.
Project Fund Leakage: The project team might inadvertently reinvest auction proceeds that were intended for their treasury.
Operational Complexity: The project team would need to manage post-auction withdrawals more meticulously, adding to operational overhead.
Potential for Exploitation: If discovered by malicious actors, this could be leveraged to manipulate the auction process or token distribution.
Manual Review.
To mitigate the identified risk, implement the following safeguards in the SpiceAuction::setAuctionConfig
function:
Add a validation check for the recipient
address:
Ensure it is not set to the contract's own address.
Verify that it points to a designated treasury address or an approved external wallet.
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.