Pieces Protocol

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

Additional ETH send to buyOrder will be stuck forever

Summary

The buyOrder function accepts ETH as payment for the ERC20s. It makes a few checks to ensure that the amount sent is enough to cover the cost and the fees. However, it never addresses that the amount sent could be more than needed. That would leave some additional ETH to sit in the contract. Unfortunately, this ETH can never be claimed as there is no logic in the contract to retrieve it.

Impact

ETH will be stuck in the contract forever

Tools Used

Manual review

Recommendations

Return the remaining ETH back to the buyer in the same function.

Updates

Lead Judging Commences

fishy Lead Judge 5 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Token misshandling

The extra eth sent by the user in the buy order will be locked in the contract forever

Support

FAQs

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