Liquidity Injector

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

circle-info

Source: src/liquidityInjector/LiquidityInjector.sol

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

Last updated