Pieces Protocol

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

The event OrderSelled is in wrong place in buyOrder function

Summary

The buyOrder function in the smart contract facilitates the purchase of a sell order.

Vulnerability Details

The event OrderSelledis before order transfer logic.

Impact

Events are crucial for logging important actions and changes. Placing them incorrectly can result in missing or misleading logs, making it difficult to trace contract behavior and identify issues

Tools Used

manual review

Recommendations

Please move OrderSelled at the end of buyOrderfunction.

IERC20(order.erc20Address).transfer(msg.sender, order.amount);
emit OrderSelled(msg.sender, order.price);
Updates

Lead Judging Commences

fishy Lead Judge 5 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.