keeper

package
v0.0.2-0...-13a971e Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

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

func (k Keeper) SettleDebt(ctx sdk.Context) sdk.Error

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?

func (Keeper) StartDebtAuction

func (k Keeper) StartDebtAuction(ctx sdk.Context) (auction.ID, sdk.Error)

StartDebtAuction sells off minted gov coin to raise set amounts of stable coin. Known as Vow.flop in maker result: minted gov coin moved to highest bidder, stable coin moved to moduleAccount

Jump to

Keyboard shortcuts

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