TIMESTAMP_90DAYS
int64Value
7776000
TIMESTAMP_180DAYS
int64Value
15552000
TIMESTAMP_365DAYS
int64Value
31536000
maxIncentiveStartDelay
time.DurationValue
<zero>
MAX_UNIX_EPOCH_TIME
untyped bigint// 9999-12-31 23:59:59
Value
(253402300799 <untyped> bigint)
maxUnstakingFee
uint64// 10%
Value
1000
assertIsValidAmount
func(amount int64)assertIsValidAmount ensures the amount is non-negative.
- OID
- 02d577…ffec:3
assertIsValidAmount details
assertIsValidRewardAmountFormat
func(rewardAmountStr string)assertIsValidRewardAmountFormat ensures the reward amount string is formatted as "tokenPath:amount".
- OID
- 02d577…ffec:5
assertIsValidRewardAmountFormat details
assertIsDepositor
func(s *v1.stakerV1, caller .uverse.address, positionId uint64)assertIsDepositor ensures the caller is the owner of the deposit.
- OID
- 02d577…ffec:6
assertIsDepositor details
assertIsIncentiveOfPool
func(s *v1.stakerV1, poolPath string, positionId uint64, incentiveId string)assertIsIncentiveOfDeposit ensures the incentive exists and targets the pool the position is staked in, so a caller cannot ask a deposit to collect an incentive that can never pay it. assertIsIncentiveOfPool ensures the incentive targets the pool the position is staked in.
- OID
- 02d577…ffec:7
assertIsIncentiveOfPool details
assertHasNoExitCheckpoint
func(s *v1.stakerV1, positionId uint64)assertHasNoExitCheckpoint ensures the position carries no reward from a previous stake. Collecting it here would smuggle an unbounded calculation into staking, and leaving it would let the next unstake overwrite the checkpoint.
- OID
- 02d577…ffec:8
assertHasNoExitCheckpoint details
assertHasNoUncollectedIncentive
func(s *v1.stakerV1, incentiveId string)assertHasNoUncollectedIncentive ensures no unstaked position still owes a reward from this incentive, which has not been drawn down from it yet.
- OID
- 02d577…ffec:9
assertHasNoUncollectedIncentive details
assertIsNotStaked
func(s *v1.stakerV1, positionId uint64)assertIsNotStaked ensures the position is not already staked.
- OID
- 02d577…ffec:10
assertIsNotStaked details
assertIsPoolExists
func(s *v1.stakerV1, poolPath string)assertIsPoolExists ensures the pool exists.
- OID
- 02d577…ffec:11
assertIsPoolExists details
assertIsValidPoolTier
func(tier uint64)assertIsValidPoolTier ensures the tier is within valid range.
- OID
- 02d577…ffec:12
assertIsValidPoolTier details
assertTier1HasSparePool
func(currentTier uint64, tier1Count uint64)assertTier1HasSparePool ensures tier 1 keeps at least one pool after a tier change.
- OID
- 02d577…ffec:13
assertTier1HasSparePool details
assertIsGreaterThanMinimumRewardAmount
func(s *v1.stakerV1, rewardToken string, rewardAmount int64)assertIsGreaterThanMinimumRewardAmount ensures the reward amount meets minimum requirements.
- OID
- 02d577…ffec:14
assertIsGreaterThanMinimumRewardAmount details
assertIsAllowedForExternalReward
func(s *v1.stakerV1, poolPath string, tokenPath string)assertIsAllowedForExternalReward ensures the token is allowed for external rewards.
- OID
- 02d577…ffec:15
assertIsAllowedForExternalReward details
assertIsExternalRewardTokenAvailable
func(s *v1.stakerV1, poolPath string, tokenPath string, currentTime int64)assertIsExternalRewardTokenAvailable ensures a pool has no unfinished incentive for the token.
- OID
- 02d577…ffec:16
assertIsExternalRewardTokenAvailable details
assertIsValidFeeRate
func(fee uint64)assertIsValidFeeRate ensures the fee rate is within valid range (0-1000 basis points).
- OID
- 02d577…ffec:17
assertIsValidFeeRate details
assertIsValidIncentiveStartTime
func(startTimestamp int64)assertIsValidIncentiveStartTime ensures the incentive starts at midnight no earlier than 24 hours after creation and no later than 7 days after the first eligible midnight.
- OID
- 02d577…ffec:18
assertIsValidIncentiveStartTime details
assertIsAdminGovernanceOrCreator
func(caller .uverse.address, creator .uverse.address)assertIsAdminGovernanceOrCreator ensures the caller may act on an incentive: admin and governance are the protocol-level operators, and the creator is the address that funded the incentive in CreateExternalIncentive.
- OID
- 02d577…ffec:19
assertIsAdminGovernanceOrCreator details
assertIsNotStartedIncentive
func(incentiveResolver *v1.ExternalIncentiveResolver, currentTime int64)assertIsNotStartedIncentive ensures the incentive can still be cancelled, i.e. it has not started and nothing has been distributed from it. Only such an incentive may be removed outright; anything that already emitted rewards has to be finalized through EndExternalIncentive so the refund accounting and the penalty balance stay reachable.
- OID
- 02d577…ffec:20
assertIsNotStartedIncentive details
getMinimumIncentiveStartTimestamp
func() int64getMinimumIncentiveStartTimestamp returns after 24 hours from now.
- OID
- 02d577…ffec:21
getMinimumIncentiveStartTimestamp details
getMaximumIncentiveStartTimestamp
func() int64getMaximumIncentiveStartTimestamp returns 7 days after the first midnight that satisfies the minimum 24-hour delay.
- OID
- 02d577…ffec:22
getMaximumIncentiveStartTimestamp details
assertIsValidIncentiveEndTime
func(endTimestamp int64)assertIsValidIncentiveEndTime ensures the end timestamp is within valid epoch range.
- OID
- 02d577…ffec:23
assertIsValidIncentiveEndTime details
assertIsValidIncentiveDuration
func(externalDuration int64)assertIsValidIncentiveDuration ensures the duration is 90, 180, or 365 days.
- OID
- 02d577…ffec:24
assertIsValidIncentiveDuration details
assertIsValidAddress
func(addr .uverse.address)AssertIsValidAddress panics if the provided address is invalid.
- OID
- 02d577…ffec:25
assertIsValidAddress details
isMidnight
func(startTime time.Time) boolisMidnight checks if a time represents midnight (00:00:00).
- OID
- 02d577…ffec:26
isMidnight details
assertIsPositionOwner
func(owner .uverse.address, caller .uverse.address)assertIsPositionOwner validates that the caller has permission to operate the token.
- OID
- 02d577…ffec:27
assertIsPositionOwner details
Reward
typeReward is a struct for storing reward for a position. Internal reward is the GNS reward, external reward is the reward for other incentives. Penalties are the amount that is deducted from the reward due to the position's warmup.
Value
v1.Reward
aggregateRewards
func(rewards []v1.Reward) v1.RewardaggregateRewards sums the per-warmup rewards/penalties into a single Reward.
- OID
- 02d577…ffec:28
aggregateRewards details
calculatePositionRewardParam
typecalculatePositionRewardParam is a struct for calculating position reward
Value
v1.calculatePositionRewardParam
positionRewardUpdate
typepositionRewardUpdate carries the persisted-state changes produced (but not applied) by a calculation. They are applied by the update\* functions, so that only the collect path mutates state while the calculation stays pure.
Value
v1.positionRewardUpdate
positionRewardContext
typepositionRewardContext carries the per-position state that both the internal (GNS emission) and the external (incentive) reward calculations need. Resolving it once lets each path be calculated on its own without duplicating the deposit/pool/reward-state setup.
Value
v1.positionRewardContext
internalRewardSegment
typeinternalRewardSegment is a \[start, end) span over which the per-second emission reward rate is constant.
Value
v1.internalRewardSegment
appendInternalRewardTailSegments
func(segments []v1.internalRewardSegment, poolTier *v1.PoolTier, poolPath string, startTime int64, endTime int64, baseReward int64, exit *staker.UnstakedPosition) ([]v1.internalRewardSegment, .uverse.error)appendInternalRewardTailSegments appends the schedule for the tail \[startTime, endTime], where no persisted cache entry exists beyond startTime. Over this span tier/count are constant, so the rate changes only at halving boundaries.
- OID
- 02d577…ffec:30
appendInternalRewardTailSegments details
getInitialCollectTime
func(deposit *staker.Deposit, incentive *staker.ExternalIncentive) int64getInitialCollectTime determines the initial collection time for an incentive by taking the maximum of the deposit's stake time and the incentive's start time. This ensures rewards are only calculated from when both conditions are met: - The position must be staked (deposit.stakeTime) - The incentive must be active (incentive.startTimestamp) This function is used for lazy initialization when a position collects from an incentive for the first time, avoiding the need to iterate through all deposits when a new incentive is created.
- OID
- 02d577…ffec:31
getInitialCollectTime details
GNS_TOKEN_KEY
stringValue
"gno.land/r/gnoswap/gns.GNS"
WUGNOT_TOKEN_KEY
stringValue
"gno.land/r/gnoland/wugnot.wugnot"
emitSetPoolTier
func(prevAddr string, prevRealm string, poolPath string, tier uint64, rewardPerSecond int64, tierRewards map[uint64]int64, counts [4]uint64, currentTime int64)- OID
- 02d577…ffec:32
emitSetPoolTier details
errNoPermission
untyped stringValue
"[GNOSWAP-STAKER-001] caller has no permission"
errPoolNotFound
untyped stringValue
"[GNOSWAP-STAKER-002] pool not found"
errNotAvailableUpdateCollectTime
untyped stringValue
"[GNOSWAP-STAKER-003] not available to update collect time"
errInvalidInput
untyped stringValue
"[GNOSWAP-STAKER-004] invalid input data"
errInvalidUnstakingFee
untyped stringValue
"[GNOSWAP-STAKER-005] invalid unstaking fee"
errAlreadyStaked
untyped stringValue
"[GNOSWAP-STAKER-006] already staked position"
errNonIncentivizedPool
untyped stringValue
"[GNOSWAP-STAKER-007] pool is not incentivized"
errCannotEndIncentive
untyped stringValue
"[GNOSWAP-STAKER-008] cannot end incentive"
errInvalidIncentiveStartTime
untyped stringValue
"[GNOSWAP-STAKER-009] invalid incentive start time"
errDefaultExternalToken
untyped stringValue
"[GNOSWAP-STAKER-010] cannot delete default external token"
errInvalidPoolPath
untyped stringValue
"[GNOSWAP-STAKER-011] invalid pool path"
errInvalidPoolTier
untyped stringValue
"[GNOSWAP-STAKER-012] invalid pool tier"
errDataNotFound
untyped stringValue
"[GNOSWAP-STAKER-013] requested data not found"
errCalculationError
untyped stringValue
"[GNOSWAP-STAKER-014] unexpected calculation error"
errZeroLiquidity
untyped stringValue
"[GNOSWAP-STAKER-015] zero liquidity"
errInvalidIncentiveDuration
untyped stringValue
"[GNOSWAP-STAKER-016] invalid incentive duration"
errNotAllowedForExternalReward
untyped stringValue
"[GNOSWAP-STAKER-017] not allowed for external reward"
errIncentiveAlreadyExists
untyped stringValue
"[GNOSWAP-STAKER-018] incentive already exists"
errOverflow
untyped stringValue
"[GNOSWAP-STAKER-019] overflow"
errAddExistingToken
untyped stringValue
"[GNOSWAP-STAKER-020] cannot add existing token"
errInvalidAddress
untyped stringValue
"[GNOSWAP-STAKER-021] invalid address"
errIsNotEndedIncentive
untyped stringValue
"[GNOSWAP-STAKER-022] incentive is not ended yet"
errCannotCancelIncentive
untyped stringValue
"[GNOSWAP-STAKER-023] cannot cancel incentive"
errUncollectedPosition
untyped stringValue
"[GNOSWAP-STAKER-024] position has uncollected rewards"
errDeniedRewardToken
untyped stringValue
"[GNOSWAP-STAKER-025] denied reward token"
errCannotDenyDefaultToken
untyped stringValue
"[GNOSWAP-STAKER-026] cannot deny default token"
errInsufficientRewardTokenBalance
untyped stringValue
"[GNOSWAP-STAKER-027] insufficient reward token balance"
makeErrorWithDetails
func(message string, details string) .uverse.error- OID
- 02d577…ffec:34
makeErrorWithDetails details
tickCrossEventInfo
typeValue
v1.tickCrossEventInfo
NewTickCrossEventInfo
func(tickID int32, stakedLiquidityGross *v1.Uint, stakedLiquidityDelta *v1.Int, outsideAccumulation *v1.Uint) *v1.tickCrossEventInfoNewTickCrossEventInfo captures the values emitted when a swap crosses a tick. Parameters: - tickID: Tick index crossed during the swap. - stakedLiquidityGross: Total staked liquidity at the crossed tick. - stakedLiquidityDelta: Net staked liquidity change applied at the crossed tick. - outsideAccumulation: Reward-ratio accumulation outside the crossed tick. Returns: - info: Event payload containing the supplied tick-cross values.
- OID
- 02d577…ffec:36
NewTickCrossEventInfo details
checkCannotAddDefaultToken
func(tokenPath string) .uverse.error- OID
- 02d577…ffec:38
checkCannotAddDefaultToken details
checkCannotRemoveDefaultToken
func(tokenPath string) .uverse.error- OID
- 02d577…ffec:40
checkCannotRemoveDefaultToken details
checkCannotDenyDefaultToken
func(tokenPath string) .uverse.error- OID
- 02d577…ffec:41
checkCannotDenyDefaultToken details
cloneExternalIncentiveEntry
func(value interface{...}) interface{...}cloneExternalIncentiveEntry is the transformation for a pool's incentive tree. ExternalIncentive is mutable and its setters are declared in /r/gnoswap/staker, so an external holder of the stored pointer could write realm state through it.
- OID
- 02d577…ffec:42
cloneExternalIncentiveEntry details
rewardCacheEntry
func(value interface{...}) interface{...}rewardCacheEntry, accumulationEntry, and historicalTickEntry are the transformations for the UintTree-backed views. Their values are immutable scalars, so nothing needs copying; they type-check instead, which keeps the filtering the replaced slice getters did when an entry failed its cast.
- OID
- 02d577…ffec:44
rewardCacheEntry details
accumulationEntry
func(value interface{...}) interface{...}- OID
- 02d577…ffec:45
accumulationEntry details
historicalTickEntry
func(value interface{...}) interface{...}- OID
- 02d577…ffec:46
historicalTickEntry details
defaultDepositGnsAmount
int64Value
100000000000
defaultMinimumRewardAmount
int64Value
1000000000
defaultUnstakingFee
uint64// 1%
Value
100
init.81
func()- OID
- 02d577…ffec:47
init.81 details
registerStakerV1
func()- OID
- 02d577…ffec:49
registerStakerV1 details
initStoreData
func(int, rlm .uverse.realm, stakerStore staker.IStakerStore, emissionAccessor staker.EmissionAccessor) .uverse.error- OID
- 02d577…ffec:50
initStoreData details
initializePoolTier
func(stakerStore staker.IStakerStore) (*v1.PoolTier, *v1.Pools, int64, map[uint64]int64)initializePoolTier seeds the staker's pool tiering state on first init. The default pool is the canonical WUGNOT:GNS:3000 pool, sourced from the emission realm's DefaultInitialPoolTierPath constant so that the staker's tier-1 base pool is guaranteed to match the pool emission distributes to. When SetDistributionStartTime executes, emission distributes to this default pool and the staker uses the same path as the base tier-1 pool for reward accrual. Keeping both sides on emission's single constant structurally enforces that invariant and removes any risk of the two realms drifting apart on the canonical default pool identity.
- OID
- 02d577…ffec:51
initializePoolTier details
stakerV1
typeValue
v1.stakerV1
NewStakerV1
func(stakerStore staker.IStakerStore, poolAccessor staker.PoolAccessor, emissionAccessor staker.EmissionAccessor, nftAccessor staker.NFTAccessor) *v1.stakerV1NewStakerV1 constructs a version 1 staker implementation backed by the supplied accessors. Parameters: - stakerStore: Persistent storage accessor for pools, deposits, incentives, tier state, and reward bookkeeping. - poolAccessor: Accessor for pool state used while updating and resolving staked positions. - emissionAccessor: Accessor for GNS emission data used to calculate rewards. - nftAccessor: Accessor for the position NFT ownership and token operations. Returns: - staker: New stakerV1 implementation wired to the supplied store and accessors.
- OID
- 02d577…ffec:52
NewStakerV1 details
NOT_EMISSION_TARGET_TIER
uint64Value
0
pctToIndex
func(pct int64) intpctToIndex converts percentage to warmup index.
- OID
- 02d577…ffec:54
pctToIndex details
IncentivesResolver
typeIncentivesResolver returns a resolver over the pool's external-incentive state. Returns: - resolver: Incentives resolver backed by this pool's incentive tree and unclaimable periods.
Value
v1.IncentivesResolver
NewIncentivesResolver
func(incentives *staker.Incentives) *v1.IncentivesResolverNewIncentivesResolver wraps the persisted external-incentive state for lookup and mutation. Parameters: - incentives: External incentive state containing the incentive tree and unclaimable periods. Returns: - resolver: Resolver backed by incentives.
- OID
- 02d577…ffec:56
NewIncentivesResolver details
retrieveIncentive
func(tree *v0.BPTree, id string) (*staker.ExternalIncentive, bool)- OID
- 02d577…ffec:58
retrieveIncentive details
calculateUnClaimableDuration
func(unclaimableStart int64, unclaimableEnd int64, incentiveStartTimestamp int64, incentiveEndTimestamp int64) int64calculateUnClaimableDuration calculates the duration of overlap between an unclaimable period and incentive period
- OID
- 02d577…ffec:59
calculateUnClaimableDuration details
q128
*v1.Uint- OID
- 02d577…ffec:61
q128 details
Pools
typePools represents the global pool storage
Value
v1.Pools
NewPools
func() *v1.PoolsNewPools creates an empty resolver for global pool storage. Returns: - pools: Pools resolver backed by a new B+ tree keyed by pool path.
- OID
- 02d577…ffec:63
NewPools details
PoolResolver
typeValue
v1.PoolResolver
NewPoolResolver
func(pool *staker.Pool) *v1.PoolResolverNewPoolResolver wraps a pool's persisted reward, liquidity, tick, and incentive state for calculations. Parameters: - pool: Pool state to resolve. Returns: - resolver: Pool resolver backed by pool.
- OID
- 02d577…ffec:65
NewPoolResolver details
newPoolResolverWithExit
func(pool *staker.Pool, exit *staker.UnstakedPosition) *v1.PoolResolvernewPoolResolverWithExit builds a resolver that reads the pool through an exit checkpoint.
- OID
- 02d577…ffec:66
newPoolResolverWithExit details
RewardState
typeRewardState is a struct for storing the intermediate state for reward calculation.
Value
v1.RewardState
AllTierCount
untyped bigint// 0, 1, 2, 3
Value
(4 <untyped> bigint)
Tier1
untyped bigintValue
(1 <untyped> bigint)
Tier2
untyped bigintValue
(2 <untyped> bigint)
Tier3
untyped bigintValue
(3 <untyped> bigint)
TierRatioFromCounts
func(tier1Count uint64, tier2Count uint64, tier3Count uint64) staker.TierRatioTierRatioFromCounts calculates the ratio distribution for each tier based on pool counts. Parameters: - tier1Count (uint64): Number of pools in tier 1. - tier2Count (uint64): Number of pools in tier 2. - tier3Count (uint64): Number of pools in tier 3. Returns: - TierRatio: The ratio distribution across tier 1, 2, and 3, scaled up by 100.
- OID
- 02d577…ffec:67
TierRatioFromCounts details
PoolTier
typePoolTier manages pool counts, ratios, and rewards for different tiers. Fields: - membership: Tracks which tier a pool belongs to (poolPath -> blockNumber -> tier). Methods: - CurrentCount: Returns the current count of pools in a tier at a specific timestamp. - CurrentRatio: Returns the current ratio for a tier at a specific timestamp. - CurrentTier: Returns the tier of a specific pool at a given timestamp. - CurrentReward: Retrieves the reward for a tier at a specific timestamp. - changeTier: Updates the tier of a pool and recalculates ratios.
Value
v1.PoolTier
NewPoolTier
func(pools *v1.Pools, currentTime int64, initialPoolPath string, getEmission func(...), getHalvingBlocksInRange func(...)) *v1.PoolTierNewPoolTier creates a new PoolTier instance with single initial 1 tier pool. Parameters: - pools: The pool collection. - currentTime: The current block time. - initialPoolPath: The path of the initial pool. - getEmission: A function that returns the current emission to the staker contract. - getHalvingBlocksInRange: A function that returns a list of halving blocks within the interval \[start, end) in ascending order. Returns: - \*PoolTier: The new PoolTier instance.
- OID
- 02d577…ffec:69
NewPoolTier details
NewPoolTierBy
func(membership *v0.BPTree, tierRatio staker.TierRatio, counts [4]uint64, lastRewardCacheTimestamp int64, currentEmission int64, getEmission func(...), getHalvingBlocksInRange func(...)) *v1.PoolTierNewPoolTierBy reconstructs a PoolTier from persisted membership, ratios, counts, and callbacks. Parameters: - membership: Persisted pool-path-to-tier mapping. - tierRatio: Persisted reward-share ratio for each tier. - counts: Persisted number of pools in each tier index. - lastRewardCacheTimestamp: Timestamp through which reward caches have been materialized. - currentEmission: Emission rate currently used for reward accrual. - getEmission: Callback returning the current staker emission rate or an error. - getHalvingBlocksInRange: Callback returning halving timestamps and corresponding emissions in \[start, end). Returns: - \*PoolTier: Reconstructed tier manager using the supplied persisted state and callbacks.
- OID
- 02d577…ffec:70
NewPoolTierBy details
calculatePoolReward
func(emission int64, tierRatio int64, tierCount int64) (int64, .uverse.error)calculatePoolReward calculates the reward for a pool based on the emission, tier ratio, and tier count. Parameters: - emission: The emission for the pool. - tierRatio: The tier ratio for the pool. - tierCount: The tier count for the pool. Returns: - int64: The reward for the pool. - error: An invalid calculation input.
- OID
- 02d577…ffec:71
calculatePoolReward details
TickResolver
typeValue
v1.TickResolver
NewTickResolver
func(tick *staker.Tick) *v1.TickResolverNewTickResolver wraps a staker tick to expose reward-accumulation updates. Parameters: - tick: Staker tick whose state is resolved. Returns: - \*TickResolver: Resolver backed by tick.
- OID
- 02d577…ffec:72
NewTickResolver details
maxDurationOneYear
int64// 31,536,000 seconds
Value
31536000
modifyWarmup
func(warmupTemplate []staker.Warmup, index int, timeDuration int64) []staker.Warmupexpected to be called by governance
- OID
- 02d577…ffec:74
modifyWarmup details
instantiateWarmup
func(warmupTemplate []staker.Warmup, currentTime int64) []staker.Warmup- OID
- 02d577…ffec:76
instantiateWarmup details
applyWarmup
func(warmup staker.Warmup, poolReward int64, positionLiquidity *v1.Uint, stakedLiquidity *v1.Uint) (int64, int64)applyWarmup applies the warmup to the rewards and calculate penalties.
- OID
- 02d577…ffec:77
applyWarmup details
safeAddTime
func(currentTime int64, duration int64) int64safeAddTime performs safe addition with overflow protection
- OID
- 02d577…ffec:78
safeAddTime details
ZERO_ADDRESS
.uverse.addressValue
<gnolang.StringValue>
Deposits
typeDeposits manages all staked positions.
Value
v1.Deposits
NewDeposits
func() *v1.DepositsNewDeposits creates a new Deposits instance. Returns: - deposits: Empty deposit collection backed by a position-ID tree.
- OID
- 02d577…ffec:79
NewDeposits details
retrieveDeposit
func(data interface{...}) *staker.DepositretrieveDeposit safely casts data to Deposit type.
- OID
- 02d577…ffec:81
retrieveDeposit details
ExternalIncentives
typeExternalIncentives manages external incentive programs.
Value
v1.ExternalIncentives
NewExternalIncentives
func() *v1.ExternalIncentivesNewExternalIncentives creates a new ExternalIncentives instance. Returns: - incentives: Empty external-incentive collection backed by an incentive-ID tree.
- OID
- 02d577…ffec:82
NewExternalIncentives details
stakeScanLowerBound
func(currentTime int64) int64stakeScanLowerBound returns the lower bound of the stake-time incentive scan window, clamped to 0. The start-time index encodes keys as unsigned, so a negative bound aborts when the chain time is under TIMESTAMP\_365DAYS.
- OID
- 02d577…ffec:83
stakeScanLowerBound details
collectContext
typecollectContext carries the values every reward delivery of one collect call shares: the deposit being collected, the collect timestamp and height, the caller identity used in events, and the accumulator snapshot emitted with every collect event. Resolving it once is what keeps a collect-everything call at a single snapshot: the emission delivery and each incentive delivery all read the same context.
Value
v1.collectContext
externalDeliveryOutcome
typeexternalDeliveryOutcome is what deliverExternalIncentiveReward did with one incentive. The checkpoint bookkeeping keys off it instead of re-deriving the decision from incentive state, which a permissionless re-entering collect may already have changed.
Value
v1.externalDeliveryOutcome
externalDeliveryPaid
v1.externalDeliveryOutcomeValue
<zero>
externalDeliveryNothingOwed
v1.externalDeliveryOutcomeValue
<zero>
externalDeliveryAlreadyDelivered
v1.externalDeliveryOutcomeValue
<zero>
externalDeliveryDeferred
v1.externalDeliveryOutcomeValue
<zero>
externalDeliveryUnpayable
v1.externalDeliveryOutcomeValue
<zero>
collectTarget
typecollectTarget is the record a collect runs against: the live deposit while staked, or the exit checkpoint an unstake left behind.
Value
v1.collectTarget
tokenHasLiquidity
func(positionId uint64) .uverse.errortokenHasLiquidity checks if the target positionId has non-zero liquidity
- OID
- 02d577…ffec:84
tokenHasLiquidity details
getLiquidity
func(positionId uint64) *v1.Uint- OID
- 02d577…ffec:85
getLiquidity details
getTickOf
func(positionId uint64) (int32, int32)- OID
- 02d577…ffec:86
getTickOf details
ExternalIncentiveResolver
typeValue
v1.ExternalIncentiveResolver
NewExternalIncentiveResolver
func(externalIncentive *staker.ExternalIncentive) *v1.ExternalIncentiveResolverNewExternalIncentiveResolver wraps an external incentive with resolver operations. Parameters: - externalIncentive: External incentive whose timestamps and accounting state the resolver exposes. Returns: - resolver: Resolver backed by externalIncentive.
- OID
- 02d577…ffec:87
NewExternalIncentiveResolver details
DepositResolver
typeValue
v1.DepositResolver
NewDepositResolver
func(deposit *staker.Deposit) *v1.DepositResolverNewDepositResolver wraps a deposit with reward-cursor and warmup resolution helpers. Parameters: - deposit: Deposit whose persisted reward state should be resolved. Returns: - resolver: Resolver backed by deposit.
- OID
- 02d577…ffec:89
NewDepositResolver details
UnstakedPositions
typeUnstakedPositions manages exit checkpoints.
Value
v1.UnstakedPositions
NewUnstakedPositions
func() *v1.UnstakedPositionsNewUnstakedPositions creates a new UnstakedPositions instance. Returns: - \*UnstakedPositions: Empty exit-checkpoint manager backed by a new B+ tree.
- OID
- 02d577…ffec:90
NewUnstakedPositions details
addUncollectedIncentiveCountTo
func(counts *v0.BPTree, incentiveId string, delta int64)- OID
- 02d577…ffec:92
addUncollectedIncentiveCountTo details
poolPathDivide
func(poolPath string) (string, string, string)poolPathDivide splits a pool path into token addresses and fee tier.
- OID
- 02d577…ffec:93
poolPathDivide details
positionIdFrom
func(positionId uint64) v0.TokenIDpositionIdFrom converts a uint64 position ID to grc721.TokenID.
- OID
- 02d577…ffec:95
positionIdFrom details
contains
func(slice []string, item string) boolcontains checks if a string exists in a slice.
- OID
- 02d577…ffec:96