Christmas Dinner

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

M-03: `ChristmasDinner::deposit()` is missing the feature to sign-up on behalf of other users

Summary

The ChristmasDinner::deposit() function is suppose to include the feature to sign-up on behalf other users but it is missing.

Vulnerability Details

function deposit(address _token, uint256 _amount) external beforeDeadline {
if(!whitelisted[_token]) {
revert NotSupportedToken();
}
if(participant[msg.sender]){
balances[msg.sender][_token] += _amount;
IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);
emit GenerousAdditionalContribution(msg.sender, _amount);
} else {
participant[msg.sender] = true;
balances[msg.sender][_token] += _amount;
IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);
emit NewSignup(msg.sender, _amount, getParticipationStatus(msg.sender));
}
}

Impact

As stated in the protocol documentation to allow a user to sign-up on behalf of other users. However, ChristmasDinner::deposit() is missing this feature.

Tools Used

Foundry

Recommendations

Add in the logic to allow a user to sign-up on behalf of other users.

Updates

Lead Judging Commences

0xtimefliez Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Deposit function lacks functionality

Support

FAQs

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

Give us feedback!