Function withdraw relies on a user's shares when calculating assets amount to transfer:
This allows to manipulate assets amounts using transfer of BriVault tokens. For example, consider the scenario below:
User bets on all teams using different accounts and gets X shares for each account
After winner is set, the user transfers all shares to the winner account and gets TeamCount * X shares on the winner account
Now the user withdraws winnings and get much more than it must be
Likelihood:
High, since no requirements should be met
Impact:
High, since user gets more tokens than it must be
Fix shares that users have and use the fixed amount to calculate assets amount to transfer in withdraw
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.