v0_15

package
v0.0.3-testing.msge Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName name that will be used throughout the module
	ModuleName = "hard"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Borrow

type Borrow struct {
	Borrower sdk.AccAddress        `json:"borrower" yaml:"borrower"`
	Amount   sdk.Coins             `json:"amount" yaml:"amount"`
	Index    BorrowInterestFactors `json:"index" yaml:"index"`
}

Borrow defines an amount of coins borrowed from a hard module account

type BorrowInterestFactor

type BorrowInterestFactor struct {
	Denom string  `json:"denom" yaml:"denom"`
	Value sdk.Dec `json:"value" yaml:"value"`
}

BorrowInterestFactor defines an individual borrow interest factor

type BorrowInterestFactors

type BorrowInterestFactors []BorrowInterestFactor

BorrowInterestFactors is a slice of BorrowInterestFactor, because Amino won't marshal maps

type BorrowLimit

type BorrowLimit struct {
	HasMaxLimit  bool    `json:"has_max_limit" yaml:"has_max_limit"`
	MaximumLimit sdk.Dec `json:"maximum_limit" yaml:"maximum_limit"`
	LoanToValue  sdk.Dec `json:"loan_to_value" yaml:"loan_to_value"`
}

BorrowLimit enforces restrictions on a money market

type Borrows

type Borrows []Borrow

Borrows is a slice of Borrow

type Deposit

type Deposit struct {
	Depositor sdk.AccAddress        `json:"depositor" yaml:"depositor"`
	Amount    sdk.Coins             `json:"amount" yaml:"amount"`
	Index     SupplyInterestFactors `json:"index" yaml:"index"`
}

Deposit defines an amount of coins deposited into a hard module account

type Deposits

type Deposits []Deposit

Deposits is a slice of Deposit

type GenesisAccumulationTime

type GenesisAccumulationTime struct {
	CollateralType           string    `json:"collateral_type" yaml:"collateral_type"`
	PreviousAccumulationTime time.Time `json:"previous_accumulation_time" yaml:"previous_accumulation_time"`
	SupplyInterestFactor     sdk.Dec   `json:"supply_interest_factor" yaml:"supply_interest_factor"`
	BorrowInterestFactor     sdk.Dec   `json:"borrow_interest_factor" yaml:"borrow_interest_factor"`
}

GenesisAccumulationTime stores the previous distribution time and its corresponding denom

type GenesisAccumulationTimes

type GenesisAccumulationTimes []GenesisAccumulationTime

GenesisAccumulationTimes slice of GenesisAccumulationTime

type GenesisState

type GenesisState struct {
	Params                    Params                   `json:"params" yaml:"params"`
	PreviousAccumulationTimes GenesisAccumulationTimes `json:"previous_accumulation_times" yaml:"previous_accumulation_times"`
	Deposits                  Deposits                 `json:"deposits" yaml:"deposits"`
	Borrows                   Borrows                  `json:"borrows" yaml:"borrows"`
	TotalSupplied             sdk.Coins                `json:"total_supplied" yaml:"total_supplied"`
	TotalBorrowed             sdk.Coins                `json:"total_borrowed" yaml:"total_borrowed"`
	TotalReserves             sdk.Coins                `json:"total_reserves" yaml:"total_reserves"`
}

GenesisState is the state that must be provided at genesis.

type InterestRateModel

type InterestRateModel struct {
	BaseRateAPY    sdk.Dec `json:"base_rate_apy" yaml:"base_rate_apy"`
	BaseMultiplier sdk.Dec `json:"base_multiplier" yaml:"base_multiplier"`
	Kink           sdk.Dec `json:"kink" yaml:"kink"`
	JumpMultiplier sdk.Dec `json:"jump_multiplier" yaml:"jump_multiplier"`
}

InterestRateModel contains information about an asset's interest rate

type MoneyMarket

type MoneyMarket struct {
	Denom                  string            `json:"denom" yaml:"denom"`
	BorrowLimit            BorrowLimit       `json:"borrow_limit" yaml:"borrow_limit"`
	SpotMarketID           string            `json:"spot_market_id" yaml:"spot_market_id"`
	ConversionFactor       sdk.Int           `json:"conversion_factor" yaml:"conversion_factor"`
	InterestRateModel      InterestRateModel `json:"interest_rate_model" yaml:"interest_rate_model"`
	ReserveFactor          sdk.Dec           `json:"reserve_factor" yaml:"reserve_factor"`
	KeeperRewardPercentage sdk.Dec           `json:"keeper_reward_percentage" yaml:"keeper_reward_percentages"`
}

MoneyMarket is a money market for an individual asset

type MoneyMarkets

type MoneyMarkets []MoneyMarket

MoneyMarkets slice of MoneyMarket

type Params

type Params struct {
	MoneyMarkets          MoneyMarkets `json:"money_markets" yaml:"money_markets"`
	MinimumBorrowUSDValue sdk.Dec      `json:"minimum_borrow_usd_value" yaml:"minimum_borrow_usd_value"`
}

Params governance parameters for hard module

type SupplyInterestFactor

type SupplyInterestFactor struct {
	Denom string  `json:"denom" yaml:"denom"`
	Value sdk.Dec `json:"value" yaml:"value"`
}

SupplyInterestFactor defines an individual borrow interest factor

type SupplyInterestFactors

type SupplyInterestFactors []SupplyInterestFactor

SupplyInterestFactors is a slice of SupplyInterestFactor, because Amino won't marshal maps

Jump to

Keyboard shortcuts

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