When the 'Double Price' case occurs during the execution of the trickOrTreat
function and msg.value
is less than required amount, it does not call the mintTreat
function. Instead, it executes its own logic minting NFT to the contract
.
In this situation, the user has only paid a portion
of the NFT's price, resulting in the contract becoming the owner of the NFT. However, an event is still emitted
as if the full amount had been paid
by the user.
Front-end applications or other off-chain services that listen to events may behave incorrectly or display inaccurate information, potentially misleading users
Manual code analysis.
Use address(this)
instead of msg.sender.
The protocol emits a Swapped event even when the user has not sent enough ETH to complete the transaction.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.