A user can modify their participationStatus without calling the christmasDinner::deposit function, bypassing the intended workflow and gaining unauthorized access to the event.
The christmasDinner::changeParticipationStatus function can be called directly by any user, bypassing the christmasDinner::deposit function. This allows users to modify their participationStatus and participate in the event as depositors without make a deposit or follow the protocol user flow.
Users can participate in the event for free.
Unauthorized users can become eligible to be the new host.
use this test in christmasDinnerTest.t.sol
IDE
Manual Review
There are ton of ideas to mitigate this such as :
create a mapping to track people who called deposit function and add it as condition in changeParticipationStatus
Make a condition that the balance of caller > 0
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.