A bundle is a sequence of steps that settle as one intent. Use bundles when the user-facing action requires more than one swap or bridge.
Example: bridge + LP deposit
USDC on Arbitrum → 50/50 USDC/WETH LP position on Base.
import { DZapClient } from '@dzapio/sdk';
const dzap = DZapClient.getInstance();
const bundleQuote = await dzap.getZapBundleQuote({
account: '0xUser',
steps: [
{
type: 'bridge',
srcChainId: 42161,
destChainId: 8453,
srcToken: '0xaf88...', // Arbitrum USDC
destToken: '0x8335...', // Base USDC
amount: '100000000', // 100 USDC
},
{
type: 'zap',
chainId: 8453,
action: 'add-liquidity',
pool: '0xPoolAddress',
tokenIn: '0x8335...', // Base USDC
},
],
});
const tx = await dzap.buildZapBundleTx({
account: '0xUser',
bundleId: bundleQuote.bundleId,
});
When bundles beat raw quotes
| You want… | Use bundle? |
|---|
| One signature for swap + bridge | ✅ |
| Bridge → LP-deposit, vault-deposit, NFT mint | ✅ |
| Same-chain swap | ❌ — use getTradeQuotes |
| Pure bridge | ❌ — use getZapQuote (single step) |
Bundle vs separate calls
Calling Core endpoints separately (swap, then bridge, then deposit) requires multiple user signatures and creates intermediate state the user can lose. A bundle:
- Is one signature for the user.
- Cannot be partially executed (in the user’s favor — funds either complete the journey or refund).
- Optimizes routing across the entire path, not step-by-step.
API
curl -X POST https://zap.dzap.io/v1/bundle \
-H "Content-Type: application/json" \
-d '{ "account": "0x...", "steps": [...] }'
See the Bundle API reference for the full request/response shape. Last modified on May 4, 2026