NFT minting effectively costs 1e18 of ERC20 tokens for the user instead of documented 2e18, which leads to 50% loss for the protocol.
SantasList::PURCHASED_PRESENT_COST
is expected to be 2e18 tokens,
This constant wasn't used anywhere in buyPresent()
function
coming to SantaToken
burning function, we see hardcoded value of 1e18 to burn
Burning 1e18 instead of 2e18 potentialy leads to 50% loss of the protocol revenue.
Manual review
Use PURCHASED_PRESENT_COST
as an input for the burn()
function inside buyPresent()
.
SantasList changes:
SantaToken changes:
This line indicates that the intended cost of presents for naughty people should be 2e18: https://github.com/Cyfrin/2023-11-Santas-List/blob/6627a6387adab89ae2ba2e82b38296723261c08a/src/SantasList.sol#L87 PURCHASE_PRESENT_COST should be implemented to enforce the cost of presents.
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.