New to Claude Skills? Learn how to install them →

jeremylongshore on GitHub

Analyzing Liquidity Pools

Free

Evaluate DEX liquidity pools for optimal LP opportunities.

Get this skill

Free · Opens the source repo

What Analyzing Liquidity Pools does

The Analyzing Liquidity Pools skill is designed for users looking to assess decentralized exchange (DEX) liquidity pools across various protocols such as Uniswap, Curve, and Balancer. By leveraging this skill, you can analyze key metrics such as Total Value Locked (TVL), trading volume, fee income, and the risk of impermanent loss. This analysis is crucial for liquidity providers (LPs) who want to make informed decisions about where to allocate their assets in the DeFi ecosystem.

To use this skill, you simply execute Python scripts that interact with liquidity pool data. The skill provides commands to analyze specific pools by their address or token pairs, calculate impermanent loss based on price changes, and estimate LP returns based on fee APR and position size. Additionally, you can compare different pools across protocols and fee tiers to identify the most lucrative opportunities for liquidity provision.

The skill outputs detailed reports that include essential metrics such as chain, TVL, 24-hour volume, fee tier, and token composition. It also provides insights into impermanent loss, allowing you to compare the potential dollar impact of holding assets versus providing liquidity. With the ability to export results in JSON or CSV formats, you can further analyze the data or integrate it into your existing workflows.

This skill is particularly beneficial for developers and designers involved in DeFi projects who need to analyze liquidity pools for investment strategies or product development. By understanding the dynamics of liquidity provision, users can optimize their strategies and enhance their overall returns in the decentralized finance space.

When to use it

Use this skill when you need to analyze specific liquidity pools, calculate impermanent loss, or compare different DEX pools to identify the best opportunities.

When not to use it

This skill may not be suitable for users who are unfamiliar with liquidity providing concepts or those looking for a graphical user interface, as it requires command-line interaction.

What you can build with it

Analyze a Specific Pool

Use the skill to analyze a specific DEX liquidity pool by providing its address or token pair.

Calculate Impermanent Loss

Estimate the impact of price changes on impermanent loss for a given token pair.

Compare Liquidity Pools

Evaluate and compare multiple liquidity pools across different protocols and fee tiers.

How to install Analyzing Liquidity Pools

View source

1. Install with the skills CLI

npx skills add jeremylongshore/claude-code-plugins-plus-skills/analyzing-liquidity-pools --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by jeremylongshore

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:

    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:

    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:

    python ${CLAUDE_SKILL_DIR}/scripts/pool_analyzer.py --il-scenarios --token-pair ETH/USDC
    
  3. Estimate LP returns with fee APR and position projections:

    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:

    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:

    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

ErrorCauseFix
Pool not foundWrong address or chainVerify address and target chain
Subgraph timeoutAPI latency or downtimeUses cached data with warning
Invalid pairUnsupported protocolCheck supported protocols list

Examples

Analyze top ETH/USDC pool - Full TVL, volume, and fee breakdown on Uniswap V3:

python pool_analyzer.py --pair ETH/USDC --protocol uniswap-v3 --chain ethereum

Calculate IL for 2x price increase - See dollar impact vs holding:

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:

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:

python pool_analyzer.py --token ETH --format json --output eth_pools.json

Resources

Frequently asked questions about Analyzing Liquidity Pools

Similar skills