In cancelParticipation(); function, numberOfParticipants and totalParticipantShares state variables are not been updated after the user cancels his participation. This is due to the fact that when the user participates ie: by calling the joinEvent(); function in the last two lines numberOfParticipants and totalParticipantShares are been updated. Thus, for cancelling the participation it should be cancelled too.
Likelihood:
Whenever a user cancels his participation.
Impact:
Error in accounting.
Update the state variables properly when the user cancels his participation.
CancelParticipation burns shares but leaves the address inside usersAddress and keeps userSharesToCountry populated.
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.