onlyController can withdraw both the principalDeposits and rewards through the withdraw function.
There's no check in the withdraw
function to ensure that the withdrawal amount is less than or equal to principalDeposits
.
This means that the controller can, in fact, withdraw the entire balance of the contract, including both principal and accrued rewards.
The controller could withdraw funds before rewards are distributed, effectively bypassing the reward distribution mechanism.
This takes away the rewards of accounts entitled to it.
Manual review
Limit withdrawals to not exceed principalDeposits
.
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.