For the complete documentation index, see llms.txt. This page is also available as Markdown.

unstaked_position.gno

Types

UnstakedPosition

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.

source

Methods

Deposit

Deposit returns the deposit snapshot captured when this position was unstaked.

Return Values

Name
Type
Description

deposit

*Deposit

Stored deposit state, including its owner, pool, liquidity, ticks, warmups, and collected reward fields.

source

EmissionCollected

EmissionCollected reports whether the emission reward has been collected.

Return Values

Name
Type
Description

collected

bool

True after MarkEmissionCollected has been called; false while the internal reward remains pending.

source

ExitTick

ExitTick returns the pool tick observed at ExitTime.

Return Values

Name
Type
Description

exitTick

int32

Tick value used to determine the position's in-range status at the exit checkpoint.

source

ExitTime

ExitTime returns the timestamp at which the position stopped accruing rewards.

Return Values

Name
Type
Description

exitTime

int64

Unix timestamp pinned as the end of this position's reward-accrual window.

source

FullyCollected

FullyCollected reports whether every reward source has been collected.

Return Values

Name
Type
Description

collected

bool

True only when the internal emission flag is set and no external incentive IDs remain pending.

source

HasPendingIncentiveId

HasPendingIncentiveId reports whether the incentive is still to be collected.

Parameters

Name
Type
Description

incentiveId

string

External incentive identifier to look up in this checkpoint's pending set.

Return Values

Name
Type
Description

pending

bool

True when incentiveId is currently pending; false when it is absent or the pending set is nil.

source

HasPendingIncentives

HasPendingIncentives reports whether any incentive is still to be collected.

Return Values

Name
Type
Description

pending

bool

True when at least one external incentive ID remains pending; false otherwise.

source

LowerOutsideAcc

LowerOutsideAcc returns the lower boundary tick's outside accumulation at ExitTime.

Return Values

Name
Type
Description

lowerOutsideAcc

string

Decimal-encoded reward-ratio accumulation outside the lower boundary at exit.

source

LowerTick

LowerTick returns the position's lower boundary tick snapshot.

Return Values

Name
Type
Description

lowerTick

*Tick

Stored lower boundary tick used when calculating rewards for this exit checkpoint.

source

MarkEmissionCollected

MarkEmissionCollected records that the emission reward has been collected.

source

MarkIncentiveCollected

MarkIncentiveCollected records that the incentive has been collected.

Parameters

Name
Type
Description

incentiveId

string

External incentive identifier to remove from the pending set.

source

PendingIncentiveCount

PendingIncentiveCount returns how many incentives are still to be collected.

Return Values

Name
Type
Description

count

int

Number of external incentive IDs currently pending in the checkpoint.

source

PendingIncentiveIdList

PendingIncentiveIdList returns the incentives still to be collected.

Return Values

Name
Type
Description

incentiveIds

[]string

IDs currently present in the pending set; iteration order is unspecified.

source

Tier

Tier returns the pool's emission tier at ExitTime, or 0 when it was not tiered.

Return Values

Name
Type
Description

tier

uint64

Tier identifier pinned at exit; zero means no emission tier applied.

source

TierCount

TierCount returns how many pools shared the tier at ExitTime.

Return Values

Name
Type
Description

tierCount

uint64

Number of pools in the pinned tier when the position exited.

source

TierRatio

TierRatio returns the tier's emission ratio at ExitTime.

Return Values

Name
Type
Description

tierRatio

uint64

Stored scaled reward-share ratio for the pinned tier at exit.

source

UnstakingFee

UnstakingFee returns the staking-reward fee rate in force at ExitTime.

Return Values

Name
Type
Description

unstakingFee

uint64

Fee rate pinned for this exit in basis points (0-1,000; 100 = 1%).

source

UpperOutsideAcc

UpperOutsideAcc returns the upper boundary tick's outside accumulation at ExitTime.

Return Values

Name
Type
Description

upperOutsideAcc

string

Decimal-encoded reward-ratio accumulation outside the upper boundary at exit.

source

UpperTick

UpperTick returns the position's upper boundary tick snapshot.

Return Values

Name
Type
Description

upperTick

*Tick

Stored upper boundary tick used when calculating rewards for this exit checkpoint.

source

Constructors

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

Last updated