add twap switch

This commit is contained in:
owen05
2021-01-19 17:10:46 +08:00
parent 059778b27b
commit 8b683af08f
34 changed files with 519 additions and 174 deletions

View File

@@ -91,7 +91,8 @@ contract CPFunding is CPStorage {
_poolQuoteToken,
3e15, // 0.3% lp feeRate
poolI,
DecimalMath.ONE
DecimalMath.ONE,
_IS_OPEN_TWAP_
);
uint256 avgPrice = unUsedBase == 0 ? _I_ : DecimalMath.divCeil(poolQuote, unUsedBase);