Collateral Factor

The percentage of a collateral asset's value that can be borrowed against in a pooled-liquidity lending protocol like Compound V2. Set per market by governance. A 75% collateral factor on ETH means users can borrow up to 75% of their ETH collateral's value.

A collateral factor (CF) is the fraction of a collateral asset's market value that can be borrowed against in a DeFi lending protocol. Every market in a protocol like Compound V2 has a collateral factor set by governance.

How Collateral Factor Works

Suppose USDC has a collateral factor of 75% in a protocol. A user who supplies $1,000 of USDC to the protocol can borrow up to $750 worth of any borrowable asset (with that asset's own constraints).

The 25% haircut between supplied value and borrowable value is the protocol's safety margin. It exists because:

  • Price volatility: asset prices change. A user whose borrow value approaches their collateral value is at risk of insolvency. The haircut buys time for liquidators to act.
  • Oracle lag: the protocol's price oracle may lag real market prices. The haircut provides buffer against short-term oracle errors.
  • Liquidation discount: liquidators receive a ~5-8% discount on seized collateral. The haircut effectively pre-pays for this discount.

Typical Ranges

  • Stablecoins (USDC, USDT, DAI, FRAX): 80-90% CF. Low volatility, deep liquidity.
  • ETH, BTC (WBTC): 70-85% CF. Moderate volatility, excellent liquidity.
  • Major altcoins (LINK, UNI, AAVE): 50-70% CF. Higher volatility.
  • Long-tail / low-liquidity assets: 30-50% CF or often 0% (supply-only, no collateralization).

Higher CF = more capital efficiency for borrowers, but more risk to the protocol. Lower CF = safer protocol, but borrowers get less utility from their collateral.

Why Setting the Wrong CF Kills Protocols

Setting collateral factor too aggressively is one of the classic lending protocol mistakes:

  • Overestimating a volatile asset's price stability and setting CF too high. When the price drops 30% in a day, borrowers become underwater faster than liquidators can react, and the protocol accumulates bad debt.
  • Not accounting for liquidity. A 70% CF on a low-liquidity asset means large positions cannot be liquidated at the expected price — the liquidator has to sell into a shallow market and eats slippage, making the liquidation unprofitable and leaving bad debt.
  • Correlated collateral and debt. If a user can use token X as collateral to borrow more of token X (or a heavily correlated asset), the CF needs to be lower to account for the lack of risk diversification.

In real exploits, aggressive CF combined with oracle manipulation has been a major attack vector. An attacker manipulates the oracle to make a low-value asset look high-value, borrows against it at the inflated CF-adjusted value, then dumps the real asset leaving the protocol with uncollateralized debt.

Collateral Factor in the Compound V2 Build

When you build Compound V2 from scratch, collateral factors appear in the Comptroller:

1mapping(address => uint256) public collateralFactors;
2
3function setCollateralFactor(
4 address cToken,
5 uint256 newCF
6) external onlyAdmin {
7 require(newCF <= MAX_CF, "above max");
8 collateralFactors[cToken] = newCF;
9}

When computing whether a user can borrow, the Comptroller iterates the user's supplied markets, multiplying each market's USD value by its collateral factor to get the "effective borrowable value." The user's total borrow value must stay below this number.

Setting Collateral Factors Well

The discipline of setting CF is about modeling pessimistic scenarios:

  1. What is the asset's 99th percentile volatility over 24 hours?
  2. What is the depth of liquidity available for liquidation during a stress event?
  3. How reliable is the oracle?
  4. Is the asset correlated with other collateral or debt in the protocol?

The right CF is the one that stays solvent through a stressed scenario, not the one that maximizes borrow demand in normal conditions.

Changing Collateral Factor Mid-Protocol

Changing CF mid-operation is a serious action. Lowering CF while positions are live can push users into liquidation ranges they were not in before. Raising CF suddenly can attract risk-on behavior before the protocol has validated the new assumption.

Best practice: changes go through governance with a timelock, allowing the community to review and potentially exit positions before a change takes effect. The Web3 Founder's Survival Guide covers governance design including timelocks for parameter changes.

Why Collateral Factor Matters for Builders

If you are forking Compound V2 for your own lending protocol, collateral factor tuning is one of the most consequential parameters you set. Get it right and the protocol survives market stress. Get it wrong and it accumulates bad debt that takes years to recover from — or permanently impairs the protocol.

The audit question to always ask: "under what 3-day price move do positions become underwater faster than liquidators can act?" If the answer is "a 30% drop," your CF is too high for anything with more than 20% typical volatility.

Need expert guidance on Collateral Factor?

Our team at Zealynx has deep expertise in blockchain security and DeFi protocols. Whether you need an audit or consultation, we're here to help.

Get a Quote