Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: high
Valid

LLMOracleCoordinator may revert when distribute generator fee due to under overflow

Summary

LLMOracleCoordinator may revert when distribute generator fee due to under overflow

Vulnerability Details

In function finalizeValidation of contract LLMOracleCooridinator.sol , it distributes generator fee to generator who meets the conditions.

When select generator, there may have under overflow. Because meanmay less than generationDeviationFactor * stddev.

This will cause the function revert due to under overflow.

// compute the mean and standard deviation
(uint256 stddev, uint256 mean) = Statistics.stddev(generationScores);
for (uint256 g_i = 0; g_i < task.parameters.numGenerations; g_i++) {
// ignore lower outliers
if (generationScores[g_i] >= mean - generationDeviationFactor * stddev) {
_increaseAllowance(responses[taskId][g_i].responder, task.generatorFee);
}
}

Impact

this issue break the core functionality of LLMOracleCoordinator and generator may not receive generator fee

Tools Used

mannul review

Recommendations

change the if condition

if (generationScores[g_i] + generationDeviationFactor * stddev>= mean)
Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Underflow in `LLMOracleCoordinator::validate`

Support

FAQs

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