Naughty persons can buy a present at cheaper than intended.
The application intends for NAUGHTY persons to purchase a present at the price of 2e18
SantaToken. But the SantasList::buyPresent
method fails to account for this.
In the terminal run the following command
forge test --mt testBuyPresentAtCheaperThanIntended
NAUGHTY
persons can buy a present at cheaper than intended
Manual review
Check that, he who is receiving the minted ERC721 SantasList token during a call to SantasList::buyPresent
is marked as NAUGHTY
. If that's the case, verify that indeed for this minted token, 2e18
SantaTokens was paid for it instead of 1e18
SantaTokens.
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.