Oracle uses inverted Uniswap TWAP price which may be inappropriate and can lead to incorrect results
It is common when dealing with token prices to use inversion as in function below LibOracle.sol
The above is appropriate as its spot price of token0/token1 can be inverted to get the spot price of token1/token0.
However the above is not the case when working with TWAP price of token0/token1 due to how TWAP is calculated. Yet in the protocol when Oracle defaults to Uniswap TWAP inversion is still used to get the price. See below
This may lead to incorrect or inappropriate price values, extremely deviated prices especially if the more volatile the price of token0/token1
See following report for similar finding => Incorrect Use Time-Weighted Average Prices
Manual Analysis
It is recommended not to invert the prices when using TWAP prices. It may be ideal to perform own accumulator based inversion, or use such other appropriate mechanisms to avoid direct inversion prices
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.