i don't think there's any normal behavior because the owner can always, in every situation choose anyone they favour.
The `briVault::setWinner()` function allows the owner to choose any `countryIndex` after the event ends, with no external verification.
This gives full control over the final outcome to the contract owner, allowing them to select any team as the winner even if that team didn’t actually win.
This completely breaks the trustless premise of the vault and enables fund theft, since all funds from losers are redistributed to the “winning” users chosen by the owner.
Likelihood:
Every time an event ends and the owner picks the winner
Impact:
The owner can:
1. Assign themselves or any preferred address to a winning team.
2. Trigger _getWinnerShares() and _setFinallizedVaultBalance() to finalize vault state.
3. Withdraw all funds using the normal winner logic.
Effectively, the owner can drain the vault post-event.
Steps to Reproduce:
1. Deploy the vault with multiple users depositing and joining different teams.
2. After the eventEndDate, call setWinner() as the owner, choosing the index of a team that contains only your own address or address of someone that you favour.
3. Call withdraw() to drain all vault assets.
Integrate a verifiable randomness or oracle-based winner determination system (e.g., Chainlink VRF).
If results are off-chain, use a multi-sig-controlled oracle or community vote.
Or delegate the authority to a trusted oracle contract.
This is owner action and the owner is assumed to be trusted and to provide correct input arguments.
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.