Function BriVault::joinEvent sets mapping userSharesToCountry value to the user's shares for the user and selected country:
However, when user cancels participation, the mapping stays unchanged:
This mapping affects calculation of totalWinnerShares that is used to calculate asset amounts to transfer to winners:
So, it makes calculation of assets amounts transferred to winners incorrect since user has no shares, but they are included in totalWinnerShares value:
Likelihood:
High, since it happens every time any user cancels participation.
Impact:
High, since winners receive less assets than they must receive.
Delete mapping userSharesToCountry value for the user when the user cancels 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.