In the LLMOracleCoordinator::finalizeValidation function, there is a potential for the function to revert under specific conditions during score calculations. This function is triggered when the final validator completes validation for a request. It iterates over all generators and assigns scores to them based on validator scores. However, there are two lines of code where a reverse can occur:
In scenarios such as:
Four responders and four validators are present.
For the first responder, validator scores are [1, 1, 5, 100].
Here, the mean is 26, and the standard deviation is 48.
The condition score >= _mean - _stddev will fail, causing the code to revert.
This reversion causes the function to fail due to potential underflow or overflow. Request can't be finalized and this will lead to wasted efforts by generators and validators will be. And all the fees will be stuck in the contract.
Manual Review
Make the following code adjustments to handle cases where _mean is less than _stddev:
Apply a similar fix to handle the condition if (generationScores[g_i] >= mean - generationDeviationFactor * stddev).
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.