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

# Fees

> How Tulip distributes inference charges and Uniswap v4 swap fees.

Tulip has two independent fee systems: inference settlement fees and AMM swap fees.

## Inference settlement

Every completed request is charged in the model's canonical credit. The escrow distributes the charge to:

1. The provider offer's payout address.
2. The Tulip protocol treasury.
3. The model creator.

For example, with a 5% protocol share and a market configured for a 2% creator share:

| Recipient             | Share | On 1,000,000 charged credits |
| --------------------- | ----: | ---------------------------: |
| Selected GPU provider |   93% |              930,000 credits |
| Tulip treasury        |    5% |               50,000 credits |
| Model creator         |    2% |               20,000 credits |

The selected provider is the exact offer bound into the signed receipt. Other providers for the same model receive nothing from that request.

<Info>
  Providers choose their own input, output, minimum, and wake charges. The percentages above split the resulting credit charge; they do not set the provider's tariff.
</Info>

Inference shares are on-chain configuration. Tulip displays the active protocol and creator shares in market and quote details. Verify them before authorizing a request.

## Swap fees

Each credit/USDG pool uses a native Uniswap v4 dynamic LP fee. The market creator may schedule a change within the factory's current global bounds. A scheduled change is public for one hour before anyone can activate it, preventing a creator from changing the fee immediately around a pending trade.

The documented production bounds are:

* Minimum: `100` pips, or 0.01%.
* Maximum: `100,000` pips, or 10%.

A common initial fee is `3,000` pips, or 0.30%.

### Example: \$1 million of swap volume

At a 0.30% pool fee, $1,000,000 in volume generates $3,000 in gross LP fees, before considering that fees may accrue in both pool tokens.

Under an 80/20 LP distribution:

| Recipient      | Share of LP fees |      Example value |
| -------------- | ---------------: | -----------------: |
| Model creator  |              80% | \$2,400 equivalent |
| Tulip treasury |              20% |   \$600 equivalent |

The locker distributes the actual token amounts collected, which may include model credits and USDG. The USD values above illustrate the split and are not guaranteed proceeds.

## What the hook does

`TulipDynamicFeeHook` returns the creator-selected fee as the standard v4 LP-fee override. The `PoolManager` applies that fee during the normal AMM swap.

Tulip does not take a separate hidden routing fee and does not execute custom-accounting swaps inside the hook.

## Configuration summary

| Parameter                 | Controller        | Timing                                                    |
| ------------------------- | ----------------- | --------------------------------------------------------- |
| Provider tariff           | Provider operator | Delayed version proposal and activation                   |
| Creator inference share   | Market launcher   | Fixed in the model record at launch                       |
| Protocol inference share  | Protocol owner    | Global registry update                                    |
| Pool LP fee               | Model creator     | Scheduled within current bounds; activates after one hour |
| LP creator/treasury split | Curve preset      | Fixed for the locked position at launch                   |
| Allowed LP-fee bounds     | Protocol owner    | Global factory update                                     |
