<!-- canonical: https://docs.melee.markets/resolver-api/fees | markdown: https://docs.melee.markets/resolver-api/fees.md | index: https://docs.melee.markets/llms.txt -->
# Fees

| Fee | When charged | Paid to | On void |
|---|---|---|---|
| Up-front fee | When a creator creates a market with you as resolver | `feeRecipient` | **Not refunded** |
| Trading-based fee (`resolutionFeeRateBps`) | Accrues on trading volume into a per-market escrow | `feeRecipient`, claimable after the market resolves and liquidity settles | **Not paid** — voided markets refund traders instead |

The allowed range for `resolutionFeeRateBps` is published by `GET /platform/limits`.

On the current program neither fee is charged yet: every market carries an up-front fee and a resolution fee
rate of `0`, and `GET /platform/limits` reports `resolutionFeeRateBps` as `0`–`0`. The values you registered are
kept. See [Contract versions](/resolver-api/reference#contract-versions).

## Which mint the up-front fee is charged in

Melee charges market creation fees in a **creation-fee mint** chosen per market from a small platform
registry (at most 4 mints, one of them the default). The creation-fee mint is often, but not always, the
market's own token (`marketToken`); when the market token is not in the registry, the default mint is used.
Your up-front fee is charged in the **same creation-fee mint as the platform's fee**, from the same creator
token account.

Your `upFrontFees` array holds one `{ mint, amount }` per mint you support; `amount` is an integer in that
mint's base units. At market creation Melee picks your entry whose `mint` equals the market's creation-fee
mint.

**If none matches, creation still succeeds: your first entry (index 0) is used and its `amount` is charged
verbatim in the creation-fee mint's base units, whatever that entry's mint or decimals were.** Keeping your
entries aligned with the platform is your responsibility: `GET /platform/creation-fee-mints` lists the mints
the platform can charge in, default first. The market definition you evaluate always shows the resolved
`upFrontFee` and `upFrontFeeMint`, so you can refuse (`confidenceBps = 0`) if the amount would be wrong.

## Claiming

`POST /markets/{market}/claim-fees` returns a transaction for `feeRecipient` to sign once the market is
resolved and settled (signer role `feeRecipient`). Fee terms are fixed per market at creation from your
record at that time.

## Changing fees and recipients

- Your record's `resolutionFeeRateBps`, `upFrontFees` and default `feeRecipient` are set at registration.
  `PATCH /resolvers/me` can't change them (`422 invalid_config`, reason `not_patchable`).
- `PUT /markets/{market}/fee-recipient` changes the recipient wallet of one existing market. Returns a
  transaction for `resolverAuthority` to sign. Rate and up-front fee of an existing market never change. On the
  current program it answers `501 feature_unavailable`, like `claim-fees`, because markets there have no
  resolution fees.
