Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/analyzing-liquidity-pools

@820dfc8
Run it yourself

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".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/analyzing-liquidity-pools

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexamples.md

≈1.9k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Usage Examples

Basic Pool Analysis

Analyze Pool by Address

python pool_analyzer.py --pool 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640

# Output:
# ==============================================================================
#   LIQUIDITY POOL ANALYZER                              2025-01-14 15:30 UTC
# ==============================================================================
#
#   POOL: USDC-WETH (uniswap-v3 - 0.05%)
# ------------------------------------------------------------------------------
#   Chain:          Ethereum
#   TVL:            $500.00M
#   24h Volume:     $125.00M
#   Fee Tier:       0.05%
#
#   FEE METRICS
# ------------------------------------------------------------------------------
#   24h Fees:       $62,500.00
#   Fee APR:        4.56%
#   Volume/TVL:     0.2500

Search by Token Pair

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

# Shows all ETH/USDC pools on Uniswap V3

Filter by Chain

python pool_analyzer.py --pair ETH/USDC --chain arbitrum

# Shows ETH/USDC pools on Arbitrum only

Impermanent Loss Calculation

Calculate IL for Price Change

python pool_analyzer.py --il-calc --entry-price 2000 --current-price 3000

# Output:
# ==============================================================================
#   IMPERMANENT LOSS CALCULATION                        2025-01-14 15:30 UTC
# ==============================================================================
#
# ------------------------------------------------------------------------------
#   Entry Price:    $2,000.00
#   Current Price:  $3,000.00
#   Price Change:   +50.0%
#
#   IL (%):         2.02%
# ==============================================================================

IL with Position Value

python pool_analyzer.py --il-calc --entry-price 2000 --current-price 3000 --position 10000

# Output includes:
#   IL (USD):       $202.00
#   Value if HODL:  $12,500.00
#   Value in LP:    $12,247.45

IL Scenarios Table

python pool_analyzer.py --il-scenarios

# Output:
# ==============================================================================
#   IMPERMANENT LOSS SCENARIOS
# ==============================================================================
#
# ------------------------------------------------------------------------------
#     Price Change     Price Ratio              IL
# ------------------------------------------------------------------------------
#            -90%           0.10x         42.54%
#            -75%           0.25x         20.00%
#            -50%           0.50x          5.72%
#            -25%           0.75x          1.03%
#              0%           1.00x          0.00%
#            +25%           1.25x          0.62%
#            +50%           1.50x          2.02%
#           +100%           2.00x          5.72%
#           +200%           3.00x         13.40%
#           +400%           5.00x         25.46%
# ------------------------------------------------------------------------------
# ==============================================================================

Pool Comparison

Compare Pools Across Protocols

python pool_analyzer.py --compare --pair ETH/USDC --protocols uniswap-v3,curve,balancer

# Output:
# ==============================================================================
#   POOL COMPARISON
# ------------------------------------------------------------------------------
#   Protocol        Pair            Chain        TVL     Fee APR
# ------------------------------------------------------------------------------
#   uniswap-v3      USDC-WETH       Ethereum     $500M      4.56%
#   curve           USDC-ETH        Ethereum      $50M      3.21%
#   balancer        WETH-USDC       Ethereum      $25M      2.89%
# ------------------------------------------------------------------------------
#   Total: 3 pools
# ==============================================================================

Compare Fee Tiers

python pool_analyzer.py --pair ETH/USDC --protocol uniswap-v3 --fee-tiers 0.01,0.05,0.30

# Shows pools at different fee tiers for comparison

Position Analysis

Project Returns for Position

python pool_analyzer.py --pool 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640 --position 10000

# Adds position metrics:
#   Position Share: 0.0020%
#   Daily Fees:     $1.25
#   Weekly Fees:    $8.75
#   Monthly Fees:   $37.50
#   Annual Fees:    $456.25

Filtering Options

Filter by Minimum TVL

python pool_analyzer.py --protocol uniswap-v3 --min-tvl 10000000

# Shows only pools with TVL >= $10M

Limit Results

python pool_analyzer.py --protocol uniswap-v3 --top 5

# Shows only top 5 pools

Output Formats

JSON Output

python pool_analyzer.py --pool 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640 --format json

# Output:
# {
#   "timestamp": "2025-01-14 15:30 UTC",
#   "data": [
#     {
#       "pool": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
#       "project": "uniswap-v3",
#       "chain": "Ethereum",
#       "symbol": "USDC-WETH",
#       "metrics": {
#         "tvl": 500000000,
#         "volume_24h": 125000000,
#         "fee_apr": 4.56,
#         "health_score": 90
#       }
#     }
#   ]
# }

CSV Output

python pool_analyzer.py --protocol uniswap-v3 --top 10 --format csv --output pools.csv

# Creates CSV file with headers:
# Protocol,Symbol,Chain,Pool Address,TVL (USD),Volume 24h,Fee Tier (%),Fee APR (%),Volume/TVL,Health Score

Save to File

python pool_analyzer.py --pool 0x88e6... --format json --output analysis.json
python pool_analyzer.py --pair ETH/USDC --format csv --output comparison.csv

Verbose Mode

Debug Output

python pool_analyzer.py --pair ETH/USDC --verbose

# Shows:
# Fetching pool data...
# Querying Uniswap V3 subgraph...
# Falling back to DeFiLlama...
# Found 15 pools for ETH/USDC
# Calculated metrics for USDC-WETH
# ...

Real-World Workflows

Find Best Pool for LP Position

# 1. Search pools for your pair
python pool_analyzer.py --pair ETH/USDC --protocol uniswap-v3 --min-tvl 1000000

# 2. Analyze specific pool
python pool_analyzer.py --pool 0x88e6... --detailed

# 3. Calculate IL risk at target price
python pool_analyzer.py --il-calc --entry-price 2000 --current-price 2500 --position 10000

Monitor Position Profitability

# Check current pool metrics
python pool_analyzer.py --pool 0x88e6... --position 10000

# Calculate IL if price drops 20%
python pool_analyzer.py --il-calc --entry-price 2000 --current-price 1600 --position 10000

Research DeFi Yields

# Compare pools across protocols
python pool_analyzer.py --pair ETH/USDC --compare --protocols uniswap-v3,curve,balancer --format csv --output research.csv

# View IL scenarios
python pool_analyzer.py --il-scenarios --format json --output il_table.json

Integration Examples

Pipe to jq

python pool_analyzer.py --protocol uniswap-v3 --top 5 --format json | jq '.data[].metrics.fee_apr'

Use in Shell Scripts

#!/bin/bash
# Get top APR pool
BEST_POOL=$(python pool_analyzer.py --pair ETH/USDC --format json | jq -r '.data[0].pool')
echo "Best pool: $BEST_POOL"

Tons of Skills by Intent Solutions | jeremylongshore.com

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides tools to analyze DEX liquidity pools, calculating metrics such as TVL, volume, fees, and impermanent loss. It fetches data from reputable external sources including The Graph and DeFiLlama. The primary security consideration is the ingestion of external data from these sources, which represents a standard but identifiable indirect prompt injection surface.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 820dfc8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
What it can do
Reads files Edits files Runs commands
version
1.24.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "crypto",
  "analyzing-liquidity"
]
All 3 allowed tools
ReadWriteBash(crypto:liquidity-*)
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/analyzing-liquidity-pools