When a user cancels participation, assets are returned to the user then shares are burnt
The issue here is that the function fails to perform certain state updates, it fails to clear out user address from users array, doesn't remove user country mapping, and it fails to clear user shares, so even though a user cancels participation, he still participates because his data still persists. Now a scenario where a user deposits a large asset to bet on a country, and he cancels participations, and redeposits again, now his intially chosen country wins, user can go and claim rewards from the inflated shares due to his intial deposit, and because he has a current share due to the redeposit, he can claim rewards proportional to his redeposit
Likelihood:
When user deposits, cancels participation, and redeposits again
Impact:
Attacker can carry out this attack sysmetically to drain protocol funds
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.