Build an unsigned Uniswap V3 LP rebalance transaction — moves a position from its current tick range to a new one in a single multicall. Composes (in order): decreaseLiquidity(100%) + collect + (optional) burn + mint(new range). The position's (token0, token1, fee) carry over; only the tick range...
AI agents invoke prepare_uniswap_v3_rebalance to trigger actions in VaultPilot MCP. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
chain | string | — | |
wallet | string | Yes | |
burnOld | boolean | — | Whether to also burn the old NFT in the same multicall. Default true — the old position has zero liquidity after the close phase and a stub NFT serves no purpos |
tokenId | string | Yes | ERC-721 tokenId of the LP NFT to rebalance. Must be owned by `wallet`. Its (token0, token1, fee) are reused for the new mint — only the tick range changes. |
approvalCap | string | — | 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 ac |
deadlineSec | integer | — | |
slippageBps | integer | — | Slippage tolerance in bps applied INDEPENDENTLY to the close phase (decreaseLiquidity floor) and the re-deposit phase (mint floor). The effective tolerance agai |
newTickLower | integer | Yes | Lower tick of the NEW range. Must align to the position's fee-tier tickSpacing (100→1, 500→10, 3000→60, 10000→200) and be < newTickUpper. |
newTickUpper | integer | Yes | |
acknowledgeHighSlippage | boolean | — |
Parameters from the server's own tool schema.
prepare_uniswap_v3_rebalance triggers real processes with real consequences. An agent gone sideways doesn't fire it once — it starts dozens of builds, sends mass notifications, or burns through compute before anyone looks up.
Risk signalsHigh parameter count (10 properties)
Attacks that exploit this kind of access
Build an unsigned Uniswap V3 LP rebalance transaction — moves a position from its current tick range to a new one in a single multicall. Composes (in order): decreaseLiquidity(100%) + collect + (optional) burn + mint(new range). The position's (token0, token1, fee) carry over; only the tick range changes. Slippage is independently applied to the close + re-deposit phases — the effective tolerance against the spot price is roughly 2× the input bps. The description block calls this out explicitly. v1 amount-source: the new mint's amount0Desired/amount1Desired are estimated from the position's expected burn amounts at current price; on-chain the actual mint pulls bounded by what was actually collected, with surplus refunded to the wallet by the NPM. Up to two ERC-20 approvals are chained ahead of the multicall (the mint phase still needs them — collect routes the tokens back to the wallet, then mint pulls them again via transferFrom). Hard-refuses on owner mismatch, mis-aligned new ticks, identical new range, or zero-liquidity position. It is categorised as a Execute tool in the VaultPilot MCP MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
prepare_uniswap_v3_rebalance accepts 10 parameters: chain, wallet, burnOld, tokenId, approvalCap, deadlineSec, slippageBps, newTickLower, newTickUpper, acknowledgeHighSlippage. Required: wallet, tokenId, newTickLower, newTickUpper. The full parameter table on this page comes from the server's own tool schema.
Register the VaultPilot MCP server in PolicyLayer and add a rule for prepare_uniswap_v3_rebalance: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches VaultPilot MCP. Nothing to install.
prepare_uniswap_v3_rebalance is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the prepare_uniswap_v3_rebalance rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for prepare_uniswap_v3_rebalance. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
prepare_uniswap_v3_rebalance is provided by the VaultPilot MCP server (vaultpilot-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.