# Fees and minimums


Each deposit is charged on its own, and the callback tells you exactly what happened: `value_coin` is the deposit, `fee_coin` is everything charged and `value_forwarded_coin` is what reached your payout address.

```
value_forwarded_coin = value_coin - fee_coin
```

## What is charged

- Service fee: a percentage of the deposit, rounded up to the smallest unit of the asset once, and never less than the minimum service fee. It is capped at the deposit.
- Network fee: a fixed amount per forwarding transaction, charged in the asset itself. When the deposit is too small it is the network fee that shrinks first.
- `fee_coin` in callbacks and logs is the sum of both. `fee_percent` in logs is the service fee rate as a percent.

All arithmetic uses integer units of the asset, so amounts are exact. A deposit whose fees leave nothing to forward cannot be paid out automatically, which is why the minimum is always set above the maximum possible fee. Create and info answer `503` with `Ticker is temporarily unavailable` if a ticker's minimum does not cover its fees.

## Minimums

Every ticker has a minimum deposit, returned as `minimum_transaction_coin` by create and info. Show it to the payer before they send.

- A deposit of at least the minimum is forwarded, each deposit separately.
- A deposit below the minimum is not forwarded, triggers no callback, does not appear in the logs and is not paid out.
- The minimum that counts is the one in force when the deposit was first detected. A later change does not affect deposits already detected.

## Default fee schedule

> [!NOTE]
> The tables show the fee schedule the gateway ships with and what a deposit of 100 units would leave you. The schedule can be changed by the operator, and fees are resolved per deposit, so use the callback values for the amounts that actually applied.

### Mainnet default fees

| Ticker | Service fee | Minimum service fee | Network fee | Fees on a deposit of 100 | Forwarded |
| --- | --- | --- | --- | --- | --- |
| `bep20/usdt` | 0.50% | 0.300000000000000000 | 0.100000000000000000 | 0.600000000000000000 | 99.400000000000000000 |
| `trc20/usdt` | 0.50% | 0.300000 | 1.000000 | 1.500000 | 98.500000 |

### Testnet default fees

| Ticker | Service fee | Minimum service fee | Network fee | Fees on a deposit of 100 | Forwarded |
| --- | --- | --- | --- | --- | --- |
| `bep20/usdt` | 0.50% | 0.300000000000000000 | 0.100000000000000000 | 0.600000000000000000 | 99.400000000000000000 |
| `trc20/usdt` | 0.50% | 0.300000 | 1.000000 | 1.500000 | 98.500000 |

To budget the network side, `GET /{ticker}/estimate/` returns a conservative ceiling of the forwarding cost in the chain's native coin. It is a fee cap, not a quote of what is deducted from your deposit.
