Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

Bad Code

Summary

There is no code to transfer the NFT minted to the presentReceiver in function buyPresent.

Vulnerability Details

function buyPresent(address presentReceiver) external {
i_santaToken.burn(presentReceiver);
_mintAndIncrement();
}

There is no code for the logic mentioned in the docs. With the current logic of buyPresent function, user can only burn his/her SantaTokens and mint NFT but cannot transfer that NFT to

Impact

Due
Hence, making the contract unusable for any user or santa.

​

Tools Used

Manual Review

Recommendations

To mitigate the vulnerability,

Here's how you can modify the function:

​
Updates

Lead Judging Commences

inallhonesty Lead Judge
almost 3 years ago
inallhonesty Lead Judge almost 3 years ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!