Dria

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

Incorrect Total Fee Calculation in `LLMOracleManager.sol::getFee` Function

Summary

The getFee function in the LLMOracleManager contract contains a logical error in the calculation of the totalFee.

Vulnerability Details

In the getFee function, the calculation of the totalFee is performed as follows:

totalFee =
platformFee + (parameters.numGenerations * (generatorFee + (parameters.numValidations * validatorFee)));

The current formula groups the generatorFee and validatorFee together, multiplying them by parameters.numGenerations and parameters.numValidations respectively. This results in an incorrect total fee calculation.

Impact

incorrect fee calculation

Tools Used

Manual Review

Recommendations

totalFee = platformFee + (parameters.numGenerations * generatorFee) + (parameters.numValidations * validatorFee);
Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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