v0_15

package
v0.17.0-alpha.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type AccumulationTime

type AccumulationTime struct {
	CollateralType           string    `json:"collateral_type" yaml:"collateral_type"`
	PreviousAccumulationTime time.Time `json:"previous_accumulation_time" yaml:"previous_accumulation_time"`
}

AccumulationTime stores the previous reward distribution time and its corresponding collateral type

type AccumulationTimes

type AccumulationTimes []AccumulationTime

AccumulationTimes slice of GenesisAccumulationTime

type BaseClaim

type BaseClaim struct {
	Owner  sdk.AccAddress `json:"owner" yaml:"owner"`
	Reward sdk.Coin       `json:"reward" yaml:"reward"`
}

BaseClaim is a common type shared by all Claims

type BaseMultiClaim

type BaseMultiClaim struct {
	Owner  sdk.AccAddress `json:"owner" yaml:"owner"`
	Reward sdk.Coins      `json:"reward" yaml:"reward"`
}

BaseMultiClaim is a common type shared by all Claims with multiple reward denoms

type DelegatorClaim

type DelegatorClaim struct {
	BaseMultiClaim `json:"base_claim" yaml:"base_claim"`
	RewardIndexes  MultiRewardIndexes `json:"reward_indexes" yaml:"reward_indexes"`
}

DelegatorClaim stores delegation rewards that can be claimed by owner

type DelegatorClaims

type DelegatorClaims []DelegatorClaim

DelegatorClaim slice of DelegatorClaim

type GenesisRewardState

type GenesisRewardState struct {
	AccumulationTimes  AccumulationTimes  `json:"accumulation_times" yaml:"accumulation_times"`
	MultiRewardIndexes MultiRewardIndexes `json:"multi_reward_indexes" yaml:"multi_reward_indexes"`
}

GenesisRewardState groups together the global state for a particular reward so it can be exported in genesis.

type GenesisState

type GenesisState struct {
	Params Params `json:"params" yaml:"params"`

	USDXRewardState       GenesisRewardState `json:"usdx_reward_state" yaml:"usdx_reward_state"`
	HardSupplyRewardState GenesisRewardState `json:"hard_supply_reward_state" yaml:"hard_supply_reward_state"`
	HardBorrowRewardState GenesisRewardState `json:"hard_borrow_reward_state" yaml:"hard_borrow_reward_state"`
	DelegatorRewardState  GenesisRewardState `json:"delegator_reward_state" yaml:"delegator_reward_state"`
	SwapRewardState       GenesisRewardState `json:"swap_reward_state" yaml:"swap_reward_state"`

	USDXMintingClaims           USDXMintingClaims           `json:"usdx_minting_claims" yaml:"usdx_minting_claims"`
	HardLiquidityProviderClaims HardLiquidityProviderClaims `json:"hard_liquidity_provider_claims" yaml:"hard_liquidity_provider_claims"`
	DelegatorClaims             DelegatorClaims             `json:"delegator_claims" yaml:"delegator_claims"`
	SwapClaims                  SwapClaims                  `json:"swap_claims" yaml:"swap_claims"`
}

GenesisState is the state that must be provided at genesis.

type HardLiquidityProviderClaim

type HardLiquidityProviderClaim struct {
	BaseMultiClaim      `json:"base_claim" yaml:"base_claim"`
	SupplyRewardIndexes MultiRewardIndexes `json:"supply_reward_indexes" yaml:"supply_reward_indexes"`
	BorrowRewardIndexes MultiRewardIndexes `json:"borrow_reward_indexes" yaml:"borrow_reward_indexes"`
}

HardLiquidityProviderClaim stores the hard liquidity provider rewards that can be claimed by owner

type HardLiquidityProviderClaims

type HardLiquidityProviderClaims []HardLiquidityProviderClaim

HardLiquidityProviderClaims slice of HardLiquidityProviderClaim

type MultiRewardIndex

type MultiRewardIndex struct {
	CollateralType string        `json:"collateral_type" yaml:"collateral_type"`
	RewardIndexes  RewardIndexes `json:"reward_indexes" yaml:"reward_indexes"`
}

MultiRewardIndex stores reward accumulation information on multiple reward types

type MultiRewardIndexes

type MultiRewardIndexes []MultiRewardIndex

MultiRewardIndexes slice of MultiRewardIndex

type MultiRewardPeriod

type MultiRewardPeriod struct {
	Active           bool      `json:"active" yaml:"active"`
	CollateralType   string    `json:"collateral_type" yaml:"collateral_type"`
	Start            time.Time `json:"start" yaml:"start"`
	End              time.Time `json:"end" yaml:"end"`
	RewardsPerSecond sdk.Coins `json:"rewards_per_second" yaml:"rewards_per_second"` // per second reward payouts
}

MultiRewardPeriod supports multiple reward types

type MultiRewardPeriods

type MultiRewardPeriods []MultiRewardPeriod

MultiRewardPeriods array of MultiRewardPeriod

type Multiplier

type Multiplier struct {
	Name         MultiplierName `json:"name" yaml:"name"`
	MonthsLockup int64          `json:"months_lockup" yaml:"months_lockup"`
	Factor       sdk.Dec        `json:"factor" yaml:"factor"`
}

Multiplier amount the claim rewards get increased by, along with how long the claim rewards are locked

type MultiplierName

type MultiplierName string

MultiplierName is the user facing ID for a multiplier. There is a restricted set of possible values.

const (
	Small  MultiplierName = "small"
	Medium MultiplierName = "medium"
	Large  MultiplierName = "large"
)

Available reward multipliers names

type Multipliers

type Multipliers []Multiplier

Multipliers is a slice of Multiplier

type MultipliersPerDenom

type MultipliersPerDenom []struct {
	Denom       string      `json:"denom" yaml:"denom"`
	Multipliers Multipliers `json:"multipliers" yaml:"multipliers"`
}

MultipliersPerDenom is a map of denoms to a set of multipliers

type Params

type Params struct {
	USDXMintingRewardPeriods RewardPeriods       `json:"usdx_minting_reward_periods" yaml:"usdx_minting_reward_periods"`
	HardSupplyRewardPeriods  MultiRewardPeriods  `json:"hard_supply_reward_periods" yaml:"hard_supply_reward_periods"`
	HardBorrowRewardPeriods  MultiRewardPeriods  `json:"hard_borrow_reward_periods" yaml:"hard_borrow_reward_periods"`
	DelegatorRewardPeriods   MultiRewardPeriods  `json:"delegator_reward_periods" yaml:"delegator_reward_periods"`
	SwapRewardPeriods        MultiRewardPeriods  `json:"swap_reward_periods" yaml:"swap_reward_periods"`
	ClaimMultipliers         MultipliersPerDenom `json:"claim_multipliers" yaml:"claim_multipliers"`
	ClaimEnd                 time.Time           `json:"claim_end" yaml:"claim_end"`
}

Params governance parameters for the incentive module

type RewardIndex

type RewardIndex struct {
	CollateralType string  `json:"collateral_type" yaml:"collateral_type"`
	RewardFactor   sdk.Dec `json:"reward_factor" yaml:"reward_factor"`
}

RewardIndex stores reward accumulation information

type RewardIndexes

type RewardIndexes []RewardIndex

RewardIndexes slice of RewardIndex

type RewardPeriod

type RewardPeriod struct {
	Active           bool      `json:"active" yaml:"active"`
	CollateralType   string    `json:"collateral_type" yaml:"collateral_type"`
	Start            time.Time `json:"start" yaml:"start"`
	End              time.Time `json:"end" yaml:"end"`
	RewardsPerSecond sdk.Coin  `json:"rewards_per_second" yaml:"rewards_per_second"` // per second reward payouts
}

RewardPeriod stores the state of an ongoing reward

type RewardPeriods

type RewardPeriods []RewardPeriod

RewardPeriods array of RewardPeriod

type SwapClaim

type SwapClaim struct {
	BaseMultiClaim `json:"base_claim" yaml:"base_claim"`
	RewardIndexes  MultiRewardIndexes `json:"reward_indexes" yaml:"reward_indexes"`
}

SwapClaim stores the swap rewards that can be claimed by owner

type SwapClaims

type SwapClaims []SwapClaim

SwapClaims slice of SwapClaim

type USDXMintingClaim

type USDXMintingClaim struct {
	BaseClaim     `json:"base_claim" yaml:"base_claim"`
	RewardIndexes RewardIndexes `json:"reward_indexes" yaml:"reward_indexes"`
}

USDXMintingClaim is for USDX minting rewards

type USDXMintingClaims

type USDXMintingClaims []USDXMintingClaim

USDXMintingClaims slice of USDXMintingClaim

Jump to

Keyboard shortcuts

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