Skip to content

Commit

Permalink
SCCP-377 (#598)
Browse files Browse the repository at this point in the history
* 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
kaleb-keny authored Dec 26, 2024
1 parent 0710a9c commit 8648a3c
Show file tree
Hide file tree
Showing 10 changed files with 664 additions and 2 deletions.
8 changes: 7 additions & 1 deletion omnibus-base-mainnet-andromeda.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "synthetix-omnibus"
version = "71"
version = "72"
description = "Andromeda deployment"
preset = "andromeda"
deployers = [
Expand Down Expand Up @@ -85,6 +85,7 @@ include = [
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-eth.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-ethbtc.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-ethfi.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-fartcoin.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-fil.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-flow.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-ftm.toml",
Expand All @@ -99,6 +100,7 @@ include = [
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-io.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-jto.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-jup.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-kmno.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-ldo.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-link.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-ltc.toml",
Expand Down Expand Up @@ -202,6 +204,7 @@ include = [
"tomls/omnibus-base-mainnet-andromeda/perps/markets/eth.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/ethbtc.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/ethfi.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/fartcoin.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/fil.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/flow.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/ftm.toml",
Expand All @@ -216,6 +219,7 @@ include = [
"tomls/omnibus-base-mainnet-andromeda/perps/markets/io.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/jto.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/jup.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/kmno.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/ldo.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/link.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/ltc.toml",
Expand Down Expand Up @@ -404,6 +408,7 @@ pyth_feed_id_etc = "0x7f5cc8d963fc5b3d2ae41fe5685ada89fd4f14b435f8050f28c7fd409f
pyth_feed_id_eth = "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace"
pyth_feed_id_ethbtc = "0xc96458d393fe9deb7a7d63a0ac41e2898a67a7750dbd166673279e06c868df0a"
pyth_feed_id_ethfi = "0xb27578a9654246cb0a2950842b92330e9ace141c52b63829cc72d5c45a5a595a"
pyth_feed_id_fartcoin = "0x58cd29ef0e714c5affc44f269b2c1899a52da4169d7acc147b9da692e6953608"
pyth_feed_id_fil = "0x150ac9b959aee0051e4091f0ef5216d941f590e1c5e7f91cf7635b5c11628c0e"
pyth_feed_id_flow = "0x2fb245b9a84554a0f15aa123cbb5f64cd263b59e9a87d80148cbffab50c69f30"
pyth_feed_id_ftm = "0x5c6c0d2386e3352356c3ab84434fafb5ea067ac2678a38a338c4a69ddc4bdb0c"
Expand All @@ -418,6 +423,7 @@ pyth_feed_id_inj = "0x7a5bc1d2b56ad029048cd63964b3ad2776eadf812edc1a43a31406cb54
pyth_feed_id_io = "0x82595d1509b770fa52681e260af4dda9752b87316d7c048535d8ead3fa856eb1"
pyth_feed_id_jto = "0xb43660a5f790c69354b0729a5ef9d50d68f1df92107540210b9cccba1f947cc2"
pyth_feed_id_jup = "0x0a0408d619e9380abad35060f9192039ed5042fa6f82301d0e48bb52be830996"
pyth_feed_id_kmno = "0xb17e5bc5de742a8a378b54c9c75442b7d51e30ada63f28d9bd28d3c0e26511a0"
pyth_feed_id_ldo = "0xc63e2a7f37a04e5e614c07238bedb25dcc38927fba8fe890597a593c0b2fa4ad"
pyth_feed_id_link = "0x8ac0c70fff57e9aefdf5edf44b51d62c2d433653cbb2cf5cc06bb115af04d221"
pyth_feed_id_ltc = "0x6e3f3fa8253588df9326580180233eb791e03b443a3ba7a1d892e73874e19a54"
Expand Down
8 changes: 7 additions & 1 deletion omnibus-base-sepolia-andromeda.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "synthetix-omnibus"
version = "68"
version = "69"
description = "Andromeda dev deployment"
preset = "andromeda"
deployers = ["0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9"]
Expand Down Expand Up @@ -75,6 +75,7 @@ include = [
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-eth.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-ethbtc.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-ethfi.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-fartcoin.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-fil.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-flow.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-ftm.toml",
Expand All @@ -89,6 +90,7 @@ include = [
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-io.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-jto.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-jup.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-kmno.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-ldo.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-link.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-ltc.toml",
Expand Down Expand Up @@ -191,6 +193,7 @@ include = [
"tomls/omnibus-base-sepolia-andromeda/perps/markets/eth.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/ethbtc.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/ethfi.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/fartcoin.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/fil.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/flow.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/ftm.toml",
Expand All @@ -205,6 +208,7 @@ include = [
"tomls/omnibus-base-sepolia-andromeda/perps/markets/io.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/jto.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/jup.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/kmno.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/ldo.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/link.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/ltc.toml",
Expand Down Expand Up @@ -444,6 +448,7 @@ pyth_feed_id_etc = "0x7f5cc8d963fc5b3d2ae41fe5685ada89fd4f14b435f8050f28c7fd409f
pyth_feed_id_eth = "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace"
pyth_feed_id_ethbtc = "0xc96458d393fe9deb7a7d63a0ac41e2898a67a7750dbd166673279e06c868df0a"
pyth_feed_id_ethfi = "0xb27578a9654246cb0a2950842b92330e9ace141c52b63829cc72d5c45a5a595a"
pyth_feed_id_fartcoin = "0x58cd29ef0e714c5affc44f269b2c1899a52da4169d7acc147b9da692e6953608"
pyth_feed_id_fil = "0x150ac9b959aee0051e4091f0ef5216d941f590e1c5e7f91cf7635b5c11628c0e"
pyth_feed_id_flow = "0x2fb245b9a84554a0f15aa123cbb5f64cd263b59e9a87d80148cbffab50c69f30"
pyth_feed_id_ftm = "0x5c6c0d2386e3352356c3ab84434fafb5ea067ac2678a38a338c4a69ddc4bdb0c"
Expand All @@ -458,6 +463,7 @@ pyth_feed_id_inj = "0x7a5bc1d2b56ad029048cd63964b3ad2776eadf812edc1a43a31406cb54
pyth_feed_id_io = "0x82595d1509b770fa52681e260af4dda9752b87316d7c048535d8ead3fa856eb1"
pyth_feed_id_jto = "0xb43660a5f790c69354b0729a5ef9d50d68f1df92107540210b9cccba1f947cc2"
pyth_feed_id_jup = "0x0a0408d619e9380abad35060f9192039ed5042fa6f82301d0e48bb52be830996"
pyth_feed_id_kmno = "0xb17e5bc5de742a8a378b54c9c75442b7d51e30ada63f28d9bd28d3c0e26511a0"
pyth_feed_id_ldo = "0xc63e2a7f37a04e5e614c07238bedb25dcc38927fba8fe890597a593c0b2fa4ad"
pyth_feed_id_link = "0x8ac0c70fff57e9aefdf5edf44b51d62c2d433653cbb2cf5cc06bb115af04d221"
pyth_feed_id_ltc = "0x6e3f3fa8253588df9326580180233eb791e03b443a3ba7a1d892e73874e19a54"
Expand Down
39 changes: 39 additions & 0 deletions tomls/omnibus-base-mainnet-andromeda/oracles/pyth-fartcoin.toml
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 tomls/omnibus-base-mainnet-andromeda/oracles/pyth-kmno.toml
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 tomls/omnibus-base-mainnet-andromeda/perps/markets/fartcoin.toml
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 %>",
]
Loading

0 comments on commit 8648a3c

Please sign in to comment.