cdp

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

View Source
const (
	AttributeKeyCdpID               = types.AttributeKeyCdpID
	AttributeKeyDeposit             = types.AttributeKeyDeposit
	AttributeKeyError               = types.AttributeKeyError
	AttributeValueCategory          = types.AttributeValueCategory
	DefaultParamspace               = types.DefaultParamspace
	EventTypeBeginBlockerFatal      = types.EventTypeBeginBlockerFatal
	EventTypeCdpClose               = types.EventTypeCdpClose
	EventTypeCdpDeposit             = types.EventTypeCdpDeposit
	EventTypeCdpDraw                = types.EventTypeCdpDraw
	EventTypeCdpLiquidation         = types.EventTypeCdpLiquidation
	EventTypeCdpRepay               = types.EventTypeCdpRepay
	EventTypeCdpWithdrawal          = types.EventTypeCdpWithdrawal
	EventTypeCreateCdp              = types.EventTypeCreateCdp
	LiquidatorMacc                  = types.LiquidatorMacc
	ModuleName                      = types.ModuleName
	QuerierRoute                    = types.QuerierRoute
	QueryGetAccounts                = types.QueryGetAccounts
	QueryGetCdp                     = types.QueryGetCdp
	QueryGetCdpDeposits             = types.QueryGetCdpDeposits
	QueryGetCdps                    = types.QueryGetCdps
	QueryGetCdpsByCollateralType    = types.QueryGetCdpsByCollateralType
	QueryGetCdpsByCollateralization = types.QueryGetCdpsByCollateralization
	QueryGetParams                  = types.QueryGetParams
	RestCollateralType              = types.RestCollateralType
	RestOwner                       = types.RestOwner
	RestRatio                       = types.RestRatio
	RouterKey                       = types.RouterKey
	StoreKey                        = types.StoreKey
)

Variables

View Source
var (
	// function aliases
	CalculateInterestFactor            = keeper.CalculateInterestFactor
	FilterCDPs                         = keeper.FilterCDPs
	FindIntersection                   = keeper.FindIntersection
	NewKeeper                          = keeper.NewKeeper
	NewQuerier                         = keeper.NewQuerier
	CdpKey                             = types.CdpKey
	CollateralRatioBytes               = types.CollateralRatioBytes
	CollateralRatioIterKey             = types.CollateralRatioIterKey
	CollateralRatioKey                 = types.CollateralRatioKey
	DefaultGenesisState                = types.DefaultGenesisState
	DefaultParams                      = types.DefaultParams
	DenomIterKey                       = types.DenomIterKey
	DepositIterKey                     = types.DepositIterKey
	DepositKey                         = types.DepositKey
	GetCdpIDBytes                      = types.GetCdpIDBytes
	GetCdpIDFromBytes                  = types.GetCdpIDFromBytes
	NewAugmentedCDP                    = types.NewAugmentedCDP
	NewCDP                             = types.NewCDP
	NewCDPWithFees                     = types.NewCDPWithFees
	NewCollateralParam                 = types.NewCollateralParam
	NewDebtParam                       = types.NewDebtParam
	NewDeposit                         = types.NewDeposit
	NewGenesisAccumulationTime         = types.NewGenesisAccumulationTime
	NewGenesisState                    = types.NewGenesisState
	NewGenesisTotalPrincipal           = types.NewGenesisTotalPrincipal
	NewMsgCreateCDP                    = types.NewMsgCreateCDP
	NewMsgDeposit                      = types.NewMsgDeposit
	NewMsgDrawDebt                     = types.NewMsgDrawDebt
	NewMsgLiquidate                    = types.NewMsgLiquidate
	NewMsgRepayDebt                    = types.NewMsgRepayDebt
	NewMsgWithdraw                     = types.NewMsgWithdraw
	NewMultiCDPHooks                   = types.NewMultiCDPHooks
	NewParams                          = types.NewParams
	NewQueryCdpDeposits                = types.NewQueryCdpDeposits
	NewQueryCdpParams                  = types.NewQueryCdpParams
	NewQueryCdpsByCollateralTypeParams = types.NewQueryCdpsByCollateralTypeParams
	NewQueryCdpsByRatioParams          = types.NewQueryCdpsByRatioParams
	NewQueryCdpsParams                 = types.NewQueryCdpsParams
	ParamKeyTable                      = types.ParamKeyTable
	ParseDecBytes                      = types.ParseDecBytes
	RegisterCodec                      = types.RegisterCodec
	RelativePow                        = types.RelativePow
	SortableDecBytes                   = types.SortableDecBytes
	SplitCdpKey                        = types.SplitCdpKey
	SplitCollateralRatioIterKey        = types.SplitCollateralRatioIterKey
	SplitCollateralRatioKey            = types.SplitCollateralRatioKey
	SplitDenomIterKey                  = types.SplitDenomIterKey
	SplitDepositIterKey                = types.SplitDepositIterKey
	SplitDepositKey                    = types.SplitDepositKey
	ValidSortableDec                   = types.ValidSortableDec

	// variable aliases
	CdpIDKey                   = types.CdpIDKey
	CdpIDKeyPrefix             = types.CdpIDKeyPrefix
	CdpKeyPrefix               = types.CdpKeyPrefix
	CollateralRatioIndexPrefix = types.CollateralRatioIndexPrefix
	DebtDenomKey               = types.DebtDenomKey
	DefaultCdpStartingID       = types.DefaultCdpStartingID
	DefaultCircuitBreaker      = types.DefaultCircuitBreaker
	DefaultCollateralParams    = types.DefaultCollateralParams
	DefaultDebtDenom           = types.DefaultDebtDenom
	DefaultDebtLot             = types.DefaultDebtLot
	DefaultDebtParam           = types.DefaultDebtParam
	DefaultDebtThreshold       = types.DefaultDebtThreshold
	DefaultGlobalDebt          = types.DefaultGlobalDebt
	DefaultGovDenom            = types.DefaultGovDenom
	DefaultStableDenom         = types.DefaultStableDenom
	DefaultSurplusLot          = types.DefaultSurplusLot
	DefaultSurplusThreshold    = types.DefaultSurplusThreshold
	DepositKeyPrefix           = types.DepositKeyPrefix
	ErrAccountNotFound         = types.ErrAccountNotFound
	ErrBelowDebtFloor          = types.ErrBelowDebtFloor
	ErrCdpAlreadyExists        = types.ErrCdpAlreadyExists
	ErrCdpNotAvailable         = types.ErrCdpNotAvailable
	ErrCdpNotFound             = types.ErrCdpNotFound
	ErrCollateralNotSupported  = types.ErrCollateralNotSupported
	ErrDebtNotSupported        = types.ErrDebtNotSupported
	ErrDenomPrefixNotFound     = types.ErrDenomPrefixNotFound
	ErrDepositNotAvailable     = types.ErrDepositNotAvailable
	ErrDepositNotFound         = types.ErrDepositNotFound
	ErrExceedsDebtLimit        = types.ErrExceedsDebtLimit
	ErrInsufficientBalance     = types.ErrInsufficientBalance
	ErrInvalidCollateral       = types.ErrInvalidCollateral
	ErrInvalidCollateralLength = types.ErrInvalidCollateralLength
	ErrInvalidCollateralRatio  = types.ErrInvalidCollateralRatio
	ErrInvalidDebtRequest      = types.ErrInvalidDebtRequest
	ErrInvalidDeposit          = types.ErrInvalidDeposit
	ErrInvalidPayment          = types.ErrInvalidPayment
	ErrInvalidWithdrawAmount   = types.ErrInvalidWithdrawAmount
	ErrLoadingAugmentedCDP     = types.ErrLoadingAugmentedCDP
	ErrNotLiquidatable         = types.ErrNotLiquidatable
	ErrPricefeedDown           = types.ErrPricefeedDown
	GovDenomKey                = types.GovDenomKey
	InterestFactorPrefix       = types.InterestFactorPrefix
	KeyCircuitBreaker          = types.KeyCircuitBreaker
	KeyCollateralParams        = types.KeyCollateralParams
	KeyDebtLot                 = types.KeyDebtLot
	KeyDebtParam               = types.KeyDebtParam
	KeyDebtThreshold           = types.KeyDebtThreshold
	KeyGlobalDebtLimit         = types.KeyGlobalDebtLimit
	KeySurplusLot              = types.KeySurplusLot
	KeySurplusThreshold        = types.KeySurplusThreshold
	MaxSortableDec             = types.MaxSortableDec
	ModuleCdc                  = types.ModuleCdc
	PreviousAccrualTimePrefix  = types.PreviousAccrualTimePrefix
	PricefeedStatusKeyPrefix   = types.PricefeedStatusKeyPrefix
	PrincipalKeyPrefix         = types.PrincipalKeyPrefix
)

Functions

func BeginBlocker

func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k Keeper)

BeginBlocker compounds the debt in outstanding cdps and liquidates cdps that are below the required collateralization ratio

func InitGenesis

func InitGenesis(ctx sdk.Context, k Keeper, pk types.PricefeedKeeper, sk types.SupplyKeeper, gs GenesisState)

InitGenesis sets initial genesis state for cdp module

func NewHandler

func NewHandler(k Keeper) sdk.Handler

NewHandler creates an sdk.Handler for cdp messages

Types

type AccountKeeper added in v0.11.0

type AccountKeeper = types.AccountKeeper

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule app module type

func NewAppModule

func NewAppModule(keeper Keeper, accountKeeper types.AccountKeeper, pricefeedKeeper types.PricefeedKeeper, supplyKeeper types.SupplyKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)

BeginBlock module begin-block

func (AppModule) EndBlock

EndBlock module end-block

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

ExportGenesis module export genesis

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis module init-genesis

func (AppModule) Name

func (AppModule) Name() string

Name module name

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler module handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler module querier

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute module querier route name

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

RegisterInvariants register module invariants

func (AppModule) Route

func (AppModule) Route() string

Route module message route name

func (AppModule) WeightedOperations added in v0.8.0

func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation

WeightedOperations returns the all the cdp module operations with their respective weights.

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic app module basics object

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis default genesis state

func (AppModuleBasic) GenerateGenesisState added in v0.8.0

func (AppModuleBasic) GenerateGenesisState(simState *module.SimulationState)

GenerateGenesisState creates a randomized GenState of the cdp module

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

GetQueryCmd returns the root query command for the auction module.

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

GetTxCmd returns the root tx command for the cdp module.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name get module name

func (AppModuleBasic) ProposalContents added in v0.8.0

ProposalContents doesn't return any content functions for governance proposals.

func (AppModuleBasic) RandomizedParams added in v0.8.0

func (AppModuleBasic) RandomizedParams(r *rand.Rand) []sim.ParamChange

RandomizedParams returns nil because cdp has no params.

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

RegisterCodec register module codec

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)

RegisterRESTRoutes registers the REST routes for the cdp module.

func (AppModuleBasic) RegisterStoreDecoder added in v0.8.0

func (AppModuleBasic) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)

RegisterStoreDecoder registers a decoder for cdp module's types

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

ValidateGenesis module validate genesis

type AuctionKeeper added in v0.11.0

type AuctionKeeper = types.AuctionKeeper

type AugmentedCDP

type AugmentedCDP = types.AugmentedCDP

type AugmentedCDPs

type AugmentedCDPs = types.AugmentedCDPs

type CDP

type CDP = types.CDP

type CDPHooks added in v0.13.0

type CDPHooks = types.CDPHooks

type CDPs

type CDPs = types.CDPs

type CollateralParam

type CollateralParam = types.CollateralParam

type CollateralParams

type CollateralParams = types.CollateralParams

type DebtParam

type DebtParam = types.DebtParam

type DebtParams

type DebtParams = types.DebtParams

type Deposit

type Deposit = types.Deposit

type Deposits

type Deposits = types.Deposits

type GenesisAccumulationTime added in v0.13.0

type GenesisAccumulationTime = types.GenesisAccumulationTime

type GenesisAccumulationTimes added in v0.13.0

type GenesisAccumulationTimes = types.GenesisAccumulationTimes

type GenesisState

type GenesisState = types.GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState

ExportGenesis export genesis state for cdp module

type GenesisTotalPrincipal added in v0.13.0

type GenesisTotalPrincipal = types.GenesisTotalPrincipal

type GenesisTotalPrincipals added in v0.13.0

type GenesisTotalPrincipals = types.GenesisTotalPrincipals

type Keeper

type Keeper = keeper.Keeper

type MsgCreateCDP

type MsgCreateCDP = types.MsgCreateCDP

type MsgDeposit

type MsgDeposit = types.MsgDeposit

type MsgDrawDebt

type MsgDrawDebt = types.MsgDrawDebt

type MsgLiquidate added in v0.13.0

type MsgLiquidate = types.MsgLiquidate

type MsgRepayDebt

type MsgRepayDebt = types.MsgRepayDebt

type MsgWithdraw

type MsgWithdraw = types.MsgWithdraw

type MultiCDPHooks added in v0.13.0

type MultiCDPHooks = types.MultiCDPHooks

type Params

type Params = types.Params

type PricefeedKeeper

type PricefeedKeeper = types.PricefeedKeeper

type QueryCdpDeposits added in v0.5.0

type QueryCdpDeposits = types.QueryCdpDeposits

type QueryCdpParams

type QueryCdpParams = types.QueryCdpParams

type QueryCdpsByCollateralTypeParams added in v0.11.0

type QueryCdpsByCollateralTypeParams = types.QueryCdpsByCollateralTypeParams

type QueryCdpsByRatioParams

type QueryCdpsByRatioParams = types.QueryCdpsByRatioParams

type QueryCdpsParams

type QueryCdpsParams = types.QueryCdpsParams

type SupplyKeeper

type SupplyKeeper = types.SupplyKeeper

Directories

Path Synopsis
client
cli
legacy

Jump to

Keyboard shortcuts

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