# User Flows

These pages document the end-to-end transaction flows for each user-facing operation in the Fira protocol. Each flow includes a Mermaid sequence diagram, preconditions, relevant view functions, emitted events, and reward share formulas where applicable.

{% hint style="info" %}
All user operations go through the **FiraRouterV4** (except variable-rate lending, which interacts with the LendingMarket directly). Users must approve the relevant tokens to the router before calling.
{% endhint %}

## Common parameter structs

| Struct           | Fields                                                                               |
| ---------------- | ------------------------------------------------------------------------------------ |
| `MarketParams`   | `loanToken`, `collateralToken`, `oracle`, `irm`, `ltv`, `lltv`, `whitelist`          |
| `TokenInput`     | `tokenIn`, `netTokenIn`, `tokenMintFw`, `firaSwap`, `swapData`                       |
| `TokenOutput`    | `tokenOut`, `minTokenOut`, `tokenRedeemFw`, `firaSwap`, `swapData`                   |
| `LimitOrderData` | Pricing limits for BT/FW market swap (interface compat, not used in current version) |

## Flows

* [Borrow at Fixed Rate](https://docs.fira.money/developers/user-flows/borrow-fixed-rate)
* [Repay Fixed-Rate Debt](https://docs.fira.money/developers/user-flows/repay-fixed-rate)
* [Variable-Rate Lending](https://docs.fira.money/developers/user-flows/variable-rate-lending)
* [Repay Variable-Rate Debt](https://docs.fira.money/developers/user-flows/repay-variable-rate)
* [FW Deposit & Redeem](https://docs.fira.money/developers/user-flows/fw-deposit-redeem)
* [Provide Liquidity](https://docs.fira.money/developers/user-flows/provide-liquidity)
* [Remove Liquidity](https://docs.fira.money/developers/user-flows/remove-liquidity)
* [Trade BT & CT](https://docs.fira.money/developers/user-flows/trade-bt-ct)
* [Pre/Post-Expiry Exits](https://docs.fira.money/developers/user-flows/pre-post-expiry-exits)
