cdp

package
v0.11.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

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

Variables

View Source
var (
	// functions aliases
	NewKeeper                   = keeper.NewKeeper
	NewQuerier                  = keeper.NewQuerier
	NewCDP                      = types.NewCDP
	NewAugmentedCDP             = types.NewAugmentedCDP
	RegisterCodec               = types.RegisterCodec
	NewDeposit                  = types.NewDeposit
	NewGenesisState             = types.NewGenesisState
	DefaultGenesisState         = types.DefaultGenesisState
	GetCdpIDBytes               = types.GetCdpIDBytes
	GetCdpIDFromBytes           = types.GetCdpIDFromBytes
	CdpKey                      = types.CdpKey
	SplitCdpKey                 = types.SplitCdpKey
	DenomIterKey                = types.DenomIterKey
	SplitDenomIterKey           = types.SplitDenomIterKey
	DepositKey                  = types.DepositKey
	SplitDepositKey             = types.SplitDepositKey
	DepositIterKey              = types.DepositIterKey
	SplitDepositIterKey         = types.SplitDepositIterKey
	CollateralRatioBytes        = types.CollateralRatioBytes
	CollateralRatioKey          = types.CollateralRatioKey
	SplitCollateralRatioKey     = types.SplitCollateralRatioKey
	CollateralRatioIterKey      = types.CollateralRatioIterKey
	SplitCollateralRatioIterKey = types.SplitCollateralRatioIterKey
	NewMsgCreateCDP             = types.NewMsgCreateCDP
	NewMsgDeposit               = types.NewMsgDeposit
	NewMsgWithdraw              = types.NewMsgWithdraw
	NewMsgDrawDebt              = types.NewMsgDrawDebt
	NewMsgRepayDebt             = types.NewMsgRepayDebt
	NewParams                   = types.NewParams
	DefaultParams               = types.DefaultParams
	ParamKeyTable               = types.ParamKeyTable
	NewQueryCdpsParams          = types.NewQueryCdpsParams
	NewQueryCdpParams           = types.NewQueryCdpParams
	NewQueryCdpDeposits         = types.NewQueryCdpDeposits
	NewQueryCdpsByRatioParams   = types.NewQueryCdpsByRatioParams
	ValidSortableDec            = types.ValidSortableDec
	SortableDecBytes            = types.SortableDecBytes
	ParseDecBytes               = types.ParseDecBytes
	RelativePow                 = types.RelativePow

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

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 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 AugmentedCDP

type AugmentedCDP = types.AugmentedCDP

type AugmentedCDPs

type AugmentedCDPs = types.AugmentedCDPs

type CDP

type CDP = types.CDP

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 GenesisState

type GenesisState = types.GenesisState

func ExportGenesis

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

ExportGenesis export genesis state for cdp module

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 MsgRepayDebt

type MsgRepayDebt = types.MsgRepayDebt

type MsgWithdraw

type MsgWithdraw = types.MsgWithdraw

type Params

type Params = types.Params

type QueryCdpDeposits added in v0.5.0

type QueryCdpDeposits = types.QueryCdpDeposits

type QueryCdpParams

type QueryCdpParams = types.QueryCdpParams

type QueryCdpsByRatioParams

type QueryCdpsByRatioParams = types.QueryCdpsByRatioParams

type QueryCdpsParams

type QueryCdpsParams = types.QueryCdpsParams

Directories

Path Synopsis
client
cli
legacy

Jump to

Keyboard shortcuts

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