analyzing-liquidity-pools

Analyze DEX liquidity pools for TVL, volume, fees, impermanent loss, and LP profitability. Use when analyzing liquidity pools, calculating impermanent loss, or comparing DEX pools. Trigger with phrases like "analyze liquidity pool", "calculate impermanent loss", "LP returns", "pool TVL", "DEX pool metrics", or "compare pools".

1,868 stars

Best use case

analyzing-liquidity-pools is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Analyze DEX liquidity pools for TVL, volume, fees, impermanent loss, and LP profitability. Use when analyzing liquidity pools, calculating impermanent loss, or comparing DEX pools. Trigger with phrases like "analyze liquidity pool", "calculate impermanent loss", "LP returns", "pool TVL", "DEX pool metrics", or "compare pools".

Teams using analyzing-liquidity-pools should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/analyzing-liquidity-pools/SKILL.md --create-dirs "https://raw.githubusercontent.com/jeremylongshore/claude-code-plugins-plus-skills/main/plugins/crypto/liquidity-pool-analyzer/skills/analyzing-liquidity-pools/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/analyzing-liquidity-pools/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How analyzing-liquidity-pools Compares

Feature / Agentanalyzing-liquidity-poolsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Analyze DEX liquidity pools for TVL, volume, fees, impermanent loss, and LP profitability. Use when analyzing liquidity pools, calculating impermanent loss, or comparing DEX pools. Trigger with phrases like "analyze liquidity pool", "calculate impermanent loss", "LP returns", "pool TVL", "DEX pool metrics", or "compare pools".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Analyzing Liquidity Pools

## Overview

Analyze DEX liquidity pools across Uniswap, Curve, and Balancer to evaluate TVL, trading volume, fee income, and impermanent loss risk. Compare pools across protocols and chains to identify optimal LP opportunities.

## Prerequisites

- Python 3.8+ installed
- Internet access for subgraph/API queries
- Understanding of liquidity providing concepts (IL, fee tiers, TVL)

## Instructions

1. **Analyze a specific pool** by address or token pair:
   ```bash
   python ${CLAUDE_SKILL_DIR}/scripts/pool_analyzer.py --pool 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640
   python ${CLAUDE_SKILL_DIR}/scripts/pool_analyzer.py --pair ETH/USDC --protocol uniswap-v3
   ```

2. **Calculate impermanent loss** for a price change:
   ```bash
   python ${CLAUDE_SKILL_DIR}/scripts/pool_analyzer.py --il-calc --entry-price 2000 --current-price 3000  # 2000/3000 = ETH price at entry/now in USD
   ```
   Project IL for various scenarios:
   ```bash
   python ${CLAUDE_SKILL_DIR}/scripts/pool_analyzer.py --il-scenarios --token-pair ETH/USDC
   ```

3. **Estimate LP returns** with fee APR and position projections:
   ```bash
   python ${CLAUDE_SKILL_DIR}/scripts/pool_analyzer.py --pool [address] --detailed
   python ${CLAUDE_SKILL_DIR}/scripts/pool_analyzer.py --pool [address] --position 10000  # 10000 = LP position size in USD
   ```

4. **Compare pools** across protocols or fee tiers:
   ```bash
   python ${CLAUDE_SKILL_DIR}/scripts/pool_analyzer.py --compare --pair ETH/USDC --protocols uniswap-v3,curve,balancer
   python ${CLAUDE_SKILL_DIR}/scripts/pool_analyzer.py --compare --pair ETH/USDC --fee-tiers 0.05,0.30,1.00
   ```

5. **Export results** to JSON or CSV:
   ```bash
   python ${CLAUDE_SKILL_DIR}/scripts/pool_analyzer.py --pool [address] --format json --output pool_analysis.json
   python ${CLAUDE_SKILL_DIR}/scripts/pool_analyzer.py --compare --pair ETH/USDC --format csv --output pools.csv
   ```

## Output

Pool analysis reports include chain, TVL, 24h volume, fee tier, fee APR, volume/TVL ratio, and token composition with current price. Impermanent loss reports show IL percentage, dollar impact, HODL vs LP value comparison, and breakeven analysis with days-to-recover based on fee income.

See `${CLAUDE_SKILL_DIR}/references/implementation.md` for detailed output format examples.

## Error Handling

| Error | Cause | Fix |
|-------|-------|-----|
| Pool not found | Wrong address or chain | Verify address and target chain |
| Subgraph timeout | API latency or downtime | Uses cached data with warning |
| Invalid pair | Unsupported protocol | Check supported protocols list |

## Examples

**Analyze top ETH/USDC pool** - Full TVL, volume, and fee breakdown on Uniswap V3:
```bash
python pool_analyzer.py --pair ETH/USDC --protocol uniswap-v3 --chain ethereum
```

**Calculate IL for 2x price increase** - See dollar impact vs holding:
```bash
python pool_analyzer.py --il-calc --entry-price 100 --current-price 200  # 100/200 = token price at entry/now in USD
```

**Compare Uniswap fee tiers** - Find optimal fee tier for ETH/USDC:
```bash
python pool_analyzer.py --compare --pair ETH/USDC --fee-tiers 0.05,0.30,1.00
```

**Export all ETH pairs** - Dump pool data for further analysis:
```bash
python pool_analyzer.py --token ETH --format json --output eth_pools.json
```

## Resources

- The Graph: https://thegraph.com/ - Subgraph queries
- Uniswap Info: https://info.uniswap.org/ - Pool explorer
- DeFiLlama: https://defillama.com/ - TVL data
- `${CLAUDE_SKILL_DIR}/references/implementation.md` - Detailed output formats, configuration, cross-protocol comparison guide

Related Skills

analyzing-test-coverage

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze code coverage metrics and identify untested code paths. Use when analyzing untested code or coverage gaps. Trigger with phrases like "analyze coverage", "check test coverage", or "find untested code".

analyzing-security-headers

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze HTTP security headers of web domains to identify vulnerabilities and misconfigurations. Use when you need to audit website security headers, assess header compliance, or get security recommendations for web applications. Trigger with phrases like "analyze security headers", "check HTTP headers", "audit website security headers", or "evaluate CSP and HSTS configuration".

analyzing-dependencies

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze dependencies for known security vulnerabilities and outdated versions. Use when auditing third-party libraries. Trigger with 'check dependencies', 'scan for vulnerabilities', or 'audit packages'.

analyzing-system-throughput

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze and optimize system throughput including request handling, data processing, and resource utilization. Use when identifying capacity limits or evaluating scaling strategies. Trigger with phrases like "analyze throughput", "optimize capacity", or "identify bottlenecks".

analyzing-network-latency

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze network latency and optimize request patterns for faster communication. Use when diagnosing slow network performance or optimizing API calls. Trigger with phrases like "analyze network latency", "optimize API calls", or "reduce network delays".

analyzing-logs

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze application logs for performance insights and issue detection including slow requests, error patterns, and resource usage. Use when troubleshooting performance issues or debugging errors. Trigger with phrases like "analyze logs", "find slow requests", or "detect error patterns".

analyzing-capacity-planning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth. it uses the capacity-planning-analyzer plugin to assess current utilization, forecast growth trends, and recommend scaling strategies. use this skill when the u... Use when analyzing code or data. Trigger with phrases like 'analyze', 'review', or 'examine'.

analyzing-query-performance

1868
from jeremylongshore/claude-code-plugins-plus-skills

Execute use when you need to work with query optimization. This skill provides query performance analysis with comprehensive guidance and automation. Trigger with phrases like "optimize queries", "analyze performance", or "improve query speed".

analyzing-database-indexes

1868
from jeremylongshore/claude-code-plugins-plus-skills

Process use when you need to work with database indexing. This skill provides index design and optimization with comprehensive guidance and automation. Trigger with phrases like "create indexes", "optimize indexes", or "improve query performance".

analyzing-options-flow

1868
from jeremylongshore/claude-code-plugins-plus-skills

Track crypto options flow to identify institutional positioning and market sentiment. Use when tracking institutional options flow. Trigger with phrases like "track options flow", "analyze derivatives", or "check institutional".

analyzing-on-chain-data

1868
from jeremylongshore/claude-code-plugins-plus-skills

Process perform on-chain analysis including whale tracking, token flows, and network activity. Use when performing crypto analysis. Trigger with phrases like "analyze crypto", "check blockchain", or "monitor market".

analyzing-nft-rarity

1868
from jeremylongshore/claude-code-plugins-plus-skills

Calculate NFT rarity scores and rank tokens by trait uniqueness. Use when analyzing NFT collections, checking token rarity, or comparing NFTs. Trigger with phrases like "check NFT rarity", "analyze collection", "rank tokens", "compare NFTs".