The getFee
function in the LLMOracleManager
contract lacks appropriate handling of token decimals during fee calculations. This oversight can lead to significantly underestimated fees, impacting the overall economics of the system.
in the getFee
function, the calculation of fees does not account for the standard 18 decimal places typically used by ERC20 tokens, which can cause discrepancies between expected and actual fees.
The fees (generatorFee
, validatorFee
, and totalFee
) are calculated as raw integers without factoring in the necessary decimal adjustment. This omission means that fees could be substantially lower than intended.
For example, if the intended fee is 1.0 (which represents 1 token with 18 decimals), it would be represented as 1 * 10^18
. Without proper decimal handling, the fees may be calculated as 1 instead of 1 * 10^18, leading to a significant loss of revenue.
Underestimating fees can threaten the sustainability of contracts, which can affect both developer earnings and user expenses.
Manual Review
consider the decimals
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.