If an auction is created with a.timings.cliffPercent set to 1 , then during withdrawal of baseTokens after auction ends, the some bidders to withdraw would claim more tokens than others of the baseToken amounts.
Proof of Concept
Auction A is created with a cliffPercent of 1 and bidded for.
Auction A ends and Alice is the first bidder to withdraw
Lines of code
https://github.com/code-423n4/2022-11-size/blob/main/src/util/CommonTokenMath.sol#L47-L69 https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L451-L464 https://github.com/code-423n4/2022-11-size/blob/main/src/SizeSealed.sol#L370
Vulnerability details
Impact
If an auction is created with
a.timings.cliffPercent
set to 1 , then during withdrawal of baseTokens after auction ends, the some bidders to withdraw would claim more tokens than others of the baseToken amounts.Proof of Concept
baseTokensAvailable
is calculated by the functiontokensAvailableForWithdrawal()
tokensAvailableForWithdrawal() is calculated by CommonTokenMath library https://github.com/code-423n4/2022-11-size/blob/main/src/util/CommonTokenMath.sol#L47-L69CommonTokenMath.tokensAvailableAtTime()
, `cliffAmount is 1Tools Used
Recommended Mitigation Steps