prepare_solana_lifi_swap
Build an unsigned LiFi-routed swap or bridge with Solana as the source chain. Returns a Solana v0 tx the user signs on Ledger. Two flows share this surface: (1) IN-CHAIN swap when toChain="solana" — LiFi internally routes through Jupiter / Orca / similar; consider prepare_solana_swap (Jupiter dir...
This record as markdown: /tools/io-github-szhygulin-vaultpilot-mcp/prepare-solana-lifi-swap.md
What prepare_solana_lifi_swap does on VaultPilot MCP
AI agents invoke prepare_solana_lifi_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.
| Parameter | Type | Required | Description |
|---|---|---|---|
wallet | string | Yes | Solana base58 wallet — funds the swap and signs the source tx. Must have an initialized durable-nonce account (prepare_solana_nonce_init). |
toChain | string | Yes | Destination chain. "solana" runs an in-chain swap (LiFi routes through Jupiter / Orca / similar — consider prepare_solana_swap for the more direct path). EVM ch |
toToken | string | Yes | Destination token. SPL mint (base58) when toChain="solana"; 0x-prefixed EVM token address otherwise. "native" works on both (resolves to the chain's conventiona |
fromMint | string | Yes | Source token: SPL mint address (base58) or the literal string "native" to swap SOL (LiFi maps "native" to wrapped-SOL internally; the wrap ix is built into the |
toAddress | string | — | Optional destination wallet. Defaults to the source wallet for in-chain swaps. REQUIRED for cross-chain bridges since the Solana base58 source wallet won't be a |
fromAmount | string | Yes | Raw integer amount in base units (NOT decimal-adjusted). Decimals are the source token's decimals — e.g. 1 USDC (6 decimals) = '1000000', 1 SOL (9 decimals) = ' |
slippageBps | integer | — | Slippage tolerance in basis points (50 = 0.5%). Omit for LiFi's default (0.5%). Cross-chain bridges may impose their own minimums above this. |
Parameters from the server's own tool schema.
Why prepare_solana_lifi_swap is rated High
This tool triggers external financial operations (swaps and cross-chain bridges) with irreversible effects once signed. Although it requires user signature, it directly prepares instructions to move assets across chains and execute DeFi trades. The critical severity reflects the high blast radius: a misconfigured or maliciously-induced swap could result in loss of funds, slippage, or bridge failures.
From the tool's definition Tool builds unsigned transactions for cross-chain swaps and bridges ('Build an unsigned LiFi-routed swap or bridge', 'Returns a Solana v0 tx'), executing trades across EVM chains and Solana via LiFi aggregation (Jupiter, Orca, Wormhole, deBridge, Mayan).
Attacks that exploit this kind of access
The rule that runs prepare_solana_lifi_swap 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_solana_lifi_swap, this is the rule to start with:
prepare_solana_lifi_swap 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_solana_lifi_swap call is checked against it from then on.
Questions about prepare_solana_lifi_swap
Build an unsigned LiFi-routed swap or bridge with Solana as the source chain. Returns a Solana v0 tx the user signs on Ledger. Two flows share this surface: (1) IN-CHAIN swap when toChain="solana" — LiFi internally routes through Jupiter / Orca / similar; consider prepare_solana_swap (Jupiter direct) as the more direct path for in-chain only. (2) CROSS-CHAIN bridge when toChain is an EVM chain — LiFi aggregates Wormhole, deBridge, Mayan, Allbridge. The Solana source tx confirms first; destination delivery happens after via the bridge protocol (typically 1-15 min). DURABLE NONCE REQUIRED. The builder rejects multi-tx routes (returned by some bridge variants) and multi-signer routes (which would need an ephemeral signer LiFi normally provides via its wallet adapter — Ledger-only signing can't supply it). Reverse direction (EVM → Solana) is not yet wired in this server; track as a follow-up. BLIND-SIGN on Ledger — match the Message Hash on-device after preview_solana_send. 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_solana_lifi_swap accepts 7 parameters: wallet, toChain, toToken, fromMint, toAddress, fromAmount, slippageBps. Required: wallet, toChain, toToken, fromMint, fromAmount. 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_solana_lifi_swap: 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_solana_lifi_swap 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_solana_lifi_swap 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_solana_lifi_swap. 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_solana_lifi_swap 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