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 package

Overview

Package staker manages liquidity mining rewards for GnoSwap positions.

The staker distributes GNS emissions and external incentives to liquidity providers based on their position size, price range, and staking duration. It supports both internal GNS rewards and external token incentives.

Reward calculations combine elapsed-time rates with tick/range accumulation, and collection flows are integrated into the staking lifecycle.

Function

NewDeposit

func NewDeposit( owner address, targetPoolPath string, liquidity *u256.Uint, currentTime int64, tickLower, tickUpper int32, warmups []Warmup, ) *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.

Params

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/staker.NewDeposit(,,,,,,)"

Result