uniswap-v3-liquidity
Installation
SKILL.md
Uniswap v3 Liquidity
Produce a position decision: keep, collect, increase, reduce, or replace the range. Include exact pool identity, inventory, usable ticks, costs, and an unsigned action sequence. Start with the user's token ID or pair and chain; do not require a wallet for public range analysis.
Read the position before choosing a range
- Resolve the chain's v3 factory and NonfungiblePositionManager from official deployments. Read their bytecode,
factory()and pool identity at one block. A token ID without a manager and chain is ambiguous. - Existing NFT: read
ownerOf(tokenId)andpositions(tokenId). Resolve the pool withgetPool(token0,token1,fee). Read poolslot0(),tickSpacing(),liquidity()and both token decimals. Preserve raw amounts as integer strings. A vault owning the NFT changes the withdrawal path; stop the direct-owner recipe and identify its share/redemption interface. - New position: establish address-sorted token0/token1 before expressing a price. Human token1 per token0 is
1.0001^tick * 10^(decimals0-decimals1). Inverting the display pair reverses the price bounds; it does not reverse protocol token order. - Pick the horizon and inventory constraints before ticks. Snap the lower tick down and upper tick up to spacing, remaining within usable TickMath bounds. The active interval is
tickLower <= currentTick < tickUpper. Below range inventory is token0; at/above upper it is token1. Pool-wide liquidity is not the NFT's liquidity. - Use the official v3 SDK
PoolandPosition.fromAmountsfor exact token composition and mint amounts, with the observed sqrt price and raw budgets. Do not price the required ratio from USD weights or floating-point token arithmetic.