Missing validation in SantasList::buyPresent
allows receiver address to have more than one present
SantasList::buyPresent
is a function that allows any user to burn SantaTokens and mint NFT presents to a receiver address. An invariant for the protocol is An address is only allowed to collect 1 NFT per address
but this function does not check if the receiver already has an NFT, therefore breaking the invariant.
Output:
HIGH, as there could be more than one NFT per address.
Manual Review
Foundry
Add a validation to check if the presentReceiver
already has an NFT. Alternatively, create a mapping that stores which addresses have received NFT presents and block them to receive more.
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.