Liquidity Injector
LiquidityInjector mints unbacked BT to bootstrap fixed-rate lending markets with initial loan token supply.
Last updated
LiquidityInjector mints unbacked BT to bootstrap fixed-rate lending markets with initial loan token supply.
Source: src/liquidityInjector/LiquidityInjector.sol
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.
injectLiquidity(params, amount)Validates params.irm == address(0) (fixed-rate market identifier)
Calls BondToken.mintByLI(address(this), amount) to create BT
Approves and supplies BT to the lending market via lendingMarket.supply()
Increments marketStats[marketId]
withdrawLiquidity(params, amount)Checks available liquidity (total supply − total borrows, capped by balance)
Withdraws BT from the lending market
Burns BT via BondToken.burnByLI()
Decrements marketStats[marketId]
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