prepare_uniswap_v3_rebalance
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...
This record as markdown: /tools/io-github-szhygulin-vaultpilot-mcp/prepare-uniswap-v3-rebalance.md
What prepare_uniswap_v3_rebalance does on VaultPilot MCP
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.
Why prepare_uniswap_v3_rebalance is rated High
This tool executes smart contract interactions on blockchain that modify the state of a liquidity position and perform token swaps, making it Execute rather than Write. While it builds unsigned transactions (which is Read-like), the purpose is to trigger external operations through a multicall that reallocates capital and incurs slippage risk.
From the tool's definition Tool builds and composes unsigned transactions for Uniswap V3 liquidity position rebalancing, including decreaseLiquidity, collect, burn, and mint operations with slippage parameters.
Risk signalsHigh parameter count (10 properties)
Attacks that exploit this kind of access
The rule that runs prepare_uniswap_v3_rebalance safely
PolicyLayer is an MCP gateway: it sits between your AI agents and VaultPilot MCP, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For prepare_uniswap_v3_rebalance, this is the rule to start with:
prepare_uniswap_v3_rebalance stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect VaultPilot MCP, apply this rule, and every prepare_uniswap_v3_rebalance call is checked against it from then on.
Questions about prepare_uniswap_v3_rebalance
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.
More on VaultPilot, and thousands of servers like it.
Across the catalogue