Versions in this module Expand all Collapse all v1 v1.0.0 Nov 15, 2022 Changes in this version + func APYToSPY(apy sdk.Dec) (sdk.Dec, error) + func CalculateBorrowInterestFactor(perSecondInterestRate sdk.Dec, secondsElapsed sdk.Int) sdk.Dec + func CalculateBorrowRate(model types.InterestRateModel, cash, borrows, reserves sdk.Dec) (sdk.Dec, error) + func CalculateSupplyInterestFactor(newInterest, cash, borrows, reserves sdk.Dec) sdk.Dec + func CalculateUtilizationRatio(cash, borrows, reserves sdk.Dec) sdk.Dec + func NewMsgServerImpl(keeper Keeper) types.MsgServer + func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier + func NewQueryServerImpl(keeper Keeper, ak types.AccountKeeper, bk types.BankKeeper) types.QueryServer + func SPYToEstimatedAPY(apy sdk.Dec) sdk.Dec + type Keeper struct + func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramstore paramtypes.Subspace, ...) Keeper + func (k *Keeper) SetHooks(hooks types.JOLTHooks) *Keeper + func (k Keeper) AccrueInterest(ctx sdk.Context, denom string) error + func (k Keeper) AfterBorrowCreated(ctx sdk.Context, borrow types.Borrow) + func (k Keeper) AfterBorrowModified(ctx sdk.Context, borrow types.Borrow) + func (k Keeper) AfterDepositCreated(ctx sdk.Context, deposit types.Deposit) + func (k Keeper) AfterDepositModified(ctx sdk.Context, deposit types.Deposit) + func (k Keeper) ApplyInterestRateUpdates(ctx sdk.Context) + func (k Keeper) AttemptKeeperLiquidation(ctx sdk.Context, keeper sdk.AccAddress, borrower sdk.AccAddress) error + func (k Keeper) BeforeBorrowModified(ctx sdk.Context, borrow types.Borrow) + func (k Keeper) BeforeDepositModified(ctx sdk.Context, deposit types.Deposit) + func (k Keeper) Borrow(ctx sdk.Context, borrower sdk.AccAddress, coins sdk.Coins) error + func (k Keeper) CalculateLtv(ctx sdk.Context, deposit types.Deposit, borrow types.Borrow) (sdk.Dec, error) + func (k Keeper) CalculatePaymentAmount(owed sdk.Coins, payment sdk.Coins) (sdk.Coins, error) + func (k Keeper) CalculateWithdrawAmount(available sdk.Coins, request sdk.Coins) (sdk.Coins, error) + func (k Keeper) DecrementBorrowedCoins(ctx sdk.Context, coins sdk.Coins) error + func (k Keeper) DecrementSuppliedCoins(ctx sdk.Context, coins sdk.Coins) error + func (k Keeper) DeleteBorrow(ctx sdk.Context, borrow types.Borrow) + func (k Keeper) DeleteDeposit(ctx sdk.Context, deposit types.Deposit) + func (k Keeper) DeleteMoneyMarket(ctx sdk.Context, denom string) + func (k Keeper) Deposit(ctx sdk.Context, depositor sdk.AccAddress, coins sdk.Coins) error + func (k Keeper) GetAllMoneyMarkets(ctx sdk.Context) (moneyMarkets types.MoneyMarkets) + func (k Keeper) GetBorrow(ctx sdk.Context, borrower sdk.AccAddress) (types.Borrow, bool) + func (k Keeper) GetBorrowInterestFactor(ctx sdk.Context, denom string) (sdk.Dec, bool) + func (k Keeper) GetBorrowedCoins(ctx sdk.Context) (sdk.Coins, bool) + func (k Keeper) GetDeposit(ctx sdk.Context, depositor sdk.AccAddress) (types.Deposit, bool) + func (k Keeper) GetDepositsByUser(ctx sdk.Context, user sdk.AccAddress) []types.Deposit + func (k Keeper) GetMinimumBorrowUSDValue(ctx sdk.Context) sdk.Dec + func (k Keeper) GetMoneyMarket(ctx sdk.Context, denom string) (types.MoneyMarket, bool) + func (k Keeper) GetParams(ctx sdk.Context) types.Params + func (k Keeper) GetPreviousAccrualTime(ctx sdk.Context, denom string) (time.Time, bool) + func (k Keeper) GetStoreLTV(ctx sdk.Context, addr sdk.AccAddress) (sdk.Dec, error) + func (k Keeper) GetSuppliedCoins(ctx sdk.Context) (sdk.Coins, bool) + func (k Keeper) GetSupplyInterestFactor(ctx sdk.Context, denom string) (sdk.Dec, bool) + func (k Keeper) GetSyncedBorrow(ctx sdk.Context, borrower sdk.AccAddress) (types.Borrow, bool) + func (k Keeper) GetSyncedDeposit(ctx sdk.Context, depositor sdk.AccAddress) (types.Deposit, bool) + func (k Keeper) GetTotalDeposited(ctx sdk.Context, depositDenom string) (total sdk.Int) + func (k Keeper) GetTotalReserves(ctx sdk.Context) (sdk.Coins, bool) + func (k Keeper) IncrementBorrowedCoins(ctx sdk.Context, newCoins sdk.Coins) + func (k Keeper) IncrementSuppliedCoins(ctx sdk.Context, newCoins sdk.Coins) + func (k Keeper) IsWithinValidLtvRange(ctx sdk.Context, deposit types.Deposit, borrow types.Borrow) (bool, error) + func (k Keeper) IterateBorrowInterestFactors(ctx sdk.Context, cb func(denom string, factor sdk.Dec) (stop bool)) + func (k Keeper) IterateBorrows(ctx sdk.Context, cb func(borrow types.Borrow) (stop bool)) + func (k Keeper) IterateDeposits(ctx sdk.Context, cb func(deposit types.Deposit) (stop bool)) + func (k Keeper) IterateMoneyMarkets(ctx sdk.Context, ...) + func (k Keeper) IterateSupplyInterestFactors(ctx sdk.Context, cb func(denom string, factor sdk.Dec) (stop bool)) + func (k Keeper) LoadLiquidationData(ctx sdk.Context, deposit types.Deposit, borrow types.Borrow) (map[string]LiqData, error) + func (k Keeper) Repay(ctx sdk.Context, sender, owner sdk.AccAddress, coins sdk.Coins) error + func (k Keeper) RunSurplusAuctions(ctx sdk.Context) error + func (k Keeper) SeizeDeposits(ctx sdk.Context, keeper sdk.AccAddress, deposit types.Deposit, ...) error + func (k Keeper) SetBorrow(ctx sdk.Context, borrow types.Borrow) + func (k Keeper) SetBorrowInterestFactor(ctx sdk.Context, denom string, borrowInterestFactor sdk.Dec) + func (k Keeper) SetBorrowedCoins(ctx sdk.Context, borrowedCoins sdk.Coins) + func (k Keeper) SetDeposit(ctx sdk.Context, deposit types.Deposit) + func (k Keeper) SetMoneyMarket(ctx sdk.Context, denom string, moneyMarket types.MoneyMarket) + func (k Keeper) SetParams(ctx sdk.Context, params types.Params) + func (k Keeper) SetPreviousAccrualTime(ctx sdk.Context, denom string, previousAccrualTime time.Time) + func (k Keeper) SetSuppliedCoins(ctx sdk.Context, suppliedCoins sdk.Coins) + func (k Keeper) SetSupplyInterestFactor(ctx sdk.Context, denom string, supplyInterestFactor sdk.Dec) + func (k Keeper) SetTotalReserves(ctx sdk.Context, coins sdk.Coins) + func (k Keeper) StartAuctions(ctx sdk.Context, borrower sdk.AccAddress, borrows, deposits sdk.Coins, ...) (sdk.Coins, error) + func (k Keeper) SyncBorrowInterest(ctx sdk.Context, addr sdk.AccAddress) + func (k Keeper) SyncSupplyInterest(ctx sdk.Context, addr sdk.AccAddress) + func (k Keeper) ValidateBorrow(ctx sdk.Context, borrower sdk.AccAddress, amount sdk.Coins) error + func (k Keeper) ValidateDeposit(ctx sdk.Context, coins sdk.Coins) error + func (k Keeper) ValidateRepay(ctx sdk.Context, sender, owner sdk.AccAddress, coins sdk.Coins) error + func (k Keeper) Withdraw(ctx sdk.Context, depositor sdk.AccAddress, coins sdk.Coins) error + type LiqData struct