During the variance calculation there could be underflow which will cause revertion of validation and inturn result in the task never being completed.
In the calculation of variance the line uint256 diff = data[i] - mean;
could underflow and revert very frequently.
Assume the following dataset:
data = [1,10,10]
1. Mean = (1+10+10)/3 = 7
During the calculation of variance:
uint256 diff = 1 - 7
is done, this will revert since the mean > data[i].
Causing the task to never be completed.
Complete DOS of the task naturally(no attack is needed, and the likelihood of this quite common).
Manual Review
Update the function as follows:
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.