Skip to main content

How fees work

Gateway pricing is quote-first: every fee is computed per swap and returned in full in the getQuote response before the user signs anything. The quote you’re shown is the quote that gets used to create the order, so the rate is the user’s guaranteed minimum — no hidden costs and no surprises at settlement. In V2 every fee line also carries an optional usd value for display. A quote reflects four components.

Protocol fee

Fees applied by the protocol for processing and routing swaps. Today these are set to merely cover routing and gas costs, with 0 markup. In the future, the BOB DAO may vote to activate a fee markup; collected revenue would then go to the BOB DAO treasury.

Solver pricing

Orders are filled by solvers quoting against live market prices. Gateway selects the best available quote for the route, and the rate the user sees is the guaranteed minimum they’ll receive.

Affiliate fees

Affiliate fees are your revenue share: a basis-point cut of each swap, routed to one or more EVM addresses you control. This is how integrators monetize Gateway.
Affiliate fees are paid out in USDT on Ethereum as part of each swap — regardless of which route the user swapped. One basis point (1 bps) is 0.01%, so 50 bps is 0.50%.
You configure affiliate fees per quote — there’s no upfront registration. Pass one or more { address, bps } pairs when you request a quote, and the fee is deducted as part of the swap and paid to your address(es) on settlement. V2 supports splitting the fee across multiple recipients in a single quote — useful for revenue splits between an aggregator and an underlying integrator, referral programs, or multi-party agreements. Routes that don’t support affiliate fees return the error code AFFILIATE_FEES_NOT_SUPPORTED_FOR_ROUTE; handle it by retrying the quote without affiliates or surfacing the error to the user. For the SDK and raw-API code — single recipient, multi-recipient splits, reading the resolved fee back from the quote, and the format rules — see Monetization (Affiliate Fees) in the integration guide.

Gas costs

The gas cost of the destination chain is included in the swap processing fees and estimated upfront, so users don’t need to hold the destination gas token (e.g. for BTC-to-Ethereum swaps, users don’t need ETH on Ethereum). The gas cost of the source chain — the chain where the swap is initiated — is handled out-of-protocol by the wallet.

Worked example

Illustrative example — actual values vary per quote. A user swaps $100 of BTC to USDT on Ethereum through your app, and you charge a 50 bps affiliate fee: Every line is returned in the getQuote response before the user signs anything, so you can display the exact breakdown. The user pays no gas on the destination chain out of pocket — it’s deducted from the swap, so they don’t need ETH to receive USDT on Ethereum.

Seeing fees in the quote

Don’t estimate — read the exact costs off the quote. Each fee line in feeBreakdown carries the amount and an optional USD value:
Show this breakdown in your UI and the user sees exactly what they pay, per swap, from the same source of truth Gateway settles against.

Next Steps

Affiliate fee integration

Code examples for configuring affiliate fees via the SDK and raw API

Refunds

What happens when a swap can’t be completed