uniswap-pool-analysis
Analyze Uniswap pool data including liquidity distribution, fee tiers, tick ranges, and TVL. Use when the user asks about pool metrics, liquidity analysis, or wants to query on-chain pool state.
Best use case
uniswap-pool-analysis is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Analyze Uniswap pool data including liquidity distribution, fee tiers, tick ranges, and TVL. Use when the user asks about pool metrics, liquidity analysis, or wants to query on-chain pool state.
Teams using uniswap-pool-analysis 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/uniswap-pool-analysis/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How uniswap-pool-analysis Compares
| Feature / Agent | uniswap-pool-analysis | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Analyze Uniswap pool data including liquidity distribution, fee tiers, tick ranges, and TVL. Use when the user asks about pool metrics, liquidity analysis, or wants to query on-chain pool state.
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.
SKILL.md Source
# Uniswap Pool Analysis
## Overview
This skill covers querying and analyzing Uniswap v3/v4 pool state on-chain using viem.
## Key Concepts
- **sqrtPriceX96**: Encoded price format used by Uniswap v3/v4. Convert with `price = (sqrtPriceX96 / 2^96)^2`
- **Ticks**: Discrete price points defining liquidity ranges. Tick spacing depends on fee tier.
- **Liquidity**: The `L` value representing active liquidity at the current tick.
## Fee Tiers (v3)
| Fee (bps) | Tick Spacing | Typical Use |
| ----------- | ------------ | ---------------- |
| 1 (0.01%) | 1 | Stablecoin pairs |
| 5 (0.05%) | 10 | Correlated pairs |
| 30 (0.30%) | 60 | Standard pairs |
| 100 (1.00%) | 200 | Exotic pairs |
## Querying Pool State
Use the Uniswap v3 Pool ABI to read on-chain state:
```typescript
import { createPublicClient, http } from "viem";
import { mainnet } from "viem/chains";
const client = createPublicClient({
chain: mainnet,
transport: http(process.env.ETHEREUM_RPC_URL),
});
// Read slot0 for current price and tick
const [
sqrtPriceX96,
tick,
observationIndex,
observationCardinality,
observationCardinalityNext,
feeProtocol,
unlocked,
] = await client.readContract({
address: poolAddress,
abi: poolAbi,
functionName: "slot0",
});
// Read liquidity
const liquidity = await client.readContract({
address: poolAddress,
abi: poolAbi,
functionName: "liquidity",
});
```
## Price Conversion
```typescript
function sqrtPriceX96ToPrice(
sqrtPriceX96: bigint,
decimals0: number,
decimals1: number,
): number {
const price = Number(sqrtPriceX96) / 2 ** 96;
return (price * price * 10 ** decimals0) / 10 ** decimals1;
}
function tickToPrice(
tick: number,
decimals0: number,
decimals1: number,
): number {
return (1.0001 ** tick * 10 ** decimals0) / 10 ** decimals1;
}
```
## Liquidity Distribution
To analyze liquidity distribution across ticks:
1. Query `tickBitmap` to find initialized ticks
2. For each initialized tick, read `ticks(tickIndex)` to get `liquidityNet`
3. Walk from `MIN_TICK` to `MAX_TICK`, accumulating net liquidity changes
4. Plot cumulative liquidity vs price for the distribution
## Multi-chain Support
Always accept a `chainId` parameter. Use the shared chain config from `packages/common/` to resolve:
- RPC URL
- Pool factory address
- Quoter address
- Subgraph endpoint (if available)Related Skills
gate-info-trendanalysis
Trend and technical analysis. Use this skill whenever the user asks for technical or trend analysis of one coin. Trigger phrases include: technical analysis, K-line, RSI, MACD, trend, support, resistance. MCP tools: info_markettrend_get_kline, info_markettrend_get_indicator_history, info_markettrend_get_technical_analysis, info_marketsnapshot_get_market_snapshot.
gate-exchange-marketanalysis
The market analysis function of Gate Exchange, such as liquidity, momentum, liquidation, funding arbitrage, basis, manipulation risk, order book explainer, slippage simulation. Use when the user asks about liquidity, depth, slippage, buy/sell pressure, liquidation, funding rate arbitrage, basis/premium, manipulation risk, order book explanation, or slippage simulation (e.g. market buy $X slippage). Trigger phrases: liquidity, depth, slippage, momentum, buy/sell pressure, liquidation, squeeze, funding rate, arbitrage, basis, premium, manipulation, order book, spread, slippage simulation.
gate-info-coinanalysis
Coin comprehensive analysis. Use this skill whenever the user asks to analyze a single coin. Trigger phrases include: analyze, how is, worth buying, look at. MCP tools: info_coin_get_coin_info, info_marketsnapshot_get_market_snapshot, info_markettrend_get_technical_analysis, news_feed_search_news, news_feed_get_social_sentiment.
v3-pools-heyanon
Safe execution layer for Uniswap V3-style concentrated liquidity across Uniswap, PancakeSwap, WAGMI, and OkuTrade.
uniswap-v4
Swap tokens and read pool state on Uniswap V4 (Base, Ethereum). Use when the agent needs to: (1) swap ERC20 tokens or ETH via Uniswap V4, (2) get pool info (price, tick, liquidity, fees), (3) find the best pool for a token pair, (4) quote expected swap output via the on-chain V4Quoter, (5) set up Permit2 approvals for the Universal Router, or (6) execute exact-input swaps with proper slippage protection. Supports Base and Ethereum mainnet, plus Base Sepolia testnet. TypeScript with strict types. Write operations need a private key via env var.
uniswap-v4-tools
Tools for querying V4 pools, swap quotes, and hook-enabled liquidity pools.
uniswap-v4-pools
Query and execute swaps on Uniswap V4 pools with hook-enabled custom logic and advanced pool configurations.
uniswap-v4-hooks
Query and execute swaps on Uniswap V4 pools with custom hooks architecture.
uniswap-v4-agent
Execute swaps and query pool info on Uniswap V4 with hooks support across Ethereum, Base, Arbitrum, and Optimism.
uniswap-v4-agent-hooks
Toolkit for AI agents to interact with Uniswap V4 hooks and custom pool configurations.
uniswap-swap-simulation
Simulate and analyze Uniswap swaps including price impact, slippage, optimal routing, and gas estimation. Use when the user asks about swap execution, routing, price impact, or MEV considerations.
uniswap-poolspy
Track newly created Uniswap liquidity pools across 9 networks. Monitor new token listings and early liquidity events in real-time.