## Quote costs

Read these fields on each quote returned by `POST /api/bridge/v2/quotes`.
The three output amounts use the destination token's smallest unit.

| Field                    | Meaning                                                                                                      |
| ------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `amountOut`              | Expected amount received, including the effect of application fees. |
| `minAmountOut`           | Each quote provides a minimum. v2 uses the router's minimum when available and otherwise applies the quote's slippage tolerance. |
| `feeUsd`                 | Router fee estimate in USD, excluding the application fee. On Universal Swap, only validated live destination execution and recipient-setup cost, excluding protocol margin, overhead and pricing surplus. |
| `deliveryGasUsd`         | Optional Universal Swap network-delivery cost in USD. The same amount already reported in `feeUsd`, not an additional charge. |
| `appFeeUsd`, `appFeeBps` | Application fee in USD and, where supplied, basis points.                                                    |
| `sourceGasUsd`           | Estimated source-chain network fee in USD, paid in the source chain's native token.                          |
| `sourceGasMaxAmount`, `sourceGasMaxUsd` | Optional most a wallet may check the balance for to send the route, in native atomic units and USD: its gas limit at twice the base fee plus the wallet's default tip (2 gwei on Ethereum). Keep at least this much of the native token. |
| `netAmountOut`           | Optional `amountOut` less estimated source gas converted to the output token. GUM uses `amountOut` for ranking when the estimate is unavailable. |
| `additionalSourceFee`    | Optional additional source fee with its own amount, symbol, and decimals.                                    |

Show a missing fee estimate as unavailable. Application fees and Universal
Swap pricing are already reflected in `amountOut`. Users also need enough
native currency to pay source-chain gas. Price movement and slippage can
affect the final output.

For Universal Swap, the GUM widget shows only reported `sourceGasUsd` plus
validated `deliveryGasUsd` as Network fees. Protocol pricing, including any
surplus, remains reflected in the quoted rate and receive amount and is not
itemized. Separately quoted `appFeeUsd` or `appFeeBps` retains its existing
display, including on Universal Swap. Both `feeUsd` and `deliveryGasUsd` are
reported only when live upstream cost data is valid and no larger than an
internally validated protocol total. Missing, static or malformed cost data,
or an unverifiable total, omits both fields; the network line shows only known
source gas in that case. Missing network estimates are unavailable, not zero.

Universal Swap's normalized fee fields exclude protocol margin, overhead and
pricing surplus. There is no separate total-protocol-fee field. This corrects
the earlier `feeUsd` semantics that included the whole protocol fee; quoted
amounts, rates and route ranking are unchanged. Never add `feeUsd` and
`deliveryGasUsd` together: they report the same cost. `appFeeUsd` remains a
separate integrator fee; it does not represent Universal Swap's pricing surplus.

## GUM fee eligibility

GUM sets its platform fee on the server. It is currently **0 bps**. Router
fees and network gas can still apply. To charge your own app fee, supply a
Solana or EVM payout address in `fee.recipient` on a v2 quote. Omit `fee`
for a quote without your app fee. You can save rates per basket or token in
[fee settings](/bridge#settings). To configure them from code, use the
[fee account API](/universal-bridge/v2/fee-accounts).

A positive GUM platform fee, including 10 bps, requires proof that the exact
route collects the required amount. A quoted rate alone cannot establish collection.

Layerswap has no qualified positive GUM fee mechanism. It is eligible only
for explicitly enabled, qualified profiles at zero fee. A positive-fee change
removes new quotes, cached/streamed routes and all new build responses,
including already prepared READY orders. Existing issued/funded transfers
keep their original zero-fee snapshot and remain trackable.

THORChain routes carry THORChain's own fees inside the quoted amount: its
liquidity fee and the payout's network fee. THORChain takes that network fee
after it checks the swap against your minimum, so the order's price floor is
set to your minimum plus twice the fee quoted when the order is built: you
receive at least the minimum unless that chain's fee more than doubles
before the payout. THORChain pays ETH, BNB and AVAX with a fixed gas allowance, so a
smart-contract wallet that can't receive within it (a Safe on Ethereum or
BNB Chain, for example) isn't offered THORChain for those coins; tokens, and
every other wallet, are. Because of that floor, THORChain is offered only where
your slippage tolerance covers one payout fee (at 1.2%, about $50 into
Bitcoin). GUM's own fee on THORChain routes is 0 bps; a positive fee would
be paid through THORChain's affiliate share and is off until that is set up.

Even at zero fee, each Layerswap quote is ordered once: posting it again
returns the same order ([Create an order](/universal-bridge/v2/create-order)).

Layerswap's receive amount and quoted minimum are offchain estimates. Its
source Depository transaction does not enforce a destination recipient or
minimum payout. A local quote expiry does not fix the eventual deposit-time
rate; show the selected route's warning before signing.

deBridge (`debridge`) pays a positive GUM fee as DLN's affiliate fee, which
the API reads from the order itself before signing. It is paid automatically
only on orders from EVM networks, so a positive fee leaves deBridge routes from
Solana and TRON out. Its fixed protocol fee in the source network's coin is
separate from GUM's fee. deBridge is available on eligible profiles when the
integrator fee is off. A quote with a positive integrator fee uses other routers.

Bungee (`socket`) also requires zero GUM application fee. Its upstream service
fee is separate and does not prove collection of a GUM fee. Restoring a
positive GUM fee excludes new Bungee quotes and builds until that collection
is qualified; pending transfers remain trackable with retained credentials.
Profile, access and transaction-validation requirements still apply at zero.

## Minimum trade size

The API recommends at least **$3**, or **$10** when either the input or output
chain is Ethereum (`evm:1`). Smaller amounts can still return quotes.
This shortened response shows the `belowMinimum` hint for a 5 USDC quote
from Ethereum.

```json
{
  "quotes": [
    {
      "route": { "id": "gum", "name": "GUM Universal Swap" },
      "amountIn": "5000000",
      "amountOut": "4996100",
      "minAmountOut": "4896178"
    }
  ],
  "belowMinimum": { "minimumUsd": 10, "minimumAmount": "10005692" }
}
```

`minimumUsd` is the recommended minimum in USD, and `minimumAmount` is that
minimum in the input token's atomic units at the price the service checked the
amount with. The API omits `belowMinimum` at or above the recommended amount.

A small quote isn't always a bad one, so warn only when it is. When a quote
carries `belowMinimum`, ask the user to confirm before you request a build if
the selected route:

- carries `warning: "loses-value"`, or
- keeps under 90% of what the user spends, counting the source-chain network
  fee: `outputUsd < 0.9 × (inputUsd + sourceGasUsd)`, with `sourceGasUsd` as 0
  when the route doesn't report it.

Without a USD value for both tokens, only the route's own warning counts. When
you warn, offer `minimumAmount` as a one-tap amount; offer it as well when no
route comes back at all. Round it up a little so a price move doesn't leave it
short: the GUM app adds 0.5% and rounds up to three significant digits, so
`"10005692"` of USDC becomes 10.1. A quote under the minimum that keeps its
value needs no warning. The GUM app follows these rules.

Each eligible router can decline amounts below its own minimum. When the API
cannot establish an input price, v2 returns HTTP 400 with
`{ "code": "price-unavailable", "error": "…" }`. Wait for the token to have a
price before retrying. A temporary service outage returns HTTP 503 and can be
retried with backoff.

## Request limits

Public v2 limits apply per caller IP over a 60-second window. Operations in
the same row share a budget.

| Operation                                          | Requests per minute |
| -------------------------------------------------- | ------------------- |
| Chain catalog                                      | 600                 |
| Token list or search (`GET /tokens?chain=…`) | 90 |
| Single token and market data (`GET /tokens?chain=…&address=…`) | 180 |
| Quote requests (`POST /quotes`) | 30 |
| Order creation and signed fee settings | 20 |
| Reading one order and reporting its steps | 120 |
| Wallet order history, fee account and leaderboard reads, fee message requests and rewards | 120 |

An API key can have its own budget shared across quotes and order creation.
An HTTP 429 from the API's rate limiter includes `Retry-After` in seconds.
If an upstream router is throttled, the header is included when a retry time
is known. Use backoff when it is absent.

Debounce token searches and avoid polling multiple
copies of the same transfer. Keep valid results during a temporary failure,
but never present an expired quote as executable.
