interface IOracle {
	/// @notice Reads one of the rates from the circuits given
	/// @return rate The current rate between the in-currency and out-currency
	/// @dev By default if the oracle involves a Uniswap price and a Chainlink price
	/// this function will return the Uniswap price
	/// @dev The rate returned is expressed with base `BASE` (and not the base of the out-currency)
	function read() external view returns (uint256 rate);

	/// @notice Read rates from the circuit of both Uniswap and Chainlink if there are both circuits
	/// else returns twice the same price
	/// @return Return all available rates (Chainlink and Uniswap) with the lowest rate returned first.
	/// @dev The rate returned is expressed with base `BASE` (and not the base of the out-currency)
	function readAll() external view returns (uint256, uint256);

	/// @notice Reads rates from the circuit of both Uniswap and Chainlink if there are both circuits
	/// and returns either the highest of both rates or the lowest
	/// @return rate The lower rate between Chainlink and Uniswap
	/// @dev If there is only one rate computed in an oracle contract, then the only rate is returned
	/// regardless of the value of the `lower` parameter
	/// @dev The rate returned is expressed with base `BASE` (and not the base of the out-currency)
	function readLower() external view returns (uint256 rate);

	/// @notice Reads rates from the circuit of both Uniswap and Chainlink if there are both circuits
	/// and returns either the highest of both rates or the lowest
	/// @return rate The upper rate between Chainlink and Uniswap
	/// @dev If there is only one rate computed in an oracle contract, then the only rate is returned
	/// regardless of the value of the `lower` parameter
	/// @dev The rate returned is expressed with base `BASE` (and not the base of the out-currency)
	function readUpper() external view returns (uint256 rate);

	/// @notice Converts an in-currency quote amount to out-currency using one of the rates available in the oracle
	/// contract
	/// @param quoteAmount Amount (in the input collateral) to be converted to be converted in out-currency
	/// @return Quote amount in out-currency from the base amount in in-currency
	/// @dev Like in the read function, if the oracle involves a Uniswap and a Chainlink price, this function
	/// will use the Uniswap price to compute the out quoteAmount
	/// @dev The rate returned is expressed with base `BASE` (and not the base of the out-currency)
	function readQuote(uint256 quoteAmount) external view returns (uint256);

	/// @notice Returns the lowest quote amount between Uniswap and Chainlink circuits (if possible). If the oracle
	/// contract only involves a single feed, then this returns the value of this feed
	/// @param quoteAmount Amount (in the input collateral) to be converted
	/// @return The lowest quote amount from the quote amount in in-currency
	/// @dev The rate returned is expressed with base `BASE` (and not the base of the out-currency)
	function readQuoteLower(uint256 quoteAmount) external view returns (uint256);
}
/// @notice Interface for Angle's oracle contracts reading oracle rates from both UniswapV3 and Chainlink,
/// from just UniswapV3 or from just Chainlink
function readQuote(uint256 quoteAmount) external view returns (uint256);

/// @notice Converts an in-currency quote amount to out-currency using one of the rates available in the oracle
/// contract
/// @param quoteAmount Amount (in the input collateral) to be converted to be converted in out-currency
/// @return Quote amount in out-currency from the base amount in in-currency
/// @dev Like in the read function, if the oracle involves a Uniswap and a Chainlink price, this function
/// will use the Uniswap price to compute the out quoteAmount
/// @dev The rate returned is expressed with base `BASE` (and not the base of the out-currency)