Christmas Dinner

First Flight #31
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

The `ChristimasDinner:deposit` doesn't allow users to signup for other users causing natspec incorrect.

Summary

/*
* @dev handles the deposit logic. Supposed to only let deposits of whitelisted tokens happen.
* Supposed to not accept deposits after deadline. Allows multiple deposits of a user as generous extra contribution.
@> * Allows a user to sign-up other users.
*
*/
function deposit(address _token, uint256 _amount) external beforeDeadline {
.
.
.
}
  • The deposit ChristimasDinner:deposit function says that it allows a user to sign-up for other users but the function doesn't have any logic to implement it.

Impact

  • The NatSpec documentation is incorrect, which could mislead developers or auditors reading the code.

Tools Used

Recommendations

  • Remove the incorect natspec line.

* @dev handles the deposit logic. Supposed to only let deposits of whitelisted tokens happen.
* Supposed to not accept deposits after deadline. Allows multiple deposits of a user as generous extra contribution.
- * Allows a user to sign-up other users.
* Assumes that no weird ERC20s or any ERC20s outside the whitelisted tokens need to be handled.
* Assumes general trust relationship between the users of this contract.
* Does not allow signing up with Ether, for Ether signups use receive()
* @param _token the token the user wishes to deposit
* @param _amount the amount the user wishes to contribute
*/
function deposit(address _token, uint256 _amount) external beforeDeadline {
.
.
.
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.