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.

When you integrate DZap into a wallet, dashboard, or dApp, you can charge your own fee on top of DZap’s protocol fee. The amount accrues to an address you control — automatically, with no separate transaction.
Partner Fees are a pattern, not a separate product. The hooks are part of the standard SDK — you add fee fields, DZap respects them, and the fee accrues to the address you specify.

How it works

1

Quote with your fee

Pass partnerFee in the quote request — basis points + recipient address.
const quotes = await dzap.getTradeQuotes({
  fromChain: 42161,
  account: '0xUser',
  data: [{
    srcToken: '0xUSDC',
    destToken: '0xWETH',
    amount: '1000000',
    slippage: 1,
    partnerFee: {
      recipient: '0xYourPlatform',
      bps: 30,                         // 0.3%
    },
  }],
});
2

DZap returns net + gross

Quote response includes both the user-facing output (net of all fees) and the breakdown (DZap protocol fee, your partner fee, gas).
3

Execute as normal

Build + send via trade() or zap(). Your fee accrues automatically — no separate transaction.
4

Withdraw / track

Your address receives the partner fee in the destination token (or source, depending on flow). Track via on-chain analytics or a server-side ledger.

Fee fields

FieldTypeNotes
partnerFee.recipientstringYour address that receives the fee
partnerFee.bpsnumberBasis points (1 bps = 0.01%)
partnerFee.flatstringOptional flat amount in source token wei
You can use either bps or flat; not both.

Combining with gasless

Partner Fees + gasless: your fee is committed in the EIP-712 intent (in executorFeesHash). Solvers can’t strip it after signing.
// In a gasless flow, partnerFee bakes into the intent
const intent = await dzap.getZapQuote({
  ...,
  partnerFee: { recipient: '0xYourPlatform', bps: 30 },
});

When to ask for a partnership

If you’re routing meaningful volume (~$1M+/month) and want a custom fee tier, joint announcements, or a dedicated support channel — see Partnership Requests.

See also