Dria

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

Check Maximum And Minimum Values

Summary

In LLMOracleManager::setParameters the logic should check whether all of the parameters of the maximum variable are higher than the minimum values, otherwise the logic in onlyValidParameters will not work. To be more precise - it will always revert.

Impact

Failing to ensure that the maximum values exceed the minimum values can lead to a Denial of Service (DoS) for the protocol, rendering it temporarily unusable until valid parameters are reinstated.

Tools Used

Manual Review

Recommendations

Make the following changes:

function setParameters(LLMOracleTaskParameters calldata minimums, LLMOracleTaskParameters calldata maximums) public onlyOwner {
+ require(maximums.difficulty > minimums.difficulty, "Max difficulty must be greater than Min difficulty");
+ require(maximums.numGenerations > minimums.numGenerations, "Max generations must be greater than Min generations");
+ require(maximums.numValidations > minimums.numValidations, "Max validations must be greater than Min validations");
minimumParameters = minimums;
maximumParameters = maximums;
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 12 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.