> ## 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.

# Token Compatibility

> Supported and unsupported ERC20 token types in Reserve Folio

## Overview

Reserve Folio supports standard ERC20 tokens but has specific compatibility requirements and limitations. Understanding which token types are supported is critical for safe Folio operation.

<Warning>
  Using incompatible tokens can lead to loss of funds, broken accounting, or security vulnerabilities.
</Warning>

## Compatibility Matrix

### Folio Collateral

| Token Characteristic      | Supported | Notes                         |
| ------------------------- | --------- | ----------------------------- |
| **Multiple Entrypoints**  | ❌         | Breaks accounting assumptions |
| **Pausable / Blocklist**  | ❌         | Can freeze Folio operations   |
| **Fee-on-transfer**       | ❌         | Breaks balance accounting     |
| **ERC777 / Callback**     | ❌         | Reentrancy risks              |
| **Upward-rebasing**       | ✅         | Supported with caveats        |
| **Downward-rebasing**     | ✅         | Supported with caveats        |
| **Revert on zero-value**  | ✅         | Fully supported               |
| **Flash mint**            | ✅         | Fully supported               |
| **Missing return values** | ✅         | Fully supported               |
| **No revert on failure**  | ✅         | Fully supported               |

### StakingVault

| Token Characteristic      | Supported | Notes                         |
| ------------------------- | --------- | ----------------------------- |
| **Multiple Entrypoints**  | ❌         | Breaks accounting assumptions |
| **Pausable / Blocklist**  | ❌         | Can freeze vault operations   |
| **Fee-on-transfer**       | ❌         | Breaks balance accounting     |
| **ERC777 / Callback**     | ❌         | Reentrancy risks              |
| **Upward-rebasing**       | ❌         | Not supported for staking     |
| **Downward-rebasing**     | ❌         | Not supported for staking     |
| **Revert on zero-value**  | ✅         | Fully supported               |
| **Flash mint**            | ✅         | Fully supported               |
| **Missing return values** | ✅         | Fully supported               |
| **No revert on failure**  | ✅         | Fully supported               |

## Unsupported Token Types

<AccordionGroup>
  <Accordion title="Multiple Entrypoints" icon="ban">
    **What it is:** Tokens with multiple addresses or entry points for the same underlying asset.

    **Why not supported:** Breaks accounting assumptions about token identity and balance tracking.

    **Examples:** Some proxy tokens with multiple interfaces
  </Accordion>

  <Accordion title="Pausable / Blocklist Tokens" icon="ban">
    **What it is:** Tokens that can be paused globally or have address-specific blocklists.

    **Why not supported:** Can freeze Folio operations indefinitely, making rebalancing impossible and trapping user funds.

    **Examples:** USDC (has blocklist), USDT (has pause functionality)

    <Warning>
      Even though USDC and USDT are widely used, their blocklist/pause features make them risky for Folios. Use wrapped or bridge versions with these features removed if available.
    </Warning>
  </Accordion>

  <Accordion title="Fee-on-Transfer Tokens" icon="ban">
    **What it is:** Tokens that deduct a fee on every transfer.

    **Why not supported:** The Folio's accounting expects received amounts to match sent amounts. Fee-on-transfer breaks this assumption.

    **Examples:** SafeMoon, reflection tokens
  </Accordion>

  <Accordion title="ERC777 / Callback Tokens" icon="ban">
    **What it is:** Tokens that make callbacks to sender/receiver during transfers.

    **Why not supported:** Creates reentrancy vectors that could be exploited.

    **Examples:** ERC777 tokens with hooks
  </Accordion>

  <Accordion title="Rebasing Tokens (StakingVault Only)" icon="ban">
    **What it is:** Tokens whose balances change over time without transfers.

    **Why not supported in StakingVault:** The staking vault requires stable balances for reward distribution calculations.

    **Note:** Rebasing tokens ARE supported in Folio collateral (see below).
  </Accordion>
</AccordionGroup>

## Supported with Caveats

### Rebasing Tokens (Folio Only)

<Info>
  Both upward-rebasing and downward-rebasing tokens are supported as Folio collateral.
</Info>

<Warning>
  **Important Limitations**

  The Folio's accounting for bought and sold token amounts relies on differences in token balances. This means:

  1. **Sold/bought amounts may be misreported** if balance changes come from rebasing rather than transfers
  2. **Non-incremental rebasings** (sudden large changes) can cause outsized accounting deviations
  3. **Continuous small rebases** are generally handled better than infrequent large rebases
</Warning>

<Tip>
  **Best Practice:** Use rebasing tokens cautiously and monitor for accounting discrepancies. Prefer wrapper tokens that convert rebasing to non-rebasing (e.g., wstETH instead of stETH).
</Tip>

### Non-Standard Return Values

<Card title="Fully Supported" icon="check">
  The Folio uses SafeERC20 patterns and handles:

  * Missing return values (e.g., USDT)
  * Boolean return values that don't revert on failure
  * Non-standard success indicators
</Card>

### Zero-Value Transfer Reversion

<Card title="Fully Supported" icon="check">
  Some tokens revert on zero-value transfers. The Folio is designed to handle this behavior correctly.
</Card>

### Flash Mintable Tokens

<Card title="Fully Supported" icon="check">
  Tokens with flash mint capabilities are fully supported. The Folio's reentrancy guards and state management handle these correctly.
</Card>

## Reentrancy Protection

<Info>
  The Folio itself is not susceptible to reentrancy attacks due to built-in protections.
</Info>

<Warning>
  **Read-Only Reentrancy Risk**

  While the Folio is protected, consuming protocols may be vulnerable to read-only reentrancy.

  **To check for reentrancy:**

  ```solidity theme={null}
  // Call stateChangeActive() and require both return values are false
  (bool rebalanceActive, bool asyncActionActive) = folio.stateChangeActive();
  require(!rebalanceActive && !asyncActionActive, "State change in progress");
  ```

  All Folio mutator calls are `nonReentrant` and close async actions as a pre-hook.
</Warning>

## Trusted Filler Considerations

<Note>
  If trusted fillers are enabled for a Folio, additional token restrictions may apply.
</Note>

<Card title="External Filler Requirements" icon="handshake">
  When trusted fillers are enabled, tokens must also be supported by the external trusted fillers whitelisted in the trusted filler registry.

  **Currently Supported Filler:** CoW Swap

  Check the trusted filler documentation for their specific token requirements.
</Card>

## Token Validation Checklist

<Steps>
  <Step title="Check Token Contract">
    Verify the token is a standard ERC20 without exotic features.

    Review the token's contract code or audit reports.
  </Step>

  <Step title="Verify Decimals">
    Confirm token decimals are within valid ranges:

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

  <Step title="Test Transfers">
    Test that transfers work as expected:

    * No fee-on-transfer
    * No pause functionality
    * No blocklists affecting the Folio address
  </Step>

  <Step title="Check for Rebasing">
    Determine if the token is rebasing:

    * If yes and using in StakingVault: ❌ Not supported
    * If yes and using in Folio: ⚠️ Supported with caveats
  </Step>

  <Step title="Verify Supply">
    Ensure total supply is well below 1e36 and unlikely to exceed it.
  </Step>

  <Step title="Test Edge Cases">
    Test zero-value transfers and other edge cases if relevant.
  </Step>
</Steps>

## Common Token Examples

### Compatible Tokens

<CardGroup cols={2}>
  <Card title="WETH" icon="circle-check">
    Fully compatible - standard ERC20 wrapper
  </Card>

  <Card title="DAI" icon="circle-check">
    Fully compatible - standard ERC20
  </Card>

  <Card title="WBTC" icon="circle-check">
    Fully compatible - standard ERC20 with 8 decimals
  </Card>

  <Card title="wstETH" icon="circle-check">
    Fully compatible - non-rebasing wrapper for stETH
  </Card>
</CardGroup>

### Incompatible Tokens

<CardGroup cols={2}>
  <Card title="USDC" icon="triangle-exclamation">
    Has blocklist functionality - risky
  </Card>

  <Card title="USDT" icon="triangle-exclamation">
    Has pause and missing return values - risky
  </Card>

  <Card title="stETH" icon="triangle-exclamation">
    Rebasing token - use with caution
  </Card>

  <Card title="SafeMoon" icon="ban">
    Fee-on-transfer - not supported
  </Card>
</CardGroup>

## Related Documentation

<CardGroup cols={2}>
  <Card title="Valid Ranges" icon="ruler" href="/resources/valid-ranges">
    Token supply and decimal limits
  </Card>

  <Card title="Security" icon="shield" href="/resources/audits">
    Security audits and considerations
  </Card>

  <Card title="Basket Management" icon="basket-shopping" href="/essentials/basket">
    Adding and removing tokens from Folios
  </Card>
</CardGroup>
