In SantasList::checkTwice
the santaList.balanceOf can be manipulated by transferring the existing reward to someone and claim reward once again. Repeat this process to collect infinteRewards.
When the attacker collects the reward, the balance of the attacker becomes 1 thus attacker cannot collectPresent once again because of the if (balanceOf(msg.sender) > 0)
check. It can be bypassed if the attacker transfer the existing Reward to his friend(let's say ALICE) which makes the balanceOf the attacker to 0 again. Thus attacker the collect the Present once again. Thus repeating the process to collecting the present infinite times.
Foundry
Use some mapping to track whether the user has already collected the present or not.
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.