Lux Lending Markets implements isolated lending pairs where each market is an independent (collateral, loan, oracle, LLTV, IRM) tuple. Unlike pooled lending (Aave/Compound), risk is isolated per market -- a bad collateral asset in one market cannot cascade to others. Each market has its own Loan-to-Value ratio, interest rate model, and liquidation parameters.
Anyone can create a market by specifying:
struct MarketParams {
address loanToken; // token being borrowed
address collateralToken; // token used as collateral
address oracle; // price oracle (LP-038)
uint256 lltv; // liquidation loan-to-value (e.g., 86% = 8600 bps)
address irm; // interest rate model contract
}
Markets are permissionless. The factory deploys a minimal proxy per market.
loanToken and receive shares representing their claimcollateralToken and borrow loanToken up to lltv
utilization = totalBorrowed / totalSupplied
borrowRate = IRM.rate(utilization)
supplyRate = borrowRate * utilization * (1 - reserveFactor)
The default IRM uses a kinked curve:
The kink at 80% incentivizes utilization to stay below optimal, ensuring withdrawal liquidity.
When a borrower's LTV exceeds lltv:
1. Liquidator repays part or all of the loan
2. Liquidator receives collateral at a discount (liquidation incentive = 5%)
3. Bad debt (if collateral < loan) is socialized across lenders in that market only
maxLiquidatable = borrowedAmount * (currentLTV - lltv) / (1 - lltv * (1 + incentive))
Each market is an independent contract with its own:
A market with a worthless collateral token only affects lenders in that specific market.
A percentage of interest (default 10%) accrues to the protocol reserve within each market. This reserve absorbs initial bad debt before socializing to lenders.
1. Oracle dependency: incorrect oracle prices lead to incorrect liquidation thresholds. Each market must use a reliable oracle feed.
2. LLTV governance: excessively high LLTV increases insolvency risk. Market creators set LLTV at creation; it cannot be changed after.
3. Dust positions: minimum borrow amounts prevent dust positions that are uneconomical to liquidate.
github.com/luxfi/standard/contracts/lending/ |MarketFactory.sol |KinkedIRM.sol |Copyright (C) 2024-2026, Lux Partners Limited. All rights reserved.
Licensed under the MIT License.