Skip to content

Commit 04aa236

Browse files
committed
removed pricing strategies in favor of meta oracle
1 parent a8ae0ae commit 04aa236

File tree

6 files changed

+370
-335
lines changed

6 files changed

+370
-335
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// SPDX-License-Identifier: BUSL-1.1
2+
3+
/// @notice Oracle contract to price perps and its underlying token.
4+
// solhint-disable-next-line compiler-version
5+
interface IPerpPricer {
6+
/// @return Number of decimals representing the prices returned.
7+
function decimals() external pure returns (uint8);
8+
9+
/// @return price The price of reference USD tokens.
10+
/// @return isValid True if the returned price is valid.
11+
function usdPrice() external returns (uint256 price, bool isValid);
12+
13+
/// @return price The price of perp tokens in dollars.
14+
/// @return isValid True if the returned price is valid.
15+
function perpUsdPrice() external returns (uint256 price, bool isValid);
16+
17+
/// @return price The price of underlying tokens (which back perp) in dollars.
18+
/// @return isValid True if the returned price is valid.
19+
function underlyingUsdPrice() external returns (uint256 price, bool isValid);
20+
21+
/// @return price Perp's fmv price in dollars.
22+
/// @return isValid True if the returned price is valid.
23+
function perpFmvUsdPrice() external returns (uint256 price, bool isValid);
24+
}

spot-vaults/contracts/_strategies/SpotAppraiser.sol

Lines changed: 0 additions & 217 deletions
This file was deleted.

0 commit comments

Comments
 (0)