QA/LOW: LibOracle::baseOracleCircuitBreaker() - Error in the Ditto docs regarding oracle price update.
The docs specifically on the following link (https://dittoeth.com/technical/oracles) is using an incorrect mathematical logic representation of the idea of "stale Data: Chainlink has not updated a round in over 2 hours".
To find the line with the error in the docs, search under the following:
"timeStamp > block.timestamp + 2 hours"
From docs/above link:
"timeStamp > block.timestamp + 2 hours (stale Data: Chainlink has not updated a round in over 2 hours)"
INCORRECT:
timeStamp > block.timestamp + 2 hours
CORRECTED:
timeStamp < block.timestamp - 2 hours
i.e. block.timestamp > 2 hours + timeStamp
NOTE: It is correctly implemented in the codebase though, as per the github link for L73.
QA/low impact.
Correctly implemented in the codebase as far as I could see.
But the docs need to mirror the codebase implementation and vice versa.
If this was a reference in the docs for developers from other protocols to guide them in building on top of this protocol(as an example), this error could result in a bad implementation if the dev wasn't careful.
VSC + docs + attention to detail/logic...
Triple gazillion check the maths & logic, but especially the logic between implementation & docs...
But good to see that it was correctly implemented by the dev(s) in the codebase even though in the docs it's completely wrong.
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.