Documentation Index
Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Zap is Meteora’s helper program for position workflows that need token accounting, a supported swap, or a follow-up liquidity action. In practice, Zap has two jobs:- Zap In: use tracked token amounts to add liquidity to a supported DAMM v2 or DLMM position flow.
- Zap Out: detect tokens received during the current flow and swap a selected percentage through a whitelisted route.
Zap runs on the program
zapvX9M3uf5pvy4wRPAbQgdQsM1xmuiFnkfHKPvwMiz.Zap is deliberately narrow. It only supports the instructions and routes described in this section; it is not a general-purpose Solana router.
Core Features
User Ledger
Zap In flows use a user-owned ledger PDA to track token A/B or token X/Y amounts before and after swaps or deposits.
DAMM v2 Zap In
Zap can add DAMM v2 liquidity, optionally swap the surplus side through DAMM v2, then add remaining liquidity again.
DLMM Zap In
Zap can initialize a new DLMM position or deposit into an existing position with Spot, Curve, or Bid-Ask distribution parameters.
Zap Out
Zap can rewrite the amount field in a prepared DAMM v2, DLMM, or Jupiter v6 swap instruction and invoke it for the detected balance increase.
What Zap Supports
| Area | Supported by the Zap program |
|---|---|
| DAMM v2 Zap In | Add liquidity, calculate the surplus side, swap through DAMM v2 swap2, then add remaining liquidity. |
| DLMM Zap In | New and existing positions through DLMM rebalance_liquidity. |
| DLMM strategies | Spot, Curve, and BidAsk. |
| Zap Out routes | DAMM v2 swap, DLMM swap2, Jupiter v6 route, and Jupiter v6 shared-account route. |
| Ledger accounting | One PDA per owner using the user_ledger seed. |
| Token 2022 transfer fees | Transfer-fee-aware net amount calculations in Zap In liquidity math. |
What Zap Does Not Do
Zap does not choose the user’s pool, route, quote, position range, or slippage settings. Frontends and integrators still prepare those decisions before calling the program. Zap also does not guarantee the best route or exact final output. Swap execution still depends on pool liquidity, price movement, route accounts, token behavior, and the slippage checks used by the underlying program.How It Works
Product Fit
Zap is useful when a user intent maps cleanly to one of the supported flows:- Add liquidity to a DAMM v2 position using amounts already tracked in the ledger.
- Create a DLMM position and deposit into a selected bin range.
- Add to or reposition an existing DLMM position with a supported strategy.
- Claim, withdraw, or otherwise receive tokens, then convert a selected percentage through a supported Zap Out route.
Read Next
Zap Compatibilities
Review supported instructions, routes, accounts, access controls, and not-fit cases.
Zap Formulas and Limits
See the percentage, slippage, price, and DLMM strategy math used by the program.

