Liquidity Injector
The Liquidity Injector bootstraps fixed-rate lending markets by minting and supplying BT as initial liquidity.
Last updated
The Liquidity Injector bootstraps fixed-rate lending markets by minting and supplying BT as initial liquidity.
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.
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.
injectLiquidity(params, amount):
Validates the market is a fixed-rate market (params.irm == address(0))
Mints BT via BondToken.mintByLI() — the only way to create BT outside the normal FW→BT+CT path
Supplies the BT to the lending market via lendingMarket.supply()
Tracks the injection amount in marketStats[marketId]
withdrawLiquidity(params, amount):
Checks available liquidity (total supply minus total borrows)
Withdraws BT from the lending market
Burns the BT via BondToken.burnByLI()
Updates marketStats[marketId]
The available liquidity check prevents withdrawal from disrupting existing borrows.
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
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.
LiquidityInjector.sol — Contract details
BondToken.sol — BT contract with mintByLI/burnByLI
Last updated