Open JetJadeja opened 3 years ago
Have tested the code, and I cannot seem to understand this issue. The oracle returns a price in TKN/ETH, which is then multiplied by ETH/USD, giving us the equation (token/ETH) * (eth/usd), which is equal to (token/usd).
MarketController.sol
The calculation of balanceUSDin MarketController.maxBorrowAmountUSDis incorrect since the balance is denominated in the underlying token unit and it is multiplied by TKN/USD which will return a TKN**2/USD unit value.