Normally, each country in the tournament is expected to have an independent outcome, as users can join by selecting a specific countryId in joinEvent(). The vault should ideally support multiple country results or isolated events.
However, the contract defines a single _setWinner boolean and a single winnerCountryId, which apply globally. Once the first winner is set, all subsequent attempts to finalize a different country revert, permanently locking the system to a single winner.
Likelihood:
The issue occurs at the end of every tournament when the owner attempts to set winners for more than one country.
Any additional call to setWinner() after the first successful one will revert, blocking finalization for other teams.
Impact:
Only one country can ever be marked as the winner across all participants.
Users who joined other countries become permanently unable to withdraw, resulting in locked funds and an inconsistent state.
Explanation:
The first call to setWinner(2) successfully sets “Mexico” as the global winner.
When attempting to call setWinner(5), the function reverts due to the _setWinner boolean already being true.
This demonstrates that all other countries are locked out, and only participants of the first winning country can withdraw their stakes.
To allow independent winner tracking per country, _setWinner and winner variables should be mapped by countryId instead of being global.
Then update the logic in setWinner():
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.