package
6.6.0
Repository: https://github.com/umee-network/umee.git
Documentation: pkg.go.dev

# Functions

AddressFromKey extracts address from a key with the form prefix | lengthPrefixed(addr) | ...
DefaultGenesis returns the default genesis state of the x/leverage module.
DefaultParams returns a default set of parameters.
No description provided by the author
DenomFromKey extracts denom from a key with the form prefix | denom | 0x00.
DenomFromKeyWithAddress extracts denom from a key with the form prefix | lengthPrefixed(addr) | denom | 0x00.
GetGenesisStateFromAppState returns x/leverage GenesisState given raw application genesis state.
KeyAdjustedBorrow returns a KVStore key for getting and setting an adjusted borrow for a denom and borrower address.
KeyAdjustedBorrowNoDenom returns the common prefix used by all borrows associated with a given borrower address.
KeyAdjustedTotalBorrow returns a KVStore key for getting and setting the total adjusted borrows for a given token.
KeyBadDebt returns a KVStore key for tracking an address with unpaid bad debt.
KeyCollateralAmount returns a KVStore key for getting and setting the amount of collateral stored for a user in a given denom.
KeyCollateralAmountNoDenom returns the common prefix used by all collateral associated with a given address.
KeyInterestScalar returns a KVStore key for getting and setting the interest scalar for a given token.
KeyRegisteredToken returns a KVStore key for getting and setting a Token.
KeyReserveAmount returns a KVStore key for getting and setting the amount reserved of a a given token.
KeySpecialAssetPair returns a KVStore key for getting and setting a SpecialAssetPair.
KeySpecialAssetPairOneDenom returns the shared prefix for all special asset pairs affecting a single denom.
KeyUTokenSupply returns a KVStore key for getting and setting a utoken's total supply.
NewAccountPosition creates an account position based on a user's borrowed and collateral values of each token, and additional information including token settings and special asset pairs.
NewAdjustedBorrow creates the Borrow struct used in GenesisState.
NewBadDebt creates the BadDebt struct used in GenesisState.
NewCollateral creates the Collateral struct used in GenesisState.
NewGenesisState creates a new GenesisState object.
NewInterestScalar creates the InterestScalar struct used in GenesisState.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewMsgGovSetParams will create a new MsgGovSetParams instance.
NewMsgGovUpdateRegistry will create a new MsgUpdateRegistry instance.
NewMsgGovUpdateSpecialAssets will create a new MsgGovUpdateSpecialAssets instance.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RegisterLegacyAminoCodec registers the necessary x/leverage interfaces and concrete types on the provided LegacyAmino codec.
No description provided by the author
RegisterQueryHandler registers the http handlers for service Query to "mux".
RegisterQueryHandlerClient registers the http handlers for service Query to "mux".
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
No description provided by the author
ValidateBaseDenom validates a denom and ensures it is not a uToken.

# Constants

No description provided by the author
ModuleName defines the module name.
High mode uses the higher of either Spot or Historic prices.
Historic mode requests the median of the most recent historic medians.
Low mode uses the lower of either Spot or Historic prices.
Query mode requests the most recent price, regardless of price age.
QueryHigh mode uses the higher of either Spot or Historic prices, allowing expired spot prices.
QueryLow mode uses the lower of either Spot or Historic prices, allowing expired spot prices.
Spot mode requests the most recent prices from oracle, unless they are too old.
No description provided by the author
StoreKey defines the primary module store key.

# Variables

4XX = Price Sensitive.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
1XX = General Validation.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
3XX = User Positions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
6XX = Internal Failsafes.
5XX = Market Conditions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
7XX = Disabled Functionality.
2XX = Token Registry.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
KVStore key prefixes.
KVStore key prefixes.
KVStore key prefixes.
KVStore key prefixes.
KVStore key prefixes.
KVStore key prefixes.
KVStore key prefixes.
KVStore key prefixes.
KVStore key prefixes.
KVStore key prefixes.
KVStore key prefixes.
ModuleCdc references the global x/leverage module codec.

# Structs

AccountPosition must be created by NewAccountPosition for proper initialization.
AccountSummary is holds account_summary with address.
AdjustedBorrow is a borrow struct used in the leverage module's genesis state.
BadDebt is a bad debt instance used in the leverage module's genesis state.
Collateral is a collateral struct used in the leverage module's genesis state.
DecBalances contains an account's position denoted in symbol denom tokens.
EventBorrow is emitted on Msg/Borrow.
EventCollaterize is emitted on Msg/Collaterize.
EventDecollaterize is emitted on Msg/Decollateralize.
EventFundOracle is emitted when sending rewards to oracle module.
EventInterestAccrual is emitted when interest accrues in EndBlock.
EventLiquidate is emitted on Msg/Liquidate.
EventRepay is emitted on Msg/Repay.
EventRepayBadDebt is emitted when bad debt is detected and repayed (potentially partially).
EventReservesExhausted is emitted when the module reserves are exhausted by paying off bad debts.
EventSupply is emitted on Msg/Supply.
EventWithdraw is emitted on Msg/Withdraw.
GenesisState defines the x/leverage module's genesis state.
InspectAccount contains risk and balance info for a single account for the inspector query.
InterestScalar is an interest scalar used in the leverage module's genesis state.
MsgBorrow represents a user's request to borrow a base asset type from the module.
MsgBorrowResponse defines the Msg/Borrow response type.
MsgCollateralize represents a user's request to enable selected uTokens as collateral.
MsgCollateralizeResponse defines the Msg/Collateralize response type.
MsgDecollateralize represents a user's request to disable selected uTokens as collateral.
MsgDecollateralizeResponse defines the Msg/Decollateralize response type.
MsgGovSetParams is used by governance to update module parameters.
MsgGovSetParamsResponse defines the Msg/SetParams response type.
MsgGovUpdateRegistry defines the Msg/GovUpdateRegistry request type.
MsgGovUpdateRegistryResponse defines the Msg/GovUpdateRegistry response type.
MsgGovUpdateSpecialAssets defines the Msg/GovUpdateSpecialAssets request type.
MsgGovUpdateSpecialAssetsResponse defines the Msg/GovUpdateSpecialAssets response type.
MsgLeveragedLiquidate is the request structure for the LeveragedLiquidate RPC.
MsgLeveragedLiquidateResponse defines the Msg/LeveragedLiquidate response type.
MsgLiquidate is the request structure for the Liquidate RPC.
MsgLiquidateResponse defines the Msg/Liquidate response type.
MsgMaxBorrow represents a user's request to borrow a base asset type from the module, using the maximum available amount.
MsgMaxBorrowResponse defines the Msg/MaxBorrow response type.
MsgMaxWithdraw represents a user's request to withdraw the maximum valid amount of supplied assets.
MsgMaxWithdrawResponse defines the Msg/MaxWithdraw response type.
MsgRepay represents a user's request to repay a borrowed base asset type to the module.
MsgRepayResponse defines the Msg/Repay response type.
MsgSupply represents a user's request to supply assets to the module.
MsgSupplyCollateral represents a user's request to supply and collateralize assets to the module.
MsgSupplyCollateralResponse defines the Msg/SupplyCollateral response type.
MsgSupplyResponse defines the Msg/Supply response type.
MsgWithdraw represents a user's request to withdraw supplied assets.
MsgWithdrawResponse defines the Msg/Withdraw response type.
Params defines the parameters for the leverage module.
PositionBalance contains denom, amount with base_denom, base_amount for account position.
QueryAccountBalances defines the request structure for the AccountBalances gRPC service handler.
QueryAccountBalancesResponse defines the response structure for the AccountBalances gRPC service handler.
QueryAccountSummaries defines the request structure for the AccountSummaries gRPC service handler.
QueryAccountSummariesResponse defines the response structure for the AccountSummaries gRPC service handler.
QueryAccountSummary defines the request structure for the AccountSummary gRPC service handler.
QueryAccountSummaryResponse defines the response structure for the AccountSummary gRPC service handler.
QueryBadDebts defines the request structure for the BedDebts gRPC service handler.
QueryBadDebtsResponse defines the response structure for the BedDebts gRPC service handler.
QueryInspect defines the request structure for the Inspect gRPC service handler.
QueryInspectAccount defines the request structure for the InspectAccount gRPC service handler.
QueryInspectAccountResponse defines the response structure for the InspectAccount gRPC service handler.
QueryInspectResponse defines the response structure for the Inspect gRPC service handler.
QueryLiquidationTargets defines the request structure for the LiquidationTargets gRPC service handler.
QueryLiquidationTargetsResponse defines the response structure for the LiquidationTargets gRPC service handler.
QueryMarketSummary defines the request structure for the MarketSummary gRPC service handler.
QueryMarketSummaryResponse defines the response structure for the MarketSummary gRPC service handler.
QueryMaxBorrow defines the request structure for the MaxBorrow gRPC service handler.
QueryMaxBorrowResponse defines the response structure for the MaxBorrow gRPC service handler.
QueryMaxWithdraw defines the request structure for the MaxWithdraw gRPC service handler.
QueryMaxWithdrawResponse defines the response structure for the MaxWithdraw gRPC service handler.
QueryParams defines the request structure for the Params gRPC service handler.
QueryParamsResponse defines the response structure for the Params gRPC service handler.
QueryRegisteredTokens defines the request structure for the RegisteredTokens gRPC service handler.
QueryRegisteredTokensResponse defines the response structure for the RegisteredTokens gRPC service handler.
QueryRegisteredTokensWithMarkets defines the request structure for the RegisteredTokenMarkets gRPC service handler.
QueryRegisteredTokensWithMarketsResponse defines the response structure for the RegisteredTokensWithMarkets gRPC service handler.
QuerySpecialAssets defines the request structure for the SpecialAssets gRPC service handler.
QuerySpecialAssetsResponse defines the response structure for the SpecialAssets gRPC service handler.
RiskInfo defines a borrower's account health without requiring sdk.Dec formatting.
SpecialAssetPair defines a special (increased) CollateralWeight used when a specified Collateral is used to collateralize a specified Borrow.
SpecialAssetSet defines a special (increased) CollateralWeight used when any of a set of assets are used to borrow each other (except for looping).
Token defines a token, along with its metadata and parameters, in the Umee capital facility that can be supplied and borrowed.
TokenMarket is a token and its market summary.
UnimplementedMsgServer can be embedded to have forward compatible implementations.
UnimplementedQueryServer can be embedded to have forward compatible implementations.
WeightedSpecialPair contains borrowed and collateral value that has been matched together as part of a special asset pair in an account's position.

# Interfaces

AccountKeeper defines the expected account keeper used for leverage simulations (noalias).
BankKeeper defines the expected x/bank keeper interface.
BondHooks defines hooks leverage module can call on other modules to determine how much of a user's uToken collateral is bonded (i.e.
MsgClient is the client API for Msg service.
MsgServer is the server API for Msg service.
OracleKeeper defines the expected x/oracle keeper interface.
QueryClient is the client API for Query service.
QueryServer is the server API for Query service.
TokenHooks defines hooks other modules can execute when the leverage module adds or removes a token.

# Type aliases

Enumerates different ways to request the price of a token.
A list of WeightedSpecialPair sorted by collateral weight (descending), and denom (alphabetical) to break ties.