The variance calculation in the Statistics library always reverts when processing normal validation score distributions, making the entire oracle validation system non-functional.
This causes the finalizeValidation() function to fail in all realistic scenarios, preventing tasks from completing and permanently locking funds in the contract.
The issue stems from using unchecked subtraction with uint256 in the variance calculation:
This variance calculation is used in the task validation process:
In any normal distribution of validator scores, some scores will be below the mean. Due to Solidity 0.8.x's checked arithmetic, this causes the transaction to revert. For example:
The only scenario where validation can complete is if all validators submit exactly the same score, which defeats the purpose of having multiple validators or there is only 1 validator
The impact is critical because:
All tasks requiring validation will fail to complete
The validation system cannot process any realistic score distributions
Generator fees are locked until validation completes
Validator fees are locked until validation completes
Since validation cannot complete, these funds become permanently locked
Manual Review
Before subtracting mean from data[i] , make sure data[i] > mean and subtract data[i] from mean in the other case
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.