zap_into_lp_position
Maps to POST /addliquidity/quote. Builds a single-transaction zap to enter an LP position from ANY input token — the deposit token does NOT have to be one of the pool's underlying tokens. SwapWizard handles all intermediate swaps, the LP mint, and price-range setup in a single transaction. FULL C...
This record as markdown: /tools/defire-business-swapwizard-mcp/zap-into-lp-position.md
What zap_into_lp_position does on Swapwizard
AI agents use zap_into_lp_position to commit financial operations through Swapwizard, usually the final step of a payment, billing, or trading workflow. A call moves real money.
| Parameter | Type | Required | Description |
|---|---|---|---|
poolId | string | Yes | Pool identifier from search_liquidity_pools (e.g. 'pancakeswap-v3:0x36696...') |
sender | string | — | Wallet address of the sender (for simulation) |
chainId | integer | Yes | EVM chain ID |
deposits | array | Yes | Tokens and amounts to deposit |
tickLower | integer | — | Custom lower tick for concentrated liquidity |
tickUpper | integer | — | Custom upper tick for concentrated liquidity |
affiliateCode | string | — | Optional affiliate wallet address registered on-chain with SwapWizard — forwarded to the API so the affiliate fee for this operation is paid to that address. Om |
Parameters from the server's own tool schema.
Why zap_into_lp_position is rated Critical
This tool executes on-chain DeFi transactions that commit real financial assets: it performs token swaps and mints LP positions in a single transaction. This constitutes a direct financial obligation/commitment of user funds across multiple AMMs on EVM chains, making it Financial category with critical severity due to the potential for significant asset loss if misused (wrong pool, wrong price range, wrong input…
From the tool's definition Builds a single-transaction zap to enter an LP position from ANY input token — the deposit token does NOT have to be one of the pool's underlying tokens. SwapWizard handles all intermediate swaps, the LP mint, and price-range setup in a single transaction.
Risk signalsHandles credentials or secrets (deposits[].token)
Attacks that exploit this kind of access
The rule that runs zap_into_lp_position safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Swapwizard, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For zap_into_lp_position, this is the rule to start with:
Any call to zap_into_lp_position is blocked until a human approves it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Swapwizard, apply this rule, and every zap_into_lp_position call is checked against it from then on.
Questions about zap_into_lp_position
Maps to POST /addliquidity/quote. Builds a single-transaction zap to enter an LP position from ANY input token — the deposit token does NOT have to be one of the pool's underlying tokens. SwapWizard handles all intermediate swaps, the LP mint, and price-range setup in a single transaction. FULL CONCENTRATED LIQUIDITY SUPPORT: for CL pools (Uniswap V3/V4, PancakeSwap V3/Infinity CL, Aerodrome Slipstream, SushiSwap V3, Algebra forks like Camelot/THENA/QuickSwap, Fluid, Balancer V3) you can set a custom price range via tickLower/tickUpper — omit them for the protocol's default range. Classic pools (Curve, Balancer V2, Uniswap V2, Solidly) are also supported. Surplus returned to the user. Supports an optional affiliateCode (registered affiliate wallet address) forwarded to the API so the affiliate fee is paid on-chain to that address. IMPORTANT: The poolId parameter MUST come verbatim from the poolId field in the search_liquidity_pools response — do NOT construct or modify it. EXECUTION FLOW: (1) If the deposit token is non-native, send an ERC-20 approve to the router and WAIT for on-chain confirmation. (2) Call this tool again for a fresh quote (quotes expire). (3) Send the tx to the router contract: to=router, data=callData, value=value. This requires a private key or wallet signer. ⚠️ PRICE IMPACT: The response includes a priceImpact field. Agents MUST present this value to the user and request explicit confirmation before executing. ⚠️ ZERO OUTPUT: If an internal swap amount is too small, the API returns HTTP 400 with "swap amount too small: output rounds to zero". Increase the deposit amount. It is categorised as a Financial tool in the Swapwizard MCP Server, which means it involves financial transactions. Block by default and require explicit approval.
zap_into_lp_position accepts 7 parameters: poolId, sender, chainId, deposits, tickLower, tickUpper, affiliateCode. Required: poolId, chainId, deposits. The full parameter table on this page comes from the server's own tool schema.
Register the Swapwizard MCP server in PolicyLayer and add a rule for zap_into_lp_position: 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 Swapwizard. Nothing to install.
zap_into_lp_position is a Financial tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the zap_into_lp_position 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 zap_into_lp_position. 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.
zap_into_lp_position is provided by the Swapwizard MCP server (@swapwizard/mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Swapwizard, and thousands of servers like it.
Across the catalogue