There are 2 issues with array usersAddress in contract BriVault:
It is node changed when user cancels participation
If user calls join several times, the array will contain several occurrences of the user's address. This can happen if user joins then cancels and again joins, or joins twice accidentally
The array affects calculation of totalWinnerShares:
And then totalWinnerShares is used to calculate payouts:
So, winners get incorrect amount of assets in cases described above.
Likelihood:
High, since the situations when the issue occurs are quite possible.
Impact:
High, since winners get less assets than they must get.
Delete the user from the array when user cancels participation
Revert if users try to join when the user is joined already
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.