prepare_uniswap_v3_increase_liquidity
Build an unsigned Uniswap V3 increaseLiquidity transaction to add liquidity to an existing LP position. Reads position details on-chain and verifies ownership to prevent deposits to others' positions.
Instructions
Build an unsigned Uniswap V3 LP increaseLiquidity transaction — adds liquidity to an existing position identified by tokenId. Reads the position's (token0, token1, fee, tickLower, tickUpper) on-chain via positions(tokenId), so the caller only supplies the tokenId + amounts. Hard-refuses when the tokenId is not owned by wallet (the on-chain call would still succeed and route the deposit into someone else's position — the position owner gets the new liquidity). Use get_lp_positions to enumerate the wallet's tokenIds. Up to two ERC-20 approvals are chained ahead of the increaseLiquidity() call. v1 limitation: only WETH (not native ETH) is supported as a pair side; wrap ETH first via prepare_native_send to the WETH contract. Slippage defaults to 50 bps (0.5%); soft cap at 100 bps requires acknowledgeHighSlippage: true. Pass amount0Desired: "0" (or amount1Desired) for a single-sided range deposit when the current price is outside the position's range.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | ||
| chain | No | ethereum | |
| tokenId | Yes | ERC-721 tokenId of the Uniswap V3 LP NFT to add liquidity to. The position must be owned by `wallet` — the builder reads ownerOf(tokenId) and refuses if it doesn't match. Use `get_lp_positions` to enumerate the wallet's tokenIds. | |
| amount0Desired | Yes | Human-readable decimal amount of the position's token0 to add. NOT raw wei. Pass "0" for a single-sided range deposit when the current price is outside the position's range. | |
| amount1Desired | Yes | Human-readable decimal amount of the position's token1. Same shape as amount0Desired. | |
| slippageBps | No | Slippage tolerance in basis points (1 bp = 0.01%). Default 50 bps (0.5%). Hard ceiling 500 bps; soft cap 100 bps requires acknowledgeHighSlippage: true. | |
| acknowledgeHighSlippage | No | Required when slippageBps is in (100, 500]. Surface the trade-off to the user before proceeding. | |
| deadlineSec | No | Seconds from now until the on-chain `deadline` parameter expires. Default 1200 (20 min). | |
| approvalCap | No | Cap on the ERC-20 approval preceding this action. Omit for "unlimited" (standard DeFi UX — fewer follow-up approvals). Pass "exact" to approve only what this action pulls. Pass a decimal string (e.g. "500") for a specific ceiling in the asset's human units; must be ≥ the action amount, otherwise the transaction would revert. |