Documentation ¶
Index ¶
- func HandleBatchSetBackingRiskParamsProposal(ctx sdk.Context, k Keeper, p *types.BatchSetBackingRiskParamsProposal) error
- func HandleBatchSetCollateralRiskParamsProposal(ctx sdk.Context, k Keeper, p *types.BatchSetCollateralRiskParamsProposal) error
- func HandleRegisterBackingProposal(ctx sdk.Context, k Keeper, p *types.RegisterBackingProposal) error
- func HandleRegisterCollateralProposal(ctx sdk.Context, k Keeper, p *types.RegisterCollateralProposal) error
- func HandleSetBackingRiskParamsProposal(ctx sdk.Context, k Keeper, p *types.SetBackingRiskParamsProposal) error
- func HandleSetCollateralRiskParamsProposal(ctx sdk.Context, k Keeper, p *types.SetCollateralRiskParamsProposal) error
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AdjustBackingRatio(ctx sdk.Context)
- func (k Keeper) AllBackingPools(c context.Context, req *types.QueryAllBackingPoolsRequest) (*types.QueryAllBackingPoolsResponse, error)
- func (k Keeper) AllBackingRiskParams(c context.Context, req *types.QueryAllBackingRiskParamsRequest) (*types.QueryAllBackingRiskParamsResponse, error)
- func (k Keeper) AllCollateralPools(c context.Context, req *types.QueryAllCollateralPoolsRequest) (*types.QueryAllCollateralPoolsResponse, error)
- func (k Keeper) AllCollateralRiskParams(c context.Context, req *types.QueryAllCollateralRiskParamsRequest) (*types.QueryAllCollateralRiskParamsResponse, error)
- func (k Keeper) BackingPool(c context.Context, req *types.QueryBackingPoolRequest) (*types.QueryBackingPoolResponse, error)
- func (k Keeper) BackingRatio(c context.Context, req *types.QueryBackingRatioRequest) (*types.QueryBackingRatioResponse, error)
- func (k Keeper) BackingRatioCooldownPeriod(ctx sdk.Context) (res int64)
- func (k Keeper) BackingRatioPriceBand(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) BackingRatioStep(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) BurnPriceBias(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) CollateralOfAccount(c context.Context, req *types.QueryCollateralOfAccountRequest) (*types.QueryCollateralOfAccountResponse, error)
- func (k Keeper) CollateralPool(c context.Context, req *types.QueryCollateralPoolRequest) (*types.QueryCollateralPoolResponse, error)
- func (k Keeper) EstimateBurnBySwapIn(c context.Context, req *types.EstimateBurnBySwapInRequest) (*types.EstimateBurnBySwapInResponse, error)
- func (k Keeper) EstimateBurnBySwapOut(c context.Context, req *types.EstimateBurnBySwapOutRequest) (*types.EstimateBurnBySwapOutResponse, error)
- func (k Keeper) EstimateBuyBackingIn(c context.Context, req *types.EstimateBuyBackingInRequest) (*types.EstimateBuyBackingInResponse, error)
- func (k Keeper) EstimateBuyBackingOut(c context.Context, req *types.EstimateBuyBackingOutRequest) (*types.EstimateBuyBackingOutResponse, error)
- func (k Keeper) EstimateMintBySwapIn(c context.Context, req *types.EstimateMintBySwapInRequest) (*types.EstimateMintBySwapInResponse, error)
- func (k Keeper) EstimateMintBySwapOut(c context.Context, req *types.EstimateMintBySwapOutRequest) (*types.EstimateMintBySwapOutResponse, error)
- func (k Keeper) EstimateSellBackingIn(c context.Context, req *types.EstimateSellBackingInRequest) (*types.EstimateSellBackingInResponse, error)
- func (k Keeper) EstimateSellBackingOut(c context.Context, req *types.EstimateSellBackingOutRequest) (*types.EstimateSellBackingOutResponse, error)
- func (k Keeper) GetAccountCollateral(ctx sdk.Context, addr sdk.AccAddress, denom string) (types.AccountCollateral, bool)
- func (k Keeper) GetAllBackingRiskParams(ctx sdk.Context) []types.BackingRiskParams
- func (k Keeper) GetAllCollateralRiskParams(ctx sdk.Context) []types.CollateralRiskParams
- func (k Keeper) GetAllPoolBacking(ctx sdk.Context) []types.PoolBacking
- func (k Keeper) GetAllPoolCollateral(ctx sdk.Context) []types.PoolCollateral
- func (k Keeper) GetBackingRatio(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetBackingRatioLastBlock(ctx sdk.Context) int64
- func (k Keeper) GetBackingRiskParams(ctx sdk.Context, denom string) (types.BackingRiskParams, bool)
- func (k Keeper) GetCollateralRiskParams(ctx sdk.Context, denom string) (types.CollateralRiskParams, bool)
- func (k Keeper) GetMakerAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPoolBacking(ctx sdk.Context, denom string) (types.PoolBacking, bool)
- func (k Keeper) GetPoolCollateral(ctx sdk.Context, denom string) (types.PoolCollateral, bool)
- func (k Keeper) GetTotalBacking(ctx sdk.Context) (types.TotalBacking, bool)
- func (k Keeper) GetTotalCollateral(ctx sdk.Context) (types.TotalCollateral, bool)
- func (k Keeper) IsBackingRegistered(ctx sdk.Context, denom string) bool
- func (k Keeper) IsCollateralRegistered(ctx sdk.Context, denom string) bool
- func (k Keeper) LiquidationCommissionFee(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MintPriceBias(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RebackBonus(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) SetAccountCollateral(ctx sdk.Context, addr sdk.AccAddress, col types.AccountCollateral)
- func (k Keeper) SetBackingRatio(ctx sdk.Context, br sdk.Dec)
- func (k Keeper) SetBackingRatioLastBlock(ctx sdk.Context, bh int64)
- func (k Keeper) SetBackingRiskParams(ctx sdk.Context, params types.BackingRiskParams)
- func (k Keeper) SetCollateralRiskParams(ctx sdk.Context, params types.CollateralRiskParams)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPoolBacking(ctx sdk.Context, pool types.PoolBacking)
- func (k Keeper) SetPoolCollateral(ctx sdk.Context, pool types.PoolCollateral)
- func (k Keeper) SetTotalBacking(ctx sdk.Context, pool types.TotalBacking)
- func (k Keeper) SetTotalCollateral(ctx sdk.Context, pool types.TotalCollateral)
- func (k Keeper) TotalBacking(c context.Context, req *types.QueryTotalBackingRequest) (*types.QueryTotalBackingResponse, error)
- func (k Keeper) TotalCollateral(c context.Context, req *types.QueryTotalCollateralRequest) (*types.QueryTotalCollateralResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
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 ¶
AdjustBackingRatio dynamically adjusts the backing ratio, according to mer price change.
func (Keeper) AllBackingPools ¶
func (k Keeper) AllBackingPools(c context.Context, req *types.QueryAllBackingPoolsRequest) (*types.QueryAllBackingPoolsResponse, error)
func (Keeper) AllBackingRiskParams ¶
func (k Keeper) AllBackingRiskParams(c context.Context, req *types.QueryAllBackingRiskParamsRequest) (*types.QueryAllBackingRiskParamsResponse, error)
func (Keeper) AllCollateralPools ¶
func (k Keeper) AllCollateralPools(c context.Context, req *types.QueryAllCollateralPoolsRequest) (*types.QueryAllCollateralPoolsResponse, error)
func (Keeper) AllCollateralRiskParams ¶
func (k Keeper) AllCollateralRiskParams(c context.Context, req *types.QueryAllCollateralRiskParamsRequest) (*types.QueryAllCollateralRiskParamsResponse, error)
func (Keeper) BackingPool ¶
func (k Keeper) BackingPool(c context.Context, req *types.QueryBackingPoolRequest) (*types.QueryBackingPoolResponse, error)
func (Keeper) BackingRatio ¶
func (k Keeper) BackingRatio(c context.Context, req *types.QueryBackingRatioRequest) (*types.QueryBackingRatioResponse, error)
func (Keeper) BackingRatioCooldownPeriod ¶
BackingRatioCooldownPeriod is minimum cooldown period after which backing ratio can be adjusted
func (Keeper) BackingRatioPriceBand ¶
BackingRatioPriceBand is price band within which backing ratio will not be adjusted
func (Keeper) BackingRatioStep ¶
BackingRatioStep is backing ratio adjust step
func (Keeper) BurnPriceBias ¶
BurnPriceBias is burn price bias ratio
func (Keeper) CollateralOfAccount ¶
func (k Keeper) CollateralOfAccount(c context.Context, req *types.QueryCollateralOfAccountRequest) (*types.QueryCollateralOfAccountResponse, error)
func (Keeper) CollateralPool ¶
func (k Keeper) CollateralPool(c context.Context, req *types.QueryCollateralPoolRequest) (*types.QueryCollateralPoolResponse, error)
func (Keeper) EstimateBurnBySwapIn ¶
func (k Keeper) EstimateBurnBySwapIn(c context.Context, req *types.EstimateBurnBySwapInRequest) (*types.EstimateBurnBySwapInResponse, error)
func (Keeper) EstimateBurnBySwapOut ¶
func (k Keeper) EstimateBurnBySwapOut(c context.Context, req *types.EstimateBurnBySwapOutRequest) (*types.EstimateBurnBySwapOutResponse, error)
func (Keeper) EstimateBuyBackingIn ¶
func (k Keeper) EstimateBuyBackingIn(c context.Context, req *types.EstimateBuyBackingInRequest) (*types.EstimateBuyBackingInResponse, error)
func (Keeper) EstimateBuyBackingOut ¶
func (k Keeper) EstimateBuyBackingOut(c context.Context, req *types.EstimateBuyBackingOutRequest) (*types.EstimateBuyBackingOutResponse, error)
func (Keeper) EstimateMintBySwapIn ¶
func (k Keeper) EstimateMintBySwapIn(c context.Context, req *types.EstimateMintBySwapInRequest) (*types.EstimateMintBySwapInResponse, error)
func (Keeper) EstimateMintBySwapOut ¶
func (k Keeper) EstimateMintBySwapOut(c context.Context, req *types.EstimateMintBySwapOutRequest) (*types.EstimateMintBySwapOutResponse, error)
func (Keeper) EstimateSellBackingIn ¶
func (k Keeper) EstimateSellBackingIn(c context.Context, req *types.EstimateSellBackingInRequest) (*types.EstimateSellBackingInResponse, error)
func (Keeper) EstimateSellBackingOut ¶
func (k Keeper) EstimateSellBackingOut(c context.Context, req *types.EstimateSellBackingOutRequest) (*types.EstimateSellBackingOutResponse, error)
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) GetBackingRatioLastBlock ¶
func (Keeper) GetBackingRiskParams ¶
func (Keeper) GetCollateralRiskParams ¶
func (Keeper) GetMakerAccount ¶
func (k Keeper) GetMakerAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetMakerAccount returns the maker ModuleAccount
func (Keeper) GetPoolBacking ¶
func (Keeper) GetPoolCollateral ¶
func (Keeper) GetTotalBacking ¶
func (Keeper) GetTotalCollateral ¶
func (Keeper) IsBackingRegistered ¶
func (Keeper) IsCollateralRegistered ¶
func (Keeper) LiquidationCommissionFee ¶
LiquidationCommissionFee is liquidation commission fee ratio
func (Keeper) MintPriceBias ¶
MintPriceBias is mint price bias ratio
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) RebackBonus ¶
RebackBonus is reback bonus ratio
func (Keeper) SetAccountCollateral ¶
func (k Keeper) SetAccountCollateral(ctx sdk.Context, addr sdk.AccAddress, col types.AccountCollateral)
func (Keeper) SetBackingRatioLastBlock ¶
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) 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)
func (Keeper) TotalBacking ¶
func (k Keeper) TotalBacking(c context.Context, req *types.QueryTotalBackingRequest) (*types.QueryTotalBackingResponse, error)
func (Keeper) TotalCollateral ¶
func (k Keeper) TotalCollateral(c context.Context, req *types.QueryTotalCollateralRequest) (*types.QueryTotalCollateralResponse, error)
Click to show internal directories.
Click to hide internal directories.