Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计提醒

uniswap-v4-lpuniswap V4 LP 命令行

Agent Skill

uniswap-v4-lp 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

544

周安装

22

GitHub Stars

15

下载量

171
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:uniswap-v4-lp(uniswap V4 LP 命令行)
来源仓库:https://github.com/0xaxiom/axiom-public
仓库路径:skills/uniswap-v4-lp
安装命令:
npx skills add https://github.com/0xaxiom/axiom-public --skill uniswap-v4-lp
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/0xaxiom/axiom-public --skill uniswap-v4-lp

简介

该技能为 Uniswap v4 流动性提供者(LP)操作提供命令行工具。

  • 适用于开发者批量创建、调整或退出流动性头寸。
  • 支持多账户管理与 Gas 费用预估功能。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 执行前务必核对钱包签名权限与资金锁定周期。
  • uniswap-v4-lp 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Uniswap V4 LP Skill

Manage concentrated liquidity positions on Uniswap V4 (Base chain).

Features

  • Add liquidity to V4 pools
  • Remove liquidity / collect fees
  • Monitor position health
  • Rebalance when out of range
  • Auto-compound fees back into liquidity (set-and-forget)

Requirements

  • Private key in environment (PRIVATE_KEY or NET_PRIVATE_KEY)
  • Node.js 18+
  • viem package

Quick Start

# Install dependencies
cd scripts && npm install

# Add liquidity ($20 test position)
node add-liquidity.mjs --amount 20 --range 25

# Check position
node check-position.mjs --token-id <ID>

# Monitor if in range
node monitor-position.mjs --token-id <ID>

# Collect fees (without removing liquidity)
node collect-fees.mjs --token-id <ID>

# Auto-compound fees → liquidity
# Two strategies: DOLLAR (default) or TIME

# Dollar strategy: compound when fees exceed $5 (default)
node auto-compound.mjs --token-id <ID>
node auto-compound.mjs --token-id <ID> --min-usd 20       # custom threshold

# Time strategy: compound on schedule (skip only if fees < gas)
node auto-compound.mjs --token-id <ID> --strategy time

# Loop mode: run continuously
node auto-compound.mjs --token-id <ID> --strategy dollar --loop --interval 3600 --min-usd 50
node auto-compound.mjs --token-id <ID> --strategy time --loop --interval 14400

# Preview
node auto-compound.mjs --token-id <ID> --dry-run

# Compound & Harvest: split fees — compound some, harvest rest as USDC
node compound-and-harvest.mjs --token-id <ID> \
  --harvest-address 0xYOUR_ADDRESS --compound-pct 50
node compound-and-harvest.mjs --token-id <ID> \
  --harvest-address 0xYOUR_ADDRESS --compound-pct 70 --slippage 3
node compound-and-harvest.mjs --token-id <ID> \
  --harvest-address 0xYOUR_ADDRESS --dry-run

# Remove liquidity (partial)
node remove-liquidity.mjs --token-id <ID> --percent 50

# Burn position (100% removal + burn NFT)
node burn-position.mjs --token-id <ID>

# Rebalance (remove + re-add at current price)
node rebalance.mjs --token-id <ID> --range 25

Base Chain Contracts

ContractAddress
PoolManager0x498581ff718922c3f8e6a244956af099b2652b2b
PositionManager0x7c5f5a4bbd8fd63184577525326123b519429bdc
StateView0xa3c0c9b65bad0b08107aa264b0f3db444b867a71
Permit20x000000000022D473030F116dDEE9F6B43aC78BA3

Security Notes

  1. Always use private mempools (Flashbots/MEV Blocker) for LP operations
  2. Set reasonable slippage (1-3% for volatile pairs)
  3. Monitor positions - rebalance when 80% to range edge
  4. Start small - test with minimal amounts first

Pool-Specific: AXIOM/WETH

const AXIOM_WETH_POOL = {
  poolId: '0x10a0b8eba9d4e0f772c8c47968ee819bb4609ef4454409157961570cdce9a735',
  token0: '0x4200000000000000000000000000000000000006', // WETH
  token1: '0xf3Ce5dDAAb6C133F9875a4a46C55cf0b58111B07', // AXIOM
  fee: 0x800000, // ⚠️ DYNAMIC_FEE_FLAG - Clanker hook controls fee
  tickSpacing: 200,
  hooks: '0xb429d62f8f3bffb98cdb9569533ea23bf0ba28cc' // Clanker hook
};

⚠️ Critical: Dynamic Fee Pools

Many V4 pools (especially Clanker-deployed) use dynamic fees. The fee in PoolKey is 0x800000 (bit 23 = DYNAMIC_FEE_FLAG), NOT a percentage.

How to verify:

// Hash your PoolKey and compare to known poolId
const poolId = keccak256(abi.encode(currency0, currency1, fee, tickSpacing, hooks));

If your hash doesn't match, check if the pool uses 0x800000 as fee.

Auto-Compound Strategies

Dollar Strategy (--strategy dollar, default)

Accumulate fees in wallet, only compound when they hit a USD threshold. Best for: low-volume pools, expensive chains, or patient LPs.

# Compound when fees reach $50
node auto-compound.mjs --token-id <ID> --strategy dollar --loop --interval 3600 --min-usd 50
FlagDefaultDescription
--min-usd5Min USD fee value to trigger compound
--min-gas-multiple3Fees must be ≥ Nx gas cost
--interval3600Seconds between checks in loop mode

Time Strategy (--strategy time)

Compound on a fixed schedule. Skips only if fees < gas cost. Best for: high-volume pools where fees accumulate quickly.

# Compound every 4 hours
node auto-compound.mjs --token-id <ID> --strategy time --loop --interval 14400
FlagDefaultDescription
--min-gas-multiple3Fees must be ≥ Nx gas cost (safety floor)
--interval3600Seconds between compounds in loop mode

When to Use Which

Pool VolumeStrategyIntervalMin USD
>$1M/daytime4-6hn/a
$100K-$1M/daydollar1h$10-25
<$100K/daydollar4h$50+

Both strategies always enforce a gas floor — you'll never burn money on gas.

Compound & Harvest

Split LP fees: compound a percentage back into the position and harvest the rest as USDC.

How It Works

  1. Collect all accrued fees (DECREASE_LIQUIDITY with 0 + CLOSE_CURRENCY)
  2. Split fees by compound-pct (default 50/50)
  3. Compound the compound portion back into the position (INCREASE_LIQUIDITY + SETTLE_PAIR)
  4. Swap the harvest portion of both tokens to USDC via Uniswap V3 SwapRouter02

- WETH → USDC direct (0.05% pool) - Meme tokens → WETH → USDC multi-hop (tries 1%, 0.3%, 0.05% fee tiers)

  1. Transfer all USDC to the harvest address

Usage

# Preview (dry run)
node compound-and-harvest.mjs --token-id 1078751 \
  --harvest-address 0xcbC7E8A39A0Ec84d6B0e8e0dd98655F348ECD44F --dry-run

# 50/50 split (default)
node compound-and-harvest.mjs --token-id 1078751 \
  --harvest-address 0xcbC7E8A39A0Ec84d6B0e8e0dd98655F348ECD44F

# 70% compound, 30% harvest
node compound-and-harvest.mjs --token-id 1078751 \
  --harvest-address 0xcbC7E8A39A0Ec84d6B0e8e0dd98655F348ECD44F \
  --compound-pct 70

# 100% harvest (take all fees as USDC, no compounding)
node compound-and-harvest.mjs --token-id 1078751 \
  --harvest-address 0xcbC7E8A39A0Ec84d6B0e8e0dd98655F348ECD44F \
  --compound-pct 0

# Custom slippage
node compound-and-harvest.mjs --token-id 1078751 \
  --harvest-address 0xcbC7E8A39A0Ec84d6B0e8e0dd98655F348ECD44F \
  --slippage 3

Flags

FlagDefaultDescription
--token-idrequiredLP NFT token ID
--harvest-addressrequiredAddress to receive harvested USDC
--compound-pct50Percentage to compound (0-100)
--slippage1Slippage tolerance for swaps (%)
--dry-runfalsePreview without executing
--rpcenv/defaultBase RPC URL

Swap Routing

  • Uses Uniswap V3 SwapRouter02 (0x2626664c2603336E57B271c5C0b26F421741e481)
  • WETH → USDC: exactInputSingle with 500 (0.05%) fee tier
  • Other tokens → USDC: exactInput multi-hop through WETH, auto-tries fee tiers 10000/3000/500

🌾 Clanker Harvest — Full Treasury Pipeline

The killer feature: a complete fee management pipeline for any Clanker-launched token.

Clanker tokens have two fee sources:

  1. Clanker protocol fees — stored in a separate fee contract, must be claimed
  2. LP position fees — accrued in the V4 position, collected via DECREASE

clanker-harvest.mjs handles both in a single modular pipeline.

Quick Start

# Just claim Clanker protocol fees (no LP, no swap)
node clanker-harvest.mjs --token 0xTOKEN

# Claim + compound 100% into LP
node clanker-harvest.mjs --token 0xTOKEN --token-id 12345 --compound-pct 100

# Claim + harvest 100% as USDC to vault
node clanker-harvest.mjs --token 0xTOKEN --harvest-address 0xVAULT --compound-pct 0

# 50/50 split — compound half, harvest half
node clanker-harvest.mjs --token 0xTOKEN --token-id 12345 \
  --harvest-address 0xVAULT --compound-pct 50

# 80% compound / 20% harvest, only if fees > $10
node clanker-harvest.mjs --token 0xTOKEN --token-id 12345 \
  --harvest-address 0xVAULT --compound-pct 80 --min-usd 10

# Use a config file (perfect for cron)
node clanker-harvest.mjs --config harvest-config.json

Pipeline Steps

StepWhatWhen
1. ClaimClaim WETH + token from Clanker fee contractAlways (unless --skip-claim)
2. Collect LPCollect accrued fees from V4 positionIf --token-id set (unless --skip-lp)
3. ThresholdCheck total USD value against --min-usdIf threshold set
4. CompoundAdd X% back into LP positionIf --compound-pct > 0 and --token-id set
5. SwapSwap remaining WETH to USDCIf --compound-pct < 100 and --harvest-address set
6. TransferSend USDC to vault addressIf USDC was swapped

Flags

FlagDefaultDescription
--tokenrequiredClanker token address
--token-idoptionalV4 LP position NFT ID (needed for compound/LP)
--harvest-addressoptionalVault address for USDC (needed for harvest)
--compound-pct100% to compound back (0 = all harvest, 100 = all compound)
--min-usd0Min USD fee value to act (0 = always)
--slippage1Swap slippage %
--fee-contract0xf362...Clanker fee storage contract
--skip-claimfalseSkip Clanker fee claim
--skip-lpfalseSkip LP fee collection
--configoptionalJSON config file path
--dry-runfalseSimulate without executing

Config File

For cron jobs, use a JSON config:

{
  "token": "0xYOUR_TOKEN",
  "tokenId": "12345",
  "harvestAddress": "0xYOUR_VAULT",
  "compoundPct": 50,
  "minUsd": 10,
  "slippage": 1
}

Clanker Fee Contract

FunctionDescription
claim(feeOwner, token)Claim fees for a specific token
availableFees(feeOwner, token)Check pending fee balance

Contract: 0xf3622742b1e446d92e45e22923ef11c2fcd55d68

Two separate claims needed (WETH + token) — the script handles both automatically.

Standalone Claim Script

For simpler use cases, claim-clanker-fees.mjs just claims without any LP operations:

# Check available fees (dry run)
node claim-clanker-fees.mjs --token 0xTOKEN --dry-run

# Claim both WETH and token fees
node claim-clanker-fees.mjs --token 0xTOKEN

Self-Sustaining Agent Economics

The core idea: agents launched on Clanker can fund their own infrastructure from LP yield.

LP Fees + Clanker Fees
        ↓
   ┌────┴────┐
   │         │
Compound   Harvest
(grow LP)  (→ USDC → pay for LLM, RPC, hosting)

Set up a cron job with --min-usd threshold and the agent only acts when it's profitable to do so.

LP Range Alert

Monitor your positions and get alerted when price moves near or out of range.

Quick Start

# Check single position
node lp-range-alert.mjs --positions 1078751

# Check multiple positions
node lp-range-alert.mjs --positions 1078751,1078720,1078695

# Dry run (check without saving state)
node lp-range-alert.mjs --positions 1078751 --dry-run

# JSON output (for cron/automation)
node lp-range-alert.mjs --positions 1078751 --json

# Custom alert threshold (alert at 20% from edge instead of 15%)
node lp-range-alert.mjs --positions 1078751 --near-edge-pct 20

# Force alert even if status unchanged
node lp-range-alert.mjs --positions 1078751 --force

Config File

For cron jobs, use a JSON config (lp-alert-config.example.json):

{
  "positions": ["1078751", "1078720", "1078695"],
  "telegramChat": "YOUR_CHAT_ID",
  "nearEdgePercent": 15,
  "rpcUrl": "https://mainnet.base.org"
}

Run with: node lp-range-alert.mjs --config lp-alert-config.json

Alert Statuses

StatusMeaningAction
OKIn range, healthyNone needed
NEAR_LOWER_EDGEWithin 15% of lower boundMonitor, prepare to rebalance down
NEAR_UPPER_EDGEWithin 15% of upper boundMonitor, prepare to rebalance up
OUT_OF_RANGEPrice outside position rangeRebalance immediately (not earning fees!)

State Persistence

State is saved to ~/.lp-alert-state.json to prevent duplicate alerts.

  • Only alerts on status changes (not on every check)
  • Use --force to alert regardless of previous state

Flags

FlagDefaultDescription
--positionsrequiredComma-separated token IDs
--configoptionalJSON config file path
--telegram-chatoptionalChat ID for Telegram alerts
--near-edge-pct15Alert threshold (% from edge)
--dry-runfalseCheck without saving state
--jsonfalseJSON output
--forcefalseAlert even if status unchanged
--rpcenv/defaultCustom RPC URL

Recommended Cron Setup

# Check every 30 minutes
*/30 * * * * cd /path/to/scripts && node lp-range-alert.mjs --config lp-alert-config.json >> /tmp/lp-alerts.log 2>&1

Position Strategy Recommendations

For ~$20-1000 positions:

  • Range: ±25% from current price
  • Rebalance: When price hits 80% of boundary
  • Check: Every 4-6 hours
  • Expected APR: 15-30%

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.2%
按下载量换算64

Claude

32.23%
按下载量换算55

Cursor

18.61%
按下载量换算32

Gemini CLI

9.8%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills