# Protocol Primer

## What is Fira? (ELI5 version)

Fira is a DeFi protocol that lets you **split yield-bearing assets into separate fixed-rate and floating-rate components**, and then **trade, lend, and provide liquidity** with those components on Ethereum.

Think of it this way: if you have a yield-bearing stablecoin (like USDC deposited in a vault), Fira wraps it into a standardized token called **FW** (Fira Wrapped), then lets you split that FW into two pieces:

* **Bond Token (BT)** — a fixed-rate principal claim. You know exactly what it's worth at maturity.
* **Coupon Token (CT)** — a floating-yield claim. Its value depends on how much yield the underlying asset generates.

### Why does this matter?

In traditional finance, separating principal from yield is a well-established concept (zero-coupon bonds, interest rate strips). Fira brings this to DeFi, enabling:

* **Fixed-rate borrowing** — Borrowers get predictable costs instead of volatile variable rates.
* **Yield speculation** — Traders can go long or short on future yield without holding the full underlying asset.
* **Capital efficiency** — LPs can provide liquidity in the BT/FW pool while simultaneously earning floating yield via CT.

### The core elements of Fira

#### **FW (Fira Wrapped)**

FW tokens are ERC-20 wrappers around yield-bearing assets. They expose a standardized deposit/redeem interface so the rest of the protocol doesn't need to know the specifics of the underlying vault. The first implementation is **USDCFW**, which wraps USDC through an ERC-4626 vault.

**Key features:**

* Standardized interface for any yield-bearing asset
* Exchange rate increases as yield accrues
* Rehypothecation — idle liquidity is deployed to vaults for yield while maintaining enough reserves for redemptions

#### **Bond Token (BT)**

BT is the fixed-rate side of the yield split. Each BT represents a claim on 1 unit of underlying at maturity. Before maturity, BT trades at a discount — the discount is the implied fixed rate.

**Key features:**

* Fixed-rate principal claim
* Trades at a discount to FW in the AMM
* Used as the loan token in fixed-rate lending markets

#### **Coupon Token (CT)**

CT is the floating-rate side. Holding CT entitles you to the yield generated by the underlying FW between now and expiry.

**Key features:**

* Floating yield exposure
* Interest accrues automatically and can be claimed at any time
* Post-expiry, remaining yield flows to the protocol treasury

#### **Fira Market (AMM)**

The AMM is a specialized BT/FW pool with time-decaying implied-rate pricing based on a logit curve. As maturity approaches, BT converges toward FW in value.

**Key features:**

* BT/FW trading pool with LP tokens
* TWAP oracle for pricing BT, CT, and LP tokens
* Swaps and mints revert after expiry; burns work at any time

#### **Fixed-Rate Lending**

Borrowers post collateral (e.g., Pendle PT tokens) and borrow BT at a fixed rate. The router automatically swaps BT to FW and then to USDC, so borrowers receive stablecoins in a single transaction.

#### **Variable-Rate Lending**

A separate lending market (powered by SisuVault, an ERC-4626 vault) allows standard variable-rate borrowing with collateral like wstETH and cbBTC.

#### **Router**

The router is the single entry point for all user operations. It uses a diamond-like proxy pattern where each function is delegated to a specialized facet contract. Users never interact with the underlying contracts directly — everything goes through the router.
