# Staker
Liquidity mining and reward distribution for LP positions.
## Overview
Staker manages distribution of internal (GNS emission) and external (user-provided) rewards to staked LP positions, with time-weighted rewards and warmup periods.
## Gnoweb
The root `Render("")` delegates to the active implementation and shows realm identity, the halt flag, stored record counts, cumulative GNS emissions, the cached emission rate, incentive requirements, tier allocations, unstaking fees, and warmup stages.
GNS amounts use six-decimal base units; external rewards use their token's base units. Warmup durations are per-stage seconds, with the final stage shown as unbounded. Rendering reads stored counts and fixed configuration without traversing positions or incentives. Unsupported paths return `404`.
## Configuration
- **Deposit GNS Amount**: 100,000 GNS per external incentive (default; governance-adjustable)
- **Minimum Reward Amount**: 1,000 token units (default for external incentive creation)
- **Unstaking Fee**: 1% default (100 basis points; configurable from 0 to 10%)
- **Internal Pool Tiers**: 1, 2, or 3 (assigned per pool); external-only pools can also be stakeable
- **Warmup Schedule**: 30/50/70/100% over default cumulative windows of 0-5, 5-15, 15-45, and 45+ days
- **External Token Policy**: Approved reward tokens; pool-pair tokens are also accepted for their own pool unless explicitly denied
## Core Features
### Internal Rewards (GNS Emission)
- Allocated to tiered pools (tiers 1, 2, 3)
- Split across tiers by TierRatio
- Distributed proportionally to in-range liquidity
- Unclaimed rewards go to community pool
### External Rewards (User Incentives)
- Created for specific pools
- Constant reward per second over the incentive window; the stored rate is Q128-scaled as `(rewardAmount << 128) / duration`
- Proportional to staked liquidity
- `EndExternalIncentive` returns only the unclaimable/remainder portion and GNS deposit to its explicit refund address; rewards still owed by live positions remain claimable
### Warmup Periods
Every staked position progresses through warmup periods. The default finite durations are 5, 10,
and 30 days, followed by a final `math.MaxInt64` tier:
- 0-5 days: 30% of the calculated reward
- 5-15 days: 50% of the calculated reward
- 15-45 days: 70% of the calculated reward
- 45+ days: 100% of the calculated reward
Governance may change the finite durations. Warmup ratios are applied before the staking-reward fee:
internal GNS penalties go to the community pool, while external penalties accumulate on the
incentive and are collected separately to an explicit address after `EndExternalIncentive`.
## Key Functions
### `StakeToken`
Stakes LP position NFT to earn rewards.
### `UnStakeToken`
Unstakes a position and records an exit checkpoint for its rewards. It neither calculates nor
pays them: withdrawing must never depend on the reward side.
### `CollectReward`
Collects accumulated rewards. Takes a position that was unstaked without collecting as well as a
staked one, so withdrawing is `UnStakeToken` plus one collect. A collect on an unstaked position
is permissionless, since it can only ever pay that position's owner.
### `CreateExternalIncentive`
Creates an external reward program for a specific pool. Any caller may create one after satisfying
the reward-token allowlist/denial, duration, start-time, reward-minimum, and GNS-deposit checks.
### `EndExternalIncentive`
Ends an incentive after its end timestamp and finalizes its refundable unclaimable/remainder
amount. The reward tokens and GNS deposit are sent to the caller-supplied `refundAddress`; only
the creator or admin may call it, and an outstanding exit checkpoint for that incentive blocks ending.
### `CancelExternalIncentive`
Removes an incentive that has not started and refunds its reward tokens and GNS deposit to the
creator. Callable by admin, governance, or the creator; the reward-token refund is capped by the
balance held by the staker.
## Reward Calculation Logic
### Tier Ratio Distribution
Emission split across tiers based on active pools:
```
If only tier 1 has pools: [100%, 0%, 0%]
If tiers 1 & 3 have pools: [80%, 0%, 20%]
If tiers 1 & 2 have pools: [70%, 30%, 0%]
If all tiers have pools: [50%, 30%, 20%]
```
Mathematical representation:
```math
TierRatio(t) =
[100, 0, 0] if Count(2) = 0 ∧ Count(3) = 0
[80, 0, 20] if Count(2) = 0
[70, 30, 0] if Count(3) = 0
[50, 30, 20] otherwise
```
### Pool Reward Formula
```math
poolReward(pool) = (emission × TierRatio[tier(pool)] / 100) / Count(tier(pool))
```
Here `emission` is the already-allocated per-second GNS amount returned by the emission module
for liquidity stakers. It is split by the tier percentage and then divided among pools in that
tier:
```math
emission = GetStakerEmissionAmountPerSecond()
```
### Position Reward Calculation
The reward for each position is calculated through:
1. **Resolve the persisted/halving per-second reward schedule** (read-only)
2. **Retrieve position state** from deposit records or an exit checkpoint
3. **Calculate internal rewards** if the pool has an internal tier
4. **Calculate external rewards** for the incentive IDs
5. **Apply warmup ratios and penalties** based on stake duration
Collection may separately advance reward caches and persist newly discovered incentive IDs; the
read-only calculation itself does not write those caches.
Mathematical formula for total reward ratio:
```math
TotalRewardRatio(s,e) = Σ[i=0 to m-1] ΔRaw(αᵢ, βᵢ) × rᵢ
where:
αᵢ = max(s, Hᵢ₋₁)
βᵢ = min(e, Hᵢ)
ΔRaw(a, b) = CalcRaw(b) - CalcRaw(a)
CalcRaw(h) =
L(h) - U(h) if tick(h) < ℓ
U(h) - L(h) if tick(h) ≥ u
G(h) - (L(h) + U(h)) otherwise
where:
L(h) = tickLower.OutsideAccumulation(h)
U(h) = tickUpper.OutsideAccumulation(h)
G(h) = globalRewardRatioAccumulation(h)
ℓ = tickLower.id
u = tickUpper.id
```
Final position reward:
```math
finalReward = TotalRewardRatio × poolReward × positionLiquidity
= ∫[s to e] (poolReward × positionLiquidity) / TotalStakedLiquidity(h) dh
```
### Tick Cross Hook
When price crosses an initialized tick with staked positions:
1. **Updates staked liquidity** - Adjusts total staked liquidity
2. **Updates reward accumulation** - Recalculates `globalRewardRatioAccumulation`
3. **Manages unclaimable periods** - Starts/ends periods with no in-range liquidity
4. **Updates tick accumulation** - Adjusts `CurrentOutsideAccumulation`
The `globalRewardRatioAccumulation` tracks the integral:
```math
globalRewardRatioAccumulation = ∫ 1/TotalStakedLiquidity(h) dh
```
This integral is only computed when `TotalStakedLiquidity(h) ≠ 0`, enabling precise reward calculation even as liquidity changes.
### Reward State Tracking
The system maintains:
- **Global accumulation**: Tracks reward ratio across all positions
- **Tick accumulation**: Tracks rewards "outside" each tick
- **Position state**: Individual reward calculation parameters
## Approval Requirements
- `StakeToken` moves the position NFT to the staker realm through
`gnft.TransferFrom`, so the caller must approve the staker on that NFT first
with `gnft.Approve(cross(cur), stakerAddress, positionId)`, or grant
`gnft.SetApprovalForAll(cross(cur), stakerAddress, true)`.
- `CreateExternalIncentive` pulls two amounts into the staker realm: the reward
token amount and the GNS deposit. Approve the staker realm for both token
contracts before calling.
- `UnStakeToken`, the reward-collection functions, `EndExternalIncentive`, and
`CancelExternalIncentive` pay out to the caller or to a supplied address and
require no approval.
```go
// Approve the staker on the position NFT, then stake
stakerAddress := access.MustGetAddress(prabc.ROLE_STAKER.String())
gnft.Approve(cross(cur), stakerAddress, grc721.TokenID("123"))
StakeToken(cross(cur), 123, "")
// GNS pays both the external reward and the required deposit
gns.Approve(cross(cur), stakerAddress, 1_000_000_000+GetDepositGnsAmount())
```
## Usage
The proxy functions receive a realm argument. From a caller realm with `cur realm`, pass
`cross(cur)` as that first argument:
```go
// Stake an existing position
StakeToken(cross(cur), 123, "g1referrer...")
// Create an external incentive (rewardAmount is an int64 token-unit amount)
CreateExternalIncentive(
cross(cur),
"gno.land/r/gnoland/wugnot.wugnot:gno.land/r/gnoswap/gns.GNS:3000",
"gno.land/r/gnoswap/gns.GNS",
1_000_000_000,
startTime,
endTime,
)
// Collect while the position is staked
CollectReward(cross(cur), 123)
// Unstake: this returns the NFT and creates an exit checkpoint; it does not collect
UnStakeToken(cross(cur), 123)
// Collect the checkpoint, either per source or all at once
CollectEmissionReward(cross(cur), 123)
CollectExternalIncentiveReward(cross(cur), 123, incentiveId)
```
## Security
- Positions locked during staking
- External incentives require GNS deposit
- Warmup periods prevent gaming
- Unclaimed rewards properly redirected
- Hook integration ensures accurate tracking
AddToken(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenPath string)
CancelExternalIncentive(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, targetPoolPath string, incentiveId string)
ChangePoolTier(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, poolPath string, tier uint64)
CollectableEmissionReward(positionId uint64) (int64, interface {Error func() string})
CollectableExternalIncentiveReward(positionId uint64, incentiveId string) (int64, interface {Error func() string})
CollectEmissionReward(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64) (int64, int64)
CollectExternalIncentivePenalty(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, targetPoolPath string, incentiveId string, refundAddress string) int64
CollectExternalIncentiveReward(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64, incentiveId string) (int64, int64)
CollectReward(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64) (string, string, map[string]int64, map[string]int64)
CreateExternalIncentive(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64)
DefaultAllowedTokens() []string
DefaultWarmupTemplate() []gno.land/r/gnoswap/staker.Warmup
EndExternalIncentive(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, targetPoolPath string, incentiveId string, refundAddress string)
GetAllowedTokens() []string
GetCreatedHeightOfIncentive(poolPath string, incentiveId string) (int64, interface {Error func() string})
GetDeniedRewardTokens() []string
GetDeposit(lpTokenId uint64) (*gno.land/r/gnoswap/staker.Deposit, interface {Error func() string})
GetDepositCollectedExternalReward(lpTokenId uint64, incentiveId string) (int64, interface {Error func() string})
GetDepositCollectedInternalReward(lpTokenId uint64) (int64, interface {Error func() string})
GetDepositExternalIncentiveIdList(lpTokenId uint64) ([]string, interface {Error func() string})
GetDepositExternalRewardLastCollectTimestamp(lpTokenId uint64, incentiveId string) (int64, interface {Error func() string})
GetDepositGnsAmount() int64
GetDepositInternalRewardLastCollectTimestamp(lpTokenId uint64) (int64, interface {Error func() string})
GetDepositLiquidity(lpTokenId uint64) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})
GetDepositLiquidityAsString(lpTokenId uint64) (string, interface {Error func() string})
GetDepositOwner(lpTokenId uint64) (string, interface {Error func() string})
GetDepositStakeTime(lpTokenId uint64) (int64, interface {Error func() string})
GetDepositTargetPoolPath(lpTokenId uint64) (string, interface {Error func() string})
GetDepositTickLower(lpTokenId uint64) (int32, interface {Error func() string})
GetDepositTickUpper(lpTokenId uint64) (int32, interface {Error func() string})
GetDepositWarmUp(lpTokenId uint64) ([]gno.land/r/gnoswap/staker.Warmup, interface {Error func() string})
GetExternalIncentiveByPoolPath(poolPath string) ([]gno.land/r/gnoswap/staker.ExternalIncentive, interface {Error func() string})
GetImplementationPackagePath() string
GetIncentiveAccumulatedPenaltyAmount(poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveCreatedTimestamp(poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveCreator(poolPath string, incentiveId string) (string, interface {Error func() string})
GetIncentiveDepositGnsAmount(poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveDistributedRewardAmount(poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveEndTimestamp(poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveRefunded(poolPath string, incentiveId string) (bool, interface {Error func() string})
GetIncentiveRemainingRewardAmount(poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveRewardAmount(poolPath string, incentiveId string) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})
GetIncentiveRewardAmountAsString(poolPath string, incentiveId string) (string, interface {Error func() string})
GetIncentiveRewardPerSecondX128(poolPath string, incentiveId string) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})
GetIncentiveRewardToken(poolPath string, incentiveId string) (string, interface {Error func() string})
GetIncentiveStartTimestamp(poolPath string, incentiveId string) (int64, interface {Error func() string})
GetIncentiveTotalRewardAmount(poolPath string, incentiveId string) (int64, interface {Error func() string})
GetMinimumRewardAmount() int64
GetMinimumRewardAmountForToken(tokenPath string) int64
GetPendingProtocolFees() map[string]int64
GetPool(poolPath string) (*gno.land/r/gnoswap/staker.Pool, interface {Error func() string})
GetPoolGlobalRewardRatioAccumulations(poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree
GetPoolHistoricalTicks(poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree
GetPoolIncentives(poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree
GetPoolReward(tier uint64) (int64, interface {Error func() string})
GetPoolRewardCaches(poolPath string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree
GetPoolsByTier(tier uint64) ([]string, interface {Error func() string})
GetPoolStakedLiquidity(poolPath string) (string, interface {Error func() string})
GetPoolTier(poolPath string) uint64
GetPoolTierCount(tier uint64) uint64
GetPoolTierRatio(poolPath string) (uint64, interface {Error func() string})
GetSpecificTokenMinimumRewardAmount(tokenPath string) (int64, bool)
GetTargetPoolPathByIncentiveId(poolPath string, incentiveId string) (string, interface {Error func() string})
GetTotalEmissionSent() int64
GetUncollectedIncentiveCount(incentiveId string) int64
GetUnstakedPositionExitTime(positionId uint64) (int64, interface {Error func() string})
GetUnstakedPositionPendingIncentives(positionId uint64) ([]string, interface {Error func() string})
GetUnstakingFee() uint64
GetWarmupTemplate() []gno.land/r/gnoswap/staker.Warmup
HasUnstakedPosition(positionId uint64) bool
IsIncentiveActive(poolPath string, incentiveId string) (bool, interface {Error func() string})
IsStaked(positionId uint64) bool
NewBPTreeN(fanout int) *gno.land/p/nt/bptree/v0.BPTree
NewCounter() *gno.land/r/gnoswap/staker.Counter
NewDeposit(owner string, targetPoolPath string, liquidity *gno.land/p/gnoswap/uint256/v1.Uint, currentTime int64, tickLower int32, tickUpper int32, warmups []gno.land/r/gnoswap/staker.Warmup) *gno.land/r/gnoswap/staker.Deposit
NewExternalIncentive(incentiveId string, targetPoolPath string, rewardToken string, rewardAmount int64, startTimestamp int64, endTimestamp int64, creator string, depositGnsAmount int64, createdHeight int64, currentTime int64) *gno.land/r/gnoswap/staker.ExternalIncentive
NewIncentives(targetPoolPath string) *gno.land/r/gnoswap/staker.Incentives
NewPool(poolPath string, currentTime int64) *gno.land/r/gnoswap/staker.Pool
NewStakerStore(kvStore interface {AddAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error; Delete func(int, .uverse.realm, string) .uverse.error; Get func(string) (interface {}, .uverse.error); GetAddress func(string) (.uverse.address, .uverse.error); GetAllKeys func() ([]string, .uverse.error); GetAuthorizedCallers func() (map[.uverse.address]gno.land/p/gnoswap/store/v1.Permission, .uverse.error); GetBPTree func(string) (*gno.land/p/nt/bptree/v0.BPTree, .uverse.error); GetBool func(string) (bool, .uverse.error); GetDomainAddress func() .uverse.address; GetInt64 func(string) (int64, .uverse.error); GetString func(string) (string, .uverse.error); GetUint64 func(string) (uint64, .uverse.error); Has func(string) bool; IsWriteAuthorized func(.uverse.address) bool; RemoveAuthorizedCaller func(int, .uverse.realm, .uverse.address) .uverse.error; Set func(int, .uverse.realm, string, interface {}) .uverse.error; UpdateAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error}) interface {AddAllowedToken func(int, .uverse.realm, string) .uverse.error; AddDeniedRewardToken func(int, .uverse.realm, string) .uverse.error; GetAllowedTokens func() []string; GetCurrentSwapBatch func() *gno.land/r/gnoswap/staker.SwapBatchProcessor; GetDeniedRewardTokens func() []string; GetDepositGnsAmount func() int64; GetDeposits func() *gno.land/p/nt/bptree/v0.BPTree; GetExternalIncentives func() *gno.land/p/nt/bptree/v0.BPTree; GetIncentiveCounter func() *gno.land/r/gnoswap/staker.Counter; GetMinimumRewardAmount func() int64; GetPendingProtocolFee func(string) int64; GetPendingProtocolFees func() map[string]int64; GetPoolTierCounts func() [4]uint64; GetPoolTierCurrentEmission func() int64; GetPoolTierGetEmission func() func() (int64, .uverse.error); GetPoolTierGetHalvingBlocksInRange func() func(int64, int64) ([]int64, []int64, .uverse.error); GetPoolTierLastRewardCacheTimestamp func() int64; GetPoolTierMemberships func() *gno.land/p/nt/bptree/v0.BPTree; GetPoolTierRatio func() gno.land/r/gnoswap/staker.TierRatio; GetPools func() *gno.land/p/nt/bptree/v0.BPTree; GetTokenSpecificMinimumRewards func() map[string]int64; GetTotalEmissionSent func() int64; GetUncollectedIncentiveCounts func() *gno.land/p/nt/bptree/v0.BPTree; GetUnstakedPositions func() *gno.land/p/nt/bptree/v0.BPTree; GetUnstakingFee func() uint64; GetWarmupTemplate func() []gno.land/r/gnoswap/staker.Warmup; HasAllowedTokensStoreKey func() bool; HasCurrentSwapBatchStoreKey func() bool; HasDeniedRewardTokensStoreKey func() bool; HasDepositGnsAmountStoreKey func() bool; HasDepositsStoreKey func() bool; HasExternalIncentivesStoreKey func() bool; HasIncentiveCounterStoreKey func() bool; HasMinimumRewardAmountStoreKey func() bool; HasPendingProtocolFeesStoreKey func() bool; HasPoolTierCountsStoreKey func() bool; HasPoolTierCurrentEmissionStoreKey func() bool; HasPoolTierGetEmissionStoreKey func() bool; HasPoolTierGetHalvingBlocksInRangeStoreKey func() bool; HasPoolTierLastRewardCacheTimestampStoreKey func() bool; HasPoolTierMembershipsStoreKey func() bool; HasPoolTierRatioStoreKey func() bool; HasPoolsStoreKey func() bool; HasTokenSpecificMinimumRewardsStoreKey func() bool; HasTotalEmissionSentStoreKey func() bool; HasUncollectedIncentiveCountsStoreKey func() bool; HasUnstakedPositionsStoreKey func() bool; HasUnstakingFeeStoreKey func() bool; HasWarmupTemplateStoreKey func() bool; NextIncentiveID func(.uverse.address, int64) string; RemoveAllowedToken func(int, .uverse.realm, string) .uverse.error; RemoveDeniedRewardToken func(int, .uverse.realm, string) .uverse.error; RemovePendingProtocolFee func(int, .uverse.realm, string) .uverse.error; RemoveTokenSpecificMinimumRewardItem func(int, .uverse.realm, string) .uverse.error; SetAllowedTokens func(int, .uverse.realm, []string) .uverse.error; SetCurrentSwapBatch func(int, .uverse.realm, *gno.land/r/gnoswap/staker.SwapBatchProcessor) .uverse.error; SetDepositGnsAmount func(int, .uverse.realm, int64) .uverse.error; SetDeposits func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetExternalIncentives func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetIncentiveCounter func(int, .uverse.realm, *gno.land/r/gnoswap/staker.Counter) .uverse.error; SetMinimumRewardAmount func(int, .uverse.realm, int64) .uverse.error; SetPendingProtocolFee func(int, .uverse.realm, string, int64) .uverse.error; SetPendingProtocolFees func(int, .uverse.realm, map[string]int64) .uverse.error; SetPoolTierCounts func(int, .uverse.realm, [4]uint64) .uverse.error; SetPoolTierCurrentEmission func(int, .uverse.realm, int64) .uverse.error; SetPoolTierGetEmission func(int, .uverse.realm, func() (int64, .uverse.error)) .uverse.error; SetPoolTierGetHalvingBlocksInRange func(int, .uverse.realm, func(int64, int64) ([]int64, []int64, .uverse.error)) .uverse.error; SetPoolTierLastRewardCacheTimestamp func(int, .uverse.realm, int64) .uverse.error; SetPoolTierMemberships func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetPoolTierRatio func(int, .uverse.realm, gno.land/r/gnoswap/staker.TierRatio) .uverse.error; SetPools func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetTokenSpecificMinimumRewardItem func(int, .uverse.realm, string, int64) .uverse.error; SetTokenSpecificMinimumRewards func(int, .uverse.realm, map[string]int64) .uverse.error; SetTotalEmissionSent func(int, .uverse.realm, int64) .uverse.error; SetUncollectedIncentiveCounts func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetUnstakedPositions func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetUnstakingFee func(int, .uverse.realm, uint64) .uverse.error; SetWarmupTemplate func(int, .uverse.realm, []gno.land/r/gnoswap/staker.Warmup) .uverse.error}
NewSwapBatchProcessor(poolPath string, pool *gno.land/r/gnoswap/staker.Pool, timestamp int64) *gno.land/r/gnoswap/staker.SwapBatchProcessor
NewSwapTickCross(tickID int32, zeroForOne bool, delta *gno.land/p/gnoswap/int256/v1.Int) *gno.land/r/gnoswap/staker.SwapTickCross
NewTick(tickId int32) *gno.land/r/gnoswap/staker.Tick
NewTicks() struct{tree *gno.land/p/nt/bptree/v0.BPTree}
NewTierRatio(tier1 uint64, tier2 uint64, tier3 uint64) struct{Tier1 uint64; Tier2 uint64; Tier3 uint64}
NewUintTree() *gno.land/r/gnoswap/staker.UintTree
NewUintTreeN(fanout int) *gno.land/r/gnoswap/staker.UintTree
NewUnstakedPosition(deposit *gno.land/r/gnoswap/staker.Deposit, exitTime int64, exitTick int32, lowerTick *gno.land/r/gnoswap/staker.Tick, upperTick *gno.land/r/gnoswap/staker.Tick, lowerOutsideAcc string, upperOutsideAcc string, tier uint64, tierRatio uint64, tierCount uint64, unstakingFee uint64, pendingIncentiveIds []string) *gno.land/r/gnoswap/staker.UnstakedPosition
NewWarmup(timeDuration int64, nextWarmupTime int64, warmupRatio uint64) struct{TimeDuration int64; NextWarmupTime int64; WarmupRatio uint64}
RegisterInitializer(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, initializer func(int, .uverse.realm, gno.land/r/gnoswap/staker.IStakerStore, gno.land/r/gnoswap/staker.PoolAccessor, gno.land/r/gnoswap/staker.EmissionAccessor, gno.land/r/gnoswap/staker.NFTAccessor) gno.land/r/gnoswap/staker.IStaker)
RemovePoolTier(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, poolPath string)
RemoveToken(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenPath string)
Render(path string) string
SetDeniedRewardToken(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenPath string, denied bool)
SetDepositGnsAmount(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, amount int64)
SetMinimumRewardAmount(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, amount int64)
SetPoolTier(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, poolPath string, tier uint64)
SetTokenMinimumRewardAmount(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, paramsStr string)
SetUnStakingFee(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, fee uint64)
SetWarmUp(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, pct int64, timeDuration int64)
StakeToken(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64, referrer string) string
UnStakeToken(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, positionId uint64) string
UpgradeImpl(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, packagePath string)
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.