-
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.
* initial commit * update version * Update fartcoin.toml * Update fartcoin.toml * bump market ids * Revert "bump market ids" This reverts commit e464c1e. * Reapply "bump market ids" This reverts commit 21cd94a.
- Loading branch information
1 parent
0710a9c
commit 8648a3c
Showing
10 changed files
with
664 additions
and
2 deletions.
There are no files selected for viewing
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 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
39 changes: 39 additions & 0 deletions
39
tomls/omnibus-base-mainnet-andromeda/oracles/pyth-fartcoin.toml
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,39 @@ | ||
# This registers a staleness node that looks to Pyth for a fresh enough price, or otherwise reverts with an ERC-7412 compatible error | ||
# Latest Pyth Price | ||
[invoke.registerPythFartcoinOracleNode] | ||
target = ["system.oracle_manager.Proxy"] | ||
func = "registerNode" | ||
args = [ | ||
5, # 5 = pyth aggregator type | ||
"<%= defaultAbiCoder.encode(['address', 'bytes32', 'bool'], [settings.pyth_price_verification_address, settings.pyth_feed_id_fartcoin, false]) %>", | ||
[ | ||
], | ||
] | ||
extra.fartcoin_pyth_oracle_id.event = "NodeRegistered" | ||
extra.fartcoin_pyth_oracle_id.arg = 0 | ||
# Pyth Off-chain Lookup | ||
[invoke.registerLookupFartcoinOracleNode] | ||
target = ["system.oracle_manager.Proxy"] | ||
func = "registerNode" | ||
args = [ | ||
9, # 9 = PythOffchainLookupNode | ||
"<%= defaultAbiCoder.encode(['address', 'bytes32', 'uint256'], [imports.pyth_erc7412_wrapper.contracts.PythERC7412Wrapper.address, settings.pyth_feed_id_fartcoin, settings.default_staleness_tolerance]) %>", | ||
[ | ||
], | ||
] | ||
extra.fartcoin_lookup_oracle_id.event = "NodeRegistered" | ||
extra.fartcoin_lookup_oracle_id.arg = 0 | ||
# Staleness Node | ||
[invoke.registerFartcoinOracleNode] | ||
target = ["system.oracle_manager.Proxy"] | ||
func = "registerNode" | ||
args = [ | ||
7, # 7 = staleness circuit breaker | ||
"<%= defaultAbiCoder.encode(['uint256'], [settings.default_staleness_tolerance]) %>", | ||
[ | ||
"<%= extras.fartcoin_pyth_oracle_id %>", | ||
"<%= extras.fartcoin_lookup_oracle_id %>", | ||
], | ||
] | ||
extra.fartcoin_oracle_id.event = "NodeRegistered" | ||
extra.fartcoin_oracle_id.arg = 0 |
39 changes: 39 additions & 0 deletions
39
tomls/omnibus-base-mainnet-andromeda/oracles/pyth-kmno.toml
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,39 @@ | ||
# This registers a staleness node that looks to Pyth for a fresh enough price, or otherwise reverts with an ERC-7412 compatible error | ||
# Latest Pyth Price | ||
[invoke.registerPythKmnoOracleNode] | ||
target = ["system.oracle_manager.Proxy"] | ||
func = "registerNode" | ||
args = [ | ||
5, # 5 = pyth aggregator type | ||
"<%= defaultAbiCoder.encode(['address', 'bytes32', 'bool'], [settings.pyth_price_verification_address, settings.pyth_feed_id_kmno, false]) %>", | ||
[ | ||
], | ||
] | ||
extra.kmno_pyth_oracle_id.event = "NodeRegistered" | ||
extra.kmno_pyth_oracle_id.arg = 0 | ||
# Pyth Off-chain Lookup | ||
[invoke.registerLookupKmnoOracleNode] | ||
target = ["system.oracle_manager.Proxy"] | ||
func = "registerNode" | ||
args = [ | ||
9, # 9 = PythOffchainLookupNode | ||
"<%= defaultAbiCoder.encode(['address', 'bytes32', 'uint256'], [imports.pyth_erc7412_wrapper.contracts.PythERC7412Wrapper.address, settings.pyth_feed_id_kmno, settings.default_staleness_tolerance]) %>", | ||
[ | ||
], | ||
] | ||
extra.kmno_lookup_oracle_id.event = "NodeRegistered" | ||
extra.kmno_lookup_oracle_id.arg = 0 | ||
# Staleness Node | ||
[invoke.registerKmnoOracleNode] | ||
target = ["system.oracle_manager.Proxy"] | ||
func = "registerNode" | ||
args = [ | ||
7, # 7 = staleness circuit breaker | ||
"<%= defaultAbiCoder.encode(['uint256'], [settings.default_staleness_tolerance]) %>", | ||
[ | ||
"<%= extras.kmno_pyth_oracle_id %>", | ||
"<%= extras.kmno_lookup_oracle_id %>", | ||
], | ||
] | ||
extra.kmno_oracle_id.event = "NodeRegistered" | ||
extra.kmno_oracle_id.arg = 0 |
128 changes: 128 additions & 0 deletions
128
tomls/omnibus-base-mainnet-andromeda/perps/markets/fartcoin.toml
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,128 @@ | ||
[var.perps_fartcoin_market_settings] | ||
fartcoin_perps_market_id = "9900" | ||
fartcoin_perps_market_skew_scale = "<%= parseEther(String(7_000_000)) %>" | ||
fartcoin_perps_market_max_funding_velocity = "<%= parseEther('9') %>" | ||
fartcoin_perps_maker_fee_ratio = "<%= parseEther('0.000000') %>" | ||
fartcoin_perps_taker_fee_ratio = "<%= parseEther('0.001000') %>" | ||
fartcoin_perps_max_market_size = "<%= parseEther(String(2_500_000)) %>" | ||
fartcoin_perps_max_market_value = "<%= parseEther(String(2_000_000)) %>" | ||
fartcoin_perps_initial_margin_ratio = "<%= parseEther('2.809') %>" | ||
fartcoin_perps_maintenance_margin_scalar = "<%= parseEther('0.317') %>" | ||
fartcoin_perps_minimum_initial_margin_ratio = "<%= parseEther('0.05') %>" | ||
fartcoin_perps_flag_reward_ratio_d18 = "<%= parseEther('0.0003') %>" | ||
fartcoin_perps_max_liquidation_limit_accumulation_multiplier = "<%= parseEther('1.5') %>" | ||
fartcoin_perps_max_seconds_in_liquidation_window = "30" | ||
fartcoin_perps_minimum_position_margin = "<%= parseEther('15') %>" | ||
fartcoin_perps_locked_oi_ratio = "<%= parseEther('0.1') %>" | ||
fartcoin_perps_max_liquidation_pd = "<%= parseEther('0.0005') %>" | ||
fartcoin_perps_endorsed_liquidator = "0x11233749514Ab8d00C0A5873DF7428b3db70030f" | ||
|
||
[invoke.createFartcoinPerpsMarket] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "createMarket" | ||
args = ["<%= settings.fartcoin_perps_market_id %>", "Fartcoin", "FARTCOIN"] | ||
|
||
[invoke.setPerpsPriceFartcoin] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "updatePriceData" | ||
args = [ | ||
"<%= settings.fartcoin_perps_market_id %>", | ||
"<%= extras.fartcoin_oracle_id %>", | ||
"<%= settings.strict_staleness_tolerance %>", | ||
] | ||
|
||
[invoke.addPerpsFartcoinSettlementStrategy] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "addSettlementStrategy" | ||
args = [ | ||
|
||
"<%= settings.fartcoin_perps_market_id %>", | ||
|
||
{ strategyType = "0", settlementDelay = "0", settlementWindowDuration = "1", priceVerificationContract = "0x0000000000000000000000000000000000000000", feedId = "0x0000000000000000000000000000000000000000000000000000000000000000", settlementReward = "0", disabled = false, commitmentPriceDelay = "0" }, | ||
] | ||
extra.fartcoin_pyth_settlement_strategy.event = "SettlementStrategyAdded" | ||
extra.fartcoin_pyth_settlement_strategy.arg = 2 | ||
[invoke.setPerpsFartcoinSettlementStrategy] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setSettlementStrategy" | ||
args = [ | ||
"<%= settings.fartcoin_perps_market_id %>", | ||
"<%= extras.fartcoin_pyth_settlement_strategy %>", | ||
{ strategyType = "0", settlementDelay = "<%= settings.settlement_delay %>", settlementWindowDuration = "<%= settings.settlement_window_duration %>", priceVerificationContract = "<%= imports.pyth_erc7412_wrapper.contracts.PythERC7412Wrapper.address %>", feedId = "<%= settings.pyth_feed_id_fartcoin %>", settlementReward = "<%= settings.settlement_reward %>", disabled = false, commitmentPriceDelay = "<%= settings.commitment_price_delay %>" }, | ||
] | ||
|
||
[invoke.setPerpsFartcoinFundingParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setFundingParameters" | ||
args = [ | ||
"<%= settings.fartcoin_perps_market_id %>", | ||
"<%= settings.fartcoin_perps_market_skew_scale %>", | ||
"<%= settings.fartcoin_perps_market_max_funding_velocity %>", | ||
] | ||
|
||
[invoke.setPerpsFartcoinOrderFees] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setOrderFees" | ||
args = [ | ||
"<%= settings.fartcoin_perps_market_id %>", | ||
"<%= settings.fartcoin_perps_maker_fee_ratio %>", | ||
"<%= settings.fartcoin_perps_taker_fee_ratio %>", | ||
] | ||
|
||
[invoke.setPerpsFartcoinMaxMarketSize] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setMaxMarketSize" | ||
args = [ | ||
"<%= settings.fartcoin_perps_market_id %>", | ||
"<%= settings.fartcoin_perps_max_market_size %>", | ||
] | ||
|
||
[invoke.setPerpsFartcoinMaxMarketValue] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setMaxMarketValue" | ||
args = [ | ||
"<%= settings.fartcoin_perps_market_id %>", | ||
"<%= settings.fartcoin_perps_max_market_value %>", | ||
] | ||
|
||
[invoke.setPerpsFartcoinMaxLiquidationParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setMaxLiquidationParameters" | ||
args = [ | ||
"<%= settings.fartcoin_perps_market_id %>", | ||
"<%= settings.fartcoin_perps_max_liquidation_limit_accumulation_multiplier %>", | ||
"<%= settings.fartcoin_perps_max_seconds_in_liquidation_window %>", | ||
"<%= settings.fartcoin_perps_max_liquidation_pd %>", | ||
"<%= settings.fartcoin_perps_endorsed_liquidator %>", | ||
] | ||
|
||
[invoke.setPerpsFartcoinLiquidationParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setLiquidationParameters" | ||
args = [ | ||
"<%= settings.fartcoin_perps_market_id %>", | ||
"<%= settings.fartcoin_perps_initial_margin_ratio %>", | ||
"<%= settings.fartcoin_perps_minimum_initial_margin_ratio %>", | ||
"<%= settings.fartcoin_perps_maintenance_margin_scalar %>", | ||
"<%= settings.fartcoin_perps_flag_reward_ratio_d18 %>", | ||
"<%= settings.fartcoin_perps_minimum_position_margin %>", | ||
] | ||
|
||
[invoke.setPerpsFartcoinLockedOiRatio] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setLockedOiRatio" | ||
args = [ | ||
"<%= settings.fartcoin_perps_market_id %>", | ||
"<%= settings.fartcoin_perps_locked_oi_ratio %>", | ||
] |
Oops, something went wrong.