prepare_uniswap_v3_mint
Build an unsigned transaction to mint a Uniswap V3 LP position with specified token pair, fee tier, tick range, and deposit amounts.
Instructions
Build an unsigned Uniswap V3 LP mint transaction — opens a new concentrated-liquidity position on the (tokenA, tokenB, feeTier) pool, bounded by [tickLower, tickUpper]. Up to two ERC-20 approvals are chained ahead of the mint() call (one per nonzero deposit side); USDT-style reset is handled automatically. The pool must already exist (initialized) — refuses with a clear error otherwise. Tick bounds MUST align to the fee tier's tickSpacing (100→1, 500→10, 3000→60, 10000→200); mis-aligned ticks are rejected rather than silently rounded. 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. After signing the mint, the resulting LP NFT appears in get_lp_positions for the recipient address.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | ||
| chain | No | ethereum | |
| tokenA | Yes | First token in the LP pair. Pass either order; the builder canonically sorts to (token0, token1) before submission. Native ETH is NOT supported in v1 — wrap to WETH first via prepare_native_send to the WETH contract. | |
| tokenB | Yes | Second token in the LP pair. Must differ from tokenA. | |
| feeTier | Yes | Pool fee in hundredths of a bip: 100 = 0.01%, 500 = 0.05%, 3000 = 0.3%, 10000 = 1%. Each fee tier is a separate pool; pick the one that matches the pair's volatility. | |
| tickLower | Yes | Lower tick of the position's price range. MUST align to the fee tier's tickSpacing (100→1, 500→10, 3000→60, 10000→200) — mis-aligned ticks are rejected. Use Uniswap UI or a tick-from-price helper to derive the value; passing arbitrary ints risks creating a position at a price the user did not intend. | |
| tickUpper | Yes | Upper tick. Must be > tickLower and aligned to tickSpacing. | |
| amountADesired | Yes | Human-readable decimal amount of tokenA to deposit. Example: "100.5" for 100.5 USDC. NOT raw wei. Pass "0" for a single-sided range deposit when the current price is outside the range and only the other token is needed. | |
| amountBDesired | Yes | Human-readable decimal amount of tokenB. Same shape as amountADesired. | |
| 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. Higher slippage masks bad fills and is a sandwich-bait misconfiguration. | |
| acknowledgeHighSlippage | No | Required when slippageBps is in (100, 500]. Surface the trade-off to the user before proceeding — wide slippage on an LP mint locks the unfavourable amounts. | |
| deadlineSec | No | Seconds from now until the on-chain `deadline` parameter expires. Default 1200 (20 min). | |
| recipient | No | Address to receive the minted LP NFT. Default: wallet (the depositor). | |
| 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. |