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

# Pricing & revenue share

> How transfer fees are calculated, how the tier is chosen, and how integrators are paid

Every fee is set by the program's **on-chain fee schedule** and charged inside the route-creation transaction. The API quotes exactly what that transaction will charge, and your half is paid to you in the same transaction.

<Tip>
  Always price with [`POST /transfers/estimate`](/api-reference/transfers/estimate). It reads the live
  schedule of the cluster you are calling, so it stays correct when the schedule changes. The table
  below is for orientation only.
</Tip>

## What a transfer costs

Two commercial components, both computed on the transfer's **hop amount**: what the recipient (or all destinations together) receives.

| Component      | Formula                                                  | Paid in                                  |
| -------------- | -------------------------------------------------------- | ---------------------------------------- |
| Percent fee    | `floor(hopAmount × percentFeeBps / 10000)`               | the transferred token (lamports for SOL) |
| Per-hop charge | `flatFeeLamportsPerRoute + flatFeeLamportsPerHop × hops` | SOL (lamports)                           |

The estimate returns both, plus the SOL you need up front for account rent, transaction fees and keeper funding (`sol.requiredSolUpFrontLamports`). Those are network costs, not MultiHopper revenue.

For **SOL** transfers, `amountRaw` is the total your wallet spends, fees included: `hopAmountRaw + percentFeeRaw + totalFlatFeeLamports ≤ amountRaw`. For **SPL** transfers, the token side is `hopAmountRaw + percentFeeRaw ≤ amountRaw`, and the per-hop charge is a separate SOL outflow.

## How the tier is chosen

The per-hop charge ramps with the transfer's USD value. The program works out that value itself, and the API reproduces it exactly:

1. It reads the spot price from the Raydium CLMM pool it is given at route creation.
2. It values the **hop amount** (after fees), not the gross amount.
3. It picks the first tier where that value is `≤` the tier's upper bound.

The estimate reports the value that decided the tier as `usdValueMicros` (USD × 10⁶) and its index as `tierIndex`. `priceSource: "onchain_pool"` means the quote came from the same pool the program will read. Any other value means the pool couldn't be read and the quote is an estimate.

<Note>
  **Just above a tier boundary** there can be no exact answer: one tier's fee leaves a hop amount in
  the tier below, and that tier's fee leaves one in the tier above. The API then sets the hop amount
  to the top of the lower tier and returns `cappedAtTierBoundary: true`. Your wallet spends slightly
  **less** than `amountRaw`, never more.
</Note>

If the pool price crosses a boundary between your quote and [`/prepare`](/api-reference/transfers/prepare), `/prepare` returns `MH_040`. Create a new transfer to re-quote.

## The fee schedule being rolled out

This schedule is **live on devnet** and is being rolled out cluster by cluster. The percent fee is 0.50% at every size. The per-hop charge is free up to $50, ramps linearly to 0.002 SOL per hop at $500, and stays flat above that:

| Tier | Hop amount value (USD) | Per-hop charge     |
| ---- | ---------------------- | ------------------ |
| 0    | ≤ \$50.00              | 0                  |
| 1    | ≤ \$106.25             | 125,000 lamports   |
| 2    | ≤ \$162.50             | 375,000 lamports   |
| 3    | ≤ \$218.75             | 625,000 lamports   |
| 4    | ≤ \$275.00             | 875,000 lamports   |
| 5    | ≤ \$331.25             | 1,125,000 lamports |
| 6    | ≤ \$387.50             | 1,375,000 lamports |
| 7    | ≤ \$443.75             | 1,625,000 lamports |
| 8    | ≤ \$500.00             | 1,875,000 lamports |
| 9    | above \$500            | 2,000,000 lamports |

The per-hop charge is set in lamports, so it doesn't move with the SOL price. The USD value only decides which tier applies.

### Worked example

1 SOL at \$120, 3 hops (devnet schedule):

|                                     | lamports                      |
| ----------------------------------- | ----------------------------- |
| `amountRaw` (wallet spends)         | 1,000,000,000                 |
| tier                                | 2 (hop amount worth \$119.27) |
| per-hop charge, 3 × 375,000         | 1,125,000                     |
| percent fee, 0.50%                  | 4,969,527                     |
| **hop amount (recipient receives)** | **993,905,472**               |
| your share (half of each fee)       | 2,484,763 + 562,500           |

## Revenue share

Integrators receive **50% of every fee**, both the percent fee and the per-hop charge, on every transfer created with their API key. The split happens atomically inside the route-creation transaction and goes straight to your registered rewards wallet. There's no balance to accrue and nothing to claim.

Before your first transfer, your rewards wallet must already hold the rent-exempt minimum for an empty account (`getMinimumBalanceForRentExemption(0)`), or `/prepare` returns `MH_091`. Small fee shares can't create a new account on their own.

[`GET /usage`](/api-reference/usage) reports what you have earned: SOL-denominated shares in `totalFlatFeeEarned`, SPL percent-fee shares per mint in `tokenFeesEarned`, and `totalPayouts` settled on chain.
