# FW (FiraWrapped)

## Overview

FW tokens wrap yield-bearing assets (e.g., USDC in an ERC-4626 vault) into a standardized ERC-20 interface. The FW token is the foundation of the protocol — BT and CT are minted from FW, and the AMM trades BT against FW.

{% hint style="info" %}
The first FW implementation is **USDCFW**, which wraps USDC through the SisuVault (an ERC-4626 vault). The FW exchange rate increases over time as yield accrues from the underlying vault.
{% endhint %}

## How it works

### Deposit

Users deposit a supported token (e.g., USDC) and receive FW shares. The number of shares depends on the current exchange rate. Deposits are validated against `isValidTokenIn` and protected by a `minSharesOut` slippage guard.

### Redeem

Users burn FW shares and receive the underlying token. The amount returned depends on the current exchange rate, which increases as yield accrues. Redemptions are validated against `isValidTokenOut` and protected by a `minTokenOut` slippage guard.

### Exchange rate

The FW exchange rate is the ratio of total underlying assets to total FW shares. It monotonically increases as the underlying vault generates yield. This property is critical: it ensures that BT+CT always represent at least as much underlying as the FW used to create them.

## Key features

* **Standardized interface** — Any yield-bearing asset can be wrapped into FW, allowing the rest of the protocol to work with a uniform API.
* **Yield accrual** — The exchange rate increases over time as the underlying vault earns yield.
* **Pause controls** — Three independent pause mechanisms: deposits-only, redemptions-only, or global pause (blocks all transfers).
* **Rehypothecation** — Underlying tokens are split between idle reserves (for instant redemptions) and vault deployment (for yield). See [Rehypothecation](https://docs.fira.money/developers/features/rehypothecation).

## BC Index

The **BC Index** is derived from the FW exchange rate and is used throughout the protocol for yield tokenization. It is defined as:

```
BCIndex = max(FW.exchangeRate(), previousBCIndex)
```

The BC Index is monotonically non-decreasing, which guarantees that BT+CT always represent at least as much underlying as the FW that was used to create them, even if the FW exchange rate temporarily dips.

## Related contracts

* [`FWBase.sol`](https://docs.fira.money/developers/token-contracts/fw-tokens) — Abstract base contract
* [`USDCFW.sol`](https://docs.fira.money/developers/token-contracts/fw-tokens) — USDC implementation
* [`BCIndex.sol`](https://docs.fira.money/developers/utility-contracts/libraries/helpers) — Type wrapper and conversion functions


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fira.money/developers/features/fw-fira-wrapped.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
