PriceOracle.getPrice doesn't check for stale price
PriceOracle.getPrice doesn't check for stale price. As result protocol can make decisions based on not up to date prices, which can cause loses.\\n```\\n    function getPriceFromChainlink(address base, address quote) internal view returns (uint256) {\\n        (, int256 price,,,) = registry.latestRoundData(base, quote);\\n        require(price > 0, "invalid price");\\n\\n        // Extend the decimals to 1e18.\\n        return uint256(price) * 10 ** (18 - uint256(registry.decimals(base, quote)));\\n    }\\n```\\n\\nThis function doesn't check that prices are up to date. Because of that it's possible that price is not outdated which can cause financial loses for protocol.
You need to check that price is not outdated by checking round timestamp.
Protocol can face bad debt.
```\\n    function getPriceFromChainlink(address base, address quote) internal view returns (uint256) {\\n        (, int256 price,,,) = registry.latestRoundData(base, quote);\\n        require(price > 0, "invalid price");\\n\\n        // Extend the decimals to 1e18.\\n        return uint256(price) * 10 ** (18 - uint256(registry.decimals(base, quote)));\\n    }\\n```\\n