user can keep withdrawing present as many times as he want from the collectPresent function. The collectPresent checks if there is nft in the user address to control the number of time user can collect present but this can be bypassed by sending the nft out the wallet. The user can collect present multiple as long as he sends the nft in his wallet to another address.
logic error
user can collect present multiple times
foundry
A state should be introduced to track if the user has collected 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.