The `joinEvent(uint256 countryId)` function does not validate the `_countryId` parameter.
A user can join an event specifying a `countryId` of `0` (or any invalid ID), which might represent a non-existent country.
Impact:
Users can join events with invalid country IDs, potentially breaking reward distribution logic.
Metrics like `userSharesToCountry` and `totalParticipantShares` may become inconsistent with real-world expectations.
Downstream calculations assuming valid country IDs could behave incorrectly or be exploited for edge-case manipulations.
1. User1 deposits tokens.
2. User1 calls `joinEvent(0)` with an empty country ID.
3. Observe that `joinedEvent` is emitted and `userSharesToCountry` is recorded for country `0`.
Add the following to `briVault.t.sol`
Validate the `_countryId` to ensure it corresponds to a valid country. For example:
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.