Skip to main content
RAVN charges no swap fee on the API. Direct users on the consumer app pay zero RAVN markup on public swaps; private swaps made in the app carry RAVN’s own 0.5% fee (none from Bitcoin), and that doesn’t change below. What’s new: integrators can now set their own fee on their API key and RAVN automatically collects and pays out their share. Every successful quote still exposes a 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’s fee 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, via PATCH /v1/keys:
This is entirely your own price; RAVN doesn’t add anything on top of it. It applies to every swap made with your 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.
Eco Routes, Houdini Swap, Hinkal, and Layerswap have no integrator-fee mechanism of their own, so RAVN collects yours beside the swap (see below) wherever it can: a fee set on your key can’t apply only on Eco Routes from Solana or Bitcoin, and Layerswap and Houdini Swap from Bitcoin, which is exactly what the quote’s 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.transaction exactly 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 send fee.transaction in the same confirmation as the swap: the deposit transfer, or the transaction (with its approval before 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.transaction sends the coin to the chain’s WETH depositTo(RAVN), tagged like any other fee payment. The quote’s fee.token is WETH (fee.amount in 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: /execute returns calls (the swap, then the fee) with batch: 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 /execute says 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) as txHash to /status. Simplest: on every poll; RAVN keeps it once confirmed. Not needed on a TRANSACTION with no statusRef when 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 answered processing for 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 a TRANSACTION, and depositFeePayment says what to pay beside a DEPOSIT; with sendDeposit: true (SDK 0.2.4) it sends the DEPOSIT and RAVN’s fee too. From SDK 0.2.5 it sends the swap and the fee in one sendCalls whenever /execute says batch: true, the WETH fee included.
  • Bitcoin (Rift, private NEAR Intents): no transaction. Pay fee.amount to fee.address as 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 tool ravn_btc_prepare_send adds it for you (feeAddress, feeAmountSats). Your Bitcoin share is paid to the address you register as payoutAddresses.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 broadcastViaRavn quotes; Jupiter under 50 bps): nothing to add. RAVN’s fee transfer is already inside transaction.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 without submit, even on a broadcastViaRavn quote: 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 exactly deposit.amount: SOL, a System transfer of fee.amount lamports to fee.address; a token, a transferChecked of fee.amount to fee.address’s associated token account for the input mint (under the mint’s token program, e.g. Token-2022 for USDG), after a createAssociatedTokenAccountIdempotent in 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.
Skip the fee payment and the swap still fills on the smaller amount; nothing is owed to you on it. Nothing is owed on a swap the venue refunds, or that expires unfunded, and a fee already paid stays with RAVN. On EVM, a fee sent on its own can wait until the swap has succeeded, still within the day, to avoid that; on Bitcoin and Solana the fee rides in the deposit itself.

Rift: a fee payment beside the deposit

Rift follows the rules above from Ethereum, Arbitrum, Base, Robinhood Chain, and Bitcoin. Its fee is on the DEPOSIT, and Rift’s order is made for deposit.amount.

The fee object on every quote

Every successful POST /quote includes:
  • bps: the fee actually applied to this quote. 0 if 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 (see supported).
  • 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 in token’s smallest unit. On output-side venues the quoted output.amount is already net of the fee, so amount is the gross fee grossed up from it (net × bps / (10000 − bps)), not net × bps. It’s the same arithmetic RAVN’s ledger books and pays you on.
  • supported: false means this venue has no fee mechanism, so your key’s feeBps couldn’t apply here regardless of its value (bps will read 0). true with bps: 0 means 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.
Each entry in 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 with PATCH /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 /status until it’s terminal. On same-chain venues (0x Swap, 0x Solana, Nordstern, Fly Trade, KyberSwap, OKX DEX, Jupiter, Mayan same-chain) the ref is 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 ref settles exactly one swap. A hash can’t be reused across quotes.
  • Swaps quoted with sandbox: true are never metered and never paid.
Payouts run on scheduled jobs, not per-swap in real time:
This automated payout system is new and we’re not going to overclaim its track record. Only the THORChain payout path has actually sent a real payout so far (a live-confirmed RUNE transfer). The EVM/Solana, Chainflip, and Bebop payout paths exist and are wired up, but haven’t yet been proven with real funds in production. There is no SLA on the exact time a run lands.
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.

Enterprise fee arrangements

Need a dedicated fee schedule, rev-share, or custom rate limits? DM @ravnexchange or reach out via ravn.exchange with a short note on what you are building.