Open gzliudan opened 2 years ago
In PriceOracle, when base asset equals quote asset, we can return 10**18 directly, no need to run other rules.
function getPrice(address _assetOne, address _assetTwo) external view returns (uint256) { require( controller.isSystemContract(msg.sender), "PriceOracle.getPrice: Caller must be system contract." ); if (_assetOne == _assetTwo) { return 10**18; }
In PriceOracle, when base asset equals quote asset, we can return 10**18 directly, no need to run other rules.