genesis

package
v0.21.0-rc.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var START_MARKETS = map[asset.Pair]perpv2types.AmmMarket{
	asset.Registry.Pair(denoms.ETH, denoms.NUSD): {
		Market: perpv2types.Market{
			Pair:                            asset.Registry.Pair(denoms.ETH, denoms.NUSD),
			Enabled:                         true,
			MaintenanceMarginRatio:          sdk.MustNewDecFromStr("0.0625"),
			MaxLeverage:                     sdk.MustNewDecFromStr("15"),
			LatestCumulativePremiumFraction: sdk.ZeroDec(),
			ExchangeFeeRatio:                sdk.MustNewDecFromStr("0.0010"),
			EcosystemFundFeeRatio:           sdk.MustNewDecFromStr("0.0010"),
			LiquidationFeeRatio:             sdk.MustNewDecFromStr("0.0500"),
			PartialLiquidationRatio:         sdk.MustNewDecFromStr("0.5"),
			FundingRateEpochId:              epochstypes.ThirtyMinuteEpochID,
			TwapLookbackWindow:              time.Minute * 30,
			PrepaidBadDebt:                  sdk.NewCoin(denoms.NUSD, sdk.ZeroInt()),
		},
		Amm: perpv2types.AMM{
			Pair:            asset.Registry.Pair(denoms.ETH, denoms.NUSD),
			BaseReserve:     sdk.NewDec(10e6),
			QuoteReserve:    sdk.NewDec(10e6),
			SqrtDepth:       sdk.NewDec(10e6),
			PriceMultiplier: sdk.NewDec(6_000),
			TotalLong:       sdk.ZeroDec(),
			TotalShort:      sdk.ZeroDec(),
		},
	},
	asset.Registry.Pair(denoms.NIBI, denoms.NUSD): {
		Market: perpv2types.Market{
			Pair:                            asset.Registry.Pair(denoms.NIBI, denoms.NUSD),
			Enabled:                         true,
			MaintenanceMarginRatio:          sdk.MustNewDecFromStr("0.04"),
			MaxLeverage:                     sdk.MustNewDecFromStr("20"),
			LatestCumulativePremiumFraction: sdk.ZeroDec(),
			ExchangeFeeRatio:                sdk.MustNewDecFromStr("0.0010"),
			EcosystemFundFeeRatio:           sdk.MustNewDecFromStr("0.0010"),
			LiquidationFeeRatio:             sdk.MustNewDecFromStr("0.0500"),
			PartialLiquidationRatio:         sdk.MustNewDecFromStr("0.5"),
			FundingRateEpochId:              epochstypes.ThirtyMinuteEpochID,
			TwapLookbackWindow:              time.Minute * 30,
			PrepaidBadDebt:                  sdk.NewCoin(denoms.NUSD, sdk.ZeroInt()),
		},
		Amm: perpv2types.AMM{
			Pair:            asset.Registry.Pair(denoms.NIBI, denoms.NUSD),
			BaseReserve:     sdk.NewDec(10 * common.TO_MICRO),
			QuoteReserve:    sdk.NewDec(10 * common.TO_MICRO),
			SqrtDepth:       common.MustSqrtDec(sdk.NewDec(10 * common.TO_MICRO * 10 * common.TO_MICRO)),
			PriceMultiplier: sdk.NewDec(10),
			TotalLong:       sdk.ZeroDec(),
			TotalShort:      sdk.ZeroDec(),
		},
	},
}
View Source
var (
	TEST_ENCODING_CONFIG = app.MakeEncodingConfig()
)

Functions

func AddOracleGenesis added in v0.21.0

func AddOracleGenesis(gen app.GenesisState) app.GenesisState

func AddPerpV2Genesis added in v0.21.0

func AddPerpV2Genesis(gen app.GenesisState) app.GenesisState

func AddSudoGenesis added in v0.21.0

func AddSudoGenesis(gen app.GenesisState) (
	genState app.GenesisState,
	rootPrivKey cryptotypes.PrivKey,
	rootAddr sdk.AccAddress,
)

func NewTestGenesisState

func NewTestGenesisState(encodingConfig app.EncodingConfig) app.GenesisState
NewTestGenesisState returns 'NewGenesisState' using the default

genesis as input. The blockchain genesis state is represented as a map from module identifier strings to raw json messages.

func OracleGenesis added in v0.21.0

func OracleGenesis() *oracletypes.GenesisState

func PerpV2Genesis added in v0.21.0

func PerpV2Genesis() *perpv2types.GenesisState

func SudoGenesis added in v0.21.0

func SudoGenesis() (
	genState *sudotypes.GenesisState,
	rootPrivKey cryptotypes.PrivKey,
	rootAddr sdk.AccAddress,
)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL