The Organizer should be able to withdraw the PredictionFee
at any time, which is used for renting the venue. Consider a scenario where the PredictionFee
value that the Organizer can withdraw is less than the funds allocated for player rewards. Additionally, assume that the players have withdrawn their due rewards. At this point, only the PredictionFee
remains in the contract, which the Organizer should be able to withdraw.
However, if the Organizer attempts to withdraw the funds using the ThePredicter::withdrawPredictionFees
function, a revert will occur due to the way the value the Organizer can withdraw is calculated.
In the aforementioned scenario, address(this).balance
is exactly the amount of the PredictionFee
that the Organizer needs to withdraw, while players.length * entranceFee
is a larger value. As a result, during the subtraction, an underflow occurs.
The Organizer cannot withdraw PredictionFees
. The funds remain locked in the protocol.
Change the mechanism for calculating the value of the fees
variable in the ThePredicter::withdrawPredictionFees
function, which represents the amount that the Organizer wants to and is entitled to withdraw.
withdrawPredictionFees incorrectly computes the value to be transferred to the organizer, which leads to pending players not being able to cancel their registration, approved players not being able to claim their rewards and other errors.
withdrawPredictionFees incorrectly computes the value to be transferred to the organizer, which leads to pending players not being able to cancel their registration, approved players not being able to claim their rewards and other errors.
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.