genesis

package
v0.20.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: Apache-2.0 Imports: 10 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),
		Bias:          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),
		Bias:          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 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

Types

This section is empty.

Jump to

Keyboard shortcuts

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