Loan-to-Value Explained in Detail
Loan-to-value, or LTV, controls borrowing power. If collateral is worth $100 and the LTV is 75%, the user can borrow up to $75 before other risk rules apply.
LTV is related to, but not always the same as, liquidation threshold or health factor.
Smart contract example
max borrow = collateral value * LTV
The result depends on oracle prices, token decimals, and risk parameters.
Loan-to-Value in Auditing
LTV is a core lending safety control. If the calculation is wrong or the price input is unsafe, users may borrow more than the protocol can recover.
Auditors check every path that changes collateral, debt, or risk configuration.
Red flags in code
-
LTV is confused with liquidation threshold.
-
Collateral can be enabled with unintended nonzero LTV.
-
Token or oracle decimals are scaled incorrectly.
-
Withdraw, transfer, or borrow paths skip solvency checks.
-
Governance can set unsafe LTV values without validation.
How to test or review it
-
Test just below, exactly at, and just above the borrow limit.
-
Fuzz collateral amounts, debt amounts, prices, and decimals.
-
Test multi-collateral portfolios.
-
Simulate oracle manipulation and stale prices.
-
Confirm collateral changes recheck borrowing capacity.