Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type AmmHooks
- func (h AmmHooks) AfterExitPool(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, ...) error
- func (h AmmHooks) AfterJoinPool(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, ...)
- func (h AmmHooks) AfterPoolCreated(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool)
- func (h AmmHooks) AfterSwap(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, input sdk.Coins, ...) error
- type CommitmentHooks
- type Keeper
- func (k Keeper) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (k Keeper) AfterExitPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, shareInAmount math.Int, ...) error
- func (k Keeper) AfterJoinPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, enterCoins sdk.Coins, ...)
- func (k Keeper) AfterPoolCreated(ctx sdk.Context, sender sdk.AccAddress, poolId uint64)
- func (k Keeper) AfterSwap(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, input sdk.Coins, ...) error
- func (k Keeper) AmmHooks() AmmHooks
- func (k Keeper) Apr(goCtx context.Context, req *types.QueryAprRequest) (*types.QueryAprResponse, error)
- func (k Keeper) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (k Keeper) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (k Keeper) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (k Keeper) BurnEdenBFromEdenUncommitted(ctx sdk.Context, delegator string, uncommitAmt math.Int) error
- func (k Keeper) BurnEdenBFromElysUnstaking(ctx sdk.Context, delegator sdk.AccAddress)
- func (k Keeper) BurnEdenBIfElysStakingReduced(ctx sdk.Context)
- func (k Keeper) CalcAmountSubbucketsPerProgram(ctx sdk.Context, delegator string, denom string, ...) math.Int
- func (k Keeper) CalcBondedDelegationAmount(ctx sdk.Context, delegator string) math.Int
- func (k Keeper) CalcDelegationAmount(ctx sdk.Context, delegator string) math.Int
- func (k Keeper) CalcEpochCountsPerYear(ctx sdk.Context, epochIdentifier string) int64
- func (k Keeper) CalcRewardsForLPs(ctx sdk.Context, totalProxyTVL sdk.Dec, commitments ctypes.Commitments, ...) (math.Int, math.Int)
- func (k Keeper) CalcRewardsForStableStakeLPs(ctx sdk.Context, totalProxyTVL sdk.Dec, commitments ctypes.Commitments, ...) (math.Int, math.Int)
- func (k Keeper) CalcRewardsForStakersByCommitted(ctx sdk.Context, amount math.Int, edenAmountPerEpoch math.Int, ...) (math.Int, math.Int)
- func (k Keeper) CalcRewardsForStakersByElysStaked(ctx sdk.Context, delAmount math.Int, edenAmountPerDistribution math.Int, ...) (math.Int, math.Int, sdk.Dec)
- func (k Keeper) CalcTotalShareOfStaking(amount math.Int) sdk.Dec
- func (k Keeper) CalculateApr(ctx sdk.Context, query *types.QueryAprRequest) (math.Int, error)
- func (k Keeper) CalculateEdenBoostRewards(ctx sdk.Context, delAmount math.Int, commitments ctypes.Commitments, ...) (math.Int, math.Int, math.Int)
- func (k Keeper) CalculatePoolAprs(ctx sdk.Context, ids []uint64) []types.PoolApr
- func (k Keeper) CalculatePoolRatio(ctx sdk.Context, pool *ammtypes.Pool) string
- func (k Keeper) CalculatePoolShareForStableStakeLPs(ctx sdk.Context, totalProxyTVL sdk.Dec, baseCurrency string) sdk.Dec
- func (k Keeper) CalculateProxyTVL(ctx sdk.Context, baseCurrency string) sdk.Dec
- func (k Keeper) CalculateTVL(ctx sdk.Context) sdk.Dec
- func (k Keeper) CollectDEXRevenue(ctx sdk.Context) (sdk.Coins, sdk.DecCoins, sdk.DecCoins)
- func (k Keeper) CollectGasFeesToIncentiveModule(ctx sdk.Context, baseCurrency string) sdk.Coins
- func (k Keeper) CommitmentChanged(ctx sdk.Context, creator string, amount sdk.Coins)
- func (k Keeper) CommitmentHooks() CommitmentHooks
- func (k Keeper) CommunityPool(goCtx context.Context, req *types.QueryCommunityPoolRequest) (*types.QueryCommunityPoolResponse, error)
- func (k Keeper) DistributeFromFeePool(ctx sdk.Context, amount sdk.Coins, receiveAddr sdk.AccAddress) error
- func (k Keeper) EdenUncommitted(ctx sdk.Context, creator string, amount sdk.Coin)
- func (k Keeper) EndBlocker(ctx sdk.Context)
- func (k Keeper) EstimatePrice(ctx sdk.Context, tokenInDenom, baseCurrency string) math.LegacyDec
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAllElysStakeChange(ctx sdk.Context) (list []sdk.AccAddress)
- func (k Keeper) GetAllElysStaked(ctx sdk.Context) (list []types.ElysStaked)
- func (k Keeper) GetDEXRewardPortionForLPs(ctx sdk.Context) (percent sdk.Dec)
- func (k Keeper) GetDEXRewardPortionForStakers(ctx sdk.Context) (percent sdk.Dec)
- func (k Keeper) GetDailyRewardsAmountForPool(ctx sdk.Context, poolId uint64) (sdk.Dec, sdk.Coins)
- func (k Keeper) GetEdenDenomPrice(ctx sdk.Context, baseCurrency string) math.LegacyDec
- func (k Keeper) GetElysStakeChange(ctx sdk.Context, addr sdk.AccAddress) (found bool)
- func (k Keeper) GetElysStaked(ctx sdk.Context, address string) math.Int
- func (k Keeper) GetFeePool(ctx sdk.Context) (feePool types.FeePool)
- func (k Keeper) GetFeePoolCommunityCoins(ctx sdk.Context) sdk.DecCoins
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPoolInfo(ctx sdk.Context, poolId uint64) (types.PoolInfo, bool)
- func (k Keeper) GiveCommissionToValidators(ctx sdk.Context, delegator string, totalDelegationAmt math.Int, ...) (math.Int, math.Int)
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (k Keeper) InitPoolParams(ctx sdk.Context, poolId uint64) bool
- func (k Keeper) InitStableStakePoolParams(ctx sdk.Context, poolId uint64) bool
- func (k Keeper) IsLPRewardsDistributionEpoch(ctx sdk.Context) (bool, *types.IncentiveInfo)
- func (k Keeper) IsStakerRewardsDistributionEpoch(ctx sdk.Context) (bool, *types.IncentiveInfo)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PoolAprs(goCtx context.Context, req *types.QueryPoolAprsRequest) (*types.QueryPoolAprsResponse, error)
- func (k Keeper) PoolRewards(goCtx context.Context, req *types.QueryPoolRewardsRequest) (*types.QueryPoolRewardsResponse, error)
- func (k Keeper) ProcessRewardsDistribution(ctx sdk.Context)
- func (k Keeper) ProcessUpdateIncentiveParams(ctx sdk.Context) bool
- func (k Keeper) ProcessWithdrawRewards(ctx sdk.Context, delegator string, withdrawType commitmenttypes.EarnType) error
- func (k Keeper) RecordWithdrawValidatorCommission(ctx sdk.Context, delegator string, validator string) error
- func (k Keeper) RemoveElysStakeChange(ctx sdk.Context, address sdk.AccAddress)
- func (k Keeper) RemoveElysStaked(ctx sdk.Context, address string)
- func (k Keeper) SetElysStakeChange(ctx sdk.Context, addr sdk.AccAddress)
- func (k Keeper) SetElysStaked(ctx sdk.Context, elysStaked types.ElysStaked)
- func (k Keeper) SetFeePool(ctx sdk.Context, feePool types.FeePool)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPoolInfo(ctx sdk.Context, poolId uint64, poolInfo types.PoolInfo) bool
- func (k Keeper) StakingHooks() StakingHooks
- func (k Keeper) TakeDelegationSnapshot(ctx sdk.Context, addr string)
- func (k Keeper) UpdateAmmPoolAPR(ctx sdk.Context, lpIncentive types.IncentiveInfo, totalProxyTVL sdk.Dec, ...)
- func (k Keeper) UpdateCommitments(ctx sdk.Context, creator string, commitments *ctypes.Commitments, ...)
- func (k Keeper) UpdateCommitmentsSubBuckets(ctx sdk.Context, creator string, commitments *ctypes.Commitments, ...)
- func (k Keeper) UpdateLPRewardsUnclaimed(ctx sdk.Context, lpIncentive types.IncentiveInfo) error
- func (k Keeper) UpdatePoolMultipliers(ctx sdk.Context, poolMultipliers []types.PoolMultiplier) bool
- func (k Keeper) UpdateStakersRewardsUnclaimed(ctx sdk.Context, stakeIncentive types.IncentiveInfo) error
- func (k Keeper) UpdateTokensForValidator(ctx sdk.Context, validator string, newUnclaimedEdenTokens math.Int, ...)
- func (k Keeper) UpdateTotalCommitmentInfo(ctx sdk.Context, baseCurrency string)
- type StakingHooks
- func (h StakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error
- func (h StakingHooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type AmmHooks ¶
type AmmHooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for incentive keeper
func (AmmHooks) AfterExitPool ¶
func (h AmmHooks) AfterExitPool(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, shareInAmount math.Int, exitCoins sdk.Coins) error
AfterExitPool is called after ExitPool, ExitSwapShareAmountIn, and ExitSwapExternAmountOut
func (AmmHooks) AfterJoinPool ¶
func (h AmmHooks) AfterJoinPool(ctx sdk.Context, sender sdk.AccAddress, pool ammtypes.Pool, enterCoins sdk.Coins, shareOutAmount math.Int)
AfterJoinPool is called after JoinPool, JoinSwapExternAmountIn, and JoinSwapShareAmountOut
func (AmmHooks) AfterPoolCreated ¶
AfterPoolCreated is called after CreatePool
type CommitmentHooks ¶
type CommitmentHooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for incentive keeper
func (CommitmentHooks) CommitmentChanged ¶
CommitmentChanged implements CommentmentHook
func (CommitmentHooks) EdenUncommitted ¶ added in v0.12.0
EdenUncommitted implements EdenUncommitted
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, ck types.CommitmentKeeper, sk types.StakingKeeper, ak types.AccountKeeper, bk types.BankKeeper, amm types.AmmKeeper, ok types.OracleKeeper, ap types.AssetProfileKeeper, accountedPoolKeeper types.AccountedPoolKeeper, epochsKeeper types.EpochsKeeper, stableKeeper types.StableStakeKeeper, tokenomicsKeeper types.TokenomicsKeeper, feeCollectorName string, dexRevCollectorName string, authority string, ) *Keeper
func (Keeper) AfterDelegationModified ¶
func (k Keeper) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Updating commitments on delegation changes
func (Keeper) AfterExitPool ¶
func (k Keeper) AfterExitPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, shareInAmount math.Int, exitCoins sdk.Coins) error
AfterExitPool is called after ExitPool, ExitSwapShareAmountIn, and ExitSwapExternAmountOut
func (Keeper) AfterJoinPool ¶
func (k Keeper) AfterJoinPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, enterCoins sdk.Coins, shareOutAmount math.Int)
AfterJoinPool is called after JoinPool, JoinSwapExternAmountIn, and JoinSwapShareAmountOut
func (Keeper) AfterPoolCreated ¶
AfterPoolCreated is called after CreatePool
func (Keeper) AfterSwap ¶
func (k Keeper) AfterSwap(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, input sdk.Coins, output sdk.Coins) error
AfterSwap is called after SwapExactAmountIn and SwapExactAmountOut
func (Keeper) Apr ¶ added in v0.27.0
func (k Keeper) Apr(goCtx context.Context, req *types.QueryAprRequest) (*types.QueryAprResponse, error)
func (Keeper) BeforeDelegationCreated ¶
func (k Keeper) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Creating a commitment object for a delegator if one does not exist:
func (Keeper) BeforeDelegationRemoved ¶
func (k Keeper) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Keeper) BeforeDelegationSharesModified ¶
func (k Keeper) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (Keeper) BurnEdenBFromEdenUncommitted ¶ added in v0.12.0
func (k Keeper) BurnEdenBFromEdenUncommitted(ctx sdk.Context, delegator string, uncommitAmt math.Int) error
Burn EdenBoost from Eden unclaimed
func (Keeper) BurnEdenBFromElysUnstaking ¶ added in v0.12.0
func (k Keeper) BurnEdenBFromElysUnstaking(ctx sdk.Context, delegator sdk.AccAddress)
Burn EdenBoost from Elys unstaked
func (Keeper) BurnEdenBIfElysStakingReduced ¶ added in v0.29.14
func (Keeper) CalcAmountSubbucketsPerProgram ¶ added in v0.17.0
func (k Keeper) CalcAmountSubbucketsPerProgram(ctx sdk.Context, delegator string, denom string, withdrawType commitmenttypes.EarnType, commitments commitmenttypes.Commitments) math.Int
Deduct rewards per program per denom
func (Keeper) CalcBondedDelegationAmount ¶ added in v0.29.20
Calculate delegation to bonded validators
func (Keeper) CalcDelegationAmount ¶ added in v0.29.20
Calculate the delegated amount
func (Keeper) CalcEpochCountsPerYear ¶ added in v0.29.20
Calculate epoch counts per year to be used in APR calculation
func (Keeper) CalcRewardsForLPs ¶ added in v0.29.20
func (k Keeper) CalcRewardsForLPs(ctx sdk.Context, totalProxyTVL sdk.Dec, commitments ctypes.Commitments, edenAmountForLpPerDistribution math.Int, gasFeesForLPsPerDistribution sdk.Dec) (math.Int, math.Int)
Calculate new Eden token amounts based on LpElys committed and MElys committed
func (Keeper) CalcRewardsForStableStakeLPs ¶ added in v0.29.20
func (k Keeper) CalcRewardsForStableStakeLPs(ctx sdk.Context, totalProxyTVL sdk.Dec, commitments ctypes.Commitments, edenAmountPerEpochLp math.Int, gasFeesForLPs sdk.Dec, baseCurrency string) (math.Int, math.Int)
Calculate new Eden token amounts based on LpElys committed and MElys committed
func (Keeper) CalcRewardsForStakersByCommitted ¶ added in v0.29.20
func (k Keeper) CalcRewardsForStakersByCommitted(ctx sdk.Context, amount math.Int, edenAmountPerEpoch math.Int, dexRevenueAmtForStakers sdk.Dec) (math.Int, math.Int)
Calculate new Eden token amounts based on the given conditions and user's current unclaimed token balance
func (Keeper) CalcRewardsForStakersByElysStaked ¶ added in v0.29.20
func (k Keeper) CalcRewardsForStakersByElysStaked(ctx sdk.Context, delAmount math.Int, edenAmountPerDistribution math.Int, dexRevenueAmtForStakersPerDistribution sdk.Dec) (math.Int, math.Int, sdk.Dec)
Calculate new Eden token amounts based on the given conditions and user's current unclaimed token balance
func (Keeper) CalcTotalShareOfStaking ¶ added in v0.29.20
Calculate total share of staking
func (Keeper) CalculateApr ¶ added in v0.17.0
func (Keeper) CalculateEdenBoostRewards ¶
func (k Keeper) CalculateEdenBoostRewards( ctx sdk.Context, delAmount math.Int, commitments ctypes.Commitments, incentiveInfo types.IncentiveInfo, edenBoostAPR sdk.Dec, ) (math.Int, math.Int, math.Int)
Calculate new Eden-Boost token amounts based on the given conditions and user's current unclaimed token balance
func (Keeper) CalculatePoolAprs ¶ added in v0.29.22
func (Keeper) CalculatePoolRatio ¶ added in v0.20.0
Calculate the amm pool ratio
func (Keeper) CalculatePoolShareForStableStakeLPs ¶ added in v0.17.0
func (k Keeper) CalculatePoolShareForStableStakeLPs(ctx sdk.Context, totalProxyTVL sdk.Dec, baseCurrency string) sdk.Dec
Calculate pool share for stable stake pool
func (Keeper) CalculateProxyTVL ¶
Calculate Proxy TVL
func (Keeper) CalculateTVL ¶
Caculate total TVL
func (Keeper) CollectDEXRevenue ¶
Collect all DEX revenues to DEX revenue wallet, while tracking the 65% of it for LPs reward distribution transfer collected fees from different wallets(liquidity pool, perpetual module etc) to the distribution module account Assume this is already in USDC. TODO: + Collect revenue from perpetual, lend module
func (Keeper) CollectGasFeesToIncentiveModule ¶
Move gas fees collected to dex revenue wallet Convert it into USDC
func (Keeper) CommitmentChanged ¶
Process commitmentChanged hook
func (Keeper) CommitmentHooks ¶
func (k Keeper) CommitmentHooks() CommitmentHooks
Return the wrapper struct
func (Keeper) CommunityPool ¶
func (k Keeper) CommunityPool(goCtx context.Context, req *types.QueryCommunityPoolRequest) (*types.QueryCommunityPoolResponse, error)
func (Keeper) DistributeFromFeePool ¶
func (k Keeper) DistributeFromFeePool(ctx sdk.Context, amount sdk.Coins, receiveAddr sdk.AccAddress) error
DistributeFromFeePool distributes funds from the distribution module account to a receiver address while updating the community pool
func (Keeper) EdenUncommitted ¶ added in v0.12.0
Process eden uncommitted hook
func (Keeper) EndBlocker ¶ added in v0.12.0
EndBlocker of incentive module
func (Keeper) EstimatePrice ¶ added in v0.17.0
Estimate the price : eg, 1 Eden -> x usdc
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the module's exported genesis
func (Keeper) GetAllElysStakeChange ¶ added in v0.29.14
func (k Keeper) GetAllElysStakeChange(ctx sdk.Context) (list []sdk.AccAddress)
func (Keeper) GetAllElysStaked ¶ added in v0.12.0
func (k Keeper) GetAllElysStaked(ctx sdk.Context) (list []types.ElysStaked)
GetAllElysStaked returns all elysStaked
func (Keeper) GetDEXRewardPortionForLPs ¶
GetDEXRewardPortionForLPs returns the dex revenue percent for Lps
func (Keeper) GetDEXRewardPortionForStakers ¶ added in v0.20.0
GetDEXRewardPortionForStakers returns the dex revenue percent for Stakers
func (Keeper) GetDailyRewardsAmountForPool ¶ added in v0.29.27
Get total dex rewards amount from the specified pool
func (Keeper) GetEdenDenomPrice ¶ added in v0.29.23
func (Keeper) GetElysStakeChange ¶ added in v0.29.14
func (Keeper) GetElysStaked ¶ added in v0.12.0
GetElysStaked returns a elysStaked from its index
func (Keeper) GetFeePool ¶
get the global fee pool distribution info
func (Keeper) GetFeePoolCommunityCoins ¶
get the community coins
func (Keeper) GetPoolInfo ¶
GetPoolInfo
func (Keeper) GiveCommissionToValidators ¶
func (k Keeper) GiveCommissionToValidators(ctx sdk.Context, delegator string, totalDelegationAmt math.Int, newUnclaimedAmt math.Int, dexRewards sdk.Dec, baseCurrency string) (math.Int, math.Int)
Give commissions to validators
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
InitGenesis initializes the module's state from a provided genesis state.
func (Keeper) InitPoolParams ¶ added in v0.20.0
InitPoolParams: creates a poolInfo at the time of pool creation.
func (Keeper) InitStableStakePoolParams ¶ added in v0.20.0
InitStableStakePoolMultiplier: create a stable stake pool information responding to the pool creation.
func (Keeper) IsLPRewardsDistributionEpoch ¶ added in v0.17.0
func (Keeper) IsStakerRewardsDistributionEpoch ¶ added in v0.17.0
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) PoolAprs ¶ added in v0.29.22
func (k Keeper) PoolAprs(goCtx context.Context, req *types.QueryPoolAprsRequest) (*types.QueryPoolAprsResponse, error)
func (Keeper) PoolRewards ¶ added in v0.29.27
func (k Keeper) PoolRewards(goCtx context.Context, req *types.QueryPoolRewardsRequest) (*types.QueryPoolRewardsResponse, error)
func (Keeper) ProcessRewardsDistribution ¶ added in v0.17.0
Rewards distribution
func (Keeper) ProcessUpdateIncentiveParams ¶ added in v0.18.0
func (Keeper) ProcessWithdrawRewards ¶
func (k Keeper) ProcessWithdrawRewards(ctx sdk.Context, delegator string, withdrawType commitmenttypes.EarnType) error
withdraw rewards Eden, EdenBoost and Elys to USDC
func (Keeper) RecordWithdrawValidatorCommission ¶ added in v0.15.0
func (k Keeper) RecordWithdrawValidatorCommission(ctx sdk.Context, delegator string, validator string) error
Update commitments for validator commission Eden, EdenBoost and USDC
func (Keeper) RemoveElysStakeChange ¶ added in v0.29.14
func (k Keeper) RemoveElysStakeChange(ctx sdk.Context, address sdk.AccAddress)
func (Keeper) RemoveElysStaked ¶ added in v0.12.0
RemoveElysStaked removes a elysStaked from the store
func (Keeper) SetElysStakeChange ¶ added in v0.29.14
func (k Keeper) SetElysStakeChange(ctx sdk.Context, addr sdk.AccAddress)
func (Keeper) SetElysStaked ¶ added in v0.12.0
func (k Keeper) SetElysStaked(ctx sdk.Context, elysStaked types.ElysStaked)
SetElysStaked set a specific elysStaked in the store from its index
func (Keeper) SetFeePool ¶
set the global fee pool distribution info
func (Keeper) SetPoolInfo ¶ added in v0.20.0
SetPoolInfo
func (Keeper) TakeDelegationSnapshot ¶ added in v0.29.14
func (Keeper) UpdateAmmPoolAPR ¶ added in v0.20.0
func (k Keeper) UpdateAmmPoolAPR(ctx sdk.Context, lpIncentive types.IncentiveInfo, totalProxyTVL sdk.Dec, edenDenomPrice sdk.Dec)
Update APR for AMM pool
func (Keeper) UpdateCommitments ¶
func (k Keeper) UpdateCommitments( ctx sdk.Context, creator string, commitments *ctypes.Commitments, newUnclaimedEdenTokens math.Int, newUnclaimedEdenBTokens math.Int, dexRewards math.Int, baseCurrency string, )
Update commitment record
func (Keeper) UpdateCommitmentsSubBuckets ¶ added in v0.15.0
func (k Keeper) UpdateCommitmentsSubBuckets(ctx sdk.Context, creator string, commitments *ctypes.Commitments, rewardsByElysStaking sdk.Coins, rewardsByEdenCommitted sdk.Coins, rewardsByEdenBCommitted sdk.Coins, rewardsByUSDCDeposit sdk.Coins)
Update sub bucket commitment record
func (Keeper) UpdateLPRewardsUnclaimed ¶ added in v0.17.0
Update unclaimed token amount Called back through epoch hook
func (Keeper) UpdatePoolMultipliers ¶
UpdatePoolMultipliers updates pool multipliers through gov proposal
func (Keeper) UpdateStakersRewardsUnclaimed ¶ added in v0.17.0
func (k Keeper) UpdateStakersRewardsUnclaimed(ctx sdk.Context, stakeIncentive types.IncentiveInfo) error
Update unclaimed token amount Called back through epoch hook
type StakingHooks ¶
type StakingHooks struct {
// contains filtered or unexported fields
}
StakingHooks wrapper struct for slashing keeper
func (StakingHooks) AfterDelegationModified ¶
func (h StakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
func (StakingHooks) AfterUnbondingInitiated ¶
func (h StakingHooks) AfterUnbondingInitiated(ctx sdk.Context, id uint64) error
staking StakingHooks Must be called when a validator is created
func (StakingHooks) AfterValidatorBeginUnbonding ¶
func (h StakingHooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
Must be called when a validator begins unbonding
func (StakingHooks) AfterValidatorBonded ¶
func (h StakingHooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
Must be called when a validator is bonded
func (StakingHooks) AfterValidatorCreated ¶
func (h StakingHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error
staking StakingHooks Must be called when a validator is created
func (StakingHooks) AfterValidatorRemoved ¶
func (h StakingHooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error
Must be called when a validator is deleted
func (StakingHooks) BeforeDelegationCreated ¶
func (h StakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Must be called when a delegation is created
func (StakingHooks) BeforeDelegationRemoved ¶
func (h StakingHooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Must be called when a delegation is removed
func (StakingHooks) BeforeDelegationSharesModified ¶
func (h StakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
Must be called when a delegation's shares are modified
func (StakingHooks) BeforeValidatorModified ¶
func (h StakingHooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error
Must be called when a validator's state changes
func (StakingHooks) BeforeValidatorSlashed ¶
func (h StakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error
Source Files ¶
- abci.go
- alias_functions.go
- apr.go
- elys_stake_change.go
- elys_staked.go
- estimate_price.go
- fee_pool.go
- genesis.go
- hooks_amm.go
- hooks_commitment.go
- hooks_staking.go
- keeper.go
- keeper_burn_edenB.go
- keeper_fees.go
- keeper_lps.go
- keeper_shares.go
- keeper_stable_stake_lps.go
- keeper_stakers.go
- keeper_withdraw.go
- msg_server.go
- msg_server_update_incentive_params.go
- msg_server_update_pool_multipliers.go
- params.go
- pool_apr.go
- queries.go
- store.go