The _convertToShares function relies on the contract's actual token balance rather than tracked deposits, creating a critical vulnerability where share values can be manipulated through direct token transfers to the contract.
Likelihood: HIGH
This vulnerability will occur whenever an attacker directly transfers tokens to the contract using the ERC20 token's transfer function, artificially inflating the vault balance used in share calculations.
This exploitation path requires minimal technical knowledge, uses standard ERC20 functionality available to any user, and can be executed with no special permissions or complex setup.
Impact: HIGH
While the assets parameter passed to _convertToShares is correctly calculated after deducting the fee, the function has a critical vulnerability in how it calculates shares based on balanceOfVault:
The share calculation can be manipulated by directly transferring tokens to the contract to artificially inflate balanceOfVault
This artificially reduces the number of shares subsequent depositors receive for the same deposit amount
An attacker can exploit this to gain a larger proportion of winning payouts
The PoC demonstrates how an attacker can manipulate share pricing by directly transferring tokens to the contract:
This creates a situation where Bob receives significantly fewer shares than Alice despite making an identical deposit, dramatically reducing his potential winnings.
The solution tracks actual deposits rather than relying on direct balance checks:
This prevents manipulation by using contract-managed accounting rather than direct token balance checks to calculate shares.
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.