The NatSpec comments for the verifyOffchainPrice
function do not match the function's actual parameters and return values. The documentation describes parameters and returns that do not exist in the function implementation.
Description: The NatSpec comment describes the function as returning the offchain price for a given order based on the configured strategy and its direction (bid vs ask). It mentions parameters like self
, priceData
, and maxVerificationDelay
which are not present in the actual function. Additionally, it describes return values bidX18
and askX18
, which are also not present in the function.
Root Cause: The NatSpec comments were not updated when the function parameters and return values were changed.
Proof of Concept:
Here is the mismatched function and its current NatSpec documentation:
Developers and users might be misled by the incorrect documentation, leading to improper use or misunderstanding of the function.
The absence of accurate documentation can cause confusion and potential bugs in the integration or use of this function.
Manual Review
Update the NatSpec comments to accurately reflect the function parameters and return values. Here's the updated function with comprehensive NatSpec documentation:
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.