首页龙虾技能列表 › Uniswap Pool Analysis — 技能工具

Uniswap Pool Analysis — 技能工具

v0.1.0

[自动翻译] Analyze Uniswap pool data including liquidity distribution, fee tiers, tick ranges, and TVL. Use when the user asks about pool metrics, liquidity anal...

0· 747·2 当前·2 累计
by @wpank·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/1
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
The skill's stated purpose (on-chain Uniswap pool analysis) matches its instructions, but the SKILL.md references environment variables, repo-local config, and external install instructions that are not declared — this inconsistency could lead to unexpected network access or require secrets the skill does not explicitly request.
评估建议
This skill appears to do what it says (on-chain Uniswap pool analysis) but there are a few inconsistencies you should resolve before installing or running it: - SKILL.md reads process.env.ETHEREUM_RPC_URL but the skill does not declare any required environment variables. Decide which RPC provider you will use and whether that URL is OK to supply (do not provide private keys or account secrets). Prefer read-only public RPC endpoints or carefully scoped provider keys. - The instructions reference...
详细分析 ▾
用途与能力
The name/description and the instructions align: the SKILL.md describes reading Uniswap pool state (slot0, liquidity, ticks) via viem and computing distributions — all appropriate for a 'Uniswap Pool Analysis' skill. Nothing in the task appears unrelated to pool analysis.
指令范围
The runtime instructions explicitly use process.env.ETHEREUM_RPC_URL and recommend using a shared 'packages/common/' chain config and subgraph endpoints. However the skill declares no required env vars or config paths. The SKILL.md therefore directs the agent to access environment variables and repository-local configuration that are not announced — this is scope creep and could cause the agent to read secrets or local files unexpectedly.
安装机制
This is instruction-only with no install spec or code files, so there is no installer-writing-to-disk risk from the published bundle. Note: README contains example npx install commands pointing at a GitHub path and 'clawhub' which would pull external code if the user follows them — that is external to the published skill and should be audited separately.
凭证需求
The SKILL.md expects an ETHEREUM_RPC_URL and mentions RPC URLs, subgraph endpoints, and shared chain config, but requires.env is empty and no primary credential is declared. Requesting an RPC URL (often a secret if using a paid provider) is reasonable for the purpose, but the omission of any declared env requirements is an incoherence that could lead to silent attempts to read environment variables or fallback to user/system defaults.
持久化与权限
The skill does not request persistent/always-on presence (always: false) and does not attempt to modify other skills or system config in the published content. Autonomous invocation is allowed by platform default, which is normal; there are no extra privilege requests in the bundle.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv0.1.02026/2/11

- Initial release: analyze Uniswap v3/v4 pool data including liquidity, tick ranges, fee tiers, and TVL. - Supports querying on-chain pool state using viem, including `slot0` and `liquidity`. - Includes utilities for price and tick conversion. - Offers liquidity distribution analysis across ticks. - Accepts `chainId` for multi-chain support with configurable endpoints.

● 无害

安装命令 点击复制

官方npx clawhub@latest install uniswap-pool-analysis
镜像加速npx clawhub@latest install uniswap-pool-analysis --registry https://cn.clawhub-mirror.com

技能文档

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 SpacingTypical Use
1 (0.01%)1Stablecoin pairs
5 (0.05%)10Correlated pairs
30 (0.30%)60Standard pairs
100 (1.00%)200Exotic pairs

Querying Pool State

Use the Uniswap v3 Pool ABI to read on-chain state:

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

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:

  • Query tickBitmap to find initialized ticks
  • For each initialized tick, read ticks(tickIndex) to get liquidityNet
  • Walk from MIN_TICK to MAX_TICK, accumulating net liquidity changes
  • 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)
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务