Closed code423n4 closed 2 years ago
Very vague and no actual issue demonstrated. baseToken is chosen per auction.
warden uses already submitted issue as proof that the issue can lead to bad outcomes... downgrade this to QA, as the segregation of auction funds is a reasonable suggestion but doesn't stand alone
Lines of code
https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L217
Vulnerability details
Impact
baseToken amount is not contained per Auction can messed up vesting accounting
Proof of Concept
If there are multiple auction with using same baseToken (which this is possible), there is probability accounting of baseToken is going to messed up because of one incident.
For example the incident which were high severity issue I submitted (seller create auction -> bidder bids -> reveal (with no
finalizeData
) -> call finalize, and set (clearingQuote) lowestQuote totype(uint128).max
-> call cancelAuction) this seller doesn't stop, because the seller recallingfinalize()
function with correctclearingQuote
therefore the state now is correctlyFinalized
so bidder can claim their vesting.if we rethink again, based on this scenario, the first finalize() call, will return the seller's baseToken when he createAuction. but the second finalize() is using the
baseToken
which is not from the sellers auction but from other auction with the same baseToken.This makes accounting of baseToken for auction will corrupted.
Tools Used
Manual analysis
Recommended Mitigation Steps
Contain/separate the baseToken for each auction, maybe different vault per auction.