agiprolabs/claude-trading-skills/liquidity-analysis
Claude Code and agent skill by agiprolabs/claude-trading-skills
- community
Checking that the SKILL.md file is still in the repository.
DEX liquidity depth assessment, slippage estimation, and pool composition analysis for Solana tokens
Install
npx vskill@latest install agiprolabs/claude-trading-skills/liquidity-analysisSKILL.md
Liquidity Analysis — DEX Depth Assessment for Solana Tokens
Liquidity analysis answers three critical questions before every trade: Can I get in at a reasonable price? Can I get out when I need to? and Is this pool safe? Without it, you risk excessive slippage, failed exits, and rug pulls.
Why Liquidity Analysis Matters
Position sizing: Maximum position size is bounded by available liquidity. A $10K position in a pool with $20K TVL will move the price significantly. Rule of thumb: keep trade size under 2% of pool depth to limit slippage below 1%.
Execution cost: Slippage is a direct cost. On a 5 SOL buy, the difference between 0.3% and 3% slippage is real money lost on every entry and exit.
Rug risk detection: Thin liquidity, single pools, unlocked LP tokens, and newly created pools are warning signs. Liquidity analysis catches these before you enter.
Exit planning: Entry liquidity may differ from exit liquidity. If LP is unlocked and owned by one wallet, it can be pulled at any time.
Key Concepts
Total Value Locked (TVL)
Total value of assets deposited in a pool. For a SOL/TOKEN pool with 100 SOL and 1M TOKEN at $0.01 each, TVL = 100 SOL_price + 1M $0.01. TVL alone is insufficient — you need depth at the current price range.
Liquidity Depth
How much can be traded before moving the price X%. In constant-product AMMs, depth is uniform. In concentrated liquidity (CLMM), depth varies by price range — thick near the current price, thin or zero outside active ranges.
Concentration Factor (CLMM)
Concentrated liquidity pools focus capital in a narrow price range, providing deeper liquidity within that range but nothing outside it. A pool with $50K TVL concentrated in a +/-5% range provides the same depth as a $500K constant-product pool within that range, but zero depth beyond it.
Slippage Curve
Slippage is not linear. Plotting slippage against trade size produces a curve that's gentle for small trades and steep for large ones. The shape depends on pool type, TVL, and concentration.
Pool Composition
Who provides liquidity matters. Locked LP tokens cannot be withdrawn (safer). Single-sided liquidity means the pool is imbalanced. Pool age indicates stability — pools older than 7 days with consistent TVL are more reliable.
Data Sources
Four complementary data sources, from free to comprehensive:
| Source | Auth Required | Best For | Limitations | |
|---|---|---|---|---|
| DexScreener | None | Quick pool lookup, liquidity.usd | No on-chain pool details | |
| Jupiter Quote API | None | Empirical slippage at any size | Aggregate across pools | |
| Birdeye | API key | Detailed pool data, trade history | Rate limited on free tier | |
| On-chain | RPC only | LP lock status, exact reserves | Requires program knowledge |
See references/data_sources.md for complete endpoint documentation and usage examples.
Core Analysis Pipeline
Step 1: Identify Pools
Fetch all pools for a token. Most Solana tokens have multiple pools across Raydium, Orca, and Meteora.
Step 2: Measure Depth
For each pool, extract liquidity metrics:
Step 3: Estimate Slippage
Use Jupiter quotes at multiple sizes to build an empirical slippage curve. This captures real routing across all pools:
Step 4: Assess Concentration
For CLMM pools (Orca Whirlpool, Raydium CLMM, Meteora DLMM), liquidity may be concentrated in a narrow range. Check if the current price is within the active range and how deep liquidity extends:
Step 5: Compute Liquidity Score
Composite score from 0 (dangerous) to 100 (deep, safe liquidity):
Risk Flags
Flag these conditions before entering any position:
| Flag | Condition | Risk Level | |
|---|---|---|---|
| Single Pool | Only 1 DEX pool exists | High | |
| Thin Liquidity | Total TVL < $10,000 | Critical | |
| New Pool | Pool created < 2 hours ago | High | |
| Unlocked LP | LP tokens not burned/locked | Medium | |
| Volume Mismatch | Volume >> TVL (wash trading) | Medium | |
| Price Deviation | >5% price difference across pools | High | |
| Concentrated CLMM | >80% liquidity in CLMM with narrow range | Medium |
Position Sizing from Liquidity
Maximum position size should keep slippage under your threshold:
| Trade Type | Max Slippage | Max Position % of TVL | |
|---|---|---|---|
| Scalp | 0.5% (50 bps) | 1% | |
| Swing | 2% (200 bps) | 2-5% | |
| Position | 5% (500 bps) | 5-10% |
Slippage Estimation
For detailed slippage mathematics including constant-product formulas, CLMM models, and empirical curve fitting, see references/slippage_curves.md.
Key formula for constant-product AMM:
Where Δx is trade size and x is pool reserve of the input token. For a 1 SOL trade on a pool with 100 SOL reserve, slippage = 1/101 = 0.99%.
Pool Types
Solana DEXes use different AMM designs with different liquidity characteristics. See references/pool_types.md for comprehensive coverage including:
- Constant Product (Raydium V4, Orca Legacy): Uniform liquidity, predictable slippage
- Concentrated Liquidity (Raydium CLMM, Orca Whirlpool): Deep at current price, zero outside range
- Dynamic AMM (Meteora DLMM): Adaptive fees, bin-based liquidity
Integration with Other Skills
token-holder-analysis: Check LP token holder distribution before entering. If one wallet holds >50% of LP tokens and they are unlocked, exit risk is high.
position-sizing: Feed max_position_from_liquidity() output into position sizing models as an upper bound.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/liquidity-analysis/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/agiprolabs/claude-trading-skills/liquidity-analysis)