Normal Behavior: When users cancel their participation, all their state should be cleared, including their entry in the usersAddress array and their team selection. They should not be counted in winner calculations.
The cancelParticipation() function burns shares and refunds the staked amount, but does not remove the user from the usersAddress array or clear their userToCountry and userSharesToCountry mappings. If a user joined an event and then canceled, they remain in usersAddress. When _getWinnerShares() is called, it iterates through usersAddress and tries to add userSharesToCountry[user][winnerCountryId] to totalWinnerShares. Even though the user's shares were burned, the mapping still contains the old value, causing totalWinnerShares to be inflated with phantom shares.
Likelihood:
Users who cancel after joining will trigger this issue
The stale data remains in mappings
Occurs whenever a user joins then cancels
Impact:
totalWinnerShares becomes inflated with phantom shares from canceled users
All winners receive less than their fair share
Funds become locked in the contract as the math doesn't add up
Protocol becomes insolvent
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.