mirror of
https://github.com/Instadapp/dsa-connectors-2.0.git
synced 2024-07-29 21:57:39 +00:00
16 lines
747 B
Solidity
16 lines
747 B
Solidity
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
pragma solidity >=0.5.0;
|
|
|
|
/// @title IOracle
|
|
/// @author Morpho Labs
|
|
/// @custom:contact security@morpho.org
|
|
/// @notice Interface that oracles used by Morpho must implement.
|
|
/// @dev It is the user's responsibility to select markets with safe oracles.
|
|
interface IOracle {
|
|
/// @notice Returns the price of 1 asset of collateral token quoted in 1 asset of loan token, scaled by 1e36.
|
|
/// @dev It corresponds to the price of 10**(collateral token decimals) assets of collateral token quoted in
|
|
/// 10**(loan token decimals) assets of loan token with `36 + loan token decimals - collateral token decimals`
|
|
/// decimals of precision.
|
|
function price() external view returns (uint256);
|
|
}
|