contracts/llm/LLMOracleManager.sol
In the avg
function, precision loss occurs during the calculation process, causing the ans
parameter to be smaller than the actual value.
The following are the affected functions
For example:
The actual value of ans
should be 1.8, closer to 2.
Impact
This affects the income allocated by the finalizeValidation
function, making the income of validator
and responder
unreasonable.
It is recommended to add the precision of 1e18
to the calculation to prevent precision loss.
The following is the recommended code modification:
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.