On a lending protocol such as Aave, people supply tokens to a shared pool and earn interest, and others borrow from it. There is no credit check. Instead the borrower locks up collateral: tokens the protocol can sell if the loan goes bad. Loans are over-collateralised: the collateral is worth more than the debt.
Three settings, one per collateral token, set by governance (holders' votes and the risk managers they appoint, Module 13, lesson 04):
- Loan-to-value (LTV): the most you can borrow, as a share of the collateral's value.
- Liquidation threshold: the share at which the loan counts as unsafe. It sits a little above the LTV.
- Liquidation bonus: the discount a liquidator gets on the collateral they take.
From those comes the health factor (HF). In words: collateral value × liquidation threshold ÷ debt. Above 1 is safe; below 1, the loan can be liquidated.
Liquidation: once HF is below 1, anyone may repay part of the debt and take the same value of collateral plus the bonus. Aave's Help page sets the size: up to 50% of the debt while HF is above 0.95, up to 100% at or below it (small loans aside).
Prices come from an oracle: a contract that brings outside prices onto the chain. A wrong or manipulated oracle means wrong liquidations (lesson 05).
Total value locked (TVL), in DefiLlama's definition, is the coins sitting in a protocol's contracts. For a lender that means supplied minus borrowed. Borrowed coins are counted separately. TVL measures size, not income.