|
| 1 | +// SPDX-License-Identifier: BUSL-1.1 |
| 2 | + |
| 3 | +/// @notice Oracle adapter for AMPL and its family of assets. |
| 4 | +// solhint-disable-next-line compiler-version |
| 5 | +interface IMetaOracle { |
| 6 | + /// @return Number of decimals representing the prices returned. |
| 7 | + function decimals() external pure returns (uint8); |
| 8 | + |
| 9 | + /// @return price The price of USDC tokens in dollars. |
| 10 | + /// @return isValid True if the returned price is valid. |
| 11 | + function usdcPrice() external returns (uint256 price, bool isValid); |
| 12 | + |
| 13 | + /// @notice Computes the deviation between SPOT's market price and FMV price. |
| 14 | + /// @return deviation The computed deviation factor. |
| 15 | + /// @return isValid True if the returned deviation is valid. |
| 16 | + function spotPriceDeviation() external returns (uint256 deviation, bool isValid); |
| 17 | + |
| 18 | + /// @notice Computes the deviation between AMPL's market price and price target. |
| 19 | + /// @return deviation The computed deviation factor. |
| 20 | + /// @return isValid True if the returned deviation is valid. |
| 21 | + function amplPriceDeviation() external returns (uint256 deviation, bool isValid); |
| 22 | + |
| 23 | + /// @return price The price of SPOT in dollars. |
| 24 | + /// @return isValid True if the returned price is valid. |
| 25 | + function spotUsdPrice() external returns (uint256 price, bool isValid); |
| 26 | + |
| 27 | + /// @return price The price of AMPL in dollars. |
| 28 | + /// @return isValid True if the returned price is valid. |
| 29 | + function amplUsdPrice() external returns (uint256 price, bool isValid); |
| 30 | + |
| 31 | + /// @return price The SPOT FMV price in dollars. |
| 32 | + /// @return isValid True if the returned price is valid. |
| 33 | + function spotFmvUsdPrice() external returns (uint256 price, bool isValid); |
| 34 | + |
| 35 | + /// @return price The AMPL target price in dollars. |
| 36 | + /// @return isValid True if the returned price is valid. |
| 37 | + function amplTargetUsdPrice() external returns (uint256 price, bool isValid); |
| 38 | + |
| 39 | + /// @return price The WAMPL price in dollars. |
| 40 | + /// @return isValid True if the returned price is valid. |
| 41 | + function wamplUsdPrice() external returns (uint256 price, bool isValid); |
| 42 | + |
| 43 | + /// @return price The ETH price in dollars. |
| 44 | + /// @return isValid True if the returned price is valid. |
| 45 | + function ethUsdPrice() external returns (uint256 price, bool isValid); |
| 46 | +} |
0 commit comments