Trick or Treat

First Flight #27
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Valid

Wrong event name in mint functions

Summary

Functions that handle minting process trickOrTreat(), mintTreat() emit a misleading Swapped event while no swap occurs. This issue could lead to confusion in 3rd party applications such as frontend of the dApp.

Vulnerability Details

Functions that handle minting process trickOrTreat(), mintTreat() emit a misleading Swapped event while no swap occurs.

emit Swapped(msg.sender, _treatName, tokenId); follows the aforementioned functions, but there's no swapping happening, only minting.

Impact

3rd party applications and users might get confused about what's going on in the protocol.

Tools Used

Manual review.

Recommendations

Change the event name from swapped to minted.

Updates

Appeal created

bube Lead Judge 10 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Incorrect Swapped event emission

The protocol emits a Swapped event even when the user has not sent enough ETH to complete the transaction.

Support

FAQs

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