What problem does it solve?
This skill helps users understand gauge staking and rewards for Slipstream liquidity positions, clarifying how NFT-based stakes earn AERO emissions and how rewards are calculated and claimed.
Core Features & Use Cases
- Gauge staking lifecycle: Mint a liquidity position NFT, deposit it into the CLGauge, and earn AERO rewards proportional to liquidity, time staked, and position range.
- Reward calculation & claiming: Track rewardGrowthInside and rewardGrowthGlobalX128 to compute earned rewards, then claim with getReward and observe earned values.
- Withdrawal & practical usage: Unstake by calling withdraw(tokenId) after claiming, and safely retrieve your NFT and accumulated rewards.
- Use Case: A liquidity provider mints a position, stakes it to start earning AERO, then periodically checks rewards and withdraws when finished.
Quick Start
Mint a new LP position via NonfungiblePositionManager to obtain tokenId, then call gauge.deposit(tokenId) to stake in CLGauge. After rewards accrue, call gauge.getReward(tokenId) to claim, and when done, call gauge.withdraw(tokenId) to retrieve the NFT.