Skip to content

Commit

Permalink
Update config schema, add documentation for newly added properties
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsoon committed May 15, 2024
1 parent 710a9a1 commit 7c8dea2
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
20 changes: 18 additions & 2 deletions .github/markets/pr_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Each json file under the [configs](../../configs) folder correspond to their res
|`transfer_options` |`object` |true |A collection of blockchain networks along with their associated priority numbers, used to establish their order in the transfer options list for deposit and withdrawal forms. |Blockchain network listed here **MUST** match the valid chainName of the bridges listed under BridgeAll RPC call.<br /><br /> To view the values of BridgeAll RPC call, simply run `yarn get-bridges [network]` on the command line. Sample for mainnet: `yarn get-bridges mainnet`|
|`network_fees` |`object` |true |List of token denoms along with their associated priority numbers, used to establish their default order in the network fees preference list. |Token denoms listed here **MUST** match the valid denoms listed under MinGasPriceAll RPC call.<br /><br /> To view the values of MinGasPriceAll RPC call, simply run `yarn get-min-gas-prices [network]` on the command line. Sample for mainnet: `yarn get-min-gas-prices mainnet`|
|`maintenance` |`Maintenance` |false |Object that dictates whether or not the maintenance page is displayed on each particular network. The maintenance page is displayed when the Carbon chain is down (i.e. blocks are not moving). | If the `maintenance` property is omitted, the maintenance page will not be shown.
|`perp_pool_banners` |`PerpPoolBanner` |true |List of Objects that indicate the banner content on specific perp pool pages. |
|`perp_pool_banners` |`PerpPoolBanner` |true |List of Objects that indicate the banner content on specific perp pool pages. |
|`demex_points_config` |`DemexPointsConfig` |false |Object that contains the parameters to earn demex points. |This object **must** be included for mainnet.json as demex points is already live on mainnet. |
|`perp_pool_promo` |`PerpPoolPromo` |false |Map of Objects that contains perp pool promo parameters for each pool |If the `perp_pool_promo` property is omitted, no promo will be shown. The key of each entry is the ids of the perp pools with existing promo. |

## Maintenance Data Structure
|Field |Type |Required |Description |Notes |
Expand All @@ -30,4 +32,18 @@ Each json file under the [configs](../../configs) folder correspond to their res
|`title` |`string` |true |The title shown on the perp pool banner. |
|`removed_markets` |`string` |false |The message describing markets being removed, shown below the perp-pool banner title. | e.g. "BTCETH Perp will be removed on 6 Mar, 09:00AM UTC". If the field is omitted, no message describing markets being removed will be shown. |
|`added_markets` |`string` |false |The message describing markets being added, shown below the markets being removed (if any). | e.g. "ATOM Perp & SOL Perp will be added on 8 Mar, 12:00AM UTC". If the field is omitted, no message describing markets being added will be shown. |
|`subtext` |`string` |false |The subtext shown on the perp pool banner (below the removed and added market descriptions). |
|`subtext` |`string` |false |The subtext shown on the perp pool banner (below the removed and added market descriptions). |

## DemexPointsConfig Data Structure
|Field |Type |Required |Description |Notes |
|---|---|---|---|---|
|`depositsPerSpin` |`integer` |true |Amount deposited in the perp pool that will earn 1 spin after 1 week. |
|`tradingVolumePerSpin` |`integer` |true |Volume traded on perp markets that will earn 1 spin. |

## PerpPoolPromo
|Field |Type |Required |Description |Notes |
|---|---|---|---|---|
|`start` |`string` |true |Start time of the promo. |
|`end` |`string` |true |End time of the promo. |
|`perpPoolDepositBoost` |`integer` |true |Boost to perp pool deposits required to earn 1 demex point spin. |
|`perpTradingBoost` |`integer` |true |Boost to trading volume required to earn 1 demex point spin. |
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Currently, each JSON file contain the following data on its corresponding networ
- default blockchain transfer option order in deposit/withdrawal forms dropdown
- default network token fee order

Additionally, the JSON file for mainnet contains the following data to support ongoing campaigns/promotions:
- demex points config
- perp pool promotion parameters

More metadata will be added in the future if required by the Demex frontend. Please see below the structure of the JSON file:

```json
Expand Down
10 changes: 4 additions & 6 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,12 @@
"pattern": "^\\d{4}(-\\d\\d(-\\d\\d(T\\d\\d:\\d\\d(:\\d\\d)?(\\.\\d+)?(([+-]\\d\\d:\\d\\d)|Z)?)?)?)?$"
},
"perpPoolDepositBoost": {
"type": "string",
"description": "The spin boost multiplier for deposits in perp pool",
"pattern": "^\\d+$"
"type": "integer",
"description": "The spin boost multiplier for deposits in perp pool"
},
"perpTradingBoost": {
"type": "string",
"description": "The spin boost multiplier for boosted perp markets trading volume",
"pattern": "^\\d+$"
"type": "integer",
"description": "The spin boost multiplier for boosted perp markets trading volume"
}
}
}
4 changes: 2 additions & 2 deletions configs/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@
"9": {
"start": "2024-05-14T08:00:00Z",
"end": "2024-05-21T08:00:00Z",
"perpPoolDepositBoost": "2",
"perpTradingBoost": "3"
"perpPoolDepositBoost": 2,
"perpTradingBoost": 3
}
}
}

0 comments on commit 7c8dea2

Please sign in to comment.