genesis

package
v0.20.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var START_MARKETS = map[asset.Pair]perpammtypes.Market{
	asset.Registry.Pair(denoms.ETH, denoms.NUSD): {
		Pair:          asset.Registry.Pair(denoms.ETH, 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)),
		PegMultiplier: sdk.NewDec(6_000),
		TotalLong:     sdk.ZeroDec(),
		TotalShort:    sdk.ZeroDec(),
		Config: perpammtypes.MarketConfig{
			TradeLimitRatio:        sdk.MustNewDecFromStr("0.8"),
			FluctuationLimitRatio:  sdk.MustNewDecFromStr("0.2"),
			MaxOracleSpreadRatio:   sdk.MustNewDecFromStr("0.2"),
			MaintenanceMarginRatio: sdk.MustNewDecFromStr("0.0625"),
			MaxLeverage:            sdk.MustNewDecFromStr("15"),
		},
	},
	asset.Registry.Pair(denoms.NIBI, denoms.NUSD): {
		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)),
		PegMultiplier: sdk.NewDec(10),
		TotalLong:     sdk.ZeroDec(),
		TotalShort:    sdk.ZeroDec(),
		Config: perpammtypes.MarketConfig{
			TradeLimitRatio:        sdk.MustNewDecFromStr("0.8"),
			FluctuationLimitRatio:  sdk.MustNewDecFromStr("0.2"),
			MaxOracleSpreadRatio:   sdk.MustNewDecFromStr("0.2"),
			MaintenanceMarginRatio: sdk.MustNewDecFromStr("0.04"),
			MaxLeverage:            sdk.MustNewDecFromStr("20"),
		},
	},
}
View Source
var (
	TEST_ENCODING_CONFIG = app.MakeTestEncodingConfig()
)

Functions

func AddOracleGenesis added in v0.21.0

func AddOracleGenesis(gen app.GenesisState) app.GenesisState

func AddPerpGenesis

func AddPerpGenesis(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() 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 PerpAmmGenesis

func PerpAmmGenesis() *perpammtypes.GenesisState

func PerpGenesis

func PerpGenesis() *perptypes.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