The buyPresent function allows any user with SantaTokens to buy a present for another user. This could lead to unintended consequences, such as users buying presents for themselves or for malicious purposes.
The buyPresent function does not verify the recipient of the present or their eligibility.
A user could purchase a present for themselves, essentially transferring SantaTokens to themselves and bypassing the intended gifting mechanism.
Attackers could exploit this functionality to purchase presents for other users anonymously, potentially for malicious purposes such as phishing or scams.
Manual
Implement checks to ensure that users can only buy presents for other eligible users who have not already collected one.
Consider introducing a system where users can opt-in to receive presents before they can be bought for them.
Monitor the use of the buyPresent function and take appropriate action against users who misuse it.
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.