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 ...

Server VaultPilot MCP vaultpilot-mcp
Category Write
Risk class Medium
Parameters 63 required

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.

ParameterTypeRequiredDescription
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 needs a policy

An AI agent can call prepare_curve_add_liquidity faster than any human can review — one bad instruction and it creates or modifies resources in VaultPilot MCP by the hundred, each call as confident as the last.

Questions about prepare_curve_add_liquidity

What does the prepare_curve_add_liquidity tool do? +

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.

What parameters does prepare_curve_add_liquidity accept? +

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.

How do I enforce a policy on prepare_curve_add_liquidity? +

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.

What risk level is prepare_curve_add_liquidity? +

prepare_curve_add_liquidity is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit prepare_curve_add_liquidity? +

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.

How do I block prepare_curve_add_liquidity completely? +

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.

What MCP server provides prepare_curve_add_liquidity? +

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.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.