By design of the SizeSealed, auction creator may cancel it during the AcceptingBids stage. This way, the auction creator will get all the tokens back for one call of cancelAuction function. At the same time, all bidders will be able to cancel bids too. However, the cost of canceling bids may be much higher than canceling the auction, because every bidder should make a separate transaction with canceling, and there are up to 1000 bidders.
All in all, the malicious auction creator with impunity can force bidders to cancel their bids. It may continue to do the same from a different account to confuse people about where are legit auctions are and where the malicious ones are.
Impact
A malicious auction creator may griefer bidders worsening the project's reputation.
Recommended Mitigation Steps
Make an additional parameter of penalty cost for canceling the auction to prevent intended canceling for the griffering purpose.
Lines of code
https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L55 https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L391
Vulnerability details
Description
By design of the
SizeSealed
, auction creator may cancel it during theAcceptingBids
stage. This way, the auction creator will get all the tokens back for one call ofcancelAuction
function. At the same time, all bidders will be able to cancel bids too. However, the cost of canceling bids may be much higher than canceling the auction, because every bidder should make a separate transaction with canceling, and there are up to 1000 bidders.All in all, the malicious auction creator with impunity can force bidders to cancel their bids. It may continue to do the same from a different account to confuse people about where are legit auctions are and where the malicious ones are.
Impact
A malicious auction creator may griefer bidders worsening the project's reputation.
Recommended Mitigation Steps
Make an additional parameter of penalty cost for canceling the auction to prevent intended canceling for the griffering purpose.