The implementation's token cost to buyPresent()
is 1e18 but should be 2e18 according to the documentations and indicated by the value of the PURCHASED_PRESENT_COST
variable.
If the expectation is that each "Extra Nice" user can buy one present for a user then the smart contract is behaving as expected. The issue is that the documentation and the unused variable PURCHASED_PRESENT_COST
is incorrect. The amount of token that should be minted has not been documented.
Depends on expected behaviour.
Manual review.
If the expectation is that each "Extra Nice" user can buy one present then update the mint and burn amounts to 2e18 in the SantaToken
contract. These amounts could also be refactor into contract arguments rather than being hard keyed to increase the resusability of this contract. Alternative the documentation and PURCHASED_PRESENT_COST
could be update to reflect the actual amounts of 1e18.
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.