keeper

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculatGrowRatePercent

func CalculatGrowRatePercent(backing_ratio sdk.Int) (sdk.Int, error)

MATH

func CheckCoinDenom

func CheckCoinDenom(coins sdk.Coins, denom string) error

func CheckCoinsLen

func CheckCoinsLen(coins sdk.Coins, amt int) error

Coins Helpers

func GetAssetIDBytes added in v0.2.5

func GetAssetIDBytes(id uint64) []byte

func GetAssetIDFromBytes added in v0.2.5

func GetAssetIDFromBytes(bz []byte) uint64

func GetLendIDBytes added in v0.2.5

func GetLendIDBytes(id uint64) []byte

GetLendIDBytes returns the byte representation of the ID

func GetLendIDFromBytes added in v0.2.5

func GetLendIDFromBytes(bz []byte) uint64

GetLendIDFromBytes returns ID in uint64 format from a byte array

func GetLiquidatorPositionIDBytes

func GetLiquidatorPositionIDBytes(id uint64) []byte

func GetLiquidatorPositionIDFromBytes

func GetLiquidatorPositionIDFromBytes(bz []byte) uint64

func GetLoanIDBytes

func GetLoanIDBytes(id uint64) []byte

GetLoanIDBytes returns the byte representation of the ID

func GetLoanIDFromBytes

func GetLoanIDFromBytes(bz []byte) uint64

GetLoanIDFromBytes returns ID in uint64 format from a byte array

func GetPairIDBytes

func GetPairIDBytes(id uint64) []byte

func GetPairIDFromBytes

func GetPairIDFromBytes(bz []byte) uint64

func GetPositionIDBytes

func GetPositionIDBytes(id uint64) []byte

func GetPositionIDFromBytes

func GetPositionIDFromBytes(bz []byte) uint64

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,

	bankKeeper types.BankKeeper,
	oracleKeeper types.OracleKeeper,

	stableKeeper types.StableKeeper,
) *Keeper

func (Keeper) AddressEmptyCheck added in v0.1.2

func (k Keeper) AddressEmptyCheck(ctx sdk.Context) bool

func (Keeper) AllPairs added in v0.2.0

func (k Keeper) AllPairs(goCtx context.Context, req *types.AllPairsRequest) (*types.AllPairsResponse, error)

func (Keeper) AppendAsset added in v0.2.5

func (k Keeper) AppendAsset(
	ctx sdk.Context,
	Asset types.Asset,
) uint64

func (Keeper) AppendLend added in v0.2.5

func (k Keeper) AppendLend(
	ctx sdk.Context,
	Lend types.Lend,
) uint64

func (Keeper) AppendLiquidatorPosition

func (k Keeper) AppendLiquidatorPosition(
	ctx sdk.Context,
	LiquidatorPosition types.LiquidatorPosition,
) uint64

func (Keeper) AppendLoan

func (k Keeper) AppendLoan(
	ctx sdk.Context,
	loan types.Loan,
) uint64

AppendLoan appends a loan in the store with a new id and update the count

func (Keeper) AppendPair

func (k Keeper) AppendPair(
	ctx sdk.Context,
	pair types.GTokenPair,
) uint64

func (Keeper) AppendPosition

func (k Keeper) AppendPosition(
	ctx sdk.Context,
	Position types.Position,
) uint64

func (Keeper) AssetByAssetId added in v0.2.5

func (Keeper) CalculateAddToReserveValue

func (k Keeper) CalculateAddToReserveValue(ctx sdk.Context, val sdk.Int, gTokenPair types.GTokenPair) (sdk.Int, bool)

func (Keeper) CalculateAmountByPriceAndAmountIn added in v0.2.5

func (k Keeper) CalculateAmountByPriceAndAmountIn(amount sdk.Int, price sdk.Int) sdk.Int

func (Keeper) CalculateAmountForRemoveFromCollateral

func (k Keeper) CalculateAmountForRemoveFromCollateral(amt sdk.Int, price sdk.Int) sdk.Int

func (Keeper) CalculateAmountLiquidate

func (k Keeper) CalculateAmountLiquidate(ctx sdk.Context, collateral int64, borrow int64) sdk.Int

#nosec

func (Keeper) CalculateDeleteLendAmountOut

func (k Keeper) CalculateDeleteLendAmountOut(amount sdk.Int, price sdk.Int) sdk.Int

func (Keeper) CalculateDepositId

func (k Keeper) CalculateDepositId(address string) string

func (Keeper) CalculateGTokenAPY

func (k Keeper) CalculateGTokenAPY(lastAmount sdk.Int, growRate sdk.Int, day sdk.Int) sdk.Int

#nosec

func (Keeper) CalculateGTokenAmountOut

func (k Keeper) CalculateGTokenAmountOut(amount sdk.Int, price sdk.Int) sdk.Int

func (Keeper) CalculateGrowRate

func (k Keeper) CalculateGrowRate(ctx sdk.Context, gTokenPair types.GTokenPair) (sdk.Int, error)

func (Keeper) CalculateGrowYield

func (k Keeper) CalculateGrowYield(ctx sdk.Context, gTokenPair types.GTokenPair) (sdk.Int, error)

func (Keeper) CalculateLendId added in v0.2.5

func (k Keeper) CalculateLendId(address string, denom string, positionId string) string

func (Keeper) CalculateNeedAmountToGet

func (k Keeper) CalculateNeedAmountToGet(borrow_amount sdk.Int, borrow_time sdk.Int) sdk.Int

func (Keeper) CalculatePremiumAmount

func (k Keeper) CalculatePremiumAmount(ctx sdk.Context, amount sdk.Int, premium int64, price sdk.Int, price1 sdk.Int) (sdk.Int, sdk.Int)

func (Keeper) CalculateRealYield

func (k Keeper) CalculateRealYield(ctx sdk.Context, gTokenPair types.GTokenPair) (sdk.Int, error)

func (Keeper) CalculateReturnQubeStableAmountOut

func (k Keeper) CalculateReturnQubeStableAmountOut(amount sdk.Int, price sdk.Int) sdk.Int

func (Keeper) CalculateRiskRate

func (k Keeper) CalculateRiskRate(collateral sdk.Int, borrow sdk.Int) (sdk.Int, error)

#nosec

func (Keeper) ChangeBorrowMethodStatus added in v0.2.1

func (k Keeper) ChangeBorrowMethodStatus(ctx sdk.Context)

func (Keeper) ChangeCollateralMethodStatus added in v0.2.1

func (k Keeper) ChangeCollateralMethodStatus(ctx sdk.Context)

func (Keeper) ChangeDepositMethodStatus added in v0.2.1

func (k Keeper) ChangeDepositMethodStatus(ctx sdk.Context)

Grow Helper

func (Keeper) ChangeGrowStakingReserveAddress

func (k Keeper) ChangeGrowStakingReserveAddress(ctx sdk.Context, address sdk.AccAddress) error

func (Keeper) ChangeGrowYieldReserveAddress

func (k Keeper) ChangeGrowYieldReserveAddress(ctx sdk.Context, address sdk.AccAddress) error

func (Keeper) ChangeUSQReserveAddress

func (k Keeper) ChangeUSQReserveAddress(ctx sdk.Context, address sdk.AccAddress) error

func (Keeper) CheckBorrowMethodStatus added in v0.2.1

func (k Keeper) CheckBorrowMethodStatus(ctx sdk.Context) error

func (Keeper) CheckCollateralMethodStatus added in v0.2.1

func (k Keeper) CheckCollateralMethodStatus(ctx sdk.Context) error

func (Keeper) CheckDepositAmount

func (k Keeper) CheckDepositAmount(ctx sdk.Context, msgAmountIn string, pair types.GTokenPair) error

Deposit Helpers

func (Keeper) CheckDepositMethodStatus added in v0.2.1

func (k Keeper) CheckDepositMethodStatus(ctx sdk.Context) error

func (Keeper) CheckIfLiquidatorPositionAlredyCreate

func (k Keeper) CheckIfLiquidatorPositionAlredyCreate(ctx sdk.Context, depositor string, denom string) error

func (Keeper) CheckIfPositionAlredyCreate

func (k Keeper) CheckIfPositionAlredyCreate(ctx sdk.Context, depositor string) error

func (Keeper) CheckLendIdInPosition added in v0.2.5

func (k Keeper) CheckLendIdInPosition(ctx sdk.Context, lendId string, position types.Position) bool

Lend ID

func (Keeper) CheckLiquidator

func (k Keeper) CheckLiquidator(address sdk.Address, pos types.LiquidatorPosition) error

func (Keeper) CheckLoanIdInPosition

func (k Keeper) CheckLoanIdInPosition(ctx sdk.Context, loanId string, position types.Position) bool

Loan ID

func (Keeper) CheckOracleAssetId

func (k Keeper) CheckOracleAssetId(ctx sdk.Context, Asset types.Asset) error

Lend Helpers

func (Keeper) CheckRiskRate

func (k Keeper) CheckRiskRate(collateral sdk.Int, borrow sdk.Int, desiredAmount sdk.Int) error

func (Keeper) CheckWithdrawalAmount

func (k Keeper) CheckWithdrawalAmount(msgAmountIn string, pair types.GTokenPair) error

func (Keeper) CheckYieldRate

func (k Keeper) CheckYieldRate(ctx sdk.Context, gTokenPair types.GTokenPair) (string, sdk.Int, error)

func (Keeper) CloseLiquidationPosition

Msg for close liquidation postion

func (Keeper) CreateBorrow added in v0.2.5

Msg for lend asset

func (Keeper) CreateLend

func (k Keeper) CreateLend(goCtx context.Context, msg *types.MsgCreateLend) (*types.MsgCreateLendResponse, error)

Msg of deposit collateral for borrowing money from x/grow

func (Keeper) DeleteBorrow added in v0.2.5

Msg for delete lend

func (Keeper) ExecuteCloseLiqPosition

func (k Keeper) ExecuteCloseLiqPosition(ctx sdk.Context, msg *types.MsgCloseLiquidationPosition) (error, sdk.Coin)

func (Keeper) ExecuteCreateBorrow added in v0.2.5

func (k Keeper) ExecuteCreateBorrow(ctx sdk.Context, msg *types.MsgCreateBorrow, Asset types.Asset) (error, sdk.Coin, string)

#nosec

func (Keeper) ExecuteCreateLend added in v0.2.5

func (k Keeper) ExecuteCreateLend(ctx sdk.Context, msg *types.MsgCreateLend, Asset types.Asset) (error, string)

#nosec

func (Keeper) ExecuteCreateLiqPosition

func (k Keeper) ExecuteCreateLiqPosition(ctx sdk.Context, msg *types.MsgOpenLiquidationPosition, Asset types.Asset) (error, string)

func (Keeper) ExecuteDeleteBorrow added in v0.2.5

func (k Keeper) ExecuteDeleteBorrow(ctx sdk.Context, msg *types.MsgDeleteBorrow, Asset types.Asset) (error, string)

#nosec

func (Keeper) ExecuteDeposit

func (k Keeper) ExecuteDeposit(ctx sdk.Context, msg *types.MsgGrowDeposit, gTokenPair types.GTokenPair) (error, sdk.Coin)

func (Keeper) ExecuteLiquidation

func (k Keeper) ExecuteLiquidation(ctx sdk.Context, liquidateLendPositionList []string) error

#nosec

func (Keeper) ExecuteWithdrawal

func (k Keeper) ExecuteWithdrawal(ctx sdk.Context, msg *types.MsgGrowWithdrawal, gTokenPair types.GTokenPair) (error, sdk.Coin)

func (Keeper) ExecuteWithdrawalLend added in v0.2.5

func (k Keeper) ExecuteWithdrawalLend(ctx sdk.Context, msg *types.MsgWithdrawalLend, Asset types.Asset) (error, sdk.Coin)

#nosec

func (Keeper) FastCoins

func (k Keeper) FastCoins(denom string, amt sdk.Int) sdk.Coins

func (Keeper) GenerateAssetIdHash added in v0.2.5

func (k Keeper) GenerateAssetIdHash(denom1 string) string

func (Keeper) GenerateDenomIdHash

func (k Keeper) GenerateDenomIdHash(denom1 string) string

func (Keeper) GenerateLendIdHash added in v0.2.5

func (k Keeper) GenerateLendIdHash(denom1 string, amount string, borrower string, time string) string

func (Keeper) GenerateLiquidatorPositionId

func (k Keeper) GenerateLiquidatorPositionId(address string, denom1 string, asset1 string, amount string, premium string) string

func (Keeper) GenerateLoanIdHash added in v0.2.5

func (k Keeper) GenerateLoanIdHash(denom string, borrower string) string

func (Keeper) GetAllAsset added in v0.2.5

func (k Keeper) GetAllAsset(ctx sdk.Context) (list []types.Asset)

func (Keeper) GetAllAssets added in v0.2.5

func (Keeper) GetAllLend added in v0.2.5

func (k Keeper) GetAllLend(ctx sdk.Context) (list []types.Lend)

GetAllLend returns all Lend

func (Keeper) GetAllLiquidatorPosition

func (k Keeper) GetAllLiquidatorPosition(ctx sdk.Context) (list []types.LiquidatorPosition)

func (Keeper) GetAllLoan

func (k Keeper) GetAllLoan(ctx sdk.Context) (list []types.Loan)

GetAllLoan returns all loan

func (Keeper) GetAllPair

func (k Keeper) GetAllPair(ctx sdk.Context) (list []types.GTokenPair)

func (Keeper) GetAllPosition

func (k Keeper) GetAllPosition(ctx sdk.Context) (list []types.Position)

func (Keeper) GetAmountIntFromCoins

func (k Keeper) GetAmountIntFromCoins(coins string) (sdk.Int, string, error)

func (Keeper) GetAssetByAssetId added in v0.2.5

func (k Keeper) GetAssetByAssetId(ctx sdk.Context, AssetId string) (val types.Asset, found bool)

func (Keeper) GetAssetByDenom added in v0.2.5

func (k Keeper) GetAssetByDenom(ctx sdk.Context, denom string) (types.Asset, bool)

func (Keeper) GetAssetByID added in v0.2.5

func (k Keeper) GetAssetByID(ctx sdk.Context, id uint64) (val types.Asset, found bool)

func (Keeper) GetAssetByOracleAssetId added in v0.2.5

func (k Keeper) GetAssetByOracleAssetId(ctx sdk.Context, oracleAssetId string) (val types.Asset, err error)

func (Keeper) GetAssetCount added in v0.2.5

func (k Keeper) GetAssetCount(ctx sdk.Context) uint64

func (Keeper) GetAssetIdByCoins added in v0.2.5

func (k Keeper) GetAssetIdByCoins(amountIn string) (string, error)

func (Keeper) GetBorrowRate

func (k Keeper) GetBorrowRate(ctx sdk.Context, id string) sdk.Int

func (Keeper) GetDenomIdWithdrawal

func (k Keeper) GetDenomIdWithdrawal(amountIn string) (string, error)

func (Keeper) GetGTokenPrice

func (k Keeper) GetGTokenPrice(ctx sdk.Context, denomID string) (sdk.Int, error)

func (Keeper) GetGrowStakingReserveAddress

func (k Keeper) GetGrowStakingReserveAddress(ctx sdk.Context) sdk.AccAddress

func (Keeper) GetGrowYieldReserveAddress

func (k Keeper) GetGrowYieldReserveAddress(ctx sdk.Context) sdk.AccAddress

func (Keeper) GetLastTimeUpdateReserve added in v0.2.0

func (k Keeper) GetLastTimeUpdateReserve(ctx sdk.Context) sdk.Int

func (Keeper) GetLend added in v0.2.5

func (k Keeper) GetLend(ctx sdk.Context, id uint64) (val types.Lend, found bool)

GetLend returns a Lend from its id

func (Keeper) GetLendByLendId added in v0.2.5

func (k Keeper) GetLendByLendId(ctx sdk.Context, lend_id string) (val types.Lend, found bool)

func (Keeper) GetLendCount added in v0.2.5

func (k Keeper) GetLendCount(ctx sdk.Context) uint64

func (Keeper) GetLiquidatorPositionByID

func (k Keeper) GetLiquidatorPositionByID(ctx sdk.Context, id uint64) (val types.LiquidatorPosition, found bool)

func (Keeper) GetLiquidatorPositionByLiquidatorPositionId

func (k Keeper) GetLiquidatorPositionByLiquidatorPositionId(ctx sdk.Context, LiquidatorPositionId string) (val types.LiquidatorPosition, found bool)

func (Keeper) GetLiquidatorPositionCount

func (k Keeper) GetLiquidatorPositionCount(ctx sdk.Context) uint64

func (Keeper) GetLiquidatorPositionsByAssetAndDenom added in v0.2.5

func (k Keeper) GetLiquidatorPositionsByAssetAndDenom(ctx sdk.Context, wantAssetId string, provideAssetId string) []types.LiquidatorPosition

#nosec

func (Keeper) GetLoadByLoanId added in v0.2.5

func (k Keeper) GetLoadByLoanId(ctx sdk.Context, loanId string) (val types.Loan, found bool)

func (Keeper) GetLoan

func (k Keeper) GetLoan(ctx sdk.Context, id uint64) (val types.Loan, found bool)

GetLoan returns a loan from its id

func (Keeper) GetLoanCount

func (k Keeper) GetLoanCount(ctx sdk.Context) uint64

GetLoanCount get the total number of loan

func (Keeper) GetPairByDenomID

func (k Keeper) GetPairByDenomID(ctx sdk.Context, denomID string) (val types.GTokenPair, found bool)

func (Keeper) GetPairByID

func (k Keeper) GetPairByID(ctx sdk.Context, id uint64) (val types.GTokenPair, found bool)

func (Keeper) GetPairByPairID

func (k Keeper) GetPairByPairID(ctx sdk.Context, id string) (stabletypes.Pair, bool)

func (Keeper) GetPairCount

func (k Keeper) GetPairCount(ctx sdk.Context) uint64

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams get all parameters as types.Params

func (Keeper) GetPositionByID

func (k Keeper) GetPositionByID(ctx sdk.Context, id uint64) (val types.Position, found bool)

func (Keeper) GetPositionByPositionId

func (k Keeper) GetPositionByPositionId(ctx sdk.Context, PositionId string) (val types.Position, found bool)

func (Keeper) GetPositionCount

func (k Keeper) GetPositionCount(ctx sdk.Context) uint64

func (Keeper) GetPriceByDenom

func (k Keeper) GetPriceByDenom(ctx sdk.Context, denom string) (sdk.Int, error)

Price Helpers

func (Keeper) GetRatesByUtilizationRate added in v0.2.5

func (k Keeper) GetRatesByUtilizationRate(ctx sdk.Context, utilization_rate float64, asset types.Asset) (float64, float64, error)

func (Keeper) GetRealRate

func (k Keeper) GetRealRate(ctx sdk.Context, id string) sdk.Int

func (Keeper) GetUSQReserveAddress

func (k Keeper) GetUSQReserveAddress(ctx sdk.Context) sdk.AccAddress

func (Keeper) GrowDeposit added in v0.2.1

Msg for deposit

func (Keeper) GrowWithdrawal added in v0.2.1

Msg for withdrawal

func (Keeper) IncreaseBorrowedAmountInUSDInPosition

func (k Keeper) IncreaseBorrowedAmountInUSDInPosition(ctx sdk.Context, position types.Position, amt sdk.Int) types.Position

func (Keeper) IncreaseGrowStakingReserve

func (k Keeper) IncreaseGrowStakingReserve(ctx sdk.Context, amountIn sdk.Coins, gTokenPair types.GTokenPair, qStablePair stabletypes.Pair) (types.GTokenPair, error)

func (Keeper) LendById added in v0.2.5

func (Keeper) LiquidatePositionByLiquidators added in v0.2.5

func (k Keeper) LiquidatePositionByLiquidators(ctx sdk.Context, lendOracleId string, borrowOracleId string, amount sdk.Int, price sdk.Int, price1 sdk.Int) (sdk.Int, error)

#nosec

func (Keeper) LoanById

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) OpenLiquidationPosition

Msg for open liquidation postion

func (Keeper) PairByDenomId added in v0.2.0

func (Keeper) Params

func (Keeper) ParseAndCheckPremium

func (k Keeper) ParseAndCheckPremium(amount string) (sdk.Int, error)

func (Keeper) PositionById

func (Keeper) PushLendToPosition added in v0.2.5

func (k Keeper) PushLendToPosition(ctx sdk.Context, lendId string, position types.Position) types.Position

func (Keeper) PushLoanToPosition

func (k Keeper) PushLoanToPosition(ctx sdk.Context, loanId string, position types.Position) types.Position

func (Keeper) ReCalculateLendLoanAmountsInUsd added in v0.2.5

func (k Keeper) ReCalculateLendLoanAmountsInUsd(ctx sdk.Context, position types.Position)

func (Keeper) ReduceBorrowedAmountInUSDInPosition

func (k Keeper) ReduceBorrowedAmountInUSDInPosition(ctx sdk.Context, position types.Position, amt sdk.Int) types.Position

func (Keeper) ReduceGrowStakingReserve

func (k Keeper) ReduceGrowStakingReserve(ctx sdk.Context, amountIn sdk.Coins, gTokenPair types.GTokenPair) (types.GTokenPair, error)

func (Keeper) RegisterAsset added in v0.2.5

func (k Keeper) RegisterAsset(ctx sdk.Context, p types.Asset) error

func for gov proposal

func (Keeper) RegisterPair

func (k Keeper) RegisterPair(ctx sdk.Context, p types.GTokenPair) error

#nosec

func (Keeper) RemoveAsset added in v0.2.5

func (k Keeper) RemoveAsset(ctx sdk.Context, id uint64)

func (Keeper) RemoveLend added in v0.2.5

func (k Keeper) RemoveLend(ctx sdk.Context, id uint64)

RemoveLend removes a Lend from the store

func (Keeper) RemoveLendInPosition added in v0.2.5

func (k Keeper) RemoveLendInPosition(ctx sdk.Context, lendId string, position types.Position) types.Position

func (Keeper) RemoveLiquidatorPosition

func (k Keeper) RemoveLiquidatorPosition(ctx sdk.Context, id uint64)

func (Keeper) RemoveLoan

func (k Keeper) RemoveLoan(ctx sdk.Context, id uint64)

RemoveLoan removes a loan from the store

func (Keeper) RemoveLoanInPosition

func (k Keeper) RemoveLoanInPosition(ctx sdk.Context, loanId string, position types.Position) types.Position

func (Keeper) RemovePair

func (k Keeper) RemovePair(ctx sdk.Context, id uint64)

func (Keeper) RemovePosition

func (k Keeper) RemovePosition(ctx sdk.Context, id uint64)

func (Keeper) SendCoinsFromAccountToModule

func (k Keeper) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error

func (Keeper) SendCoinsFromModuleToAccount

func (k Keeper) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error

EndBlocker Helpers

func (Keeper) SetAsset added in v0.2.5

func (k Keeper) SetAsset(ctx sdk.Context, Asset types.Asset)

func (Keeper) SetAssetCount added in v0.2.5

func (k Keeper) SetAssetCount(ctx sdk.Context, count uint64)

func (Keeper) SetBorrowRate

func (k Keeper) SetBorrowRate(ctx sdk.Context, val sdk.Int, id string) error

Borrow Rate

func (Keeper) SetGrowStakingReserveAddress

func (k Keeper) SetGrowStakingReserveAddress(ctx sdk.Context, newGrowStakingReserveAddress sdk.AccAddress)

func (Keeper) SetGrowYieldReserveAddress

func (k Keeper) SetGrowYieldReserveAddress(ctx sdk.Context, newGrowYieldReserveAddress sdk.AccAddress)

func (Keeper) SetLastTimeUpdateReserve

func (k Keeper) SetLastTimeUpdateReserve(ctx sdk.Context, val sdk.Int) error

LastTimeUpdateReserve

func (Keeper) SetLend added in v0.2.5

func (k Keeper) SetLend(ctx sdk.Context, Lend types.Lend)

SetLend set a specific Lend in the store

func (Keeper) SetLendCount added in v0.2.5

func (k Keeper) SetLendCount(ctx sdk.Context, count uint64)

func (Keeper) SetLiquidatorPosition

func (k Keeper) SetLiquidatorPosition(ctx sdk.Context, LiquidatorPosition types.LiquidatorPosition)

func (Keeper) SetLiquidatorPositionCount

func (k Keeper) SetLiquidatorPositionCount(ctx sdk.Context, count uint64)

func (Keeper) SetLoan

func (k Keeper) SetLoan(ctx sdk.Context, loan types.Loan)

SetLoan set a specific loan in the store

func (Keeper) SetLoanCount

func (k Keeper) SetLoanCount(ctx sdk.Context, count uint64)

SetLoanCount set the total number of loan

func (Keeper) SetPair

func (k Keeper) SetPair(ctx sdk.Context, Pair types.GTokenPair)

func (Keeper) SetPairCount

func (k Keeper) SetPairCount(ctx sdk.Context, count uint64)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) SetPosition

func (k Keeper) SetPosition(ctx sdk.Context, Position types.Position)

func (Keeper) SetPositionCount

func (k Keeper) SetPositionCount(ctx sdk.Context, count uint64)

func (Keeper) SetRealRate

func (k Keeper) SetRealRate(ctx sdk.Context, val sdk.Int, id string) error

Real Rate

func (Keeper) SetUSQReserveAddress

func (k Keeper) SetUSQReserveAddress(ctx sdk.Context, newUSQReserveAddress sdk.AccAddress)

func (Keeper) SortLiquidatorPositionsByPremium added in v0.2.5

func (k Keeper) SortLiquidatorPositionsByPremium(ctx sdk.Context, lps []types.LiquidatorPosition) []types.LiquidatorPosition

#nosec

func (Keeper) UpdateGTokenPrice

func (k Keeper) UpdateGTokenPrice(ctx sdk.Context, gTokenPair types.GTokenPair) error

func (Keeper) WithdrawalLend added in v0.2.5

Msg of withdrawal collateral from x/grow

Jump to

Keyboard shortcuts

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