Normally, the user would claim his share of the prize pool which depends on the amount of vault token he has bet on the winner.
In this scenario, the user's share of the prize depends on the amount of token he has. Which can be increased by transferring from other accounts. If the user bet on more than one country, then his bet for the other countries will also increase his share of the prize.
Likelihood: High
Reason 1: When the user deposits and join for multiple countries and win, his share bet on the other countries will count as effective.
Reason 2: An exploiter could easily use multiple accounts to bet on all the countries and transfer the vault token to the winner account to increase his share of the prize.
Impact: High
Impact 1: Users who plays normally can lose everything even if they win and the game becomes unplayable.
This proof of code can be run inside the provided briVault.t.sol
The attacker deposit and join the game using 48 accounts for 48 countries.
Normal users deposit and join the game.
The game ends and the owner selects the winner.
The attacker transfers all the vault tokens to the winner account
The attacker transfer surplus to another account
The attacker calls withdraw and get all the asset in the pool.
Use the userSharesToCountry mapping to determine the share of the prize. Howeverm this assumes userSharesToCountry is correct and won't be affected by other vulnerabilities.
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.