Attacker can collect presents many time without limit with only one valid address.
function collectPresent()
limit user only collect 1 time with 1 valid address with condition check balance of address : if (balanceOf(msg.sender) > 0)
, but attacker can bypass easy by send token to another address before call collectPresent()
again.
Test code for POC:
Attacker can mint unlimit amount nft santasList and santasToken
Manual Review & Foundry
Implement a mapping address with status collected to record that address have call collectPresent() or not, ex: mapping(address => bool) collectedPreson
Relying on balanceOf > 0 in collectPresent() allows the msg.sender to send their present to another address and then collect again.
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.