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

NFT can mint at the wrong price.

Summary

The cost of the gift is defined as 2e18, but it can be bought for 1e18.

Vulnerability Details

PURCHASED_PRESENT_COST = 2e18; is defined as a constant, specifying that this is the cost to buy the gift. However, this is not used in buyPresent, and with _burn(from, 1e18), a present can be purchased for 1e18

Impact

Gifts are bought at prices not anticipated by Santa.

Tools Used

Manual

Recommendations

Allow _burn to be set to any amount and pass PURCHASED_PRESENT_COST as an argument

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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