# Token Mechanics

Comprehensive reference for Fira's core token types. Fira's fixed-rate markets operate with three primary tokens — BT, CT, and FW — governed by the fundamental invariant: $$1 \hspace{0.1cm} \text{FW} = \mu\_{s}(t) \hspace{0.1cm} \text{BT} + \mu\_s(t) \hspace{0.1cm} \text{CT}$$.

## Token Overview

| Token       | Full Name              | Role                                                                                                                                                                                                                                     |
| ----------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **FW-XXXX** | **Fira Wrapped Asset** | Standard asset wrapped within Fira. Mintable and redeemable frictionlessly at any time. Each FW can be deconstructed into one BT and one CT, separating principal and interest components of a fixed-rate position.                      |
| **BT-XXXX** | **Bond Token**         | Zero-coupon bond representing a borrowed position that must be repaid at or before maturity. BT trades at a discount to FW — the discount reflects the fixed interest cost. At maturity, BT redeems 1:1 for the underlying asset.        |
| **CT-XXXX** | **Coupon Token**       | <p>Yield token representing the present value of unrealized interest. When BT is borrowed and swapped for FW at a discount, CT captures the remaining value. CT holders accrue interest and rewards from the</p><p>underlying yield.</p> |

***

## Wrapping Rate

All tokens are connected by a single fundamental invariant:

$$
\mu(t) \hspace{0.1cm} \text{Underlying} = 1 \hspace{0.1cm} \text{FW} = \mu\_{s}(t) \hspace{0.1cm} \text{BT} + \mu\_s(t) \hspace{0.1cm} \text{CT}
$$

The wrapping rate $$\mu(t)$$ specifically relates to the relationship between the underlying asset and the wrapped version (FW). We then have a modified version of this rate which is gross of bad debt loss. These two rates are computed as follows:

$$
\mu (t) = \frac{Reserve(t)}{Supplied(t)}
$$

Such that $$\mu(t)$$ is initialized at 1 and grows based on the earnings from rehypothecation (see [Rehypothecation](#rehypothecation)).

As bad debt is incurred, $$\mu(t)$$ will decrease in value as FW is redeemable for less of the underlying asset. However, the modified wrapping rate $$\mu \_s(t)$$ will not decrease. This is computed as follows:

$$
\mu\_s(t) = max(\mu(t),\mu\_s(t))
$$

Therefore the modified wrapping rate does not decrease. Specifically we do this for the accounting of yield distributed to CT (see [Rehypothecation](#rehypothecation)) as well as adapting the exchange rate from BT to FW based on this value (see [Fixed Rate Markets](https://docs.fira.money/protocol/fixed-rate-markets)). See the [Whitepaper](https://docs.fira.money/resources/whitepaper) for a full explanation.

***

## Bond Token (BT)

### Overview

BT (Bond Token) is an ERC-20 token representing the principal component of a fixed-rate position. Each BT redeems 1:1 into the underlying asset at expiry.

### Key Properties

* **Standard**: ERC-20 (based on `FiraERC20.sol` -- reentrancy-safe ERC20 base)
* **Redemption**: 1:1 for the underlying asset at maturity
* **Minting**: Only the corresponding CT contract or the LiquidityInjector can mint or burn BT
* **Trading**: Traded in the FiraMarket AMM, borrowed/lent in the lending market
* **Stored data**: Associated yield-token address (`FW`), expiry date
* **Contract**: [BondToken.sol](https://github.com/usual-dao/fira/blob/master/src/fira_bonding/core/YieldContracts/BondToken.sol)

### Price Behavior

BT trades at a discount to FW before maturity. The discount reflects the implied fixed yield (see [Fixed Rate Markets](https://docs.fira.money/protocol/fixed-rate-markets)).

As maturity approaches, BT price converges toward 1:1 with the underlying. This convergence mechanism is what creates the fixed-rate dynamic:

* Borrowers sell BT at a discount now and repay at par later (the discount is their interest cost)
* Lenders buy BT at a discount and redeem at par later (the discount is their fixed yield)

> For the full mathematical treatment of fixed-rate pricing, see [Whitepaper](https://docs.fira.money/resources/whitepaper).

### Creation Methods

1. **Deconstruction from FW**: Depositing FW into a Fira yield contract splits it into equal quantities of BT + CT
2. **Collateralized borrowing**: Borrowing BT through the LendingMarket against collateral (e.g. WBTC, WETH)
3. **LiquidityInjector minting**: Protocol-authorized contract that can mint BT to seed fixed-rate lending markets, ensuring market liquidity without relying on external actors

***

## Coupon Token (CT)

### Overview

CT (Coupon Token) is an ERC-20 token that tracks all interest and yield due on a given BT line. CT holders accrue interest and rewards from the underlying yield.

### Key Properties

* **Standard**: ERC-20 (based on `FiraERC20.sol`)
* **Function**: Represents the right to yield generated by the principal until maturity
* **Parent contract**: `InterestManagerCT.sol` -- handles calculation and distribution of yield from FW based on its exchange rate
* **Contract**: [CouponToken.sol](https://github.com/usual-dao/fira/blob/master/src/fira_bonding/core/YieldContracts/CouponToken.sol)
* **Interest Manager**: [InterestManagerCT.sol](https://github.com/usual-dao/fira/blob/master/src/fira_bonding/core/YieldContracts/InterestManagerCT.sol)

### Yield Mechanics

CT increases in value as FW accrues yield (i.e., as the redemption value of FW > 1 underlying). CT holders can:

* Hold CT until maturity and redeem for FW gains
* Sell CT earlier if market conditions are favorable

### Value Proposition

CT represents the present value of unrealized gains from fixed-rate loans. When BT tokens are borrowed and exchanged for their corresponding wrapped assets at a discount, CT tokens can be sold to realize the difference -- capturing the portion of value that was not initially extracted in the BT swap.

***

## FiraWrapped Token (FW)

### Overview

FW (FiraWrapped) is a yield-bearing wrapper for the underlying asset. For example, FW-USDC (also written `USDCFW`) wraps USDC.

### Key Properties

* **Standard**: ERC-20 / ERC-4626 compliant
* **Minting**: Users deposit the base asset (e.g. USDC) to mint FW tokens
* **Redemption**: FW can be redeemed back for the base asset at any time (frictionless)
* **Decomposition**: Each FW can be split into 1 BT + 1 CT via yield contracts
* **Exchange rate**: Tracks an exchange rate reflecting yield earned -- 1 FW gradually represents more underlying over time as interest accrues
* **Contract**: [USDCFW.sol](https://github.com/usual-dao/fira/blob/master/src/fira_bonding/StandardizedYield/implementations/USDCFW.sol)

### Rehypothecation

FW tokens internally invest a portion of deposited assets to earn yield via the **RehypothecationModule**. Idle USDC from FW is rehypothecated into variable-rate markets to generate yield. The rehypothecation is governed by three parameters:

| Parameter   | Description                           |
| ----------- | ------------------------------------- |
| `phiMin`    | Minimum allowed idle ratio            |
| `phiMax`    | Maximum allowed idle ratio            |
| `phiTarget` | Target idle ratio to rebalance toward |

The rebalancing logic moves deposited USDC between two states:

* **Idle** USDC held in the FW contract (readily redeemable)
* **Invested** USDC as shares in a **SisuVault**, where it earns variable yield by supplying to LendingMarkets

Rehypothecation is triggered on FW deposit or redeem function calls, and can also be triggered manually by the FW owner.

> For the formal treatment of rehypothecation mechanics, see [Rehypothecation](https://docs.fira.money/protocol/rehypothecation) and the [Whitepaper](https://docs.fira.money/resources/whitepaper).

### Role in the AMM

FW serves as the quote asset in the FiraMarket AMM. The AMM pricing of BT relative to FW determines the implied fixed interest rate for a given expiry.

***

## Token Strategy Summary

| Token  | Exposure           | Strategy                                                                                             |
| ------ | ------------------ | ---------------------------------------------------------------------------------------------------- |
| **BT** | Fixed yield        | Buy at discount, hold to maturity, redeem 1:1. No exposure to future rate changes.                   |
| **CT** | Floating yield     | Benefits from rising interest/yield rates. Value increases as FW accrues yield.                      |
| **FW** | Underlying + yield | Passive yield from rehypothecation. Can be split into BT+CT for more targeted strategies.            |
| **LP** | BT + FW (AMM)      | Exposure to both fixed-yield assets (BT) and yield-bearing tokens (FW), plus trading fee collection. |

***

## Contract Reference

| Component     | Contract            | Role                                                 |
| ------------- | ------------------- | ---------------------------------------------------- |
| BondToken     | `BondToken.sol`     | ERC-20 zero-coupon bond, matures 1:1 with underlying |
| CouponToken   | `CouponToken.sol`   | ERC-20 yield token, accrues interest from FW         |
| FiraWrapped   | `USDCFW.sol`        | Yield-bearing wrapper with rehypothecation           |
| FiraMarket    | `FiraMarket.sol`    | AMM for BT/FW trading and rate discovery             |
| LendingMarket | `LendingMarket.sol` | Core lending vault, collateral, liquidations         |
| SisuVault     | `SisuVault.sol`     | ERC-4626 vault for rehypothecation                   |

***

## Further Reading

* [Contracts & Addresses](https://docs.fira.money/resources/contracts-addresses) — Deployed contract addresses on Ethereum Mainnet
* [Whitepaper](https://docs.fira.money/resources/whitepaper) — Full mathematical treatment


---

# 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/protocol/token-mechanics.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.
