Skip to content

galleonlabs/crypto-defi-skills / packages/lp/skills/uniswap-v3-liquidity

uniswap-v3-liquidity

Verified

Use when managing a Uniswap v3 NFT position: choose usable ticks, mint or increase liquidity, collect fees, remove liquidity, or move a range. Resolves position inventory and fee accounting with exact manager calls; excludes v4 and gauge custody.

FileKindSize
ATTRIBUTION.mdmarkdown921 B
LICENSEother1.0 KB
SKILL.mdskill md5.4 KB
agents/openai.yamlconfig273 B
references/recipes.mdmarkdown2.5 KB
scripts/ticks.mjsscript1.5 KB

references/recipes.md

View on GitHub
# Uniswap v3 recipes

Checked 2026-09-27. Use the deployed version's ABI, not signatures from another protocol.

## Read-only Foundry examples

Set RPC_URL, BLOCK, MANAGER, FACTORY, POOL and TOKEN_ID from verified inputs. `cast` is optional; equivalent eth_call through an existing provider is sufficient.

```sh
cast call "$MANAGER" 'ownerOf(uint256)(address)' "$TOKEN_ID" --rpc-url "$RPC_URL" --block "$BLOCK"
cast call "$MANAGER" 'positions(uint256)(uint96,address,address,address,uint24,int24,int24,uint128,uint256,uint256,uint128,uint128)' "$TOKEN_ID" --rpc-url "$RPC_URL" --block "$BLOCK"
cast call "$POOL" 'slot0()(uint160,int24,uint16,uint16,uint16,uint8,bool)' --rpc-url "$RPC_URL" --block "$BLOCK"
cast call "$POOL" 'tickSpacing()(int24)' --rpc-url "$RPC_URL" --block "$BLOCK"
```

Read `getPool(address,address,uint24)(address)` on FACTORY with position tokens and fee. Verify nonzero code and matching tokens/fee on returned pool.

## Unsigned construction fields

- `mint`: token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, amount0Min, amount1Min, recipient, deadline.
- `increaseLiquidity`: tokenId, amount0Desired, amount1Desired, amount0Min, amount1Min, deadline.
- `decreaseLiquidity`: tokenId, liquidity (uint128 units, not token value), amount0Min, amount1Min, deadline.
- `collect`: tokenId, recipient, amount0Max, amount1Max (uint128). Simulate from owner; reporting maxima is not reporting expected proceeds.
- `burn(uint256)`: optional NFT cleanup, only once liquidity and owed amounts are zero.

Official SDK: `NonfungiblePositionManager.addCallParameters(position, mintOptions)` returns calldata/value; `removeCallParameters(position, removeOptions)` prepares removal. Inspect options against the installed SDK version and decode every multicall before wallet handoff. Never copy the guide's zero minimums into production.

## Primary sources

- [Deployments](https://developers.uniswap.org/deployments)
- [Minting SDK guide](https://developers.uniswap.org/docs/sdks/v3/guides/managing-liquidity/position-minting)
- [Liquidity modification](https://developers.uniswap.org/docs/sdks/v3/guides/managing-liquidity/modifying-position)
- [Fee collection](https://developers.uniswap.org/docs/protocols/v3/guides/managing-liquidity/collect-fees)
- [Position manager interface](https://github.com/Uniswap/v3-periphery/blob/main/contracts/interfaces/INonfungiblePositionManager.sol)
- [Pool state interface](https://github.com/Uniswap/v3-core/blob/main/contracts/interfaces/pool/IUniswapV3PoolState.sol)
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 196kUpdated Claude CodeCodexVerifiedInstall