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

SIP-336 Deploy Synthetix V3 Core on Base #36

Merged
merged 13 commits into from
Oct 17, 2023
16 changes: 11 additions & 5 deletions .github/workflows/simulate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
- "omnibus-optimism-mainnet.toml"
- "omnibus-goerli.toml"
- "omnibus-optimism-goerli.toml"
- "omnibus-base-goerli.toml"
# - "omnibus-base-goerli.toml" # TODO: enable when deployed
# - "omnibus-base-mainnet.toml" # TODO: enable when deployed
- "omnibus-base-goerli-competition.toml"
- "omnibus-sepolia.toml"
- "omnibus-polygon-mumbai.toml"
Expand All @@ -47,10 +48,15 @@ jobs:
chainId: 420
providerUrl: "https://optimism-goerli.infura.io/v3/$INFURA_API_KEY"

- toml: "omnibus-base-goerli.toml"
preset: "main"
chainId: 84531
providerUrl: "https://base-goerli.infura.io/v3/$INFURA_API_KEY"
#- toml: "omnibus-base-mainnet.toml"
# preset: "main"
# chainId: 8453
# providerUrl: "https://base-mainnet.infura.io/v3/$INFURA_API_KEY"

#- toml: "omnibus-base-goerli.toml"
# preset: "main"
# chainId: 84531
# providerUrl: "https://base-goerli.infura.io/v3/$INFURA_API_KEY"

- toml: "omnibus-base-goerli-competition.toml"
preset: "competition"
Expand Down
39 changes: 28 additions & 11 deletions omnibus-base-goerli.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ include = [
"tomls/settings-testnet.toml",
"tomls/core.toml",
"tomls/permissions.toml",
#"tomls/collaterals/snx.toml",
"tomls/collaterals/weth.toml",
noisekit marked this conversation as resolved.
Show resolved Hide resolved
"tomls/pools/spartan-council.toml",
"tomls/markets/spot/eth.toml",
"tomls/permit-all-createPool.toml",
"tomls/permit-all-registerMarket.toml",
"tomls/permit-all-transferCrossChain.toml",
]

[setting.target_preset]
defaultValue = "main"

[setting.salt]
defaultValue = "staging"
dbeal-eth marked this conversation as resolved.
Show resolved Hide resolved

[setting.snx_package]
defaultValue = "synthetix:3.3.4"

Expand All @@ -26,12 +29,20 @@ defaultValue = "synthetix-perps-market:3.3.4"
[setting.owner]
defaultValue = "0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9"

#[setting.snx_address]
#defaultValue = "0x"
#[setting.snx_aggregator_address]
#defaultValue = "0x"
[setting.weth_address]
# https://docs.base.org/base-contracts/#base-mainnet
defaultValue = "0x4200000000000000000000000000000000000006"

[setting.eth_aggregator_address]
# https://docs.chain.link/data-feeds/price-feeds/addresses/?network=base
defaultValue = "0xcD2A119bD1F7DF95d706DE6F2057fDD45A0503E2"

#[setting.snx_liquidation_reward]
#defaultValue = "10000000000000000000"
[setting.minimum_liquidity_ratio]
defaultValue = "2000000000000000000"

Expand All @@ -52,8 +63,9 @@ defaultValue = "0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9"
defaultValue = "0xa8c0c11bf64af62cdca6f93d3769b88bdd7cb93d"

[setting.ccip_token_pool]
# TODO: There is no CCIP token pool available yet, using temporary address
defaultValue = "0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9"
# https://docs.chain.link/ccip/supported-networks#base-mainnet
# TODO: Update when snxUSD pool availabe Base Goerli
defaultValue = "0x0000000000000000000000000000000000000000"

# ETH Synth Configuration
[setting.synthEthAsyncFixedFee]
Expand Down Expand Up @@ -89,7 +101,7 @@ defaultValue = "0xca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57
# https://docs.pyth.network/documentation/pythnet-price-feeds/evm
defaultValue = "0x5955C1478F0dAD753C7E2B4dD1b4bC530C64749f"

[invoke.setScPoolConfig]
[invoke.configure_spartan_council_pool]
target = ["system.CoreProxy"]
fromCall.func = "getPoolOwner"
fromCall.args = ["<%= settings.sc_pool_id %>"]
Expand All @@ -102,9 +114,14 @@ args = [
]
depends = ["invoke.createScPool", "invoke.createEthSynth"]

# TODO clean this block after deployment
[invoke.unapprove_wrongfully_deployed_snx_pool]
[invoke.configure_weth_collateral_for_spartan_council_pool]
target = ["system.CoreProxy"]
fromCall.func = "owner"
func = "removeApprovedPool"
args = ["2"]
fromCall.func = "getPoolOwner"
fromCall.args = ["<%= settings.sc_pool_id %>"]
func = "setPoolCollateralConfiguration"
args = [
"<%= settings.sc_pool_id %>",
"<%= settings.weth_address %>",
{ collateralLimitD18 = "<%= MaxUint256 %>", issuanceRatioD18 = "<%= MaxUint256 %>" }
0xjocke marked this conversation as resolved.
Show resolved Hide resolved
]
depends = ["invoke.createScPool"]
dbeal-eth marked this conversation as resolved.
Show resolved Hide resolved
127 changes: 127 additions & 0 deletions omnibus-base-mainnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name = "synthetix-omnibus"
version = "3.3.4"
description = "Includes the full synthetix system with configurations applied"
include = [
"tomls/settings-mainnet.toml",
"tomls/core.toml",
"tomls/permissions.toml",
"tomls/collaterals/weth.toml",
"tomls/pools/spartan-council.toml",
"tomls/markets/spot/eth.toml",
"tomls/permit-all-transferCrossChain.toml",
]

[setting.target_preset]
defaultValue = "main"

[setting.salt]
defaultValue = "0x3330363734343032330000000000000000000000000000000000000000000000"
noisekit marked this conversation as resolved.
Show resolved Hide resolved

[setting.snx_package]
defaultValue = "synthetix:3.3.4"

[setting.spot_market_package]
defaultValue = "synthetix-spot-market:3.3.4"

[setting.perps_market_package]
defaultValue = "synthetix-perps-market:3.3.4"

[setting.owner]
defaultValue = "0x6E1613B5c68B4Cf2A58400D8019a97849A678139"

#[setting.snx_address]
#defaultValue = "0x"
#[setting.snx_aggregator_address]
#defaultValue = "0x"
[setting.weth_address]
# https://docs.base.org/base-contracts/#base-mainnet
defaultValue = "0x4200000000000000000000000000000000000006"

[setting.eth_aggregator_address]
# https://docs.chain.link/data-feeds/price-feeds/addresses/?network=base
defaultValue = "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70"

#[setting.snx_liquidation_reward]
#defaultValue = "10000000000000000000"
[setting.minimum_liquidity_ratio]
defaultValue = "2000000000000000000"

[setting.account_timeout_withdraw]
defaultValue = "86400"

[setting.deployer]
defaultValue = "0xEde8a407913A874Dd7e3d5B731AFcA135D30375E"

[setting.sc_pool_id]
defaultValue = "1"

[setting.pool_owner]
defaultValue = "0x302d2451d9f47620374B54c521423Bf0403916A2"

[setting.ccip_router]
# https://docs.chain.link/ccip/supported-networks#base-mainnet
defaultValue = "0x673aa85efd75080031d44fca061575d1da427a28"

[setting.ccip_token_pool]
# https://docs.chain.link/ccip/supported-networks#base-mainnet
# TODO: Update when snxUSD pool availabe Base Mainnet
defaultValue = "0x0000000000000000000000000000000000000000"

# ETH Synth Configuration
[setting.synthEthAsyncFixedFee]
defaultValue = "0.001"

[setting.synthEthMaxMarketCollateral]
defaultValue = "100"

[setting.synthEthSkewScale]
defaultValue = "100000"

[setting.synthEthWrapFee]
defaultValue = "0.0001"

[setting.synthEthUnwrapFee]
defaultValue = "0.0001"

[setting.ethSettlementWindowDuration]
defaultValue = "60"

[setting.ethSettlementDelay]
defaultValue = "15"

# Pyth settlement strategy config
[setting.pythFeedUrl]
defaultValue = "https://api.synthetix.io/pyth-mainnet/api/get_vaa_ccip?data={data}"

[setting.pythEthFeedId]
# https://pyth.network/developers/price-feed-ids#pyth-evm-mainnet
defaultValue = "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace"

[setting.pythPriceVerificationAddress]
# https://docs.pyth.network/documentation/pythnet-price-feeds/evm
defaultValue = "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a"

[invoke.configure_spartan_council_pool]
target = ["system.CoreProxy"]
fromCall.func = "getPoolOwner"
fromCall.args = ["<%= settings.sc_pool_id %>"]
func = "setPoolConfiguration"
args = [
"<%= settings.sc_pool_id %>",
[
{ marketId = "<%= extras.synth_eth_market_id %>", weightD18 = 1, maxDebtShareValueD18 = "<%= parseEther('1') %>" }
dbeal-eth marked this conversation as resolved.
Show resolved Hide resolved
],
]
depends = ["invoke.createScPool", "invoke.createEthSynth"]

[invoke.configure_weth_collateral_for_spartan_council_pool]
target = ["system.CoreProxy"]
fromCall.func = "getPoolOwner"
fromCall.args = ["<%= settings.sc_pool_id %>"]
func = "setPoolCollateralConfiguration"
args = [
"<%= settings.sc_pool_id %>",
"<%= settings.weth_address %>",
{ collateralLimitD18 = "<%= MaxUint256 %>", issuanceRatioD18 = "<%= MaxUint256 %>" }
]
depends = ["invoke.createScPool"]
3 changes: 2 additions & 1 deletion tomls/settings-mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ include = ["settings.toml"]
target = ["system.CoreProxy"]
fromCall.func = "owner"
func = "setSupportedCrossChainNetworks"
args = [["1", "10"], ["5009297550715157269", "3734403246176062136"]]
# https://docs.chain.link/ccip/supported-networks
args = [["1", "10", "8453"], ["5009297550715157269", "3734403246176062136", "15971525489660198786"]]
depends = ["provision.system"]