Allows staking nonfungible liquidity tokens in exchange for reward tokens
function factory(
) external view returns (contract IDragonswapV2Factory)
The DragonswapV2 Factory
function nonfungiblePositionManager(
) external view returns (contract INonfungiblePositionManager)
The nonfungible position manager with which this staking contract is compatible
function maxIncentiveDuration(
) external view returns (uint256)
The max duration of an incentive in seconds
function maxIncentiveStartLeadTime(
) external view returns (uint256)
The max amount of seconds into the future the incentive startTime can be set
Represents a staking incentive
Parameters:β
The ID of the incentive computed from its parameters
Return Values:β
The amount of reward token not yet claimed by users
Total liquidity-seconds claimed, represented as a UQ32.128
The count of deposits that are currently staked for the incentive
Returns information about a deposited NFT
Return Values:β
The owner of the deposited NFT
Counter of how many incentives for which the liquidity is staked
The lower tick of the range
The upper tick of the range
Returns information about a staked liquidity NFT
Parameters:β
The ID of the staked token
The ID of the incentive for which the token is staked
Return Values:β
secondsPerLiquidityInsideInitialX128
secondsPerLiquidity represented as a UQ32.128
The amount of liquidity in the NFT as of the last time the rewards were computed
Returns amounts of reward tokens owed to a given address according to the last time all stakes were updated
Parameters:β
The token for which to check rewards
The owner for which the rewards owed are checked
Return Values:β
The amount of the reward token claimable by the owner
Creates a new liquidity mining incentive program
Parameters:β
struct IDragonswapV2Staker.IncentiveKey
Details of the incentive to create
The amount of reward tokens to be distributed
Ends an incentive after the incentive end time has passed and all stakes have been withdrawn
Parameters:β
struct IDragonswapV2Staker.IncentiveKey
Details of the incentive to end
Return Values:β
The remaining reward tokens when the incentive is ended
Transfers ownership of a deposit from the sender to the given recipient
Parameters:β
The ID of the token (and the deposit) to transfer
The new owner of the deposit
Withdraws a DragonswapV2 LP token tokenId from this contract to the recipient to
Parameters:β
The unique identifier of an DragonswapV2 LP token
The address where the LP token will be sent
An optional data array that will be passed along to the to address via the NFT safeTransferFrom
Stakes a DragonswapV2 LP token
Parameters:β
struct IDragonswapV2Staker.IncentiveKey
The key of the incentive for which to stake the NFT
The ID of the token to stake
Unstakes a DragonswapV2 LP token
Parameters:β
struct IDragonswapV2Staker.IncentiveKey
The key of the incentive for which to unstake the NFT
The ID of the token to unstake
Transfers amountRequested of accrued rewardToken rewards from the contract to the recipient to
Parameters:β
The token being distributed as a reward
The address where claimed rewards will be sent to
The amount of reward tokens to claim. Claims entire reward amount if set to 0.
Return Values:β
The amount of reward tokens claimed
Calculates the reward amount that will be received for the given stake
Parameters:β
struct IDragonswapV2Staker.IncentiveKey
Return Values:β
The reward accrued to the NFT for the given incentive thus far
The seconds inside the tick range
Event emitted when a liquidity mining incentive has been created
Parameters:β
The token being distributed as a reward
contract IDragonswapV2Pool
The time when the incentive program begins
The time when rewards stop accruing
The address which receives any remaining reward tokens after the end time
The amount of reward tokens to be distributed
Event that can be emitted when a liquidity mining incentive has ended
Parameters:β
The incentive which is ending
The amount of reward tokens refunded
Emitted when ownership of a deposit changes
Parameters:β
The ID of the deposit (and token) that is being transferred
The owner before the deposit was transferred
The owner after the deposit was transferred
Event emitted when a DragonswapV2 LP token has been staked
Parameters:β
The unique identifier of an DragonswapV2 LP token
The amount of liquidity staked
The incentive in which the token is staking
Event emitted when a DragonswapV2 LP token has been unstaked
Parameters:β
The unique identifier of an DragonswapV2 LP token
The incentive in which the token is staking
Event emitted when a reward token has been claimed
Parameters:β
The address where claimed rewards were sent to
The amount of reward tokens claimed