add twap switch
This commit is contained in:
@@ -30,7 +30,8 @@ contract CP is CPVesting {
|
||||
function init(
|
||||
address[] calldata addressList,
|
||||
uint256[] calldata timeLine,
|
||||
uint256[] calldata valueList
|
||||
uint256[] calldata valueList,
|
||||
bool isOpenTWAP
|
||||
) external {
|
||||
/*
|
||||
Address List
|
||||
@@ -94,6 +95,8 @@ contract CP is CPVesting {
|
||||
|
||||
_TOTAL_BASE_ = _BASE_TOKEN_.balanceOf(address(this));
|
||||
|
||||
_IS_OPEN_TWAP_ = isOpenTWAP;
|
||||
|
||||
require(address(this).balance == _SETTEL_FUND_, "SETTLE_FUND_NOT_MATCH");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -22,6 +22,7 @@ contract CPStorage is InitializableOwnable, ReentrancyGuard {
|
||||
|
||||
uint256 internal constant _SETTLEMENT_EXPIRE_ = 86400 * 7;
|
||||
uint256 internal constant _SETTEL_FUND_ = 200 finney;
|
||||
bool public _IS_OPEN_TWAP_ = false;
|
||||
|
||||
// ============ Timeline ============
|
||||
|
||||
|
||||
Reference in New Issue
Block a user