Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: medium
Invalid

PreMarkets.relistOffer() rounds down how much to deposit

Summary

PreMarkets.relistOffer() rounds down how much to deposit

Vulnerability Details

Users can list offers, cancel offers and relist the offers again depositing, withdrawing and depositing collateral again, but through out the codebase, anytime a user wants to deposit the value is rounded up and anytime Userclaimable balance is about to be updated it is rounded down except from this instance PreMarkets.relistOffer() which rounds down how much to deposit because it calls OfferLibraries.getRefundAmount() instead of getDepositAmount(), in certain instances of little amount/point balance in offer it can return zero which will revert in TokenManager.tillIn(), but if it rounded up like other deposit functions it will not revert.

Impact

DOS of PreMarkets.relistOffer()

Tools Used

Manual Review

Recommendations

Call OfferLibraries.getDepositAmount() instead of OfferLibraries.getRefundAmount().

Updates

Lead Judging Commences

0xnevi Lead Judge
about 1 year ago
0xnevi Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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