> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/reserve-protocol/reserve-index-dtf/llms.txt
> Use this file to discover all available pages before exploring further.

# Valid Ranges

> Valid ranges for token supply, decimals, and other protocol parameters

## Overview

Reserve Folio enforces specific ranges for token supplies, decimals, and other parameters to ensure safe arithmetic operations and prevent overflow/underflow conditions.

<Warning>
  It is the job of governance to ensure these ranges are maintained throughout the protocol's operation.
</Warning>

## Token Supply Limits

All tokens in the Reserve Folio ecosystem are assumed to have a maximum supply of **1e36**.

| Asset Type              | Max Supply | Notes                                                   |
| ----------------------- | ---------- | ------------------------------------------------------- |
| **Folio Shares**        | 1e36       | Governance must prevent supply growth beyond this limit |
| **Folio Collateral**    | 1e36       | Applies to all tokens held by the Folio                 |
| **StakingVault Shares** | 1e36       | Applies to staking vault tokens                         |
| **Underlying/Rewards**  | 1e36       | Applies to staking vault underlying and reward tokens   |

<Note>
  The 1e36 supply limit is enforced to prevent arithmetic overflow in internal calculations involving D18 and D27 precision multipliers.
</Note>

## Decimal Limits

### Folio Collateral

<Card title="Maximum: 27 decimals" icon="coins">
  Tokens used as Folio collateral must have **27 or fewer decimals**.

  This limit ensures that calculations with D27 precision multipliers don't overflow.
</Card>

### StakingVault Tokens

<Card title="Maximum: 21 decimals" icon="layer-group">
  Tokens used as StakingVault underlying or rewards must have **21 or fewer decimals**.

  The lower limit accounts for additional precision needed in staking calculations.
</Card>

### Summary Table

| Component               | Decimals Limit | Reason                                   |
| ----------------------- | -------------- | ---------------------------------------- |
| Folio collateral tokens | ≤ 27           | D27 precision arithmetic                 |
| StakingVault underlying | ≤ 21           | Additional staking calculation precision |
| StakingVault rewards    | ≤ 21           | Reward distribution precision            |

## Rebalance Parameter Ranges

### Exchange Rates (Rebalance Limits)

<Card title="D18{BU/share}" icon="arrow-right-arrow-left">
  **Valid Range:** `(0, 1e27]` (exclusive of 0)

  **Precision:** 18-decimal fixed point

  Exchange rates for rebalance limits define the basket units per share ratios.
</Card>

### Basket Weights

<Card title="D27{tok/BU}" icon="weight-hanging">
  **Valid Range:** `[0, 1e54]` (inclusive of 0)

  **Precision:** 27-decimal fixed point

  Basket weights define how much of each token comprises one basket unit.
</Card>

### Token Prices

<Card title="D27{UoA/tok}" icon="dollar-sign">
  **Valid Range:** `(0, 1e45]` (exclusive of 0)

  **Precision:** 27-decimal fixed point

  Prices are denominated in Unit of Account (typically nanoUSD) per token quanta.
</Card>

### Price Range Restrictions

<Warning>
  The maximum allowable price range for a token is **1e2** (100x).

  This means an auction can span at most 4 orders of magnitude between start and end prices.
</Warning>

<Tip>
  While 100x price ranges are technically allowed, non-degen Folios should use much tighter ranges for optimal execution and to minimize MEV exposure.
</Tip>

## Fee Limits

### TVL Fee (Management Fee)

<AccordionGroup>
  <Accordion title="Annual TVL Fee Range">
    **Minimum (DAO Floor):** 15 basis points (0.15% annually)

    **Maximum:** 10% annually

    The DAO takes a cut with a minimum floor of 15 bps. If the TVL fee is set to exactly 15 bps, then 100% of the inflation goes to the DAO.
  </Accordion>
</AccordionGroup>

### Mint Fee

<AccordionGroup>
  <Accordion title="Mint Fee Range">
    **Minimum (DAO Floor):** 15 basis points (0.15%)

    **Maximum:** 5%

    The DAO always receives at least 15 bps of the mint value. If the mint fee is set to exactly 15 bps, then 100% goes to the DAO.
  </Accordion>
</AccordionGroup>

### Fee Floor Configuration

<Info>
  The universal 15 bps fee floor can be lowered by the DAO:

  * Globally across all Folios
  * On a per-Folio basis (only lower, never higher)
</Info>

## Governance Safety Guidelines

<Steps>
  <Step title="Monitor Folio Supply">
    Continuously monitor that Folio share supply remains well below 1e36.
  </Step>

  <Step title="Validate Token Decimals">
    Before adding tokens to a Folio, verify decimal counts:

    * Folio collateral: ≤ 27 decimals
    * StakingVault tokens: ≤ 21 decimals
  </Step>

  <Step title="Set Conservative Price Ranges">
    Use price ranges that will contain market prices even after timelock delays.

    Avoid max 100x ranges unless absolutely necessary.
  </Step>

  <Step title="Validate Basket Weights">
    Ensure basket weight calculations don't approach overflow limits.

    Remember: weights can be up to 1e54 in theory, but practical values should be much lower.
  </Step>
</Steps>

## Arithmetic Safety

<Warning>
  **Overflow Prevention**

  The ranges above are carefully chosen to prevent overflow in these scenarios:

  * Token supply (1e36) × D27 (1e27) = 1e63 \< type(uint256).max
  * Price (1e45) × Token amount (varies) with proper decimal handling
  * Basket weights (1e54) used in ratio calculations
</Warning>

## Related Documentation

<CardGroup cols={2}>
  <Card title="Unit System" icon="ruler-combined" href="/resources/units">
    Learn about the unit system and precision multipliers
  </Card>

  <Card title="Token Compatibility" icon="circle-check" href="/resources/token-compatibility">
    Understand which ERC20 tokens are supported
  </Card>

  <Card title="Rebalancing" icon="balance-scale" href="/essentials/rebalancing">
    How ranges are used in rebalancing operations
  </Card>

  <Card title="Fees" icon="percent" href="/essentials/fees">
    Detailed fee structure documentation
  </Card>
</CardGroup>
