Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: medium
Invalid

In `LLMOracleCoordinator::finalizeValidation` when checking if validator score is in the range of mean and standardDeviation, the `validationDeviationFactor` is not applied decreasing the number of eligible validators.

Description

The validationDeviationFactor is supposed to multiplied by the _stddev to increase the range of validators to be given fees to ensure that all eligible validators are catered for. But when rewarding validators in LLMOracleCoordinator::finalizeValidation the _stddev value is not multiplied by validationDeviationFactor which reduces the range of validators receiving the validatorFee

for (uint256 v_i = 0; v_i < task.parameters.numValidations; ++v_i) {
uint256 score = scores[v_i];
//@audit validationDeviationFactor not multiplied with _stddev reducing range of receivers
if ((score >= _mean - _stddev) && (score <= _mean + _stddev)) {
innerSum += score;
innerCount++;
// send validation fee to the validator
_increaseAllowance(validations[taskId][v_i].validator, task.validatorFee);
}
}

Impact

Loss of fees for eligible validators of a given generation

Tools Used

Manual Review

Recommendation

Update the fee distribution loop in the above line of code like this

- if ((score >= _mean - _stddev) && (score <= _mean + _stddev )) {
+ if ((score >= _mean - (_stddev * validationDeviationFactor)) && (score <= _mean + (_stddev * validationDeviationFactor) )) {
innerSum += score;
innerCount++;
_increaseAllowance(validations[taskId][v_i].validator, task.validatorFee);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.