Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

staker state

Back to all declarations

PoolAccessor

type

Value

staker.PoolAccessor

poolAccessor

type

Value

staker.poolAccessor

newPoolAccessor

func() staker.PoolAccessor
Open
OID
0742c3…b8af:3
newPoolAccessor details

Inspect func

EmissionAccessor

type

Value

staker.EmissionAccessor

emissionAccessor

type

Value

staker.emissionAccessor

newEmissionAccessor

func() staker.EmissionAccessor
Open
OID
0742c3…b8af:5
newEmissionAccessor details

Inspect func

NFTAccessor

type

Value

staker.NFTAccessor

gnftAccessor

type

Value

staker.gnftAccessor

newNFTAccessor

func() staker.NFTAccessor
Open
OID
0742c3…b8af:6
newNFTAccessor details

Inspect func

Counter

type

Value

staker.Counter

NewCounter

func() *staker.Counter

NewCounter creates a counter initialized at zero. Returns: - counter: Counter whose next generated identifier is 1.

Open
OID
0742c3…b8af:7
NewCounter details

Inspect func

Deposit

type

Deposit returns the deposit snapshot captured when this position was unstaked. Returns: - deposit: Stored deposit state, including its owner, pool, liquidity, ticks, warmups, and collected reward fields.

Value

staker.Deposit

NewDeposit

func(owner .uverse.address, targetPoolPath string, liquidity *v1.Uint, currentTime int64, tickLower int32, tickUpper int32, warmups []staker.Warmup) *staker.Deposit

NewDeposit creates a deposit for a staked LP position and initializes its reward cursors and maps. Parameters: - owner: Address that owns the staked position. - targetPoolPath: Pool identifier associated with the position. - liquidity: LP liquidity amount represented by the position. - currentTime: Staking and initial reward-cursor time in Unix seconds. - tickLower: Lower signed tick boundary of the position's range. - tickUpper: Upper signed tick boundary of the position's range. - warmups: Warmup schedule to apply to this position's rewards. Returns: - deposit: Newly initialized deposit containing the supplied position and warmup state.

Open
OID
0742c3…b8af:9
NewDeposit details

Inspect func

Warmup

type

Value

staker.Warmup

NewWarmup

func(timeDuration int64, nextWarmupTime int64, warmupRatio uint64) staker.Warmup

NewWarmup creates one warmup tier. Parameters: - timeDuration: Duration of this tier in seconds. - nextWarmupTime: Unix timestamp at which this tier ends. - warmupRatio: Percentage of the calculated reward credited to the position, from 0 to 100. Returns: - warmup: Warmup tier initialized with the supplied duration, end time, and ratio.

Open
OID
0742c3…b8af:11
NewWarmup details

Inspect func

DefaultWarmupTemplate

func() []staker.Warmup

DefaultWarmupTemplate returns the built-in four-tier warmup schedule. Returns: - warmups: Template with 5-day, 10-day, 30-day, and final-unbounded tiers using 30%, 50%, 70%, and 100% ratios; NextWarmupTime values are zero until instantiated.

Open
OID
0742c3…b8af:12
DefaultWarmupTemplate details

Inspect func

GNS_PATH

string

Value

"gno.land/r/gnoswap/gns.GNS"

WUGNOT_PATH

string

Value

"gno.land/r/gnoland/wugnot.wugnot"

DefaultAllowedTokens

func() []string

DefaultAllowedTokens returns the token paths accepted by the staker's default configuration. Returns: - tokenPaths: Slice containing the GNS and wrapped-GNOT token paths.

Open
OID
0742c3…b8af:13
DefaultAllowedTokens details

Inspect func

GetPool

func(poolPath string) (*staker.Pool, .uverse.error)

GetPool returns a copy of the staking state for a pool. Parameters: - poolPath: pool realm path Returns: - pool: independent pool copy, or nil when an implementation has no pool value - err: implementation resolution error; the current v1 implementation returns not-found for a missing pool

Open
OID
0742c3…b8af:14
GetPool details

Inspect func

GetDeposit

func(lpTokenId uint64) (*staker.Deposit, .uverse.error)

GetDeposit returns a copy of a staked position's deposit. Parameters: - lpTokenId: staked position NFT token ID Returns: - deposit: independent deposit copy, or nil when an implementation has no deposit value - err: implementation resolution error; the current v1 implementation returns not-found for a missing deposit

Open
OID
0742c3…b8af:16
GetDeposit details

Inspect func

CollectableEmissionReward

func(positionId uint64) (int64, .uverse.error)

CollectableEmissionReward returns the claimable internal GNS reward for a live staked deposit or an exit checkpoint left by UnStakeToken. Parameters: - positionId: staked position NFT token ID or position with an exit checkpoint Returns: - amount: claimable internal reward amount - err: non-nil when positionId cannot be resolved

Open
OID
0742c3…b8af:17
CollectableEmissionReward details

Inspect func

CollectableExternalIncentiveReward

func(positionId uint64, incentiveId string) (int64, .uverse.error)

CollectableExternalIncentiveReward returns a position's claimable external reward for a live staked deposit or an exit checkpoint left by UnStakeToken. Parameters: - positionId: staked position NFT token ID or position with an exit checkpoint - incentiveId: external incentive identifier Returns: - amount: claimable external reward amount - err: non-nil when the position or incentive cannot be resolved

Open
OID
0742c3…b8af:18
CollectableExternalIncentiveReward details

Inspect func

GetCreatedHeightOfIncentive

func(poolPath string, incentiveId string) (int64, .uverse.error)

GetCreatedHeightOfIncentive returns an incentive's creation block height. Parameters: - poolPath: pool realm path - incentiveId: external incentive identifier Returns: - height: creation block height - err: non-nil when the incentive cannot be resolved

Open
OID
0742c3…b8af:19
GetCreatedHeightOfIncentive details

Inspect func

GetIncentiveCreatedTimestamp

func(poolPath string, incentiveId string) (int64, .uverse.error)

GetIncentiveCreatedTimestamp returns an incentive's creation timestamp. Parameters: - poolPath: pool realm path - incentiveId: external incentive identifier Returns: - timestamp: creation Unix timestamp - err: non-nil when the incentive cannot be resolved

Open
OID
0742c3…b8af:20
GetIncentiveCreatedTimestamp details

Inspect func

GetIncentiveTotalRewardAmount

func(poolPath string, incentiveId string) (int64, .uverse.error)

GetIncentiveTotalRewardAmount returns the total reward amount of an incentive. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - amount: Total reward amount configured when the incentive was created, in token units. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:21
GetIncentiveTotalRewardAmount details

Inspect func

GetIncentiveDistributedRewardAmount

func(poolPath string, incentiveId string) (int64, .uverse.error)

GetIncentiveDistributedRewardAmount returns the distributed reward amount of an incentive. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - amount: Reward amount already delivered to positions or refunded at incentive end, in token units. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:22
GetIncentiveDistributedRewardAmount details

Inspect func

GetIncentiveRemainingRewardAmount

func(poolPath string, incentiveId string) (int64, .uverse.error)

GetIncentiveRemainingRewardAmount returns the remaining reward amount of an incentive. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - amount: Mutable reward balance remaining after distributions and refunds, in token units. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:23
GetIncentiveRemainingRewardAmount details

Inspect func

GetIncentiveAccumulatedPenaltyAmount

func(poolPath string, incentiveId string) (int64, .uverse.error)

GetIncentiveAccumulatedPenaltyAmount returns the accumulated warmup penalty amount of an incentive. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - amount: Warmup penalty accumulated from collections for the incentive, in reward-token units. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:24
GetIncentiveAccumulatedPenaltyAmount details

Inspect func

GetIncentiveDepositGnsAmount

func(poolPath string, incentiveId string) (int64, .uverse.error)

GetIncentiveDepositGnsAmount returns the deposited GNS amount of an incentive. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - amount: GNS deposit locked by the incentive, in token units. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:25
GetIncentiveDepositGnsAmount details

Inspect func

GetIncentiveRefunded

func(poolPath string, incentiveId string) (bool, .uverse.error)

GetIncentiveRefunded returns whether an incentive has been refunded. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - refunded: True when the incentive has been finalized as refunded; false while it remains open. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:26
GetIncentiveRefunded details

Inspect func

IsIncentiveActive

func(poolPath string, incentiveId string) (bool, .uverse.error)

IsIncentiveActive reports whether an unrefunded incentive is active, including both start and end timestamps. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - active: True when the current Unix time is within the incentive window and it has not been refunded. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:27
IsIncentiveActive details

Inspect func

GetDepositExternalRewardLastCollectTimestamp

func(lpTokenId uint64, incentiveId string) (int64, .uverse.error)

GetDepositExternalRewardLastCollectTimestamp returns the last external reward collection time for a position and incentive. For a newly tracked incentive, the value is based on the stake timestamp. Parameters: - lpTokenId: Position NFT token ID whose external reward cursor should be read. - incentiveId: External incentive identifier whose collection cursor should be read. Returns: - timestamp: Unix timestamp of the last collection cursor; newly tracked incentives use the deposit's stake time. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:28
GetDepositExternalRewardLastCollectTimestamp details

Inspect func

GetDepositGnsAmount

func() int64

GetDepositGnsAmount retrieves the GNS reserve amount deposited for the staker. Returns: - int64: Stored GNS reserve amount; panics on read or type failure.

Open
OID
0742c3…b8af:29
GetDepositGnsAmount details

Inspect func

GetDepositInternalRewardLastCollectTimestamp

func(lpTokenId uint64) (int64, .uverse.error)

GetDepositInternalRewardLastCollectTimestamp returns the last internal reward collection time for a position. Parameters: - lpTokenId: Position NFT token ID whose internal reward cursor should be read. Returns: - timestamp: Unix timestamp of the deposit's last internal reward collection. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:30
GetDepositInternalRewardLastCollectTimestamp details

Inspect func

GetDepositCollectedInternalReward

func(lpTokenId uint64) (int64, .uverse.error)

GetDepositCollectedInternalReward returns the collected internal reward amount of a position. Parameters: - lpTokenId: Position NFT token ID whose collected internal reward should be read. Returns: - amount: Internal GNS reward amount already recorded as collected, in token units. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:31
GetDepositCollectedInternalReward details

Inspect func

GetDepositCollectedExternalReward

func(lpTokenId uint64, incentiveId string) (int64, .uverse.error)

GetDepositCollectedExternalReward returns the collected external reward amount of a position. Parameters: - lpTokenId: Position NFT token ID whose collected reward should be read. - incentiveId: External incentive identifier whose collected amount should be read. Returns: - amount: External reward amount already recorded as collected for the incentive, in token units. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:32
GetDepositCollectedExternalReward details

Inspect func

GetDepositLiquidity

func(lpTokenId uint64) (*v1.Uint, .uverse.error)

GetDepositLiquidity returns the liquidity amount of a staked position. Parameters: - lpTokenId: Position NFT token ID whose liquidity should be read. Returns: - liquidity: Independent uint256 copy of the deposit's liquidity amount. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:33
GetDepositLiquidity details

Inspect func

GetDepositLiquidityAsString

func(lpTokenId uint64) (string, .uverse.error)

GetDepositLiquidityAsString returns the liquidity amount of a staked position as a decimal string. Parameters: - lpTokenId: Position NFT token ID whose liquidity should be formatted. Returns: - liquidity: Decimal representation of the deposit's uint256 liquidity amount. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:34
GetDepositLiquidityAsString details

Inspect func

GetDepositOwner

func(lpTokenId uint64) (.uverse.address, .uverse.error)
Open
OID
0742c3…b8af:35
GetDepositOwner details

Inspect func

GetDepositStakeTime

func(lpTokenId uint64) (int64, .uverse.error)

GetDepositStakeTime returns the Unix timestamp at which a position was staked. Parameters: - lpTokenId: Position NFT token ID whose stake time should be read. Returns: - stakeTime: Unix timestamp recorded when the deposit entered staking. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:36
GetDepositStakeTime details

Inspect func

GetDepositTargetPoolPath

func(lpTokenId uint64) (string, .uverse.error)

GetDepositTargetPoolPath returns the pool path of a staked position. Parameters: - lpTokenId: Position NFT token ID whose target pool should be read. Returns: - poolPath: Pool path stored on the deposit. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:37
GetDepositTargetPoolPath details

Inspect func

GetDepositTickLower

func(lpTokenId uint64) (int32, .uverse.error)

GetDepositTickLower returns the lower tick of a staked position. Parameters: - lpTokenId: Position NFT token ID whose lower boundary should be read. Returns: - tickLower: Lower price-range tick stored on the deposit. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:38
GetDepositTickLower details

Inspect func

GetDepositTickUpper

func(lpTokenId uint64) (int32, .uverse.error)

GetDepositTickUpper returns the upper tick of a staked position. Parameters: - lpTokenId: Position NFT token ID whose upper boundary should be read. Returns: - tickUpper: Upper price-range tick stored on the deposit. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:39
GetDepositTickUpper details

Inspect func

GetDepositWarmUp

func(lpTokenId uint64) ([]staker.Warmup, .uverse.error)

GetDepositWarmUp returns the warmup records of a staked position. Parameters: - lpTokenId: Position NFT token ID whose warmup schedule should be inspected. Returns: - warmups: Independent copy of the deposit's warmup records. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:40
GetDepositWarmUp details

Inspect func

GetDepositExternalIncentiveIdList

func(lpTokenId uint64) ([]string, .uverse.error)

GetDepositExternalIncentiveIdList returns external incentive IDs tracked by a deposit. Parameters: - lpTokenId: Position NFT token ID whose deposit should be inspected. Returns: - incentiveIds: Independent copy of external incentive IDs associated with the deposit. - err: Non-nil when lpTokenId does not resolve to a stored deposit.

Open
OID
0742c3…b8af:41
GetDepositExternalIncentiveIdList details

Inspect func

GetExternalIncentiveByPoolPath

func(poolPath string) ([]staker.ExternalIncentive, .uverse.error)

GetExternalIncentiveByPoolPath returns all external incentives for a pool. Parameters: - poolPath: Pool path whose external incentives should be listed. Returns: - incentives: Independent copies of incentives targeting poolPath. - err: Non-nil when stored incentive data cannot be read or cast.

Open
OID
0742c3…b8af:42
GetExternalIncentiveByPoolPath details

Inspect func

GetIncentiveEndTimestamp

func(poolPath string, incentiveId string) (int64, .uverse.error)

GetIncentiveEndTimestamp returns the end timestamp of an incentive. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - endTimestamp: Incentive end time as a Unix timestamp. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:43
GetIncentiveEndTimestamp details

Inspect func

GetIncentiveCreator

func(poolPath string, incentiveId string) (.uverse.address, .uverse.error)
Open
OID
0742c3…b8af:44
GetIncentiveCreator details

Inspect func

GetIncentiveRewardAmount

func(poolPath string, incentiveId string) (*v1.Uint, .uverse.error)

GetIncentiveRewardAmount returns the remaining reward amount of an incentive, after deliveries and refunds represented by the current incentive state. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - amount: Independent uint256 copy of the incentive's mutable remaining reward amount. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:45
GetIncentiveRewardAmount details

Inspect func

GetIncentiveRewardAmountAsString

func(poolPath string, incentiveId string) (string, .uverse.error)

GetIncentiveRewardAmountAsString returns the remaining reward amount of an incentive as string. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - amount: Decimal string for the incentive's remaining reward amount after deliveries and refunds. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:46
GetIncentiveRewardAmountAsString details

Inspect func

GetIncentiveRewardPerSecondX128

func(poolPath string, incentiveId string) (*v1.Uint, .uverse.error)

GetIncentiveRewardPerSecondX128 returns the reward rate per second of an incentive, expressed as a Q128 fixed-point number (i.e. actual rate = value / 2^128). Callers needing an integer rate can right-shift the result by 128. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - rateX128: Clone of the Q128-scaled reward rate; divide by 2^128 to recover the actual token units per second. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:47
GetIncentiveRewardPerSecondX128 details

Inspect func

GetIncentiveRewardToken

func(poolPath string, incentiveId string) (string, .uverse.error)

GetIncentiveRewardToken returns the reward token of an incentive. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - tokenPath: Reward-token path configured for the incentive. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:48
GetIncentiveRewardToken details

Inspect func

GetIncentiveStartTimestamp

func(poolPath string, incentiveId string) (int64, .uverse.error)

GetIncentiveStartTimestamp returns the start timestamp of an incentive. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - startTimestamp: Incentive start time as a Unix timestamp. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:49
GetIncentiveStartTimestamp details

Inspect func

GetMinimumRewardAmount

func() int64

GetMinimumRewardAmount retrieves the default minimum external reward amount. Returns: - int64: Stored default minimum reward amount; panics on read or type failure.

Open
OID
0742c3…b8af:50
GetMinimumRewardAmount details

Inspect func

GetMinimumRewardAmountForToken

func(tokenPath string) int64

GetMinimumRewardAmountForToken returns the minimum reward amount for a specific token. Parameters: - tokenPath: Token path whose configured minimum-reward override should be read. Returns: - amount: Token-specific minimum reward amount when configured, otherwise the default minimum, in token units.

Open
OID
0742c3…b8af:51
GetMinimumRewardAmountForToken details

Inspect func

GetPoolStakedLiquidity

func(poolPath string) (string, .uverse.error)

GetPoolStakedLiquidity returns the current total staked liquidity of a pool. Parameters: - poolPath: Pool path whose current staked liquidity should be read. Returns: - liquidity: Decimal string containing the pool's total staked liquidity at the current time. - err: Non-nil when poolPath does not resolve to a pool.

Open
OID
0742c3…b8af:52
GetPoolStakedLiquidity details

Inspect func

GetPoolsByTier

func(tier uint64) ([]string, .uverse.error)

GetPoolsByTier returns the pool list for a tier. Parameters: - tier: Emission tier identifier whose current pool memberships should be listed. Returns: - poolPaths: Copy of pool paths currently assigned to tier; tier zero yields an empty list. - err: Non-nil when the stored tier membership contains an invalid value.

Open
OID
0742c3…b8af:53
GetPoolsByTier details

Inspect func

GetPoolReward

func(tier uint64) (int64, .uverse.error)

GetPoolReward returns the reward amount for a tier. Parameters: - tier: Emission tier identifier for which to retrieve the per-pool reward. Returns: - reward: Current per-pool GNS reward rate for tier, in token units per second. - err: Non-nil when tier is outside the valid range 1 through AllTierCount-1.

Open
OID
0742c3…b8af:54
GetPoolReward details

Inspect func

GetPoolTier

func(poolPath string) uint64

GetPoolTier returns the tier of a pool. Parameters: - poolPath: Pool path whose current emission tier should be read. Returns: - tier: Current emission tier identifier; zero when the pool has no tier assignment.

Open
OID
0742c3…b8af:55
GetPoolTier details

Inspect func

GetPoolTierCount

func(tier uint64) uint64

GetPoolTierCount returns the number of pools in a tier. Parameters: - tier: Emission tier identifier to count; tier zero has no pools. Returns: - count: Number of pools currently assigned to tier, or zero for tier zero.

Open
OID
0742c3…b8af:56
GetPoolTierCount details

Inspect func

GetPoolTierRatio

func(poolPath string) (uint64, .uverse.error)

GetPoolTierRatio retrieves the configured pool-tier reward-share ratio. Returns: - TierRatio: Stored ratio distribution across tiers; panics on read or type failure.

Open
OID
0742c3…b8af:57
GetPoolTierRatio details

Inspect func

GetSpecificTokenMinimumRewardAmount

func(tokenPath string) (int64, bool)

GetSpecificTokenMinimumRewardAmount returns the explicitly set minimum reward amount for a token. Parameters: - tokenPath: Token path whose explicit minimum-reward override should be read. Returns: - amount: Explicit minimum reward amount in token units, or 0 when no override is configured. - found: True when tokenPath has an explicit override; false when the default would be used.

Open
OID
0742c3…b8af:58
GetSpecificTokenMinimumRewardAmount details

Inspect func

GetTargetPoolPathByIncentiveId

func(poolPath string, incentiveId string) (string, .uverse.error)

GetTargetPoolPathByIncentiveId returns the pool path for an incentive ID. Parameters: - poolPath: Pool path containing the incentive record. - incentiveId: External incentive identifier to resolve. Returns: - targetPoolPath: Pool path stored on the resolved incentive. - err: Non-nil when poolPath or incentiveId cannot be resolved.

Open
OID
0742c3…b8af:59
GetTargetPoolPathByIncentiveId details

Inspect func

GetUnstakingFee

func() uint64

GetUnstakingFee retrieves the configured unstaking fee rate. Returns: - uint64: Stored unstaking fee rate in basis points; panics on read or type failure.

Open
OID
0742c3…b8af:60
GetUnstakingFee details

Inspect func

HasUnstakedPosition

func(positionId uint64) bool

HasUnstakedPosition returns whether a position was unstaked with rewards left to collect. Parameters: - positionId: Position NFT token ID to check in the unstaked-position tree. Returns: - unstaked: True when positionId has an exit checkpoint awaiting collection; false otherwise.

Open
OID
0742c3…b8af:61
HasUnstakedPosition details

Inspect func

GetUnstakedPositionExitTime

func(positionId uint64) (int64, .uverse.error)

GetUnstakedPositionExitTime returns the timestamp at which an unstaked position stopped accruing rewards. Parameters: - positionId: Position NFT token ID identifying the unstaked exit checkpoint. Returns: - exitTime: Unix timestamp pinned as the end of the position's reward-accrual window. - err: Non-nil when positionId has no unstaked checkpoint with uncollected rewards.

Open
OID
0742c3…b8af:62
GetUnstakedPositionExitTime details

Inspect func

GetUnstakedPositionPendingIncentives

func(positionId uint64) ([]string, .uverse.error)

GetUnstakedPositionPendingIncentives returns the incentives an unstaked position has yet to collect. Parameters: - positionId: Position NFT token ID identifying the unstaked exit checkpoint. Returns: - incentiveIds: Copy of external incentive IDs still pending for the exit checkpoint. - err: Non-nil when positionId has no unstaked checkpoint with uncollected rewards.

Open
OID
0742c3…b8af:63
GetUnstakedPositionPendingIncentives details

Inspect func

GetUncollectedIncentiveCount

func(incentiveId string) int64

GetUncollectedIncentiveCount returns how many unstaked positions still owe a reward from the incentive. Parameters: - incentiveId: External incentive identifier whose outstanding exit positions should be counted. Returns: - count: Number of unstaked positions with an uncollected reward for incentiveId.

Open
OID
0742c3…b8af:64
GetUncollectedIncentiveCount details

Inspect func

IsStaked

func(positionId uint64) bool

IsStaked returns whether a position is staked. Parameters: - positionId: Position NFT token ID to check in the active deposit tree. Returns: - staked: True when positionId has an active deposit; false for an unstaked or unknown position.

Open
OID
0742c3…b8af:65
IsStaked details

Inspect func

GetTotalEmissionSent

func() int64

GetTotalEmissionSent retrieves the cumulative emission amount sent. Returns: - int64: Stored cumulative emission amount; panics on read or type failure.

Open
OID
0742c3…b8af:66
GetTotalEmissionSent details

Inspect func

GetAllowedTokens

func() []string

GetAllowedTokens retrieves a clone of the allowed external-reward token list. Returns: - \[]string: Allowed token paths copied for the caller; panics on read or type failure.

Open
OID
0742c3…b8af:67
GetAllowedTokens details

Inspect func

GetDeniedRewardTokens

func() []string

GetDeniedRewardTokens retrieves the denied-reward list, treating a missing key as empty. Returns: - \[]string: Clone of denied reward-token paths; empty when the key is absent, and panics on read or type failure.

Open
OID
0742c3…b8af:68
GetDeniedRewardTokens details

Inspect func

GetWarmupTemplate

func() []staker.Warmup

GetWarmupTemplate retrieves a clone of the stored warmup schedule. Returns: - \[]Warmup: Warmup entries copied into the caller's realm; panics on read or type failure.

Open
OID
0742c3…b8af:69
GetWarmupTemplate details

Inspect func

GetPoolRewardCaches

func(poolPath string) *v0.ReadOnlyTree

GetPoolRewardCaches returns a read-only view of a pool's reward cache, keyed by the encoded block timestamp. Callers paginate it themselves through IterateByOffset and decode keys with DecodeInt64. Parameters: - poolPath: Pool path whose reward-cache checkpoints should be read. Returns: - caches: Read-only tree of timestamp keys to cached reward values, or nil when poolPath has no pool.

Open
OID
0742c3…b8af:70
GetPoolRewardCaches details

Inspect func

GetPoolIncentives

func(poolPath string) *v0.ReadOnlyTree

GetPoolIncentives returns a read-only view of a pool's external incentives, keyed by incentive ID. Reading an entry yields a clone, so the view cannot mutate realm state. Parameters: - poolPath: Pool path whose external-incentive records should be read. Returns: - incentives: Read-only tree keyed by incentive ID with cloned entries, or nil when poolPath has no pool.

Open
OID
0742c3…b8af:71
GetPoolIncentives details

Inspect func

GetPoolGlobalRewardRatioAccumulations

func(poolPath string) *v0.ReadOnlyTree

GetPoolGlobalRewardRatioAccumulations returns a read-only view of a pool's global reward ratio accumulation, keyed by the encoded block timestamp. Parameters: - poolPath: Pool path whose global reward-ratio checkpoints should be read. Returns: - accumulations: Read-only tree of timestamp keys to stored accumulation values, or nil when poolPath has no pool.

Open
OID
0742c3…b8af:72
GetPoolGlobalRewardRatioAccumulations details

Inspect func

GetPoolHistoricalTicks

func(poolPath string) *v0.ReadOnlyTree

GetPoolHistoricalTicks returns a read-only view of a pool's historical ticks, keyed by the encoded block timestamp with the int32 tick as the value. Parameters: - poolPath: Pool path whose historical tick checkpoints should be read. Returns: - ticks: Read-only tree of timestamp keys to int32 ticks, or nil when poolPath has no pool.

Open
OID
0742c3…b8af:73
GetPoolHistoricalTicks details

Inspect func

GetPendingProtocolFees

func() map[string]int64

GetPendingProtocolFees retrieves pending protocol fee amounts keyed by token path. Returns: - map\[string]int64: Stored token-to-fee map; panics on read or type failure.

Open
OID
0742c3…b8af:74
GetPendingProtocolFees details

Inspect func

cloneStringSlice

func(src []string) []string
Open
OID
0742c3…b8af:75
cloneStringSlice details

Inspect func

cloneStringInt64Map

func(src map[string]int64) map[string]int64
Open
OID
0742c3…b8af:77
cloneStringInt64Map details

Inspect func

cloneStringBoolMap

func(src map[string]bool) map[string]bool
Open
OID
0742c3…b8af:78
cloneStringBoolMap details

Inspect func

cloneExternalIncentives

func(src []staker.ExternalIncentive) []staker.ExternalIncentive
Open
OID
0742c3…b8af:79
cloneExternalIncentives details

Inspect func

cloneWarmups

func(warmups []staker.Warmup) []staker.Warmup
Open
OID
0742c3…b8af:80
cloneWarmups details

Inspect func

AllTierCount

untyped bigint

// 0, 1, 2, 3

Value

(4 <untyped> bigint)

Pool

type

Pool is a struct for storing an incentivized pool information Each pool stores Incentives and Ticks associated with it. Fields: - poolPath: The path of the pool. - stakedLiquidity: The current total staked liquidity of the in-range positions for the pool. Updated when tick cross happens or stake/unstake happens. Used to calculate the global reward ratio accumulation or decide whether to enter/exit unclaimable period. - lastUnclaimableTime: The time at which the unclaimable period started. Set to 0 when the pool is not in an unclaimable period. - unclaimableAcc: The accumulated undistributed unclaimable reward. Reset to 0 when processUnclaimableReward is called and sent to community pool. - rewardCache: The cached per-second reward emitted for this pool. Stores new entry only when the reward is changed. PoolTier.cacheReward() updates this. \- incentives: The external incentives associated with the pool. \- ticks: The Ticks associated with the pool. - globalRewardRatioAccumulation: Global ratio of Time / TotalStake accumulation(since the pool creation) Stores new entry only when tick cross or stake/unstake happens. It is used to calculate the reward for a staked position at certain time. - historicalTick: The historical tick for the pool at a given time. It does not reflect the exact tick at the timestamp, but it provides correct ordering for the staked position's ticks. Therefore, you should not compare it for equality, only for ordering. Set when tick cross happens or a new position is created.

Value

staker.Pool

NewPool

func(poolPath string, currentTime int64) *staker.Pool

NewPool creates pool reward state initialized at currentTime (Unix seconds). Parameters: - poolPath: Pool identifier to store in the new reward-state object. - currentTime: Unix timestamp in seconds used to seed the initial accumulation, reward-cache, and liquidity snapshots. Returns: - pool: Initialized pool with empty backing structures and zero initial reward/liquidity snapshots at currentTime.

Open
OID
0742c3…b8af:81
NewPool details

Inspect func

Incentives

type

Incentives represents a collection of external incentives for a specific pool. Fields: - incentives: BPTree storing ExternalIncentive objects indexed by incentiveId The incentiveId serves as the key to efficiently lookup incentive details - targetPoolPath: String identifier for the pool this incentive collection belongs to Used to associate incentives with their corresponding liquidity pool - unclaimablePeriods: Tree storing periods when rewards cannot be claimed Maps start timestamp (key) to end timestamp (value) An end timestamp of 0 indicates an ongoing unclaimable period Used to track intervals when staking rewards are not claimable - byStartTime: Per-pool start-time index mapping an incentive's start timestamp (key) to the incentive IDs that start at that timestamp (value). This mirrors the lazy-discovery lookup previously served by a global creation-time index, but scoped to this pool's own incentives, so discovery cost is bounded by this pool's incentives instead of growing with the total number of incentives system-wide.

Value

staker.Incentives

NewIncentives

func(targetPoolPath string) *staker.Incentives

NewIncentives creates an incentive collection for a pool and starts an open unclaimable period at the current time. Parameters: - targetPoolPath: Pool path to associate with the new incentive collection. Returns: - incentives: Collection with initialized incentive, start-time, and unclaimable-period trees.

Open
OID
0742c3…b8af:83
NewIncentives details

Inspect func

ExternalIncentive

type

Value

staker.ExternalIncentive

NewExternalIncentive

func(incentiveId string, targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64, creator .uverse.address, depositGnsAmount int64, createdHeight int64, currentTime int64) *staker.ExternalIncentive

NewExternalIncentive creates a new external incentive Parameters: - incentiveId: Unique identifier assigned to the external incentive. - targetPoolPath: Pool path whose staked positions may receive this incentive. - rewardToken: Token path of the asset deposited for distribution. - rewardAmount: Total reward amount, also used as the initial remaining reward balance. - startTimestamp: Unix timestamp in seconds when reward distribution starts. - endTimestamp: Unix timestamp in seconds when reward distribution ends; duration is endTimestamp-startTimestamp and must be nonzero for the rate calculation. - creator: Address that funds the incentive and receives refunds at finalization. - depositGnsAmount: GNS amount deposited as the incentive's required collateral. - createdHeight: Block height to record for incentive creation. - currentTime: Unix timestamp in seconds recorded as the incentive creation time. Returns: - incentive: New incentive with a Q128-scaled per-second rate and zeroed distribution, penalty, and unclaimable counters.

Open
OID
0742c3…b8af:84
NewExternalIncentive details

Inspect func

Ticks

type

Tick mapping for each pool

Value

staker.Ticks

NewTicks

func() staker.Ticks

NewTicks creates an empty tick mapping with a fanout-16 B+ tree. Returns: - ticks: Empty Ticks value ready to store pool tick records.

Open
OID
0742c3…b8af:85
NewTicks details

Inspect func

Tick

type

Tick represents the state of a specific tick in a pool. Fields: - id (int32): The ID of the tick. - stakedLiquidityGross (\*u256.Uint): Total gross staked liquidity at this tick. - stakedLiquidityDelta (\*i256.Int): Net change in staked liquidity at this tick. - outsideAccumulation (\*UintTree): RewardRatioAccumulation outside the tick.

Value

staker.Tick

NewTick

func(tickId int32) *staker.Tick

NewTick creates a tick with zero staked liquidity and an empty fanout-4 outside-accumulation tree. Parameters: - tickId: Tick index to assign to the new record. Returns: - tick: Initialized tick record.

Open
OID
0742c3…b8af:86
NewTick details

Inspect func

TierRatio

type

100%, 0%, 0% if no tier2 and tier3 80%, 0%, 20% if no tier2 70%, 30%, 0% if no tier3 50%, 30%, 20% if has tier2 and tier3

Value

staker.TierRatio

NewTierRatio

func(tier1 uint64, tier2 uint64, tier3 uint64) staker.TierRatio

NewTierRatio constructs the reward-share ratio for tiers 1 through 3. Parameters: - tier1: Tier-1 share scaled by 100 (for example, 70 means 70%). - tier2: Tier-2 share scaled by 100. - tier3: Tier-3 share scaled by 100. Returns: - ratio: TierRatio containing the supplied scaled shares.

Open
OID
0742c3…b8af:87
NewTierRatio details

Inspect func

SwapBatchProcessor

type

SwapBatchProcessor processes tick crosses in batch for a swap This processor accumulates all tick crosses that occur during a single swap and processes them together at the end, reducing redundant calculations and state updates that would occur with individual tick processing

Value

staker.SwapBatchProcessor

NewSwapBatchProcessor

func(poolPath string, pool *staker.Pool, timestamp int64) *staker.SwapBatchProcessor

NewSwapBatchProcessor creates an active batch for collecting tick crosses in a pool swap. Parameters: - poolPath: Pool identifier associated with the swap. - pool: Pool state whose tick crosses are being collected. - timestamp: Unix timestamp in seconds when the swap began. Returns: - processor: Active processor with an empty cross sequence.

Open
OID
0742c3…b8af:88
NewSwapBatchProcessor details

Inspect func

SwapTickCross

type

SwapTickCross stores information about a tick cross during a swap This struct is used to accumulate tick cross events during a single swap transaction for batch processing to optimize gas usage and computational efficiency

Value

staker.SwapTickCross

NewSwapTickCross

func(tickID int32, zeroForOne bool, delta *v1.Int) *staker.SwapTickCross

NewSwapTickCross creates a tick-cross record for a swap batch. Parameters: - tickID: Index of the tick crossed during the swap. - zeroForOne: Swap direction; true means token0-to-token1 and false means token1-to-token0. - delta: Precomputed signed staked-liquidity change for this tick cross. Returns: - cross: Tick-cross record containing the supplied index, direction, and delta.

Open
OID
0742c3…b8af:89
NewSwapTickCross details

Inspect func

StakeToken

func(positionId uint64, referrer string) string

StakeToken stakes a position NFT to earn rewards. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - positionId: LP position NFT token ID to stake. - referrer: Optional referral address string used for referral tracking. Returns: - string: Pool path where the position was staked. Halt check: reverts while the Staker halt scope is active.

Open
OID
0742c3…b8af:90
StakeToken details

Inspect func

UnStakeToken

func(positionId uint64) string

UnStakeToken unstakes a position NFT and creates an exit checkpoint for its rewards. The NFT is returned to its owner without calculating or paying rewards. Use a Collect\* entry point afterward; collection of an exit checkpoint is permissionless and pays its pinned owner. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - positionId: LP position NFT token ID to unstake. Returns: - string: Pool path where the position was staked. Halt check: reverts while the Withdraw halt scope is active.

Open
OID
0742c3…b8af:92
UnStakeToken details

Inspect func

CollectReward

func(positionId uint64) (string, string, map[string]int64, map[string]int64)

CollectReward collects both the GNS emission and external incentive rewards for a live staked deposit or an exit checkpoint left by UnStakeToken. A live-deposit collect requires the depositor/owner. An exit-checkpoint collect is permissionless and pays the owner pinned in the checkpoint. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - positionId: Staked position NFT token ID or position with an exit checkpoint. Returns: - string: GNS emission amount sent to the user. - string: GNS emission penalty amount sent to the community pool. - map\[string]int64: Gross external reward amount per reward token, before the staking-reward fee. - map\[string]int64: External penalty amount per reward token. Halt check: reverts while the Withdraw halt scope is active.

Open
OID
0742c3…b8af:93
CollectReward details

Inspect func

CollectEmissionReward

func(positionId uint64) (int64, int64)

CollectEmissionReward collects only the GNS emission reward for a live staked deposit or an exit checkpoint left by UnStakeToken. A live-deposit collect requires the depositor/owner. An exit-checkpoint collect is permissionless and pays the owner pinned in the checkpoint. External incentive rewards keep accruing; collect them with CollectExternalIncentiveReward. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - positionId: Staked position NFT token ID or position with an exit checkpoint. Returns: - int64: GNS emission amount sent to the user. - int64: GNS emission penalty amount sent to the community pool. Halt check: reverts while the Withdraw halt scope is active.

Open
OID
0742c3…b8af:94
CollectEmissionReward details

Inspect func

CollectExternalIncentiveReward

func(positionId uint64, incentiveId string) (int64, int64)

CollectExternalIncentiveReward collects one external incentive reward for a live staked deposit or an exit checkpoint left by UnStakeToken. A live-deposit collect requires the depositor/owner. An exit-checkpoint collect is permissionless and pays the owner pinned in the checkpoint. The GNS emission reward and every other incentive keep accruing; collect the emission reward with CollectEmissionReward and the other incentives by calling this with their own incentive id. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - positionId: Staked position NFT token ID or position with an exit checkpoint. - incentiveId: External incentive identifier to collect. Returns: - int64: Gross reward amount before the staking-reward fee. - int64: Penalty amount retained by the incentive. Halt check: reverts while the Withdraw halt scope is active.

Open
OID
0742c3…b8af:95
CollectExternalIncentiveReward details

Inspect func

SetPoolTier

func(poolPath string, tier uint64)

SetPoolTier assigns a pool to an internal GNS emission reward tier. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - poolPath: Pool path whose emission tier is assigned. - tier: Target tier number from 0 through 3; zero removes the pool from emission targeting. Halt check: reverts while the Staker halt scope is active.

Open
OID
0742c3…b8af:96
SetPoolTier details

Inspect func

ChangePoolTier

func(poolPath string, tier uint64)

ChangePoolTier changes the internal GNS emission tier assigned to a pool. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - poolPath: Pool path whose emission tier is changed. - tier: New tier number from 0 through 3; zero means no internal-emission target. Halt check: reverts while the Staker halt scope is active.

Open
OID
0742c3…b8af:97
ChangePoolTier details

Inspect func

RemovePoolTier

func(poolPath string)

RemovePoolTier removes a pool from the internal GNS emission tier system. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - poolPath: Pool path to remove from emission-tier membership. Halt check: reverts while the Staker halt scope is active.

Open
OID
0742c3…b8af:98
RemovePoolTier details

Inspect func

CreateExternalIncentive

func(targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64)

CreateExternalIncentive creates an external reward incentive for a pool. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - targetPoolPath: Pool path whose liquidity providers will receive the incentive. - rewardToken: Registered token path used to pay the incentive. - rewardAmount: Total reward amount deposited, in reward-token units. - startTimestamp: Incentive start time as an inclusive Unix timestamp. - endTimestamp: Incentive end time as an inclusive Unix timestamp. Any caller may create an incentive after satisfying the token, duration, start-time, reward-minimum, and GNS-deposit checks. Halt check: reverts while the Staker halt scope is active.

Open
OID
0742c3…b8af:99
CreateExternalIncentive details

Inspect func

EndExternalIncentive

func(targetPoolPath string, incentiveId string, refundAddress .uverse.address)

EndExternalIncentive finalizes an external incentive once its end timestamp has passed, sending the unclaimable/remainder reward portion and GNS deposit to the explicit refundAddress. Only the incentive creator or admin may call it; an outstanding exit checkpoint for this incentive must be collected or forfeited first. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - targetPoolPath: Pool path containing the incentive. - incentiveId: Unique incentive identifier to finalize. - refundAddress: Address receiving the refundable reward tokens and GNS deposit. Halt check: reverts while the Withdraw halt scope is active.

Open
OID
0742c3…b8af:100
EndExternalIncentive details

Inspect func

CancelExternalIncentive

func(targetPoolPath string, incentiveId string)

CancelExternalIncentive cancels an external incentive that has not started yet, removing it and refunding the reward tokens and the GNS deposit to the creator. Callable by admin, governance, or the incentive creator. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - targetPoolPath: Pool path containing the incentive. - incentiveId: Unique incentive identifier to cancel. Halt check: reverts while the Withdraw halt scope is active.

Open
OID
0742c3…b8af:101
CancelExternalIncentive details

Inspect func

CollectExternalIncentivePenalty

func(targetPoolPath string, incentiveId string, refundAddress .uverse.address) int64

CollectExternalIncentivePenalty collects accumulated warm-up penalties after EndExternalIncentive has finalized the incentive, sending them to refundAddress. Only the incentive creator or admin may call it. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - targetPoolPath: Pool path containing the incentive. - incentiveId: Unique incentive identifier whose penalty is collected. - refundAddress: Address receiving the collected penalty amount. Returns: - int64: Penalty amount transferred, capped by the staker's available reward-token balance. Halt check: reverts while the Withdraw halt scope is active.

Open
OID
0742c3…b8af:102
CollectExternalIncentivePenalty details

Inspect func

AddToken

func(tokenPath string)

AddToken adds a token to the reward token whitelist. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - tokenPath: Registered token path to add to the allowed reward-token list. Halt check: reverts while the Staker halt scope is active.

Open
OID
0742c3…b8af:103
AddToken details

Inspect func

RemoveToken

func(tokenPath string)

RemoveToken removes a token from the reward token whitelist. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - tokenPath: Token path to remove from the allowed reward-token list. Halt check: reverts while the Staker halt scope is active.

Open
OID
0742c3…b8af:104
RemoveToken details

Inspect func

SetDeniedRewardToken

func(tokenPath string, denied bool)

SetDeniedRewardToken sets or clears the operational deny flag for an external incentive reward token. Pool-pair tokens qualify as reward tokens without the governance allowlist (by design), so this flag is the only lever to stop NEW incentives in a pair token whose issuer turned hostile. Existing incentives and their collection are deliberately unaffected; the ledger-level delivery guard in the implementation bounds their blast radius instead. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - tokenPath: Reward-token path whose deny status is changed. - denied: True to block new incentives for tokenPath; false to clear that block. Halt check: reverts while the Staker halt scope is active.

Open
OID
0742c3…b8af:105
SetDeniedRewardToken details

Inspect func

SetWarmUp

func(pct int64, timeDuration int64)

SetWarmUp configures the duration for the warm-up tier selected by its fixed ratio. Finite tiers are capped at 365 days; the final 100% tier must retain math.MaxInt64. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - pct: Warm-up payout percentage selecting one of the 30%, 50%, 70%, or 100% tiers. - timeDuration: Warm-up duration in Unix seconds for the selected percentage tier; finite tiers are capped at 365 days and the 100% tier uses math.MaxInt64. Halt check: reverts while the Staker halt scope is active.

Open
OID
0742c3…b8af:106
SetWarmUp details

Inspect func

SetDepositGnsAmount

func(amount int64)

SetDepositGnsAmount stores the GNS amount deposited as the staker reserve. Parameters: - \_: Leading realm-call discriminator for the forwarded store call; callers pass 0. - rlm: Current staker realm context; it must be current before storage is written. - amount: GNS reserve amount used for staker initialization and accounting. Returns: - error: ErrSpoofedRealm when rlm is not current, or the underlying KV-store write error; nil on success.

Open
OID
0742c3…b8af:107
SetDepositGnsAmount details

Inspect func

SetMinimumRewardAmount

func(amount int64)

SetMinimumRewardAmount stores the default minimum external reward amount. Parameters: - \_: Leading realm-call discriminator for the forwarded store call; callers pass 0. - rlm: Current staker realm context; it must be current before storage is written. - amount: Default minimum reward amount applied when no token-specific override exists. Returns: - error: ErrSpoofedRealm when rlm is not current, or the underlying KV-store write error; nil on success.

Open
OID
0742c3…b8af:108
SetMinimumRewardAmount details

Inspect func

SetTokenMinimumRewardAmount

func(paramsStr string)

SetTokenMinimumRewardAmount sets minimum reward amounts per token. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - paramsStr: Colon-delimited token path and minimum amount (\`tokenPath:amount\`); amount zero removes the override. Halt check: reverts while the Staker halt scope is active.

Open
OID
0742c3…b8af:109
SetTokenMinimumRewardAmount details

Inspect func

SetUnStakingFee

func(fee uint64)

SetUnStakingFee sets the unstaking fee rate in basis points (0-1,000; 100 = 1%). Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - fee: Unstaking fee rate in basis points, from 0 through 1,000 inclusive. Halt check: reverts while the Staker halt scope is active.

Open
OID
0742c3…b8af:110
SetUnStakingFee details

Inspect func

Render

func(path string) string

Render delegates web rendering to the active implementation.

Open
OID
0742c3…b8af:111
Render details

Inspect func

ErrSpoofedRealm

untyped string

Value

"rlm does not match the current crossing frame"

initRegisterWritableContract

func()
Open
OID
0742c3…b8af:118
initRegisterWritableContract details

Inspect func

initializeDomainStore

func(int, rlm .uverse.realm, kvStore v1.KVStore) interface{...}
Open
OID
0742c3…b8af:119
initializeDomainStore details

Inspect func

getImplementation

func() staker.IStaker
Open
OID
0742c3…b8af:120
getImplementation details

Inspect func

updateImplementation

func() .uverse.error
Open
OID
0742c3…b8af:121
updateImplementation details

Inspect func

StoreKey

type

Value

staker.StoreKey

StoreKeyDepositGnsAmount

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyMinimumRewardAmount

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyDeposits

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyExternalIncentives

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyTotalEmissionSent

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyAllowedTokens

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyDeniedRewardTokens

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyIncentiveCounter

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyTokenSpecificMinimumRewards

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyUnstakingFee

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyPendingProtocolFees

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyUnstakedPositions

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyUncollectedIncentiveCounts

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyPools

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyPoolTierMemberships

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyPoolTierRatio

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyPoolTierCounts

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyPoolTierLastRewardCacheTimestamp

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyPoolTierCurrentEmission

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyPoolTierGetEmission

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyPoolTierGetHalvingBlocksInRange

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyWarmupTemplate

staker.StoreKey

Value

<gnolang.StringValue>

StoreKeyCurrentSwapBatch

staker.StoreKey

Value

<gnolang.StringValue>

stakerStore

type

Value

staker.stakerStore

NewStakerStore

func(kvStore v1.KVStore) staker.IStakerStore

NewStakerStore creates a new staker store instance with the provided KV store. This function is used by the upgrade system to create storage instances for each implementation. Parameters: - kvStore: Key-value store used for all staker state. Returns: - IStakerStore: Store interface backed by the supplied KV store.

Open
OID
0742c3…b8af:122
NewStakerStore details

Inspect func

makeIncentiveID

func(creator .uverse.address, timestamp int64, index int64) string
Open
OID
0742c3…b8af:124
makeIncentiveID details

Inspect func

contains

func(items []string, item string) bool
Open
OID
0742c3…b8af:125
contains details

Inspect func

UintTree

type

UintTree wraps a B+ tree with nonnegative int64 timestamp keys, encoded as fixed-width 8-byte big-endian strings to preserve numeric ordering. Methods: - Get: Retrieves a value associated with an int64 key. - Set: Stores a value with an int64 key. - Has: Checks if an int64 key exists in the tree. - Remove: Removes an int64 key and its associated value. - Iterate: Iterates over keys and values in a range. - ReverseIterate: Iterates in reverse order over keys and values in a range.

Value

staker.UintTree

NewBPTreeN

func(fanout int) *v0.BPTree

NewBPTreeN allocates a raw BP-tree under /r/gnoswap/staker's realm context (the realm that declares Pool/Deposit/ExternalIncentive). The tree's PkgID is therefore /r/gnoswap/staker, matching the domain values it stores, so tree.Set leaf-slot writes clear the readonly-taint gate regardless of which realm (staker/v1, mock) calls Set (borrow rule #2 borrows m.Realm to the tree's owning realm). Implementations and mocks must allocate trees that hold /r/gnoswap/staker-declared values through here rather than calling bptree.NewBPTreeN directly in their own realm. Parameters: - fanout: Number of child pointers per B+ tree node; controls the tree's branching factor. Returns: - tree: Mutable raw B+ tree allocated in the staker realm context.

Open
OID
0742c3…b8af:126
NewBPTreeN details

Inspect func

NewUintTree

func() *staker.UintTree

NewUintTree creates a new UintTree instance with default fanout 64. Returns: - tree: Empty UintTree using the default fanout of 64.

Open
OID
0742c3…b8af:128
NewUintTree details

Inspect func

NewUintTreeN

func(fanout int) *staker.UintTree

NewUintTreeN creates a new UintTree instance with the specified fanout. Parameters: - fanout: Number of child pointers per B+ tree node used by the wrapped tree. Returns: - tree: Empty UintTree configured with the requested fanout.

Open
OID
0742c3…b8af:129
NewUintTreeN details

Inspect func

encodeInt64

func(num int64) string
Open
OID
0742c3…b8af:130
encodeInt64 details

Inspect func

decodeInt64

func(s string) int64
Open
OID
0742c3…b8af:131
decodeInt64 details

Inspect func

IStaker

type

Value

staker.IStaker

IStakerManager

type

Value

staker.IStakerManager

IStakerGetter

type

Value

staker.IStakerGetter

IStakerStore

type

Value

staker.IStakerStore

UnstakedPosition

type

UnstakedPosition is the exit checkpoint of a position that left the pool before collecting. It pins the pool state a later collect must reproduce the exit-time reward from: the tick observed at the exit, the two boundary ticks (which the unstake may prune from the pool), and the tier context (which a later tier change would otherwise re-rate the window with). Collection is per source, so the checkpoint tracks what is left and is dropped when nothing is.

Value

staker.UnstakedPosition

NewUnstakedPosition

func(deposit *staker.Deposit, exitTime int64, exitTick int32, lowerTick *staker.Tick, upperTick *staker.Tick, lowerOutsideAcc string, upperOutsideAcc string, tier uint64, tierRatio uint64, tierCount uint64, unstakingFee uint64, pendingIncentiveIds []string) *staker.UnstakedPosition

NewUnstakedPosition creates an exit checkpoint owing every reward source of the deposit. Parameters: - deposit: Deposit state captured when the position leaves the pool. - exitTime: Unix timestamp when staking ended and this checkpoint's reward window stopped. - exitTick: Pool tick observed at exitTime for reconstructing in-range rewards. - lowerTick: Snapshot of the position's lower boundary tick, retained if the live pool prunes it. - upperTick: Snapshot of the position's upper boundary tick, retained if the live pool prunes it. - lowerOutsideAcc: Decimal-encoded outside reward-ratio accumulation of the lower tick at exitTime. - upperOutsideAcc: Decimal-encoded outside reward-ratio accumulation of the upper tick at exitTime. - tier: Pool emission tier at exitTime; zero denotes that the pool was not tiered. - tierRatio: Tier reward-share ratio, in its stored scaled form, at exitTime. - tierCount: Number of pools sharing the tier at exitTime for dividing tier rewards. - unstakingFee: Staking-reward fee rate in basis points at exitTime (0-1,000; 100 = 1%). - pendingIncentiveIds: External incentive IDs whose rewards are still owed by the position. Returns: - position: New exit checkpoint retaining the deposit and exit-time reward context; emission is initially uncollected and every supplied incentive is pending.

Open
OID
0742c3…b8af:132
NewUnstakedPosition details

Inspect func

RegisterInitializer

func(initializer func(...))

RegisterInitializer registers a new staker implementation version. This function is called by each version (v1, v2, etc.) during initialization to register their implementation with the proxy system. The initializer function creates a new instance of the implementation using the provided stakerStore interface. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - initializer: Factory callback that receives the internal discriminator, current staker realm, and accessor interfaces, then returns the implementation instance. Security: Only contracts within the domain path can register initializers. Each package path can only register once to prevent duplicate registrations.

Open
OID
0742c3…b8af:134
RegisterInitializer details

Inspect func

UpgradeImpl

func(packagePath string)

UpgradeImpl switches the active staker implementation to a different version. It changes the implementation pointer without transforming persisted state; the selected implementation must understand the existing storage schema. Parameters: - cur: Current realm context; callers use cross(cur) when crossing into this realm. - packagePath: Registered package path of the implementation to activate. Security: Only admin or governance can perform upgrades. The new implementation must have been previously registered via RegisterInitializer.

Open
OID
0742c3…b8af:136
UpgradeImpl details

Inspect func

GetImplementationPackagePath

func() string

GetImplementationPackagePath returns the package path of the currently active implementation. Returns: - packagePath: package path of the active implementation

Open
OID
0742c3…b8af:137
GetImplementationPackagePath details

Inspect func
PoolAccessor : type =staker.PoolAccessor
poolAccessor : type =staker.poolAccessor
newPoolAccessor : func() staker.PoolAccessor Inspect
EmissionAccessor : type =staker.EmissionAccessor
emissionAccessor : type =staker.emissionAccessor
newEmissionAccessor : func() staker.EmissionAccessor Inspect
NFTAccessor : type =staker.NFTAccessor
gnftAccessor : type =staker.gnftAccessor
newNFTAccessor : func() staker.NFTAccessor Inspect
Counter : type =staker.Counter
NewCounter : func() *staker.Counter Inspect
Deposit : type =staker.Deposit
NewDeposit : func(owner .uverse.address, targetPoolPath string, liquidity *v1.Uint, currentTime int64, tickLower int32, tickUpper int32, warmups []staker.Warmup) *staker.Deposit Inspect
Warmup : type =staker.Warmup
NewWarmup : func(timeDuration int64, nextWarmupTime int64, warmupRatio uint64) staker.Warmup Inspect
DefaultWarmupTemplate : func() []staker.Warmup Inspect
GNS_PATH : string ="gno.land/r/gnoswap/gns.GNS"
WUGNOT_PATH : string ="gno.land/r/gnoland/wugnot.wugnot"
DefaultAllowedTokens : func() []string Inspect
GetPool : func(poolPath string) (*staker.Pool, .uverse.error) Inspect
GetDeposit : func(lpTokenId uint64) (*staker.Deposit, .uverse.error) Inspect
CollectableEmissionReward : func(positionId uint64) (int64, .uverse.error) Inspect
CollectableExternalIncentiveReward : func(positionId uint64, incentiveId string) (int64, .uverse.error) Inspect
GetCreatedHeightOfIncentive : func(poolPath string, incentiveId string) (int64, .uverse.error) Inspect
GetIncentiveCreatedTimestamp : func(poolPath string, incentiveId string) (int64, .uverse.error) Inspect
GetIncentiveTotalRewardAmount : func(poolPath string, incentiveId string) (int64, .uverse.error) Inspect
GetIncentiveDistributedRewardAmount : func(poolPath string, incentiveId string) (int64, .uverse.error) Inspect
GetIncentiveRemainingRewardAmount : func(poolPath string, incentiveId string) (int64, .uverse.error) Inspect
GetIncentiveAccumulatedPenaltyAmount : func(poolPath string, incentiveId string) (int64, .uverse.error) Inspect
GetIncentiveDepositGnsAmount : func(poolPath string, incentiveId string) (int64, .uverse.error) Inspect
GetIncentiveRefunded : func(poolPath string, incentiveId string) (bool, .uverse.error) Inspect
IsIncentiveActive : func(poolPath string, incentiveId string) (bool, .uverse.error) Inspect
GetDepositExternalRewardLastCollectTimestamp : func(lpTokenId uint64, incentiveId string) (int64, .uverse.error) Inspect
GetDepositGnsAmount : func() int64 Inspect
GetDepositInternalRewardLastCollectTimestamp : func(lpTokenId uint64) (int64, .uverse.error) Inspect
GetDepositCollectedInternalReward : func(lpTokenId uint64) (int64, .uverse.error) Inspect
GetDepositCollectedExternalReward : func(lpTokenId uint64, incentiveId string) (int64, .uverse.error) Inspect
GetDepositLiquidity : func(lpTokenId uint64) (*v1.Uint, .uverse.error) Inspect
GetDepositLiquidityAsString : func(lpTokenId uint64) (string, .uverse.error) Inspect
GetDepositOwner : func(lpTokenId uint64) (.uverse.address, .uverse.error) Inspect
GetDepositStakeTime : func(lpTokenId uint64) (int64, .uverse.error) Inspect
GetDepositTargetPoolPath : func(lpTokenId uint64) (string, .uverse.error) Inspect
GetDepositTickLower : func(lpTokenId uint64) (int32, .uverse.error) Inspect
GetDepositTickUpper : func(lpTokenId uint64) (int32, .uverse.error) Inspect
GetDepositWarmUp : func(lpTokenId uint64) ([]staker.Warmup, .uverse.error) Inspect
GetDepositExternalIncentiveIdList : func(lpTokenId uint64) ([]string, .uverse.error) Inspect
GetExternalIncentiveByPoolPath : func(poolPath string) ([]staker.ExternalIncentive, .uverse.error) Inspect
GetIncentiveEndTimestamp : func(poolPath string, incentiveId string) (int64, .uverse.error) Inspect
GetIncentiveCreator : func(poolPath string, incentiveId string) (.uverse.address, .uverse.error) Inspect
GetIncentiveRewardAmount : func(poolPath string, incentiveId string) (*v1.Uint, .uverse.error) Inspect
GetIncentiveRewardAmountAsString : func(poolPath string, incentiveId string) (string, .uverse.error) Inspect
GetIncentiveRewardPerSecondX128 : func(poolPath string, incentiveId string) (*v1.Uint, .uverse.error) Inspect
GetIncentiveRewardToken : func(poolPath string, incentiveId string) (string, .uverse.error) Inspect
GetIncentiveStartTimestamp : func(poolPath string, incentiveId string) (int64, .uverse.error) Inspect
GetMinimumRewardAmount : func() int64 Inspect
GetMinimumRewardAmountForToken : func(tokenPath string) int64 Inspect
GetPoolStakedLiquidity : func(poolPath string) (string, .uverse.error) Inspect
GetPoolsByTier : func(tier uint64) ([]string, .uverse.error) Inspect
GetPoolReward : func(tier uint64) (int64, .uverse.error) Inspect
GetPoolTier : func(poolPath string) uint64 Inspect
GetPoolTierCount : func(tier uint64) uint64 Inspect
GetPoolTierRatio : func(poolPath string) (uint64, .uverse.error) Inspect
GetSpecificTokenMinimumRewardAmount : func(tokenPath string) (int64, bool) Inspect
GetTargetPoolPathByIncentiveId : func(poolPath string, incentiveId string) (string, .uverse.error) Inspect
GetUnstakingFee : func() uint64 Inspect
HasUnstakedPosition : func(positionId uint64) bool Inspect
GetUnstakedPositionExitTime : func(positionId uint64) (int64, .uverse.error) Inspect
GetUnstakedPositionPendingIncentives : func(positionId uint64) ([]string, .uverse.error) Inspect
GetUncollectedIncentiveCount : func(incentiveId string) int64 Inspect
IsStaked : func(positionId uint64) bool Inspect
GetTotalEmissionSent : func() int64 Inspect
GetAllowedTokens : func() []string Inspect
GetDeniedRewardTokens : func() []string Inspect
GetWarmupTemplate : func() []staker.Warmup Inspect
GetPoolRewardCaches : func(poolPath string) *v0.ReadOnlyTree Inspect
GetPoolIncentives : func(poolPath string) *v0.ReadOnlyTree Inspect
GetPoolGlobalRewardRatioAccumulations : func(poolPath string) *v0.ReadOnlyTree Inspect
GetPoolHistoricalTicks : func(poolPath string) *v0.ReadOnlyTree Inspect
GetPendingProtocolFees : func() map[string]int64 Inspect
cloneStringSlice : func(src []string) []string Inspect
cloneStringInt64Map : func(src map[string]int64) map[string]int64 Inspect
cloneStringBoolMap : func(src map[string]bool) map[string]bool Inspect
cloneExternalIncentives : func(src []staker.ExternalIncentive) []staker.ExternalIncentive Inspect
cloneWarmups : func(warmups []staker.Warmup) []staker.Warmup Inspect
AllTierCount : untyped bigint =(4 <untyped> bigint)
Pool : type =staker.Pool
NewPool : func(poolPath string, currentTime int64) *staker.Pool Inspect
Incentives : type =staker.Incentives
NewIncentives : func(targetPoolPath string) *staker.Incentives Inspect
ExternalIncentive : type =staker.ExternalIncentive
NewExternalIncentive : func(incentiveId string, targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64, creator .uverse.address, depositGnsAmount int64, createdHeight int64, currentTime int64) *staker.ExternalIncentive Inspect
Ticks : type =staker.Ticks
NewTicks : func() staker.Ticks Inspect
Tick : type =staker.Tick
NewTick : func(tickId int32) *staker.Tick Inspect
TierRatio : type =staker.TierRatio
NewTierRatio : func(tier1 uint64, tier2 uint64, tier3 uint64) staker.TierRatio Inspect
SwapBatchProcessor : type =staker.SwapBatchProcessor
NewSwapBatchProcessor : func(poolPath string, pool *staker.Pool, timestamp int64) *staker.SwapBatchProcessor Inspect
SwapTickCross : type =staker.SwapTickCross
NewSwapTickCross : func(tickID int32, zeroForOne bool, delta *v1.Int) *staker.SwapTickCross Inspect
StakeToken : func(positionId uint64, referrer string) string Inspect
UnStakeToken : func(positionId uint64) string Inspect
CollectReward : func(positionId uint64) (string, string, map[string]int64, map[string]int64) Inspect
CollectEmissionReward : func(positionId uint64) (int64, int64) Inspect
CollectExternalIncentiveReward : func(positionId uint64, incentiveId string) (int64, int64) Inspect
SetPoolTier : func(poolPath string, tier uint64) Inspect
ChangePoolTier : func(poolPath string, tier uint64) Inspect
RemovePoolTier : func(poolPath string) Inspect
CreateExternalIncentive : func(targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64) Inspect
EndExternalIncentive : func(targetPoolPath string, incentiveId string, refundAddress .uverse.address) Inspect
CancelExternalIncentive : func(targetPoolPath string, incentiveId string) Inspect
CollectExternalIncentivePenalty : func(targetPoolPath string, incentiveId string, refundAddress .uverse.address) int64 Inspect
AddToken : func(tokenPath string) Inspect
RemoveToken : func(tokenPath string) Inspect
SetDeniedRewardToken : func(tokenPath string, denied bool) Inspect
SetWarmUp : func(pct int64, timeDuration int64) Inspect
SetDepositGnsAmount : func(amount int64) Inspect
SetMinimumRewardAmount : func(amount int64) Inspect
SetTokenMinimumRewardAmount : func(paramsStr string) Inspect
SetUnStakingFee : func(fee uint64) Inspect
Render : func(path string) string Inspect
ErrSpoofedRealm : untyped string ="rlm does not match the current crossing frame"
kvStore : *v1.kvStore Inspect
versionManager : *v1.versionManager Inspect
implementation : *v1.stakerV1 Inspect
init.126 : func() Inspect
initRegisterWritableContract : func() Inspect
initializeDomainStore : func(int, rlm .uverse.realm, kvStore v1.KVStore) interface{...} Inspect
getImplementation : func() staker.IStaker Inspect
updateImplementation : func() .uverse.error Inspect
StoreKey : type =staker.StoreKey
StoreKeyDepositGnsAmount : staker.StoreKey =<gnolang.StringValue>
StoreKeyMinimumRewardAmount : staker.StoreKey =<gnolang.StringValue>
StoreKeyDeposits : staker.StoreKey =<gnolang.StringValue>
StoreKeyExternalIncentives : staker.StoreKey =<gnolang.StringValue>
StoreKeyTotalEmissionSent : staker.StoreKey =<gnolang.StringValue>
StoreKeyAllowedTokens : staker.StoreKey =<gnolang.StringValue>
StoreKeyDeniedRewardTokens : staker.StoreKey =<gnolang.StringValue>
StoreKeyIncentiveCounter : staker.StoreKey =<gnolang.StringValue>
StoreKeyTokenSpecificMinimumRewards : staker.StoreKey =<gnolang.StringValue>
StoreKeyUnstakingFee : staker.StoreKey =<gnolang.StringValue>
StoreKeyPendingProtocolFees : staker.StoreKey =<gnolang.StringValue>
StoreKeyUnstakedPositions : staker.StoreKey =<gnolang.StringValue>
StoreKeyUncollectedIncentiveCounts : staker.StoreKey =<gnolang.StringValue>
StoreKeyPools : staker.StoreKey =<gnolang.StringValue>
StoreKeyPoolTierMemberships : staker.StoreKey =<gnolang.StringValue>
StoreKeyPoolTierRatio : staker.StoreKey =<gnolang.StringValue>
StoreKeyPoolTierCounts : staker.StoreKey =<gnolang.StringValue>
StoreKeyPoolTierLastRewardCacheTimestamp : staker.StoreKey =<gnolang.StringValue>
StoreKeyPoolTierCurrentEmission : staker.StoreKey =<gnolang.StringValue>
StoreKeyPoolTierGetEmission : staker.StoreKey =<gnolang.StringValue>
StoreKeyPoolTierGetHalvingBlocksInRange : staker.StoreKey =<gnolang.StringValue>
StoreKeyWarmupTemplate : staker.StoreKey =<gnolang.StringValue>
StoreKeyCurrentSwapBatch : staker.StoreKey =<gnolang.StringValue>
stakerStore : type =staker.stakerStore
NewStakerStore : func(kvStore v1.KVStore) staker.IStakerStore Inspect
makeIncentiveID : func(creator .uverse.address, timestamp int64, index int64) string Inspect
contains : func(items []string, item string) bool Inspect
UintTree : type =staker.UintTree
NewBPTreeN : func(fanout int) *v0.BPTree Inspect
NewUintTree : func() *staker.UintTree Inspect
NewUintTreeN : func(fanout int) *staker.UintTree Inspect
encodeInt64 : func(num int64) string Inspect
decodeInt64 : func(s string) int64 Inspect
IStaker : type =staker.IStaker
IStakerManager : type =staker.IStakerManager
IStakerGetter : type =staker.IStakerGetter
IStakerStore : type =staker.IStakerStore
UnstakedPosition : type =staker.UnstakedPosition
NewUnstakedPosition : func(deposit *staker.Deposit, exitTime int64, exitTick int32, lowerTick *staker.Tick, upperTick *staker.Tick, lowerOutsideAcc string, upperOutsideAcc string, tier uint64, tierRatio uint64, tierCount uint64, unstakingFee uint64, pendingIncentiveIds []string) *staker.UnstakedPosition Inspect
RegisterInitializer : func(initializer func(...)) Inspect
UpgradeImpl : func(packagePath string) Inspect
GetImplementationPackagePath : func() string Inspect