Risk of Duplicate Present Collection
The current implementation checks balanceOf(msg.sender) > 0
to determine eligibility for present collection. However, this check does not prevent duplicate collections. For instance, if a user receives a present and then transfers it to another account, their balance returns to zero. This reset allows them to potentially collect presents repeatedly.
This loophole in the balance check allows for the theoretical possibility of infinite present collection, as users could continually receive and transfer presents to exploit the system.
Implement a new mapping to track the collection status of each account individually. This would prevent the possibility of duplicate collections by maintaining a record of whether an account has already collected a present.
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.