Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sccp-383 #621

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 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 = "74"
version = "75"
description = "Andromeda deployment"
preset = "andromeda"
deployers = [
Expand Down Expand Up @@ -105,6 +105,7 @@ include = [
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-link.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-ltc.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-matic.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-melania.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-meme.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-mew.toml",
"tomls/omnibus-base-mainnet-andromeda/oracles/pyth-mkr.toml",
Expand Down Expand Up @@ -225,6 +226,7 @@ include = [
"tomls/omnibus-base-mainnet-andromeda/perps/markets/link.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/ltc.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/matic.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/melania.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/meme.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/mew.toml",
"tomls/omnibus-base-mainnet-andromeda/perps/markets/mkr.toml",
Expand Down Expand Up @@ -429,6 +431,7 @@ pyth_feed_id_kmno = "0xb17e5bc5de742a8a378b54c9c75442b7d51e30ada63f28d9bd28d3c0e
pyth_feed_id_ldo = "0xc63e2a7f37a04e5e614c07238bedb25dcc38927fba8fe890597a593c0b2fa4ad"
pyth_feed_id_link = "0x8ac0c70fff57e9aefdf5edf44b51d62c2d433653cbb2cf5cc06bb115af04d221"
pyth_feed_id_ltc = "0x6e3f3fa8253588df9326580180233eb791e03b443a3ba7a1d892e73874e19a54"
pyth_feed_id_melania = "0x8fef7d52c7f4e3a6258d663f9d27e64a1b6fd95ab5f7d545dbf9a515353d0064"
pyth_feed_id_meme = "0xcd2cee36951a571e035db0dfad138e6ecdb06b517cc3373cd7db5d3609b7927c"
pyth_feed_id_mew = "0x514aed52ca5294177f20187ae883cec4a018619772ddce41efcc36a6448f5d5d"
pyth_feed_id_mkr = "0x9375299e31c0deb9c6bc378e6329aab44cb48ec655552a70d4b9050346a30378"
Expand Down
5 changes: 4 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 = "71"
version = "72"
description = "Andromeda dev deployment"
preset = "andromeda"
deployers = ["0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9"]
Expand Down Expand Up @@ -95,6 +95,7 @@ include = [
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-link.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-ltc.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-matic.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-melania.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-meme.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-mew.toml",
"tomls/omnibus-base-sepolia-andromeda/oracles/pyth-mkr.toml",
Expand Down Expand Up @@ -214,6 +215,7 @@ include = [
"tomls/omnibus-base-sepolia-andromeda/perps/markets/link.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/ltc.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/matic.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/melania.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/meme.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/mew.toml",
"tomls/omnibus-base-sepolia-andromeda/perps/markets/mkr.toml",
Expand Down Expand Up @@ -469,6 +471,7 @@ pyth_feed_id_kmno = "0xb17e5bc5de742a8a378b54c9c75442b7d51e30ada63f28d9bd28d3c0e
pyth_feed_id_ldo = "0xc63e2a7f37a04e5e614c07238bedb25dcc38927fba8fe890597a593c0b2fa4ad"
pyth_feed_id_link = "0x8ac0c70fff57e9aefdf5edf44b51d62c2d433653cbb2cf5cc06bb115af04d221"
pyth_feed_id_ltc = "0x6e3f3fa8253588df9326580180233eb791e03b443a3ba7a1d892e73874e19a54"
pyth_feed_id_melania = "0x8fef7d52c7f4e3a6258d663f9d27e64a1b6fd95ab5f7d545dbf9a515353d0064"
pyth_feed_id_meme = "0xcd2cee36951a571e035db0dfad138e6ecdb06b517cc3373cd7db5d3609b7927c"
pyth_feed_id_mew = "0x514aed52ca5294177f20187ae883cec4a018619772ddce41efcc36a6448f5d5d"
pyth_feed_id_mkr = "0x9375299e31c0deb9c6bc378e6329aab44cb48ec655552a70d4b9050346a30378"
Expand Down
39 changes: 39 additions & 0 deletions tomls/omnibus-base-mainnet-andromeda/oracles/pyth-melania.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.registerPythMelaniaOracleNode]
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_melania, false]) %>",
[
],
]
extra.melania_pyth_oracle_id.event = "NodeRegistered"
extra.melania_pyth_oracle_id.arg = 0
# Pyth Off-chain Lookup
[invoke.registerLookupMelaniaOracleNode]
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_melania, settings.default_staleness_tolerance]) %>",
[
],
]
extra.melania_lookup_oracle_id.event = "NodeRegistered"
extra.melania_lookup_oracle_id.arg = 0
# Staleness Node
[invoke.registerMelaniaOracleNode]
target = ["system.oracle_manager.Proxy"]
func = "registerNode"
args = [
7, # 7 = staleness circuit breaker
"<%= defaultAbiCoder.encode(['uint256'], [settings.default_staleness_tolerance]) %>",
[
"<%= extras.melania_pyth_oracle_id %>",
"<%= extras.melania_lookup_oracle_id %>",
],
]
extra.melania_oracle_id.event = "NodeRegistered"
extra.melania_oracle_id.arg = 0
119 changes: 119 additions & 0 deletions tomls/omnibus-base-mainnet-andromeda/perps/markets/melania.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
[var.perps_melania_market_settings]
melania_perps_market_id = "10100"
melania_perps_market_skew_scale = "<%= parseEther(String(1_500_000)) %>"
melania_perps_market_max_funding_velocity = "<%= parseEther('36') %>"
melania_perps_maker_fee_ratio = "<%= parseEther('0.000200') %>"
melania_perps_taker_fee_ratio = "<%= parseEther('0.001000') %>"
melania_perps_max_market_size = "<%= parseEther(String(1_000_000)) %>"
melania_perps_max_market_value = "<%= parseEther(String(2_000_000)) %>"
melania_perps_initial_margin_ratio = "<%= parseEther('1.811') %>"
melania_perps_maintenance_margin_scalar = "<%= parseEther('0.408') %>"
melania_perps_minimum_initial_margin_ratio = "<%= parseEther('0.05') %>"
melania_perps_flag_reward_ratio_d18 = "<%= parseEther('0.0003') %>"
melania_perps_max_liquidation_limit_accumulation_multiplier = "<%= parseEther('1.5') %>"
melania_perps_max_seconds_in_liquidation_window = "30"
melania_perps_minimum_position_margin = "<%= parseEther('15') %>"
melania_perps_locked_oi_ratio = "<%= parseEther('0.1') %>"
melania_perps_max_liquidation_pd = "<%= parseEther('0.0005') %>"
melania_perps_endorsed_liquidator = "0x11233749514Ab8d00C0A5873DF7428b3db70030f"

[invoke.createMelaniaPerpsMarket]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "createMarket"
args = ["<%= settings.melania_perps_market_id %>", "Melania Meme", "MELANIA"]

[invoke.setPerpsPriceMelania]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "updatePriceData"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= extras.melania_oracle_id %>",
"<%= settings.strict_staleness_tolerance %>",
]

[invoke.addPerpsMelaniaSettlementStrategy]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "addSettlementStrategy"
args = [

"<%= settings.melania_perps_market_id %>",

{ strategyType = "0", settlementDelay = "0", settlementWindowDuration = "1", priceVerificationContract = "0x0000000000000000000000000000000000000000", feedId = "0x0000000000000000000000000000000000000000000000000000000000000000", settlementReward = "0", disabled = false, commitmentPriceDelay = "0" },
]
extra.melania_pyth_settlement_strategy.event = "SettlementStrategyAdded"
extra.melania_pyth_settlement_strategy.arg = 2
[invoke.setPerpsMelaniaSettlementStrategy]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setSettlementStrategy"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= extras.melania_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_melania %>", settlementReward = "<%= settings.settlement_reward %>", disabled = false, commitmentPriceDelay = "<%= settings.commitment_price_delay %>" },
]

[invoke.setPerpsMelaniaFundingParameters]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setFundingParameters"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= settings.melania_perps_market_skew_scale %>",
"<%= settings.melania_perps_market_max_funding_velocity %>",
]

[invoke.setPerpsMelaniaOrderFees]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setOrderFees"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= settings.melania_perps_maker_fee_ratio %>",
"<%= settings.melania_perps_taker_fee_ratio %>",
]

[invoke.setPerpsMelaniaMaxMarketSize]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setMaxMarketSize"
args = ["<%= settings.melania_perps_market_id %>", "<%= settings.melania_perps_max_market_size %>"]

[invoke.setPerpsMelaniaMaxMarketValue]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setMaxMarketValue"
args = ["<%= settings.melania_perps_market_id %>", "<%= settings.melania_perps_max_market_value %>"]

[invoke.setPerpsMelaniaMaxLiquidationParameters]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setMaxLiquidationParameters"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= settings.melania_perps_max_liquidation_limit_accumulation_multiplier %>",
"<%= settings.melania_perps_max_seconds_in_liquidation_window %>",
"<%= settings.melania_perps_max_liquidation_pd %>",
"<%= settings.melania_perps_endorsed_liquidator %>",
]

[invoke.setPerpsMelaniaLiquidationParameters]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setLiquidationParameters"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= settings.melania_perps_initial_margin_ratio %>",
"<%= settings.melania_perps_minimum_initial_margin_ratio %>",
"<%= settings.melania_perps_maintenance_margin_scalar %>",
"<%= settings.melania_perps_flag_reward_ratio_d18 %>",
"<%= settings.melania_perps_minimum_position_margin %>",
]

[invoke.setPerpsMelaniaLockedOiRatio]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setLockedOiRatio"
args = ["<%= settings.melania_perps_market_id %>", "<%= settings.melania_perps_locked_oi_ratio %>"]
39 changes: 39 additions & 0 deletions tomls/omnibus-base-sepolia-andromeda/oracles/pyth-melania.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.registerPythMelaniaOracleNode]
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_melania, false]) %>",
[
],
]
extra.melania_pyth_oracle_id.event = "NodeRegistered"
extra.melania_pyth_oracle_id.arg = 0
# Pyth Off-chain Lookup
[invoke.registerLookupMelaniaOracleNode]
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_melania, settings.default_staleness_tolerance]) %>",
[
],
]
extra.melania_lookup_oracle_id.event = "NodeRegistered"
extra.melania_lookup_oracle_id.arg = 0
# Staleness Node
[invoke.registerMelaniaOracleNode]
target = ["system.oracle_manager.Proxy"]
func = "registerNode"
args = [
7, # 7 = staleness circuit breaker
"<%= defaultAbiCoder.encode(['uint256'], [settings.default_staleness_tolerance]) %>",
[
"<%= extras.melania_pyth_oracle_id %>",
"<%= extras.melania_lookup_oracle_id %>",
],
]
extra.melania_oracle_id.event = "NodeRegistered"
extra.melania_oracle_id.arg = 0
119 changes: 119 additions & 0 deletions tomls/omnibus-base-sepolia-andromeda/perps/markets/melania.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
[var.perps_melania_market_settings]
melania_perps_market_id = "10100"
melania_perps_market_skew_scale = "<%= parseEther(String(1_500_000)) %>"
melania_perps_market_max_funding_velocity = "<%= parseEther('36') %>"
melania_perps_maker_fee_ratio = "<%= parseEther('0.000200') %>"
melania_perps_taker_fee_ratio = "<%= parseEther('0.001000') %>"
melania_perps_max_market_size = "<%= parseEther(String(1_000_000)) %>"
melania_perps_max_market_value = "<%= parseEther(String(2_000_000)) %>"
melania_perps_initial_margin_ratio = "<%= parseEther('1.811') %>"
melania_perps_maintenance_margin_scalar = "<%= parseEther('0.408') %>"
melania_perps_minimum_initial_margin_ratio = "<%= parseEther('0.05') %>"
melania_perps_flag_reward_ratio_d18 = "<%= parseEther('0.0003') %>"
melania_perps_max_liquidation_limit_accumulation_multiplier = "<%= parseEther('1.5') %>"
melania_perps_max_seconds_in_liquidation_window = "30"
melania_perps_minimum_position_margin = "<%= parseEther('15') %>"
melania_perps_locked_oi_ratio = "<%= parseEther('0.1') %>"
melania_perps_max_liquidation_pd = "<%= parseEther('0.0005') %>"
melania_perps_endorsed_liquidator = "0x11233749514Ab8d00C0A5873DF7428b3db70030f"

[invoke.createMelaniaPerpsMarket]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "createMarket"
args = ["<%= settings.melania_perps_market_id %>", "Melania Meme", "MELANIA"]

[invoke.setPerpsPriceMelania]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "updatePriceData"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= extras.melania_oracle_id %>",
"<%= settings.strict_staleness_tolerance %>",
]

[invoke.addPerpsMelaniaSettlementStrategy]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "addSettlementStrategy"
args = [

"<%= settings.melania_perps_market_id %>",

{ strategyType = "0", settlementDelay = "0", settlementWindowDuration = "1", priceVerificationContract = "0x0000000000000000000000000000000000000000", feedId = "0x0000000000000000000000000000000000000000000000000000000000000000", settlementReward = "0", disabled = false, commitmentPriceDelay = "0" },
]
extra.melania_pyth_settlement_strategy.event = "SettlementStrategyAdded"
extra.melania_pyth_settlement_strategy.arg = 2
[invoke.setPerpsMelaniaSettlementStrategy]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setSettlementStrategy"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= extras.melania_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_melania %>", settlementReward = "<%= settings.settlement_reward %>", disabled = false, commitmentPriceDelay = "<%= settings.commitment_price_delay %>" },
]

[invoke.setPerpsMelaniaFundingParameters]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setFundingParameters"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= settings.melania_perps_market_skew_scale %>",
"<%= settings.melania_perps_market_max_funding_velocity %>",
]

[invoke.setPerpsMelaniaOrderFees]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setOrderFees"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= settings.melania_perps_maker_fee_ratio %>",
"<%= settings.melania_perps_taker_fee_ratio %>",
]

[invoke.setPerpsMelaniaMaxMarketSize]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setMaxMarketSize"
args = ["<%= settings.melania_perps_market_id %>", "<%= settings.melania_perps_max_market_size %>"]

[invoke.setPerpsMelaniaMaxMarketValue]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setMaxMarketValue"
args = ["<%= settings.melania_perps_market_id %>", "<%= settings.melania_perps_max_market_value %>"]

[invoke.setPerpsMelaniaMaxLiquidationParameters]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setMaxLiquidationParameters"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= settings.melania_perps_max_liquidation_limit_accumulation_multiplier %>",
"<%= settings.melania_perps_max_seconds_in_liquidation_window %>",
"<%= settings.melania_perps_max_liquidation_pd %>",
"<%= settings.melania_perps_endorsed_liquidator %>",
]

[invoke.setPerpsMelaniaLiquidationParameters]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setLiquidationParameters"
args = [
"<%= settings.melania_perps_market_id %>",
"<%= settings.melania_perps_initial_margin_ratio %>",
"<%= settings.melania_perps_minimum_initial_margin_ratio %>",
"<%= settings.melania_perps_maintenance_margin_scalar %>",
"<%= settings.melania_perps_flag_reward_ratio_d18 %>",
"<%= settings.melania_perps_minimum_position_margin %>",
]

[invoke.setPerpsMelaniaLockedOiRatio]
target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setLockedOiRatio"
args = ["<%= settings.melania_perps_market_id %>", "<%= settings.melania_perps_locked_oi_ratio %>"]