When calculating the Variant of a set of variants, we add the summation of the square root of the difference between each element and the Average then divide them by their number
When Subtracting The element by the Average, we made a Power 2 operation, which makes the value positive even if the result was negative.
The problem is that we are performing the subtraction operation first (Element - Average), and put it in uint256
, which will make it revert because of underflow in solidity.
This will make calculating variance()
always revert if one of the elements is smaller than the average.
This will make finalizeValidation()
process revert as it uses stddev()
function that uses variance()
functions for the scores input
If Element < Avg
reverse the order of subtraction
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.