Skip to content

Commit

Permalink
Set up Vara inflation pararms (#10164)
Browse files Browse the repository at this point in the history
* set up vara inflation pararms

* use lint
  • Loading branch information
EugenWay authored Jan 10, 2024
1 parent c657686 commit 109efd6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/apps-config/src/api/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ export const NFTMART_GENESIS = '0xfcf9074303d8f319ad1bf0195b145871977e7c375883b8
export const CERE_NETWORK_GENESIS = '0x81443836a9a24caaa23f1241897d1235717535711d1d3fe24eae4fdc942c092c';

export const CERE_NETWORK_TESTNET_GENESIS = '0x42b9b44b4950b6c1edae543a7696caf8d0a160e9bc0424ab4ab217f7a8ba30dc';

export const VARA_NETWORK_GENESIS = '0xfe1b4c55fd4d668101126434206571a7838a8b6b93a6d1b95d607e78e6c53763';

export const VARA_NETWORK_TESTNET_GENESIS = '0x525639f713f397dcf839bd022cd821f367ebcf179de7b9253531f8adbe5436d6';
8 changes: 6 additions & 2 deletions packages/apps-config/src/api/params/inflation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import type { ApiPromise } from '@polkadot/api';

import { CERE_NETWORK_GENESIS, CERE_NETWORK_TESTNET_GENESIS, DOCK_POS_TESTNET_GENESIS, KUSAMA_GENESIS, NEATCOIN_GENESIS, NFTMART_GENESIS, POLKADOT_GENESIS } from '../constants.js';
import { CERE_NETWORK_GENESIS, CERE_NETWORK_TESTNET_GENESIS, DOCK_POS_TESTNET_GENESIS, KUSAMA_GENESIS, NEATCOIN_GENESIS, NFTMART_GENESIS, POLKADOT_GENESIS, VARA_NETWORK_GENESIS, VARA_NETWORK_TESTNET_GENESIS } from '../constants.js';

interface InflationParams {
auctionAdjust: number;
Expand All @@ -29,6 +29,8 @@ const DEFAULT_PARAMS: InflationParams = {

const CERE_NETWORK_INFLATION_PARAMS = { ...DEFAULT_PARAMS, maxInflation: 0.05, minInflation: 0.0001, stakeTarget: 0.2 };

const VARA_NETWORK_INFLATION_PARAMS = { ...DEFAULT_PARAMS, maxInflation: 0, minInflation: 0.0001, stakeTarget: 0.85 };

const KNOWN_PARAMS: Record<string, InflationParams> = {
[CERE_NETWORK_GENESIS]: CERE_NETWORK_INFLATION_PARAMS,
[CERE_NETWORK_TESTNET_GENESIS]: CERE_NETWORK_INFLATION_PARAMS,
Expand All @@ -40,7 +42,9 @@ const KNOWN_PARAMS: Record<string, InflationParams> = {
[KUSAMA_GENESIS]: { ...DEFAULT_PARAMS, auctionAdjust: (0.3 / 60), auctionMax: 60, stakeTarget: 0.75 },
[NEATCOIN_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 },
[NFTMART_GENESIS]: { ...DEFAULT_PARAMS, falloff: 0.04, stakeTarget: 0.60 },
[POLKADOT_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 }
[POLKADOT_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 },
[VARA_NETWORK_GENESIS]: VARA_NETWORK_INFLATION_PARAMS,
[VARA_NETWORK_TESTNET_GENESIS]: VARA_NETWORK_INFLATION_PARAMS
};

export function getInflationParams (api: ApiPromise): InflationParams {
Expand Down

0 comments on commit 109efd6

Please sign in to comment.