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

# Fee Formulas

> Protocol fee structure, formulas, defaults, and tiers, expressed as percentages.

# Fee Formulas

Reiy collects fees on each settled intent, split between the solver and the protocol. Fees are charged in the settled **buy** token and deducted from the gross payout. All rates below are percentages of the relevant base; the contract evaluates them in integer token units (rounding down).

## Vocabulary

| Term | Meaning |
| - | - |
| Gross | The buy-token payout before any fees. |
| Net | What the user receives after fees: `gross − total fee`. |
| Surplus | The payout above the user's protected minimum. |
| Volume fee | A percentage of the gross payout. Applied first. |
| Surplus fee | A percentage of the surplus, capped by a percentage of gross. |
| Solver fee share | The percentage of the total fee paid to the solver; the rest goes to the protocol fee vault. |

## Fee computation

Fees are computed per intent, in order:

### 1. Volume fee

$$
\begin{aligned}
\text{volume fee} = \text{gross} \times \text{volume fee rate}
\end{aligned}
$$

The rate comes from the pair's fee tier (see below). Settlement is rejected if `gross − volume fee` falls below the protected minimum.

### 2. Surplus fee

$$
\begin{aligned}
\text{surplus} &= (\text{gross} - \text{volume fee}) - \text{protected min} \\
\text{surplus fee} &= \min\big(\text{surplus} \times 10\%,\;\; \text{gross} \times 0.1\%\big)
\end{aligned}
$$

The surplus fee is the smaller of 10% of surplus or 0.1% of gross (the cap).

### 3. Total fee cap

$$
\begin{aligned}
\text{total fee} = \min\big(\text{volume fee} + \text{surplus fee},\;\; \text{gross} \times 0.15\%\big)
\end{aligned}
$$

### 4. Net payout

$$
\begin{aligned}
\text{net} = \text{gross} - \text{total fee}
\end{aligned}
$$

### 5. Solver split

$$
\begin{aligned}
\text{solver fee} &= \text{total fee} \times 35\% \\
\text{protocol fee} &= \text{total fee} - \text{solver fee}
\end{aligned}
$$

The solver fee is paid out immediately. The protocol fee goes to the per-token `FeeVault`.

## Default fee parameters

| Parameter | Default | Maximum |
| - | - | - |
| Standard volume fee | 0.0075% | 1% |
| Correlated volume fee | 0.001% | 1% |
| Surplus fee | 10% of surplus | 100% |
| Surplus fee cap | 0.1% of gross | 2% |
| Max total fee | 0.15% of gross | 2% |
| Solver fee share | 35% of total fee | 100% |

## Fee tiers

Each pair is assigned one of four tiers:

| Tier | Volume fee | Description |
| - | - | - |
| Standard | 0.0075% | Default for most pairs. |
| Correlated | 0.001% | Stablecoin / correlated assets. |
| Custom | configurable | Per-pair override. |
| Disabled | 0% | No volume fee. |

## Related Topics

<CardGroup cols={2}>
  <Card title="Scoring and Ranking" href="/reiy-protocol/reference/core/scoring-and-ranking">
    How solutions are validated and ranked.
  </Card>

  <Card title="Fees" href="/reiy-protocol/concepts/fees">
    User-facing fee overview.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.