> For the complete documentation index, see [llms.txt](https://docs.fira.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fira.money/developers/features/liquidity-injector.md).

# Liquidity Injector

## Overview

Fixed-rate lending markets need BT as the loan token, but BT can normally only be created by splitting FW through the yield tokenization process. The Liquidity Injector solves this chicken-and-egg problem by having a special privilege to mint BT directly, without backing FW.

{% hint style="info" %}
The "unbacked" BT minted by the Liquidity Injector is safe because the lending market requires borrowers to post collateral. When borrowers repay their loans, the BT is burned. The injector is simply the bootstrap mechanism.
{% endhint %}

## How it works

### Inject liquidity

`injectLiquidity(params, amount)`:

1. Validates the market is a fixed-rate market (`params.irm == address(0)`)
2. Mints BT via `BondToken.mintByLI()` — the only way to create BT outside the normal FW→BT+CT path
3. Supplies the BT to the lending market via `lendingMarket.supply()`
4. Tracks the injection amount in `marketStats[marketId]`

### Withdraw liquidity

`withdrawLiquidity(params, amount)`:

1. Checks available liquidity (total supply minus total borrows)
2. Withdraws BT from the lending market
3. Burns the BT via `BondToken.burnByLI()`
4. Updates `marketStats[marketId]`

The available liquidity check prevents withdrawal from disrupting existing borrows.

## Key features

* **Owner-only operation** — Only the protocol owner can inject or withdraw
* **No resting state** — BT is either in the lending market or burned; the injector never holds BT idly
* **Per-market tracking** — `marketStats` records net injected amounts per market
* **Self-balancing** — Borrowers must repay BT, which is then burned, closing the loop

## Risk considerations

The unbacked BT creates a soft protocol liability: if the underlying FW exchange rate rises significantly, BT becomes more valuable than when it was minted. However, since borrowers must post collateral and repay in BT, the system is self-balancing.

## Related contracts

* [`LiquidityInjector.sol`](/developers/protocol-contracts/liquidity-injector.md) — Contract details
* [`BondToken.sol`](/developers/protocol-contracts/yield-contracts/bond-token.md) — BT contract with `mintByLI`/`burnByLI`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.fira.money/developers/features/liquidity-injector.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
