Oracles
Oracles are contracts that can be used as oracles for markets on Morpho. The oracles implement the IOracle interface defined in IOracle.sol.
They return the price of 1 asset of collateral token quoted in 1 asset of loan token.
price
function price() external view returns (uint256);
Returns the price of 1 asset of collateral token quoted in 1 asset of loan token, scaled by 1e36.
- 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.
Return values:
Name | Type | Description |
---|---|---|
price | uint256 | The price rate of 1 asset of collateral token quoted in 1 asset of loan token (scaled by 1e36). |