Submitted by bin2chen
In ETHOracle.sol, getPrecision() is defined as 10 ** 18, but the actual oracle used is 8-decimals.
https://data.chain.link/feeds/arbitrum/mainnet/eth-usd
This data feeds decimals is 8.
PythOracle is used to get prices for other tokens, also getPrecision() == 18.
Since a different precision is used, then the calculation of totalCollateralInEth at StrategyLeverage will be wrong.
Incorrect calculation of totalCollateralInEth, affecting borrowing judgment, e.g. overvaluation overborrowing, etc.
Convert to 18 decimals.
hvasconcelos (BakerFi) confirmed
ickas (BakerFi) commented:
