The LibOracle::baseOracleCircuitBreaker()
uses the hardcoded value of 50% price deviation, which might be too large when using the ETH as a base price reference. Moreover, the fixed % deviation is considered too risky because the protocol's DAO or admin will not be able to update it in production.
This report raises an issue regarding the
priceDeviation
variable only, as theinvalidFetchData
(2-hour stale check) was flagged as a known issue.
The baseOracleCircuitBreaker()
is used for verifying the price reported by Chainlink. If the reported price is invalid or its price deviation when compared to the protocol's cached oracle price is more than 50%, the function will fall back to get Uniswap's TWAP price instead.
However, the baseOracleCircuitBreaker()
uses a hardcoded value of 50% price deviation (0.5 ether
), which might be too large when using the ETH as a base price reference. Moreover, the fixed % deviation is considered too risky because the protocol's DAO or admin will not be able to update it in production.
This report raises an issue regarding the
priceDeviation
variable only, as theinvalidFetchData
(2-hour stale check) was flagged as a known issue.
The use of the hardcoded value of 50% price deviation (0.5 ether
) might be too large when using the ETH as a base price reference. Moreover, the fixed % deviation is considered too risky because the protocol's DAO or admin will not be able to update it in production.
Consequently, the check for price deviation in the baseOracleCircuitBreaker()
might not be effective enough for filtering out the stale price in production, directly affecting the quality of the oracle price that will be consumed by the core functions of the Ditto
protocol (HIGH impact).
Manual Review
The % price deviation should be a variable updatable by the protocol's DAO or admin in production.
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.