-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f71381
commit 0d2f4a2
Showing
14 changed files
with
684 additions
and
568 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
include = [ | ||
"../perps-factory.toml", | ||
# TODO: this is a funny necessary dependency because the oracle manager is registering the same node twice | ||
# however, it will not emit "NodeRegistered" the second time because its an unnecessary call | ||
"../../oracles/pyth-ltc.toml", | ||
"../common/bigcap-settings.toml", | ||
] | ||
|
||
[setting.ltcPerpsMarketId] | ||
|
||
[setting.perpsLtcSkewScale] | ||
|
||
[setting.perpsLtcMaxFundingVelocity] | ||
|
||
[setting.perpsLtcMakerFeeRatio] | ||
|
||
[setting.perpsLtcTakerFeeRatio] | ||
|
||
[setting.perpsLtcMaxMarketSize] | ||
|
||
[setting.perpsLtcInitialMarginRatio] | ||
|
||
[setting.perpsLtcMaintenanceMarginFraction] | ||
|
||
[setting.perpsLtcLiquidationRewardRatioD18] | ||
|
||
[setting.perpsLtcMaxLiquidationLimitAccumulationMultiplier] | ||
|
||
[setting.perpsLtcMaxSecondsInLiquidationWindow] | ||
|
||
[setting.perpsLtcMinimumPositionMargin] | ||
|
||
[setting.perpsLtcLockedOiRatio] | ||
|
||
[setting.pythLtcFeedId] | ||
|
||
# strategy type for Perps markets is 0, for spot markets is 1 | ||
[setting.strategyType] | ||
defaultValue = "0" | ||
|
||
[invoke.createLTCPerpsMarket] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "createMarket" | ||
args = ["<%= settings.ltcPerpsMarketId %>", "Litecoin", "LTC"] | ||
depends = ["provision.perpsFactory"] | ||
|
||
[invoke.setPerpsPriceLtc] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "updatePriceData" | ||
args = ["<%= settings.ltcPerpsMarketId %>", "<%= extras.ltc_oracle_id %>"] | ||
depends = ["invoke.createLtcPerpsMarket", "invoke.registerLtcOracleNode"] | ||
|
||
[invoke.setPerpsLtcSettlementStrategy] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "addSettlementStrategy" | ||
args = [ | ||
"<%= settings.ltcPerpsMarketId %>", | ||
{ strategyType = "<%= settings.strategyType %>", settlementDelay = "<%= settings.bigCapSettlementDelay %>", settlementWindowDuration = "<%= settings.bigCapSettlementWindowDuration %>", priceWindowDuration = "<%= settings.bigCapPriceWindowDuration %>", priceVerificationContract = "<%= settings.pythPriceVerificationAddress %>", feedId = "<%= settings.pythLtcFeedId %>", url = "<%= settings.pythFeedUrl %>", settlementReward = "<%= settings.settlementReward %>", priceDeviationTolerance = "<%= parseEther('1') %>", disabled = false } | ||
] | ||
depends = ["invoke.createLtcPerpsMarket"] | ||
|
||
[invoke.setPerpsLtcFundingParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setFundingParameters" | ||
args = [ | ||
"<%= settings.ltcPerpsMarketId %>", | ||
"<%= parseEther(settings.perpsLtcSkewScale) %>", | ||
"<%= parseEther(settings.perpsLtcMaxFundingVelocity) %>" | ||
] | ||
depends = ["invoke.createLtcPerpsMarket"] | ||
|
||
[invoke.setPerpsLtcOrderFees] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setOrderFees" | ||
args = [ | ||
"<%= settings.ltcPerpsMarketId %>", | ||
"<%= parseEther(settings.perpsLtcMakerFeeRatio) %>", | ||
"<%= parseEther(settings.perpsLtcTakerFeeRatio) %>" | ||
] | ||
depends = ["invoke.createLtcPerpsMarket"] | ||
|
||
[invoke.setPerpsLtcMaxMarketSize] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setMaxMarketSize" | ||
args = ["<%= settings.ltcPerpsMarketId %>", "<%= parseEther(settings.perpsLtcMaxMarketSize) %>"] | ||
depends = ["invoke.createLtcPerpsMarket"] | ||
|
||
[invoke.setPerpsLtcMaxLiquidationParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setMaxLiquidationParameters" | ||
args = [ | ||
"<%= settings.ltcPerpsMarketId %>", | ||
"<%= parseEther(settings.perpsLtcMaxLiquidationLimitAccumulationMultiplier) %>", | ||
"<%= settings.perpsLtcMaxSecondsInLiquidationWindow %>", | ||
"<%= parseEther(settings.perpsLtcMaxLiquidationPd) %>", | ||
"<%= settings.perpsLtcEndorsedLiquidator %>" | ||
] | ||
depends = ["invoke.createLtcPerpsMarket"] | ||
|
||
[invoke.setPerpsLtcLiquidationParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setLiquidationParameters" | ||
args = [ | ||
"<%= settings.ltcPerpsMarketId %>", | ||
"<%= parseEther(settings.perpsLtcInitialMarginRatio) %>", | ||
"<%= parseEther(settings.perpsLtcMinimumInitialMarginRatio) %>", | ||
"<%= parseEther(settings.perpsLtcMaintenanceMarginScalar) %>", | ||
"<%= parseEther(settings.perpsLtcLiquidationRewardRatioD18) %>", | ||
"<%= parseEther(settings.perpsLtcMinimumPositionMargin) %>" | ||
] | ||
depends = ["invoke.createLtcPerpsMarket"] | ||
|
||
[invoke.setPerpsLtcLockedOiRatio] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setLockedOiRatio" | ||
args = ["<%= settings.ltcPerpsMarketId %>", "<%= parseEther(settings.perpsLtcLockedOiRatio) %>"] | ||
depends = ["invoke.createLtcPerpsMarket"] | ||
|
||
[invoke.setMaxCollateralAmountLtc] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setMaxCollateralAmount" | ||
args = ["<%= extras.synth_ltc_market_id %>", "<%= settings.perpsLtcSynthMaxCollateralAmount %>"] | ||
depends = ["invoke.createLtcSynth", "provision.perpsFactory"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
include = [ | ||
"../perps-factory.toml", | ||
# TODO: this is a funny necessary dependency because the oracle manager is registering the same node twice | ||
# however, it will not emit "NodeRegistered" the second time because its an unnecessary call | ||
"../../oracles/pyth-xrp.toml", | ||
"../common/bigcap-settings.toml", | ||
] | ||
|
||
[setting.xrpPerpsMarketId] | ||
|
||
[setting.perpsXrpSkewScale] | ||
|
||
[setting.perpsXrpMaxFundingVelocity] | ||
|
||
[setting.perpsXrpMakerFeeRatio] | ||
|
||
[setting.perpsXrpTakerFeeRatio] | ||
|
||
[setting.perpsXrpMaxMarketSize] | ||
|
||
[setting.perpsXrpInitialMarginRatio] | ||
|
||
[setting.perpsXrpMaintenanceMarginFraction] | ||
|
||
[setting.perpsXrpLiquidationRewardRatioD18] | ||
|
||
[setting.perpsXrpMaxLiquidationLimitAccumulationMultiplier] | ||
|
||
[setting.perpsXrpMaxSecondsInLiquidationWindow] | ||
|
||
[setting.perpsXrpMinimumPositionMargin] | ||
|
||
[setting.perpsXrpLockedOiRatio] | ||
|
||
[setting.pythXrpFeedId] | ||
|
||
# strategy type for Perps markets is 0, for spot markets is 1 | ||
[setting.strategyType] | ||
defaultValue = "0" | ||
|
||
[invoke.createXrpPerpsMarket] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "createMarket" | ||
args = ["<%= settings.xrpPerpsMarketId %>", "Ripple Token", "XRP"] | ||
depends = ["provision.perpsFactory"] | ||
|
||
[invoke.setPerpsPriceXrp] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "updatePriceData" | ||
args = ["<%= settings.xrpPerpsMarketId %>", "<%= extras.xrp_oracle_id %>"] | ||
depends = ["invoke.createXrpPerpsMarket", "invoke.registerXrpOracleNode"] | ||
|
||
[invoke.setPerpsXrpSettlementStrategy] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "addSettlementStrategy" | ||
args = [ | ||
"<%= settings.xrpPerpsMarketId %>", | ||
{ strategyType = "<%= settings.strategyType %>", settlementDelay = "<%= settings.bigCapSettlementDelay %>", settlementWindowDuration = "<%= settings.bigCapSettlementWindowDuration %>", priceWindowDuration = "<%= settings.bigCapPriceWindowDuration %>", priceVerificationContract = "<%= settings.pythPriceVerificationAddress %>", feedId = "<%= settings.pythLtcFeedId %>", url = "<%= settings.pythFeedUrl %>", settlementReward = "<%= settings.settlementReward %>", priceDeviationTolerance = "<%= parseEther('1') %>", disabled = false } | ||
] | ||
depends = ["invoke.createXrpPerpsMarket"] | ||
|
||
[invoke.setPerpsXrpFundingParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setFundingParameters" | ||
args = [ | ||
"<%= settings.xrpPerpsMarketId %>", | ||
"<%= parseEther(settings.perpsXrpSkewScale) %>", | ||
"<%= parseEther(settings.perpsXrpMaxFundingVelocity) %>" | ||
] | ||
depends = ["invoke.createLtcPerpsMarket"] | ||
|
||
[invoke.setPerpsLtcOrderFees] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setOrderFees" | ||
args = [ | ||
"<%= settings.ltcPerpsMarketId %>", | ||
"<%= parseEther(settings.perpsXrpMakerFeeRatio) %>", | ||
"<%= parseEther(settings.perpsXrpTakerFeeRatio) %>" | ||
] | ||
depends = ["invoke.createXrpPerpsMarket"] | ||
|
||
[invoke.setPerpsXrpMaxMarketSize] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setMaxMarketSize" | ||
args = ["<%= settings.xrpPerpsMarketId %>", "<%= parseEther(settings.perpsXrpMaxMarketSize) %>"] | ||
depends = ["invoke.createXrpPerpsMarket"] | ||
|
||
[invoke.setPerpsXrpMaxLiquidationParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setMaxLiquidationParameters" | ||
args = [ | ||
"<%= settings.xrpPerpsMarketId %>", | ||
"<%= parseEther(settings.perpsXrpMaxLiquidationLimitAccumulationMultiplier) %>", | ||
"<%= settings.perpsXrpMaxSecondsInLiquidationWindow %>", | ||
"<%= parseEther(settings.perpsXrpMaxLiquidationPd) %>", | ||
"<%= settings.perpsXrpEndorsedLiquidator %>" | ||
] | ||
depends = ["invoke.createXrpPerpsMarket"] | ||
|
||
[invoke.setPerpsXrpLiquidationParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setLiquidationParameters" | ||
args = [ | ||
"<%= settings.opPerpsMarketId %>", | ||
"<%= parseEther(settings.perpsXrpInitialMarginRatio) %>", | ||
"<%= parseEther(settings.perpsXrpMinimumInitialMarginRatio) %>", | ||
"<%= parseEther(settings.perpsXrpMaintenanceMarginScalar) %>", | ||
"<%= parseEther(settings.perpsXrpLiquidationRewardRatioD18) %>", | ||
"<%= parseEther(settings.perpsXrpMinimumPositionMargin) %>" | ||
] | ||
depends = ["invoke.createXrpPerpsMarket"] | ||
|
||
[invoke.setPerpsOpLockedOiRatio] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setLockedOiRatio" | ||
args = ["<%= settings.xrpPerpsMarketId %>", "<%= parseEther(settings.perpsXrpLockedOiRatio) %>"] | ||
depends = ["invoke.createXrpPerpsMarket"] | ||
|
||
[invoke.setMaxCollateralAmountXrp] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setMaxCollateralAmount" | ||
args = ["<%= extras.synth_xrp_market_id %>", "<%= settings.perpsXrpSynthMaxCollateralAmount %>"] | ||
depends = ["invoke.createXrpSynth", "provision.perpsFactory"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[setting.pythBtcFeedId] | ||
defaultValue = "0xf9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b" | ||
|
||
# Perps Configuration | ||
[setting.btcPerpsMarketId] | ||
defaultValue = "200" | ||
|
||
[setting.perpsBtcSkewScale] | ||
defaultValue = "1000000" | ||
|
||
[setting.perpsBtcMaxFundingVelocity] | ||
defaultValue = "9" | ||
|
||
[setting.perpsBtcMakerFeeRatio] | ||
defaultValue = "0.0007" | ||
|
||
[setting.perpsBtcTakerFeeRatio] | ||
defaultValue = "0.0003" | ||
|
||
[setting.perpsBtcMaxMarketSize] | ||
defaultValue = "100000" | ||
|
||
[setting.perpsBtcInitialMarginRatio] | ||
defaultValue = "1" | ||
|
||
[setting.perpsBtcMaintenanceMarginScalar] | ||
defaultValue = "0.5" | ||
|
||
[setting.perpsBtcMinimumInitialMarginRatio] | ||
defaultValue = "0.02" | ||
|
||
[setting.perpsBtcLiquidationRewardRatioD18] | ||
defaultValue = "0.01" | ||
|
||
[setting.perpsBtcMaxLiquidationLimitAccumulationMultiplier] | ||
defaultValue = "0.5" | ||
|
||
[setting.perpsBtcMaxSecondsInLiquidationWindow] | ||
defaultValue = "30" | ||
|
||
[setting.perpsBtcMinimumPositionMargin] | ||
defaultValue = "0" | ||
|
||
[setting.perpsBtcLockedOiRatio] | ||
defaultValue = "0.5" | ||
|
||
[setting.perpsBtcSynthMaxCollateralAmount] | ||
defaultValue = "<%= MaxUint256 %>" | ||
|
||
[setting.perpsBtcMaxLiquidationPd] | ||
defaultValue = "0.0016" | ||
|
||
[setting.perpsBtcEndorsedLiquidator] | ||
defaultValue = "0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13" |
Oops, something went wrong.