fee object so you can read the applied fee programmatically.
Retail is always free
A bare no-fee key, an anonymous call, or a public swap on the consumer app: all 0 bps from RAVN and you, permanently. (Private swaps in RAVN’s own app carry RAVN’s 0.5% fee, except from Bitcoin; swaps through the API never do.) Venue or network costs that appear in a quote (for example gas on non-gasless routes, or NEAR Intents’ own fee, which a NEAR quote’sfee reports, see below) are not RAVN fees;
they’re part of the route economics RAVN ranks for best execution.
Setting your own fee
Any self-serve key can set its own swap fee, from 0 up to a 100 bps (1%) cap, viaPATCH /v1/keys:
x-api-key header, whether over REST or the MCP server (see
Fee by access path for how x402 differs). Enterprise keys work
differently: their fee is set directly by RAVN as part of a custom arrangement (see
Enterprise fee arrangements) rather than through this endpoint.
What you actually receive
RAVN keeps a fixed 40% of whatever fee you collect, and pays the rest to you. It is never a fee on top of yours. On most venues that’s the whole story. On a few venues, the venue itself takes a cut of the fee before RAVN ever receives it, which reduces both sides proportionally:NEAR Intents charges the end user its own fee on every swap, whether or not you set one. 1Click
takes 20 bps (1 bp when both tokens are USDC, USDT or DAI, or the same asset) with no fee of yours,
keyless calls included. With yours it takes half of it (you keep the extra bp of an odd fee), and at
least that same floor, so a declared fee under 40 bps (2 on those pairs) costs the user your half
plus the floor, never out of your share. On a private swap, where RAVN collects your fee beside the deposit, 1Click’s floor comes on
top. 1Click takes it from the input before pricing, so the quoted output already reflects it. The
quote’s
fee.bps and fee.amount report that honest total, so NEAR never shows bps: 0. Read them
from the quote rather than assuming they equal what you set.fee.supported: false tells you. Every other live venue reports supported: true.
On 0x Solana, the fee is charged when one side of the pair is SOL or a token RAVN’s fee wallet
has a token account for; other pairs quote fee-free, with fee.bps: 0 and supported: true.
Fees paid beside the swap
Some routes have no fee of their own: Rift, Eco Routes (from an EVM chain), Layerswap and Mayan’s routes that pay no referrer (from an EVM chain or Solana), and private swaps (confidential: true: NEAR Intents from an EVM chain, Bitcoin or Solana; Houdini Swap from an EVM
chain or Solana; Hinkal, always from an EVM chain). Jupiter takes a fee of its own only from 50 bps, so a smaller one is collected
the same way. So is Fly Trade’s on a sale of the chain’s native coin (ETH, for example) outside
Ethereum, Base and Polygon: Fly takes its fee from inside that swap, where RAVN can’t prove it, so
Fly is quoted fee-free there. On those, RAVN collects your fee itself, as a
payment next to the swap: your user pays it in the swap’s input token (on Robinhood Chain and
Arbitrum, a coin sell’s fee as WETH: see below), and the venue is quoted
and paid on the rest, so the quote already reflects your fee and the route races every other venue
on equal terms, the payment’s own network cost included. You get your 60% in the regular payouts,
in the token it was paid in.
The execution carries it as fee: { amount, address, chainId, transaction? }, on a DEPOSIT
(Rift, private swaps) or a TRANSACTION (Eco Routes, Layerswap, Mayan, Fly Trade, Hinkal’s deposit). deposit.amount, or the
transaction, already leaves it out. The exception is a Solana TRANSACTION RAVN builds (Mayan,
Layerswap) or adds its fee to (Jupiter under 50 bps): the fee is already inside it, and the execution has no fee (see Solana below). How
it’s paid depends on the chain:
- EVM: one confirmation or two. Send
fee.transactionexactly as given: it carries a tag naming this swap, which is how RAVN ties the payment to it.- One confirmation (ERC-20 fee). A wallet that batches (EIP-5792
wallet_sendCalls) or relays (a smart account, EIP-7702, ERC-4337) can sendfee.transactionin the same confirmation as the swap: the deposit transfer, or thetransaction(with itsapprovalbefore it). Put one fee-bearing swap in a batch: a batch carrying two fees proves only one. Batch a token deposit, or a native-coin deposit to NEAR Intents (it credits coin a smart account moves); send any other native-coin deposit to a deposit address as a plain transfer, as an exchange may not credit coin a contract moved. - A coin sell’s fee as WETH (Fly Trade on Robinhood Chain and
Arbitrum). There RAVN takes your fee as WETH minted to its fee wallet:
fee.transactionsends the coin to the chain’s WETHdepositTo(RAVN), tagged like any other fee payment. The quote’sfee.tokenis WETH (fee.amountin its 18 decimals, the same number as in ETH), and the fee is booked and paid out in WETH. WETH’s Transfer log proves it wherever it rides, so it may go in the swap’s own confirmation:/executereturnscalls(the swap, then the fee) withbatch: true, and a wallet that batches can send it in one confirmation. Fly’s swap on Robinhood Chain measured 430k to 560k gas (2026-10-20), above the ~400k past which/executesays to send the calls one by one, so under that rule it usually goes as two (the fee after the swap). Batch it only from a wallet that leaves the batch real gas headroom: one that estimates it tight reverts all of it. - Any other native-coin fee (ETH, for example) must be a plain transaction of its own, from a
regular wallet, sent after the swap: RAVN proves it from the transaction’s own value, which a
batch hides. That includes a Fly Trade coin sell on Optimism, BNB Chain and Fly’s other chains
where RAVN can’t read internal transfers (
batch: false). The one exception: beside a NEAR Intents deposit (a private swap) on Ethereum, Base or Polygon it may ride in the same batch, as RAVN reads those chains’ internal transfers. Anywhere else, a contract wallet that can’t send a plain transaction (a Safe, a 4337 account) can’t pay it. - Report it. Pass the on-chain hash of the transaction that carried the fee (the batch’s
transaction, not an EIP-5792 batch id or a 4337
userOpHash) astxHashto/status. Simplest: on every poll; RAVN keeps it once confirmed. Not needed on aTRANSACTIONwith nostatusRefwhen the fee rode in the swap’s own transaction and you poll with that hash. RAVN stops waiting for it a day after/execute: a fee reported later earns nothing. Keep polling to a terminal status even when the venue’s own tracker says delivered: until RAVN can read the fee transaction, a delivered swap is answeredprocessingfor up to 15 minutes after/execute. - On JS/TS,
executeAndTrack(SDK 0.1.15 or later, 0.2.5 recommended) does all of this for aTRANSACTION, anddepositFeePaymentsays what to pay beside aDEPOSIT; withsendDeposit: true(SDK 0.2.4) it sends theDEPOSITand RAVN’s fee too. From SDK 0.2.5 it sends the swap and the fee in onesendCallswhenever/executesaysbatch: true, the WETH fee included.
- One confirmation (ERC-20 fee). A wallet that batches (EIP-5792
- Bitcoin (Rift, private NEAR Intents): no
transaction. Payfee.amounttofee.addressas an extra output of the same transaction that pays the deposit; RAVN finds it there once that transaction confirms. One deposit per Bitcoin transaction. A fee under 546 sats (Bitcoin’s dust limit) isn’t charged. The MCP toolravn_btc_prepare_sendadds it for you (feeAddress,feeAmountSats). Your Bitcoin share is paid to the address you register aspayoutAddresses.bitcoin(see/keys). - Solana, on a swap RAVN builds or adds its fee to (Mayan’s routes paying no referrer;
Layerswap’s memo route on
broadcastViaRavnquotes; Jupiter under 50 bps): nothing to add. RAVN’s fee transfer is already insidetransaction.serialized; sign and send it as usual, from the signing wallet itself. A wallet that runs it inside its own program (a Squads-style smart account) pays the fee where RAVN can’t find it, and nothing is owed to you on it. A Jupiter order carrying your fee comes withoutsubmit, even on abroadcastViaRavnquote: Jupiter’s own landing takes only the order it built, so your user signs it alone and you broadcast it. - Solana, on a private-swap deposit: no
transaction. Add the fee to the same transaction that pays the deposit exactlydeposit.amount: SOL, a System transfer offee.amountlamports tofee.address; a token, atransferCheckedoffee.amounttofee.address’s associated token account for the input mint (under the mint’s token program, e.g. Token-2022 for USDG), after acreateAssociatedTokenAccountIdempotentin case RAVN has none for that token yet. RAVN finds it there once that transaction is finalized; a fee sent in a transaction of its own isn’t found. One deposit per Solana transaction.
Rift: a fee payment beside the deposit
Rift follows the rules above from Ethereum, Arbitrum, Base, Robinhood Chain, and Bitcoin. Itsfee is on the DEPOSIT, and Rift’s order is made for deposit.amount.
The fee object on every quote
Every successfulPOST /quote includes:
bps: the fee actually applied to this quote.0if your key has no fee set, if the winning venue doesn’t support fees at all, or if it can’t carry one on this pair (seesupported).token: the token the fee is deducted in. This is the output token on every venue except Fly Trade and Mayan, which take the fee out of the input (sold) token before the swap, and every route where your user pays it beside the swap (Rift, Eco Routes, Layerswap, Mayan routes paying no referrer, Jupiter under 50 bps, Fly Trade’s coin sells outside Ethereum, Base and Polygon, private swaps), also in the input token, except a Fly Trade coin sell on Robinhood Chain or Arbitrum, where it’s that chain’s WETH (minted to RAVN). Some venues switch to the input token on certain pairs: KyberSwap, 0x Swap and 0x Gasless when the output is a native coin; OKX DEX when the output is a native coin (EVM) or a token RAVN can’t hold (Solana); 0x Solana, whichever side RAVN can receive it on; Jupiter from 50 bps, whichever side Jupiter takes it on. Read it from each quote. It is also the token your share is paid in.amount: that fee intoken’s smallest unit. On output-side venues the quotedoutput.amountis already net of the fee, soamountis the gross fee grossed up from it (net × bps / (10000 − bps)), notnet × bps. It’s the same arithmetic RAVN’s ledger books and pays you on.supported:falsemeans this venue has no fee mechanism, so your key’sfeeBpscouldn’t apply here regardless of its value (bpswill read0).truewithbps: 0means the venue can carry a fee, but your key has none set, the fee rounded to zero, or it couldn’t on this pair: 0x Solana when RAVN has no account for either token; Jupiter under 50 bps when its order can’t carry the fee (a market maker’s or gas-sponsored order, a transaction with no room left, or a token whose transfer can’t take it), which is then priced on the input less your fee: your user keeps that amount, and the route races as if it had charged it; Jupiter from 50 bps when it takes the fee in a token RAVN has no referral account for; a two-hop route whose first hop runs through a venue that can’t carry it; or a Bitcoin fee under the 546-sat dust limit.
alternatives carries the same four fields for its own venue. Don’t hard-code an
assumption either way: read fee.bps, fee.amount, fee.token, and fee.supported from each
quote rather than inferring them from your key’s configured feeBps.
Getting paid
Register a payout address per ecosystem withPATCH /v1/keys:
payoutAddresses.evm, .solana, .thorchain, and .bitcoin. If you haven’t registered an address for an
ecosystem, your earned balance in it simply accrues unpaid rather than RAVN guessing where to
send it. That’s the same fail-closed, never-guess posture described in Security.
A new or changed payout address takes effect 24 hours after you set it. Until then, payouts keep
going to the address you had before; a first address simply waits, and its balance carries forward.
Sending the same address again changes nothing. RAVN is alerted to every change and may check with
you before it takes effect. That way a leaked key can’t quietly redirect your payouts.
A swap only counts toward your payout once it has reached settled in RAVN’s ledger, and that
depends on you:
- Report every swap to
/statusuntil it’s terminal. On same-chain venues (0x Swap, 0x Solana, Nordstern, Fly Trade, KyberSwap, OKX DEX, Jupiter, Mayan same-chain) therefis the transaction hash you broadcast, and RAVN verifies that receipt on-chain before it marks the swap settled: mined, not reverted, moved the quoted input amount, and (for an ERC-20 fee) the fee actually arrived. A swap you never report never becomes payable. - One
refsettles exactly one swap. A hash can’t be reused across quotes. - Swaps quoted with
sandbox: trueare never metered and never paid.
Chainflip is structurally different from the rest. Once you’ve set a fee and registered an
EVM payout address, RAVN registers you as a real on-chain Chainflip “Affiliate.” Your share of
the fee then accrues on Chainflip’s own chain as part of the swap itself, outside RAVN’s ledger,
and a scheduled job withdraws it, in USDC, to the Ethereum address bound at registration: your EVM
payout address in effect at your first fee-bearing Chainflip swap. Chainflip never lets that address
change, so register your EVM payout address before you start routing Chainflip swaps.
Fee by access path
An integrator fee is tied to your API key, so it only applies when you actually send your
x-api-key header. That includes the x402 endpoints: pay per call
without a key and you quote at the 0% default; pay per call and send your key and your fee
applies, credited to you like any other keyed swap.
The x402 amounts are API access fees, not swap fees. They pay for the HTTP call when you
choose the metered door. See x402 Payments.
Rate limits and keys live on Authentication.

