Pieces Protocol

First Flight #32
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing input validation in buyOrder

Summary

Invalid orderIndex input could result in a non-informative error

Vulnerability Details

In TokenDivider::buyOrder, there are no validations for the value of the orderIndexargument. As a result, the passed orderIndex can be > s_userToSellOrders.length, which would result in an Out of bound error.

Impact

Non-informative error will be returned to the caller.

Tools Used

none

Recommendations

Make an explicit validation of orderIndex and revert with a custom error.

Updates

Lead Judging Commences

fishy Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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