Manage concentrated-liquidity (CLMM/DLMM) LP positions on Solana — measure → monitor → rebalance — with real impermanent-loss math, current SDK calls, and safe execution rules.
Concentrated liquidity turns LPing into an active management job most builders get wrong: positions silently drift out of range and stop earning; impermanent loss is larger and non-obvious in narrow ranges; rebalancing is done by feel. Three protocols with different models (tick ranges vs discrete bins) make every script bespoke. No existing kit skill covers the LP position lifecycle end-to-end.
Real concentrated-IL math with the exact λ-amplification formula (capital efficiency = IL multiplier), unit-tested against worked examples.
Out-of-range + drift detection (GREEN / YELLOW / RED), fee-to-principal alerts, opt-in Claude Code Stop hook.
HOLD / WIDEN / MOVE / WITHDRAW heuristics gated by fee-vs-IL — simulate before sign, never auto-execute.
Verified SDK tx order per protocol; atomic Meteora rebalancePosition (claim+remove+resize+add in one ix).
Three concentrated programs are covered end-to-end (fetch → measure → decide → monitor): Meteora DLMM ships an executable atomic rebalance (tsc-clean SDK example), while Orca and Raydium ship SDK-correct rebalance recipes (resetPositionRangeInstructions / close+open). Two constant-product programs are covered as the v2 baseline (λ = 1) with an explicit scope explanation — so the skill knows what it does and does not actively manage.
Tick-range CLMM, 216-byte Position, resetPositionRangeInstructions.
Tick-range CLMM, Position NFT, close+open range change.
concentrated · coveredBin-based, dynamic fees, atomic rebalance, limit orders.
concentrated · managedConstant-product, fungible LP — full-range v2 case (λ=1).
scope-clarifiedConstant-product, NFT positions — fetch / fees / claim in scope.
scope-clarifiedThe same factor that boosts fee APR boosts IL. For a symmetric range [1/k, k]:
IL_v3(r) = λ · IL_v2(r), λ = √k / (√k − 1) // capital efficiency = IL multiplier
IL_v2(r) = 2√r / (1 + r) − 1 // full-range (λ → 1) ✓
Range [0.5, 2.0] (λ ≈ 3.4) on a +21% move → −1.54% IL. Tight range [0.8, 1.25] (λ ≈ 9.5) on the same move → −4.28% IL. Implemented and pinned in examples/il_math.py + tests/test_il.py.
Reproducible offline suite (python tests/test_eval.py, runs in CI) — with-skill vs a fair ablation baseline (knows the common textbook cases, misses the CLMM nuance) across the LP lifecycle.
| Suite | baseline | with-skill | tasks |
|---|---|---|---|
| IL computation | 4 / 6 | 6 / 6 | 6 |
| In-range / drift level | 7 / 10 | 10 / 10 | 10 |
| Rebalance decision | 5 / 8 | 8 / 8 | 8 |
| Total | 16 / 24 | 24 / 24 | 24 |
| Trigger false-positive (false-RED on margin-in-range) | — | 0 / 12 | 12 |
Full methodology + per-task detail: docs/EVAL.md.
git clone https://github.com/yusizer/solana-position-manager-skill.git
cd solana-position-manager-skill
./validate.sh && python tests/test_il.py && python tests/test_fetch.py && python tests/test_eval.py
./install.sh -y