okx-lp-position-manager

Manages Uniswap LP positions by checking range status, calculating impermanent loss, and rebalancing via OKX swaps.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Nith567/xlayer-skills-arena --skill okx-lp-position-manager-nith567
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: okx-lp-position-manager
Source: https://github.com/Nith567/xlayer-skills-arena/tree/main/okx-lp-position-manager
Command: npx skills add https://github.com/Nith567/xlayer-skills-arena --skill okx-lp-position-manager-nith567

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Liquidity providers on Uniswap V3/V4 often lose track of whether their positions are in range, earning fees, or suffering impermanent loss, and manually rebalancing ranges is error-prone and time-consuming. ## Core Features & Use Cases - Position Health Check: Detects out-of-range positions and computes fee income versus concentrated impermanent loss to show net P&L and APY. - Auto-Rebalance: Fetches 30-day price history via OKX market data, recalculates an optimal volatility-based range, executes ratio-correcting swaps, and generates a pre-filled Uniswap position deep link. - Fee Collection & Exit Guidance: Walks users through harvesting fees, exiting positions, and consolidating returned tokens into a single asset. - Use Case: A user whose ETH/USDC LP on Base went out of range asks for a health check; the skill calculates IL versus fees, proposes a new range from fresh volatility data, swaps tokens to the correct ratio, and opens Uniswap with the new position pre-filled. ## Quick Start Ask the agent to check whether your ETH/USDC LP position on Base is in range and profitable, and to rebalance it if needed.

Frequently Asked Questions about okx-lp-position-manager

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if my Uniswap LP position is in range?▼

Provide your token pair, chain, and price range, and the skill compares the current price from OKX market data against your min and max bounds. It reports in-range or out-of-range status along with estimated fee income and impermanent loss.

How is impermanent loss calculated for a concentrated liquidity position?▼

The skill computes the standard IL formula from the price ratio, then multiplies it by a concentration factor derived from the square root of your range width. The result is compared against estimated fee income to show net P&L.

Can I rebalance an out-of-range Uniswap position automatically?▼

Yes. The skill fetches 30-day price history, derives a new volatility-based range, swaps tokens to the required ratio using OKX DEX execution, and generates a pre-filled Uniswap position creation link for the new range.

Which chains does this LP position manager support?▼

It works on Ethereum, Base, Arbitrum, Optimism, and Polygon. Chain-specific data comes from the OKX onchainos CLI and DexScreener using the appropriate chain identifier.

What are the limitations of the fee and IL estimates?▼

Fee estimates rely on pool share approximations and 24-hour volume, so actual amounts vary. IL figures are estimates since exact values depend on on-chain position data not directly read by the skill.