# Fees & channels

> LayerHop's fee per channel (0.10% API, 0.15% web and widget, 0.45% bot), 0.25% on same-token checkout payments, how partner fees stack on top, and how both are reported on every quote.

Source: https://docs.layerhop.com/concepts/fees-and-channels

LayerHop charges 0.10% on API and SDK trades, 0.15% in the web app and widget, and 0.45% in the Telegram bot, collected through each provider's own integrator-fee mechanism. The fee actually applied is reported on every quote as `fees.ourFeeBps`, separately from provider fees, gas and any partner fee.

## How much does LayerHop charge?

The fee depends on the **channel** the trade comes from. Pass `channel` to `GET /v1/quote`; it defaults to `api`, and the SDK sends its `channel` option.

| Channel | Default fee | Used by |
|---|---|---|
| `api` | 10 bps (0.10%) | Direct API and SDK integrations |
| `web` | 15 bps (0.15%) | The swap app at layerhop.com |
| `widget` | 15 bps (0.15%) | The embeddable widget (`/embed`) |
| `bot` | 45 bps (0.45%) | The Telegram bot (`@layerhop_bot`), and links with `ref=bot` |

Fees are in basis points of the **input** amount. The defaults are `DEFAULT_FEE_BPS` in `packages/shared/src/fees.ts`. They were halved on 2026-10-23 (previously 20, 30, 30 and 90 bps); see the [changelog](/changelog).

## How is the fee shown on a quote?

```json
"fees": {
  "ourFeeBps": 10,
  "integratorFeeBps": 10,
  "integrator": "myapp",
  "providerFeeUsd": 0.12,
  "gasUsd": 0.03
}
```

| Field | Meaning |
|---|---|
| `ourFeeBps` | LayerHop's part, in bps of the input amount |
| `integratorFeeBps`, `integrator` | The partner's part and partner id, when a partner is selected |
| `providerFeeUsd` | Provider or protocol fees in USD, when the provider reports them |
| `gasUsd` | Estimated network gas in USD, when known |
| `tier` | The token class the fee was priced on (`stable`, `major` or `longtail`), only when fee tiers are on |

`dstAmount` already accounts for all of them. Trust the numbers on the quote: they are what the user pays.

The LayerHop web app and widget show these as one **Fees** total (LayerHop fee + partner fee + provider fee + estimated gas) before the user signs; opening it lists each part by name. The API keeps every part as its own field, so your own UI can show them either way.

## Can the fee depend on the tokens?

A deployment can price LayerHop's fee by **token class** as well as channel. This is off on layerhop.com today: every quote pays the channel fee above and has no `fees.tier`.

When it is on, each trade gets a class from its two tokens, and the quote reports it as `fees.tier`:

| `tier` | When |
|---|---|
| `stable` | Both sides are stablecoins, including same-asset bridging such as USDC → USDC |
| `major` | The riskier side is a native coin, a wrapped native or a listed blue chip (ETH, BTC and SOL variants) |
| `longtail` | Either side is anything else: unlisted, new or memecoin tokens |

A trade takes the riskier of its two sides, so a stablecoin → memecoin swap is `longtail`. A class with no fee set for the channel pays the channel fee. Partner fees stack on top as usual, and checkout payments and deposit addresses keep their own fees. Whatever the class, `ourFeeBps` is the fee actually applied, and the web app and widget show it before the user signs.

## Who gets positive slippage?

Sometimes a swap executes at a better price than quoted, so the output is above `dstAmount` (positive slippage, or surplus). When the provider documents who receives it, the quote says so in `fees.surplusPolicy`:

| `surplusPolicy` | Meaning |
|---|---|
| `user` | The recipient keeps all of it |
| `provider` | The provider keeps it. KyberSwap documents that surplus on certain trades accrues to KyberSwap |
| `layerhop` | Surplus **above** `dstAmount` goes to LayerHop, up to `fees.surplusMaxBps` of `dstAmount`; anything beyond the cap stays with the user |
| absent | The provider documents no policy |

LayerHop does **not** capture positive slippage today. Capture is a server setting that is off (`POSITIVE_SLIPPAGE_CAPTURE`) and is only possible through a provider's official surplus parameter (0x `tradeSurplusRecipient`). Even if it is turned on, it never touches what the quote promises: `dstAmount` and `dstAmountMin` stay as quoted, and only output above `dstAmount` is affected. Every quote it applies to says `surplusPolicy: "layerhop"`.

## How do partner fees work?

A registered partner earns its own fee on top of LayerHop's. Select it with `integrator=<id>` (the partner's configured fee) or with the partner's API key (which may also set `integratorFeeBps` up to the partner's maximum). LayerHop's fee plus the partner fee is capped at **150 bps** by default; only the partner part is trimmed to fit. See [Earn fees as a partner](/guides/partner-fees).

## Why can ourFeeBps be lower than the channel fee?

Each provider has its own fee rules. When a provider applies less than requested, the applied fee is reported, and when a partner fee is present it is split pro rata between LayerHop and the partner.

| Provider | Fee mechanism | Limits |
|---|---|---|
| Jupiter | Swap V2 `/build` platform fee into LayerHop's referral token accounts | Any bps when a fee account exists for the input or output mint (SOL, USDC, USDT); otherwise falls back to the referral program (50 to 255 bps, below 50 bps no fee) |
| Relay | App fee | Accrues in USDC |
| deBridge | Affiliate fee on the source chain | Up to 1000 bps |
| 0x | `swapFeeBps` in the sell token | Up to 1000 bps |
| KyberSwap | Fee taken from the input token | Any bps |
| LI.FI | Integrator fee | LI.FI also charges its own fee |
| Mayan (available on request) | Referrer fee | Up to 200 bps, lower on some route types |

A fee also needs a configured recipient for the chain family. Without one, the quote reports `ourFeeBps: 0`.

## What do checkout payments cost?

[Checkout](/guides/checkout) payments are priced per route:

| Payment | LayerHop fee |
|---|---|
| Same-token payments (the settlement token on the settlement chain) | **0.25%** (25 bps) of the amount due, paid on top by the payer |
| Any other token or chain (swap or bridge route) | The API channel fee (0.10%), included in the route |
| [Refunds](/guides/refunds) | None |

Same-token payments are a direct transfer, so no provider carries the fee. Instead the payer sends two transfers: the full amount due to the merchant, and the fee to LayerHop. On Solana both are in one transaction; on EVM chains the fee transfer comes in the built transaction's `extraTxs` (sent after the payment, or batched by EIP-5792 wallets). LayerHop never holds the merchant's funds. The quote reports `fees.ourFeeBps: 25` and a `srcAmount` that includes the fee.

## How is the fee calculated?

Amounts are integers in base units, so fees use integer math and round down:

```ts
import { applyBps, minAfterSlippage } from "@layerhop/shared";

applyBps("100000000", 10);          // "100000"  → 0.1 USDC of a 100 USDC input
minAfterSlippage("612345678", 50);  // "609283949"
```
