The Statistics::variance function will revert if the value of data[i] is less than the mean, indicating that the calculation for finding the difference is incorrect.
We are using solidity version 0.8.20.
After Solidity version 0.8.0, any overflow or underflow will cause the transaction to revert.
In the Statistics::variance function, if the value of data[i] is less than mean, this situation can occur frequently because the mean is always less than some numbers in data set, leading to reverts.
Such reverts can cripple the contract, preventing it from functioning properly.
The revert from underflow will prevent the contract from functioning properly.
Manual Review
The below given recommendations will give the absolution difference of numbers without reverting.
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.