The deposit function in the ChristmasDinner contract does not allow a user to sign up other users despite the documentation stating otherwise. This mismatch between the intended behavior and the actual implementation could lead to confusion at the participiants.
The deposit function is supposed to allow users to sign up other participants on their behalf by depositing tokens for them. However, the current implementation checks the participant mapping against msg.sender, which ties the logic strictly to the caller of the function.
There is no option to specify an address other than msg.sender, meaning a user cannot sign up another participant, contradicting the documentation.
This issue results in a functional limitation of the deposit function. While it does not directly lead to financial loss or exploits, it creates confusion due to the mismatch between the intended functionality described in the documentation and the actual behavior. This could cause trust issues among users and disrupt the contract's usability.
Manual code review
To allow users to sign up other participants, the deposit function should be modified to accept an additional parameter, such as _user, which specifies the address to be signed up.
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.