dodo-start && cpV2 ing
This commit is contained in:
@@ -50,7 +50,7 @@ contract DPPStorage is InitializableOwnable, ReentrancyGuard {
|
||||
// ============ Helper Functions ============
|
||||
|
||||
function getPMMState() public view returns (PMMPricing.PMMState memory state) {
|
||||
(state.i,,,) = IOracle(_I_).getPrice(address(_BASE_TOKEN_));
|
||||
state.i = IOracle(_I_).prices(address(_BASE_TOKEN_));
|
||||
state.K = _K_;
|
||||
state.B = _BASE_RESERVE_;
|
||||
state.Q = _QUOTE_RESERVE_;
|
||||
|
||||
@@ -39,9 +39,8 @@ contract DPPTrader is DPPVault {
|
||||
event RChange(PMMPricing.RState newRState);
|
||||
|
||||
modifier isOraclePriceValid() {
|
||||
(, bool isValid, bool isStale,) = IOracle(_I_).getPrice(address(_BASE_TOKEN_));
|
||||
require(isValid, "ORACLE_PRICE_INVALID");
|
||||
require(!isStale, "ORACLE_PRICE_STALE");
|
||||
bool isFeasible = IOracle(_I_).isFeasible(address(_BASE_TOKEN_));
|
||||
require(isFeasible, "ORACLE_PRICE_INVALID");
|
||||
_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user