prepare_curve_add_liquidity
Build an unsigned Curve add_liquidity transaction for a stable_ng plain pool on Ethereum. Bundles ERC-20 approvals (one per non-zero deposit slot) before the action call via chainApproval. Pass amounts as a decimal-string array matching the pool's N_COINS (use '0' for slots you're not depositing ...
This record as markdown: /tools/io-github-szhygulin-vaultpilot-mcp/prepare-curve-add-liquidity.md
What prepare_curve_add_liquidity does on VaultPilot MCP
AI agents use prepare_curve_add_liquidity to create or update resources in VaultPilot MCP, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your VaultPilot MCP environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
pool | string | Yes | Pool address (== LP token address on stable_ng). Must be a stable_ng plain pool — meta pools rejected with a clear error in v0.1; use `get_curve_positions` to d |
wallet | string | Yes | 0x EVM wallet address that will sign the tx. |
amounts | array | Yes | Per-coin deposit amounts as decimal-string-encoded uint256, in the order returned by `get_curve_positions(...).coins`. Length must match the pool's N_COINS. Pas |
minLpOut | string | — | Explicit minimum LP tokens to receive (decimal-string uint256). Passes through to the pool's `add_liquidity(amounts, min_mint_amount)`. Either `minLpOut` or `sl |
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 |
slippageBps | integer | — | Server-side slippage allowance in basis points (e.g. 50 = 0.5%). When set, `minLpOut = calc_token_amount * (1 - slippageBps / 10000)`. Capped at 10% (1000 bps) |
Parameters from the server's own tool schema.
Why prepare_curve_add_liquidity is rated Medium
This tool creates a financial transaction that moves and locks user assets into a Curve liquidity pool. While the transaction is unsigned (requiring additional authorization before execution), the tool itself constructs the write operation that commits capital.
From the tool's definition Tool builds an unsigned transaction for 'add_liquidity' on Curve, which 'creates or modifies data reversibly' by depositing assets into a liquidity pool.
Attacks that exploit this kind of access
The rule that runs prepare_curve_add_liquidity 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_curve_add_liquidity, this is the rule to start with:
prepare_curve_add_liquidity stays usable, but capped: an agent stuck in a loop can't make hundreds of changes 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_curve_add_liquidity call is checked against it from then on.
Questions about prepare_curve_add_liquidity
Build an unsigned Curve add_liquidity transaction for a stable_ng plain pool on Ethereum. Bundles ERC-20 approvals (one per non-zero deposit slot) before the action call via chainApproval. Pass amounts as a decimal-string array matching the pool's N_COINS (use '0' for slots you're not depositing into — single-coin deposit). Slippage gate is REQUIRED: pass either minLpOut (explicit decimal-string uint256) OR slippageBps (server computes via calc_token_amount * (1 - bps/10000)). v0.1 scope: stable_ng plain pools only — meta pools rejected. Use get_curve_positions to discover valid pool addresses + their coin order before calling this. It is categorised as a Write tool in the VaultPilot MCP MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
prepare_curve_add_liquidity accepts 6 parameters: pool, wallet, amounts, minLpOut, approvalCap, slippageBps. Required: pool, wallet, amounts. 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_curve_add_liquidity: 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_curve_add_liquidity is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the prepare_curve_add_liquidity 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_curve_add_liquidity. 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_curve_add_liquidity 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.
This server
Across the catalogue