Documentation ¶
Index ¶
- func NewQuerier(keeper Keeper) sdk.Querier
- type Keeper
- func (k Keeper) GetParams(ctx sdk.Context) types.LiquidatorParams
- func (k Keeper) GetSeizedDebt(ctx sdk.Context) types.SeizedDebt
- func (k Keeper) PartialSeizeCSDT(ctx sdk.Context, owner sdk.AccAddress, collateralDenom string, ...) sdk.Error
- func (k Keeper) SeizeAndStartCollateralAuction(ctx sdk.Context, owner sdk.AccAddress, collateralDenom string) (auction.ID, sdk.Error)
- func (k Keeper) SetParams(ctx sdk.Context, params types.LiquidatorParams)
- func (k Keeper) SetSeizedDebt(ctx sdk.Context, debt types.SeizedDebt)
- func (k Keeper) SettleDebt(ctx sdk.Context) sdk.Error
- func (k Keeper) StartDebtAuction(ctx sdk.Context) (auction.ID, sdk.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc *codec.Codec, storeKey sdk.StoreKey, subspace params.Subspace, csdtKeeper types.CsdtKeeper, auctionKeeper types.AuctionKeeper, bankKeeper types.BankKeeper, supplyKeeper types.SupplyKeeper, ) Keeper
func (Keeper) GetParams ¶
func (k Keeper) GetParams(ctx sdk.Context) types.LiquidatorParams
GetParams returns the params for liquidator module
func (Keeper) GetSeizedDebt ¶
func (k Keeper) GetSeizedDebt(ctx sdk.Context) types.SeizedDebt
func (Keeper) PartialSeizeCSDT ¶
func (k Keeper) PartialSeizeCSDT(ctx sdk.Context, owner sdk.AccAddress, collateralDenom string, collateralToSeize sdk.Int, debtToSeize sdk.Int) sdk.Error
PartialSeizeCSDT seizes some collateral and debt from an under-collateralized CSDT.
func (Keeper) SeizeAndStartCollateralAuction ¶
func (k Keeper) SeizeAndStartCollateralAuction(ctx sdk.Context, owner sdk.AccAddress, collateralDenom string) (auction.ID, sdk.Error)
SeizeAndStartCollateralAuction pulls collateral out of a CSDT and sells it in an auction for stable coin. Excess collateral goes to the original CSDT owner. Known as Cat.bite in maker result: stable coin is transferred to module account, collateral is transferred from module account to buyer, (and any excess collateral is transferred to original CSDT owner)
func (Keeper) SetParams ¶
func (k Keeper) SetParams(ctx sdk.Context, params types.LiquidatorParams)
SetParams sets params for the liquidator module
func (Keeper) SetSeizedDebt ¶
func (k Keeper) SetSeizedDebt(ctx sdk.Context, debt types.SeizedDebt)
func (Keeper) SettleDebt ¶
SettleDebt removes equal amounts of debt and stable coin from the liquidator's reserves (and also updates the global debt in the csdt module). This is called in the handler when a debt or surplus auction is started TODO Should this be called with an amount, rather than annihilating the maximum?