Description:
The participant mapping is only updated when user deposits a whitelisted ERC20 token. This does not happen when user sends ETH directly to the contract.
Impact:
This issue cause a double standard in managing the participation status between users that decide to join the dinner with whitelisted ERC20 tokens and users that send native ETH directly to the contract.
Tools Used:
Manual review
Proof of Concept:
Add the following test to ChristmasDinnerTest.t.sol, which will demonstrate the double standard when dealing with users with different kind of deposit. User1 deposits 1WETH and is automatically listed as participant, whereas User2 deposits 1ETH and is still listed as non participant.
Recommended Mitigation:
Add the following line in the receive function, so that, upon receiving any amount of ETH from the user, their participation status is updated to true.
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.