Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dzap.io/llms.txt

Use this file to discover all available pages before exploring further.

Vibe coding = describe outcomes, not steps. The agent picks tools. You sanity-check.

Patterns that work

1. Anchor on accounts

The agent does better when wallet + chain are in metadata, not buried in the prompt:
await sdk.ask({
  userQuery: "What's my exposure to ETH?",
  metadata: {
    accountInfo: [
      { blockchain: 'evm', chain: '1', user_account: '0xUser' },
      { blockchain: 'evm', chain: '42161', user_account: '0xUser' },
    ],
  },
});

2. Ask for plans before actions

For trades, two prompts beats one:
1. "Plan a swap of 100 USDC to WETH on Arbitrum. Show route and fees."
2. "OK, execute it."
The first surfaces a route for review; the second commits. Keeps you in the loop without sacrificing speed.

3. Composing tools

Don’t manually call tools in series — the agent’s better at it:
"Show top 3 pools on Base, pick the highest APR, plan a zap from USDC."
ZapBot will fire PoolTool → reason about APR → fire ZapCallDataGeneratorTool.

4. Constraints in plain English

"Swap 100 USDC for the best stablecoin yield on Arbitrum, max 1% slippage, no protocols below $10M TVL."
The agent passes constraints as parameters where supported and rejects routes where not.

Gotchas

Hallucinated addresses

LLMs can invent token addresses. Always pass an account or token via metadata when accuracy matters; fall back to TokenAddressTool to look up by symbol.

Slippage units

Tools and APIs use percent, not basis points. 1 = 1%. The agent gets this right when you say “1%”; it sometimes converts oddly when you say “100 bps”.

Native tokens

Native ETH/MATIC/etc. uses the sentinel 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE. Tools handle this transparently when you say “ETH”; they get confused if you pass 0x0...0 (zero address).

Multi-chain ambiguity

“Swap USDC for WETH” without a chain is ambiguous. Either set chain in metadata or specify (“on Arbitrum”). The agent will ask for clarification if it’s missing.

Bridge timing

Cross-chain bridges aren’t instant. The agent kicks off getZapTxnStatus polling but a UI loop should also poll independently — bridges can settle in seconds (Across) or minutes (CCTP).

Recipes

Daily portfolio summary

"Summarize my portfolio across Ethereum, Arbitrum, and Base.
Group by token, show USD value, flag any positions worth less than $1 (dust)."

Rebalance to target

"My target: 60% USDC, 30% WETH, 10% WBTC across Arbitrum and Base.
Plan the swaps to hit target. Show me the plan; don't execute."

News-driven swap idea

"Show top 3 trending tokens on Base by 24h volume.
For the top one, pull recent news and sentiment.
If sentiment is positive, plan a $500 swap from USDC."

When NOT to use the agent

  • High-value trades — the agent’s good at planning; for $100k+ swaps, drive the SDK directly with explicit slippage and review the route.
  • Production wallets — never give a production hot wallet’s key to an unsupervised agent. Use session keys and limits. See ZapBot Safety.
  • Deterministic flows — if you know exactly what should happen every time, the SDK is faster and cheaper.