Skip to content

Commit

Permalink
update base position notional in genesis.sh (#640) (#653)
Browse files Browse the repository at this point in the history
* update base position notional in genesis.sh

* adding updated sample_pregenesis.json

* regenerate sample

---------

Co-authored-by: yujin512 <leeyujin512@gmail.com>
  • Loading branch information
teddyding and yujin512 authored Oct 18, 2023
1 parent 86bf0c9 commit 5387f67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions protocol/scripts/genesis/sample_pregenesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -819,15 +819,15 @@
"name": "Large-Cap"
},
{
"base_position_notional": 1000000000,
"base_position_notional": 250000000000,
"id": 1,
"impact_notional": 5000000000,
"initial_margin_ppm": 100000,
"maintenance_fraction_ppm": 500000,
"name": "Mid-Cap"
},
{
"base_position_notional": 1000000000,
"base_position_notional": 100000000000,
"id": 2,
"impact_notional": 2500000000,
"initial_margin_ppm": 200000,
Expand Down
4 changes: 2 additions & 2 deletions protocol/testing/genesis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function edit_genesis() {
dasel put -t string -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[1].name' -v 'Mid-Cap'
dasel put -t int -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[1].initial_margin_ppm' -v '100000' # 10%
dasel put -t int -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[1].maintenance_fraction_ppm' -v '500000' # 50% of IM
dasel put -t int -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[1].base_position_notional' -v '1000000000' # 1_000 USDC
dasel put -t int -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[1].base_position_notional' -v '250000000000' # 250_000 USDC
dasel put -t int -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[1].impact_notional' -v '5000000000' # 5_000 USDC (500 USDC / 10%)

# Liquidity Tier: Long-Tail
Expand All @@ -127,7 +127,7 @@ function edit_genesis() {
dasel put -t string -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[2].name' -v 'Long-Tail'
dasel put -t int -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[2].initial_margin_ppm' -v '200000' # 20%
dasel put -t int -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[2].maintenance_fraction_ppm' -v '500000' # 50% of IM
dasel put -t int -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[2].base_position_notional' -v '1000000000' # 1_000 USDC
dasel put -t int -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[2].base_position_notional' -v '100000000000' # 100_000 USDC
dasel put -t int -f "$GENESIS" '.app_state.perpetuals.liquidity_tiers.[2].impact_notional' -v '2500000000' # 2_500 USDC (500 USDC / 20%)

# Liquidity Tier: Safety
Expand Down

0 comments on commit 5387f67

Please sign in to comment.