As the documentation states, and the PURCHASED_PRESENT_COST
constant variable indicates, the cost of a present is 2e18
. However, the actual cost is 1e18
.
The documentation states that the cost of a present is 2e18
. There is a constant variable in SantasList
contract that confirms that:
However, this constant variable is not used anywhere. The SantasList::buyPresent()
method calls the SantaToken::burn()
method, which looks as follows:
The actual amount of tokens burnt - and therefore the present's price - is 1e18
. This is a serious issue as the price is only half of what was intended.
The actual price of present is only half of the intended value.
Manual review
Change the burn amount in SantaToken::burn()
method to the correct value of 2e18
.
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.