keeper

package
v0.1.0-blackfury-t1 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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleBatchSetBackingRiskParamsProposal

func HandleBatchSetBackingRiskParamsProposal(ctx sdk.Context, k Keeper, p *types.BatchSetBackingRiskParamsProposal) error

func HandleBatchSetCollateralRiskParamsProposal

func HandleBatchSetCollateralRiskParamsProposal(ctx sdk.Context, k Keeper, p *types.BatchSetCollateralRiskParamsProposal) error

func HandleRegisterBackingProposal

func HandleRegisterBackingProposal(ctx sdk.Context, k Keeper, p *types.RegisterBackingProposal) error

func HandleRegisterCollateralProposal

func HandleRegisterCollateralProposal(ctx sdk.Context, k Keeper, p *types.RegisterCollateralProposal) error

func HandleSetBackingRiskParamsProposal

func HandleSetBackingRiskParamsProposal(ctx sdk.Context, k Keeper, p *types.SetBackingRiskParamsProposal) error

func HandleSetCollateralRiskParamsProposal

func HandleSetCollateralRiskParamsProposal(ctx sdk.Context, k Keeper, p *types.SetCollateralRiskParamsProposal) error

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,
	ps paramtypes.Subspace,

	accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, oracleKeeper types.OracleKeeper,
) *Keeper

func (Keeper) AdjustBackingRatio

func (k Keeper) AdjustBackingRatio(ctx sdk.Context)

AdjustBackingRatio dynamically adjusts the backing ratio, according to black price change.

func (Keeper) BackingRatioCooldownPeriod

func (k Keeper) BackingRatioCooldownPeriod(ctx sdk.Context) (res int64)

BackingRatioCooldownPeriod is minimum cooldown period after which backing ratio can be adjusted

func (Keeper) BackingRatioPriceBand

func (k Keeper) BackingRatioPriceBand(ctx sdk.Context) (res sdk.Dec)

BackingRatioPriceBand is price band within which backing ratio will not be adjusted

func (Keeper) BackingRatioStep

func (k Keeper) BackingRatioStep(ctx sdk.Context) (res sdk.Dec)

BackingRatioStep is backing ratio adjust step

func (Keeper) BurnPriceBias

func (k Keeper) BurnPriceBias(ctx sdk.Context) (res sdk.Dec)

BurnPriceBias is burn price bias ratio

func (Keeper) GetAccountCollateral

func (k Keeper) GetAccountCollateral(ctx sdk.Context, addr sdk.AccAddress, denom string) (types.AccountCollateral, bool)

func (Keeper) GetAllBackingRiskParams

func (k Keeper) GetAllBackingRiskParams(ctx sdk.Context) []types.BackingRiskParams

func (Keeper) GetAllCollateralRiskParams

func (k Keeper) GetAllCollateralRiskParams(ctx sdk.Context) []types.CollateralRiskParams

func (Keeper) GetAllPoolBacking

func (k Keeper) GetAllPoolBacking(ctx sdk.Context) []types.PoolBacking

func (Keeper) GetAllPoolCollateral

func (k Keeper) GetAllPoolCollateral(ctx sdk.Context) []types.PoolCollateral

func (Keeper) GetBackingRatio

func (k Keeper) GetBackingRatio(ctx sdk.Context) sdk.Dec

func (Keeper) GetBackingRatioLastBlock

func (k Keeper) GetBackingRatioLastBlock(ctx sdk.Context) int64

func (Keeper) GetBackingRiskParams

func (k Keeper) GetBackingRiskParams(ctx sdk.Context, denom string) (types.BackingRiskParams, bool)

func (Keeper) GetCollateralRiskParams

func (k Keeper) GetCollateralRiskParams(ctx sdk.Context, denom string) (types.CollateralRiskParams, bool)

func (Keeper) GetMakerAccount

func (k Keeper) GetMakerAccount(ctx sdk.Context) authtypes.ModuleAccountI

GetMakerAccount returns the maker ModuleAccount

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams get all parameters as types.Params

func (Keeper) GetPoolBacking

func (k Keeper) GetPoolBacking(ctx sdk.Context, denom string) (types.PoolBacking, bool)

func (Keeper) GetPoolCollateral

func (k Keeper) GetPoolCollateral(ctx sdk.Context, denom string) (types.PoolCollateral, bool)

func (Keeper) GetTotalBacking

func (k Keeper) GetTotalBacking(ctx sdk.Context) (types.TotalBacking, bool)

func (Keeper) GetTotalCollateral

func (k Keeper) GetTotalCollateral(ctx sdk.Context) (types.TotalCollateral, bool)

func (Keeper) IsBackingRegistered

func (k Keeper) IsBackingRegistered(ctx sdk.Context, denom string) bool

func (Keeper) IsCollateralRegistered

func (k Keeper) IsCollateralRegistered(ctx sdk.Context, denom string) bool

func (Keeper) LiquidationCommissionFee

func (k Keeper) LiquidationCommissionFee(ctx sdk.Context) (res sdk.Dec)

LiquidationCommissionFee is liquidation commission fee ratio

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) MintPriceBias

func (k Keeper) MintPriceBias(ctx sdk.Context) (res sdk.Dec)

MintPriceBias is mint price bias ratio

func (Keeper) Params

func (Keeper) RebackBonus

func (k Keeper) RebackBonus(ctx sdk.Context) (res sdk.Dec)

RebackBonus is reback bonus ratio

func (Keeper) SetAccountCollateral

func (k Keeper) SetAccountCollateral(ctx sdk.Context, addr sdk.AccAddress, col types.AccountCollateral)

func (Keeper) SetBackingRatio

func (k Keeper) SetBackingRatio(ctx sdk.Context, br sdk.Dec)

func (Keeper) SetBackingRatioLastBlock

func (k Keeper) SetBackingRatioLastBlock(ctx sdk.Context, bh int64)

func (Keeper) SetBackingRiskParams

func (k Keeper) SetBackingRiskParams(ctx sdk.Context, params types.BackingRiskParams)

func (Keeper) SetCollateralRiskParams

func (k Keeper) SetCollateralRiskParams(ctx sdk.Context, params types.CollateralRiskParams)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) SetPoolBacking

func (k Keeper) SetPoolBacking(ctx sdk.Context, pool types.PoolBacking)

func (Keeper) SetPoolCollateral

func (k Keeper) SetPoolCollateral(ctx sdk.Context, pool types.PoolCollateral)

func (Keeper) SetTotalBacking

func (k Keeper) SetTotalBacking(ctx sdk.Context, pool types.TotalBacking)

func (Keeper) SetTotalCollateral

func (k Keeper) SetTotalCollateral(ctx sdk.Context, pool types.TotalCollateral)

Jump to

Keyboard shortcuts

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