# prepare_curve_swap

Build an unsigned Curve swap on Ethereum. Issue #615. Supports the canonical legacy stETH/ETH pool (0xDC24316b9AE028F1497c275EB9192a3Ea0f67022 — historically the tightest-spread venue for stETH↔ETH) and any plain pool registered with the stable_ng factory (covers crvUSD/USDC, USDe/USDC, etc.). Pass pool + fromToken + toToken; the tool resolves coin indices from the pool's coins array. Use fromToken: "native" for the ETH leg of the stETH/ETH pool (the only currently-supported pool whose coins(i) returns the ETH sentinel). Slippage gate REQUIRED: slippageBps (server reads get_dy and applies the cap) or minOut (explicit decimal-string uint256). The pool's exchange() accepts min_dy=0 silently — defaulting to that would let MEV extract the entire output. ERC-20 inputs chain an approval to the pool automatically. Rejected: meta pools (use exchange_underlying — different ABI), cryptoswap / tricrypto / older legacy stable pools (uint256 indices, use_eth flag — different selectors). For unsupported Curve pairs, fall back to prepare_swap (LiFi).

Agent View of the PolicyLayer registry record for `prepare_curve_swap`. HTML page: https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-curve-swap

## Facts

- Tool: `prepare_curve_swap`
- Server: VaultPilot MCP (`vaultpilot-mcp`) — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp.md
- Install: `npx -y vaultpilot-mcp`
- Homepage: https://github.com/szhygulin/vaultpilot-mcp
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 10 (5 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `pool` | string | yes | Curve pool address. Must be the canonical legacy stETH/ETH pool (0xDC24316b9AE028F1497c275EB9192a3Ea0f67022) or a stable_ng factory plain pool. Meta pools, cryp |
| `amount` | string | yes | Human-readable decimal input amount in the from-token (e.g. "1.5"). Decimals are read from the from-token contract; native = 18. |
| `minOut` | string | no | Explicit minimum output in the to-token's wei (decimal-string uint256). Takes precedence over `slippageBps` when both are provided. |
| `wallet` | string | yes | 0x EVM wallet address that will sign the tx. |
| `toToken` | object | yes | Token to receive. Same rules as `fromToken`. Must differ from `fromToken` and both must appear in the pool's `coins` array. |
| `fromToken` | object | yes | Token to spend. Pass `"native"` only for pools whose `coins(i)` returns the ETH sentinel (0xeeee...eeee) at some index — currently the legacy stETH/ETH pool. Fo |
| `approvalCap` | string | 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 ac |
| `slippageBps` | integer | no | Slippage tolerance in basis points (50 = 0.5%). When set, `min_dy = get_dy(i,j,dx) * (1 - slippageBps/10000)`. Either `slippageBps` or `minOut` is required — th |
| `acknowledgeHighSlippage` | boolean | no | Required when `slippageBps > 100` (1%). Same gate as `prepare_swap` — sandwich-MEV bots target wide-slippage txs. |
| `acknowledgeNonAllowlistedSpender` | boolean | no | AFFIRMATIVE GATE — required whenever `fromToken` is an ERC-20 (the approve leg targets the Curve pool, which is NOT in the global protocol approve-allowlist: Aa |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "prepare_curve_swap",
    "arguments": {
      "pool": "<pool>",
      "amount": "<amount>",
      "wallet": "<wallet>",
      "toToken": {},
      "fromToken": {}
    }
  }
}
```

## Why prepare_curve_swap is rated High

This tool builds and prepares a swap transaction on the Ethereum blockchain via the Curve protocol. While it produces an 'unsigned' transaction (suggesting it doesn't directly submit), it constructs executable financial operations (token swaps) that, once signed and submitted, move crypto assets. The tool itself is the Execute step in a sign-then-broadcast workflow common in self-custodial crypto systems.

From the tool's own definition: "'Build an unsigned Curve swap on Ethereum' — constructs a DeFi swap transaction involving token exchange on Curve protocol, triggering external on-chain operations with slippage controls and pool interactions"

Risk signals: High parameter count (10 properties) · Bulk/mass operation — affects multiple targets

## Use case

AI agents invoke prepare_curve_swap 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.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches VaultPilot MCP:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "prepare_curve_swap": {
      "limits": [
        {
          "counter": "prepare_curve_swap_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on VaultPilot MCP (188)

- `prepare_btc_lifi_swap` — Destructive — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-btc-lifi-swap.md
- `prepare_btc_rbf_bump` — Destructive — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-btc-rbf-bump.md
- `prepare_jito_stake` — Destructive — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-jito-stake.md
- `prepare_marginfi_init` — Destructive — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-marginfi-init.md
- `prepare_solana_nonce_close` — Destructive — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-solana-nonce-close.md
- `prepare_sunswap_swap` — Destructive — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-sunswap-swap.md
- `prepare_uniswap_v3_burn` — Destructive — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-uniswap-v3-burn.md
- `prepare_uniswap_v3_mint` — Destructive — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-uniswap-v3-mint.md
- `remove_contact` — Destructive — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/remove-contact.md
- `unregister_btc_multisig_wallet` — Destructive — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/unregister-btc-multisig-wallet.md
- `combine_btc_psbts` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/combine-btc-psbts.md
- `pair_ledger_btc` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/pair-ledger-btc.md
- `prepare_aave_repay` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-aave-repay.md
- `prepare_btc_multisig_send` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-btc-multisig-send.md
- `prepare_compound_repay` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-compound-repay.md
- `prepare_compound_supply` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-compound-supply.md
- `prepare_custom_call` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-custom-call.md
- `prepare_kamino_init_user` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-kamino-init-user.md
- `prepare_kamino_supply` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-kamino-supply.md
- `prepare_lido_unstake` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-lido-unstake.md
- `prepare_lido_unwrap` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-lido-unwrap.md
- `prepare_lido_wrap` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-lido-wrap.md
- `prepare_native_stake_deactivate` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-native-stake-deactivate.md
- `prepare_native_stake_delegate` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-native-stake-delegate.md
- `prepare_rocketpool_unstake` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-rocketpool-unstake.md
- `prepare_safe_tx_execute` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-safe-tx-execute.md
- `prepare_solana_lifi_swap` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-solana-lifi-swap.md
- `prepare_solana_nonce_init` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-solana-nonce-init.md
- `prepare_solana_swap` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-solana-swap.md
- `prepare_swap` — Execute — https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp/prepare-swap.md
- …and 158 more: https://policylayer.com/tools/io-github-szhygulin-vaultpilot-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=io-github-szhygulin-vaultpilot-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-szhygulin-vaultpilot-mcp
