Skip to content
Guides

Fees and commission

Fees come off the deposit before the order is published. Solvers then price what remains, so their rate contains none of these fees. What the quote shows already has every fee taken off: display.receive and display.receiveMin are what the user gets, and terms.minRate is receiveMin per token of the whole deposit.

A flat fee per order. The source asset’s depositFee plus the destination asset’s withdrawFee, from GET /v3/catalog. Each is in its own asset’s base units, so the quote converts the withdraw fee into the source asset at a live price, and shows the total as display.flatFee. Once the order publishes, the flat fee is kept in full at any fill level, even when the order never fills. If the deposit couldn’t publish, its recovery refunds the full deposit without a flat fee.

Khalani’s fee and your commission, operatorFeeBps and commissionBps in GET /v3/catalog. Each is basis points of the deposit less the flat fee, on the part that fills. Your commission is paid to your commission wallet on the hub when the order settles.

The relay fee, on an EVM source only. The deposit transaction pays it in the chain’s gas token, on top of send, as the deposit step’s value. display.relayFee estimates it in the quote.

Source-chain gas for the approval and deposit transactions, paid by the user’s wallet as usual.

flat fee = depositFee(source) + withdrawFee(destination, converted to source units)
published = (send − flat fee) × (1 − (operatorFeeBps + commissionBps) / 10 000)
receive = published × solvers' rate, rounded down
protocolFee = flat fee + Khalani's fee (your commission is not in it)
Field Where What it holds
assets[].depositFee, assets[].withdrawFee Catalog Each asset’s flat fee as a source and as a destination, in its own base units.
operatorFeeBps, commissionBps Catalog Khalani’s fee and your commission, in basis points.
display.flatFee Quote The order’s flat fee, in the source asset, rounded up.
display.protocolFee Quote The flat fee plus Khalani’s fee, rounded up. Not your commission.
display.relayFee Quote The relay fee estimate, in the gas token. Null on a non-EVM source.
terms.flatFee Order The quote’s display.flatFee.
charges.protocolFee Order The protocol fee taken at settlement, rounded up.
fills[].send Order What each fill used of the deposit, its share of the percentage fees included.

No endpoint returns the commission earned on a single order. It reaches your commission wallet as its own transfer on the hub, and you withdraw it on your own schedule.

Only Khalani can change your percentages and commission wallet, on your request. No API call can. After a change, an option quoted before it answers 409 REQUOTE_REQUIRED at order creation: quote again.