DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Potential Precision Loss in Multiplier Calculation

Vulnerability Details:

In the auctionEnd() function, the calculation of the multiplier value may result in significant precision loss if totalTokens is much smaller than totalBids.

Impact:

This precision loss could lead to incorrect token distribution calculations, potentially resulting in users receiving fewer tokens than they should, or in extreme cases, no tokens at all.

Proof of Concept:

Link to code

multiplier = totalTokens.mul(PRECISION_18).div(totalBids);

If totalTokens is 1 and totalBids is 1,000,000, the result of this calculation would be 0, leading to no tokens being distributed.

Tools Used: Manual review

Recommendations

  • Reorder the operations to perform multiplication last:

multiplier = PRECISION_18.mul(totalTokens).div(totalBids);

  • Consider using a higher precision factor if dealing with very small token amounts.

  • Implement a minimum multiplier value to ensure some token distribution occurs.

  • Lack of Minimum Bid Amount

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Low decimal tokens or super small bids can lead to 0 claims

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.