> 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/protocol-contracts/liquidity-injector.md).

# Liquidity Injector

LiquidityInjector mints unbacked BT to bootstrap fixed-rate lending markets with initial loan token supply.

{% hint style="info" %}
**Source:** `src/liquidityInjector/LiquidityInjector.sol`
{% endhint %}

## Contract summary

The LiquidityInjector has a special privilege to call `BondToken.mintByLI()` to create BT without backing FW. This is the only way BT can be minted outside the normal FW→BT+CT yield-split path.

## Functions

### `injectLiquidity(params, amount)`

1. Validates `params.irm == address(0)` (fixed-rate market identifier)
2. Calls `BondToken.mintByLI(address(this), amount)` to create BT
3. Approves and supplies BT to the lending market via `lendingMarket.supply()`
4. Increments `marketStats[marketId]`

### `withdrawLiquidity(params, amount)`

1. Checks available liquidity (total supply − total borrows, capped by balance)
2. Withdraws BT from the lending market
3. Burns BT via `BondToken.burnByLI()`
4. Decrements `marketStats[marketId]`

## Invariants

* Owner-only for inject and withdraw
* BT is never held in a resting state — always in the lending market or burned
* `marketStats` tracks net injected amount per market
* Available liquidity check prevents disrupting existing borrows


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
