> ## Documentation Index
> Fetch the complete documentation index at: https://docs.symbiosis.markets/llms.txt
> Use this file to discover all available pages before exploring further.

# Fees

> The taker fee on RFQ matches, how it is computed, and where to read it

The requester (taker) pays a fee on every match. The quoter (maker) pays nothing.

> [!NOTE]
>
> The taker fee is currently **0 bps**. It can change, so read `fee_bps`
> from each quote instead of hard-coding it.

## The rate is fixed per quote

Each quote's `fee_bps` is set when the quote is created, and a match always uses
the rate on the accepted quote. A rate change only affects new quotes.

Requesters see the rate on `GET /rfq/quote` and on `RFQOffer` events. Quoters see it
on `GET /rfq/get-quotes`. Each match on `GET /rfq/matches` records `fee_bps` and the
`fee_amount` charged.

## Computing the fee

Amounts and prices are integers scaled by 1e6 (see
[wire formats](https://docs.symbiosis.markets/introduction.md#wire-formats)). Both steps round down:

```text theme={null}
notional = floor(price × amount / 1000000)
fee      = floor(notional × fee_bps / 10000)
```

The requester pays the fee in USDC:

| Requester side | Requester's balance change | Quoter's balance change |
| - | - | - |
| `Bid` (buy) | `+amount` tokens, `−(notional + fee)` USDC | `−amount` tokens, `+notional` USDC |
| `Ask` (sell) | `−amount` tokens, `+(notional − fee)` USDC | `+amount` tokens, `−notional` USDC |

Accepting returns `400` if the requester can't cover their side, fee included.

## Worked example

Buy 5 YES tokens at 0.75: `amount` is `5000000` and `price` is `750000`.

* notional = floor(750000 × 5000000 / 1000000) = `3750000`, or 3.75 USDC.
* fee at 0 bps = floor(3750000 × 0 / 10000) = `{Math.floor(3750000 * takerFeeBps / 10000)}`.
* The requester pays {(3750000 + Math.floor(3750000 * takerFeeBps / 10000)) / 1000000} USDC and receives 5 YES tokens.

## In the ledger

Each fee is a separate `fee` entry on `GET /custody/get-ledger`, with the match id
as its `ref_id`. A zero fee writes no entry.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.