The joinEvent() function allows users to call it multiple times, overwriting their previous country selection. When a user calls joinEvent() again with a different countryId, their shares get mapped to the new country but the old mapping is not cleared. Additionally, the user gets added to the usersAddress array multiple times, and totalParticipantShares is incremented each time, leading to incorrect accounting. This can result in users accidentally losing their ability to claim winnings if they change from a winning country to a losing one.
Users can accidentally lose their winning shares by calling joinEvent multiple times. The usersAddress array becomes bloated with duplicate entries, causing gas issues in _getWinnerShares(). The totalParticipantShares becomes inflated with duplicate counting, breaking the protocol's accounting system.
The _getWinnerShares() function is intended to iterate through all users and sum their shares for the winning country, returning the total.
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.