5/5
## Understanding Your Health Factor in DeFi Borrowing When borrowing tokens in a decentralized finance (DeFi) lending protocol, your **Health Factor** is the single most critical metric to monitor. This numerical value represents the safety of your deposited collateral against your borrowed debt. If your Health Factor drops below 1, your collateral is at risk of being liquidated to repay your loan. Therefore, maintaining a Health Factor comfortably above 1 is paramount to a secure borrowing experience. ## Deconstructing the Health Factor Calculation The calculation of your Health Factor (`H(u)`) is a two-step process. First, we determine your "Average Liquidation Threshold," which considers all the different types of collateral you've supplied. Second, we use this threshold, along with your total collateral value and total debt value, to find your Health Factor. ### Step 1: Calculating Your Average Liquidation Threshold (`L(u)`) The Average Liquidation Threshold (`L(u)`) is a weighted average that reflects the overall stability of your collateral portfolio. Different assets have different risk profiles, and thus, different liquidation thresholds. **Key Notations:** * `C_R(u)`: The total USD value of a specific collateral asset (reserve `R`) deposited by you (user `u`). * **Example**: If you deposit 1 ETH as collateral when 1 ETH is valued at $3000 USD, then `C_ETH(you)` = $3000. * **Example**: If you deposit 1000 USDC as collateral (assuming 1 USDC = $1 USD), then `C_USDC(you)` = $1000. * `L_R`: The Liquidation Threshold for a specific collateral asset (reserve `R`). This is a percentage (e.g., 0.77 for ETH, 0.80 for USDC) representing the maximum percentage of debt that can be covered by this collateral before it's considered undercollateralized for liquidation purposes. More volatile assets typically have lower liquidation thresholds. * `L(u)`: Your Average Liquidation Threshold. **Formula for Average Liquidation Threshold `L(u)`:** Your Average Liquidation Threshold is calculated by summing the products of each collateral's USD value and its specific Liquidation Threshold, and then dividing by the total USD value of all your collateral. ``` L(u) = ( Σ [ L_R * C_R(u) ] ) / ( Σ C_R(u) ) ``` Where: * The summation (Σ) occurs over all reserves `R` where you have deposited collateral. * **Numerator `( Σ [ L_R * C_R(u) ] )`**: For each collateral asset you've deposited, multiply its specific Liquidation Threshold (`L_R`) by the current USD value of that collateral (`C_R(u)`). Sum all these resulting values. * **Denominator `( Σ C_R(u) )`**: Sum the total current USD value of all collateral assets you have deposited. ### Step 2: Calculating Your Health Factor (`H(u)`) Once you have your Average Liquidation Threshold (`L(u)`), you can calculate your Health Factor (`H(u)`). **Additional Notation:** * `B_R(u)`: The total USD value of debt from a specific reserve `R` borrowed by you (user `u`). * **Example**: If you borrowed 1000 USDC, then `B_USDC(you)` = $1000. * `H(u)`: Your Health Factor. **Formula for Health Factor `H(u)`:** The Health Factor is calculated by multiplying your Average Liquidation Threshold (`L(u)`) by the total USD value of all your collateral, and then dividing this by the total USD value of all your debt. ``` H(u) = L(u) * ( Σ C_R(u) ) / ( Σ B_R(u) ) ``` Where: * `L(u)` is your Average Liquidation Threshold. * `Σ C_R(u)` is the total USD value of all collateral you've deposited. * `Σ B_R(u)` is the total USD value of all assets you've borrowed. Alternatively, by substituting the formula for `L(u)` into the `H(u)` formula, we get a more direct calculation: ``` H(u) = [ ( Σ [ L_R * C_R(u) ] ) / ( Σ C_R(u) ) ] * ( Σ C_R(u) ) / ( Σ B_R(u) ) ``` This simplifies to: ``` H(u) = ( Σ [ L_R * C_R(u) ] ) / ( Σ B_R(u) ) ``` This simplified formula directly shows that the Health Factor is the ratio of your risk-adjusted collateral value (sum of each collateral's value multiplied by its liquidation threshold) to your total debt value. Lending protocols typically calculate `L(u)` first and then use it to find `H(u)`. ## The Liquidation Trigger: When Your Position is at Risk Liquidation of your collateral becomes a possibility if your **Health Factor `H(u)` drops below 1**. When `H(u) < 1`, it signifies that the risk-adjusted value of your collateral is no longer sufficient to safely cover your outstanding debt according to the protocol's parameters. ## How Market Volatility Affects Your Health Factor The prices of your collateral and borrowed assets are dynamic and directly influence your Health Factor. Let's consider a simplified example to illustrate this: Imagine Alice has deposited only ETH as collateral and borrowed only USDC. For this illustrative example, we'll temporarily assume her Average Liquidation Threshold (`L(u)`) is a constant value (e.g., 1.0 or 0.8) to focus on the ratio of collateral to debt. In reality, `L(u)` would be determined by `L_ETH`. * Let `Σ C_R(u)` be the total USD value of Alice's ETH collateral. * Let `Σ B_R(u)` be the total USD value of Alice's borrowed USDC. **Initial Scenario (Healthy Position):** * Alice deposits 1 ETH when 1 ETH = $3000 USD. Thus, `Σ C_R(u) = $3000`. * Alice borrows $1000 USDC. Thus, `Σ B_R(u) = $1000`. * The core ratio of collateral to debt is `$3000 / $1000 = 3`. * If, for simplicity, `L(u)` = 0.8 (meaning ETH has an 80% liquidation threshold and it's her only collateral), her Health Factor would be `H(Alice) = 0.8 * ($3000 / $1000) = 0.8 * 3 = 2.4`. This is well above 1, indicating a healthy position. **Scenario: Price of Collateral (ETH) Drops:** * Suppose the price of ETH plummets, and 1 ETH is now worth only $1500 USD. * Alice's `Σ C_R(u)` (USD value of her 1 ETH) becomes $1500. * Her `Σ B_R(u)` (USD value of her USDC debt) remains $1000 (as USDC is a stablecoin). * The core ratio becomes `$1500 / $1000 = 1.5`. * Her Health Factor, assuming `L(u)` remains 0.8 (as `L_ETH` is fixed, but the *average* `L(u)` could change if she had multiple collaterals with shifting values), would now be `H(Alice) = 0.8 * ($1500 / $1000) = 0.8 * 1.5 = 1.2`. Her position is still safe, but closer to the liquidation threshold. * Now, suppose ETH drops further to $1200 USD. * Alice's `Σ C_R(u)` becomes $1200. * The core ratio becomes `$1200 / $1000 = 1.2`. * Her Health Factor would be `H(Alice) = 0.8 * ($1200 / $1000) = 0.8 * 1.2 = 0.96`. * Since `H(Alice) = 0.96 < 1`, her position is now eligible for liquidation. **Key Takeaways from Price Changes:** * **Decrease in Collateral Value**: If the price of your collateralized assets falls, your Health Factor decreases, increasing the risk of liquidation. * **Increase in Collateral Value**: If the price of your collateralized assets rises, your Health Factor increases, making your position safer. * **Increase in Borrowed Asset Value (for non-stablecoins)**: If you've borrowed a volatile asset and its price increases, the USD value of your debt (`Σ B_R(u)`) increases. This causes your Health Factor to decrease, increasing liquidation risk. * **Decrease in Borrowed Asset Value (for non-stablecoins)**: Conversely, if the price of a borrowed volatile asset decreases, the USD value of your debt decreases, causing your Health Factor to increase. ## Best Practices for Maintaining a Healthy Borrowing Position Proactive management is key to avoiding liquidation and utilizing DeFi borrowing services safely. 1. **Active Monitoring**: Regularly check your Health Factor, especially during periods of high market volatility. Price fluctuations can rapidly alter your risk profile. 2. **Initial Borrowing Margin**: Protocols enforce that your Health Factor must be above 1 when you initiate a loan. It's wise to start with a Health Factor significantly higher than 1 to provide a buffer against market swings. 3. **Multiple Assets**: The formulas for `L(u)` and `H(u)` are designed to handle complex positions involving multiple types of collateral and various borrowed assets. 4. **Understand Asset-Specific Liquidation Thresholds (`L_R`)**: Each collateral type has its own `L_R`. This threshold is crucial as it dictates how much that specific asset contributes to the safety of your loan. Assets with higher volatility generally have lower liquidation thresholds (e.g., 75-80%), while more stable assets might have higher ones (e.g., 80-85%). ## Recap: Key Determinants of Your Health Factor Your Health Factor (`H(u)`) is a dynamic value influenced by several interconnected factors: * **Your Average Liquidation Threshold (`L(u)`)**: * This, in turn, depends on the specific **Liquidation Threshold (`L_R`)** of each asset you've supplied as collateral. * It also depends on the **current USD value of each collateral asset (`C_R(u)`)** you've supplied, as this affects the weighting in the `L(u)` calculation. * **The total current USD value of all your collateral (`Σ C_R(u)`)**. * **The total current USD value of all your debt (`Σ B_R(u)`)**. By understanding these components and how they interact, you can make more informed decisions when borrowing in DeFi, manage your risk effectively, and protect your collateral from liquidation.
When borrowing tokens in a decentralized finance (DeFi) lending protocol, your Health Factor is the single most critical metric to monitor. This numerical value represents the safety of your deposited collateral against your borrowed debt. If your Health Factor drops below 1, your collateral is at risk of being liquidated to repay your loan. Therefore, maintaining a Health Factor comfortably above 1 is paramount to a secure borrowing experience.
The calculation of your Health Factor (H(u)
) is a two-step process. First, we determine your "Average Liquidation Threshold," which considers all the different types of collateral you've supplied. Second, we use this threshold, along with your total collateral value and total debt value, to find your Health Factor.
L(u)
)The Average Liquidation Threshold (L(u)
) is a weighted average that reflects the overall stability of your collateral portfolio. Different assets have different risk profiles, and thus, different liquidation thresholds.
Key Notations:
C_R(u)
: The total USD value of a specific collateral asset (reserve R
) deposited by you (user u
).
Example: If you deposit 1 ETH as collateral when 1 ETH is valued at $3000 USD, then C_ETH(you)
= $3000.
Example: If you deposit 1000 USDC as collateral (assuming 1 USDC = $1 USD), then C_USDC(you)
= $1000.
L_R
: The Liquidation Threshold for a specific collateral asset (reserve R
). This is a percentage (e.g., 0.77 for ETH, 0.80 for USDC) representing the maximum percentage of debt that can be covered by this collateral before it's considered undercollateralized for liquidation purposes. More volatile assets typically have lower liquidation thresholds.
L(u)
: Your Average Liquidation Threshold.
Formula for Average Liquidation Threshold L(u)
:
Your Average Liquidation Threshold is calculated by summing the products of each collateral's USD value and its specific Liquidation Threshold, and then dividing by the total USD value of all your collateral.
Where:
The summation (Σ) occurs over all reserves R
where you have deposited collateral.
Numerator ( Σ [ L_R * C_R(u) ] )
: For each collateral asset you've deposited, multiply its specific Liquidation Threshold (L_R
) by the current USD value of that collateral (C_R(u)
). Sum all these resulting values.
Denominator ( Σ C_R(u) )
: Sum the total current USD value of all collateral assets you have deposited.
H(u)
)Once you have your Average Liquidation Threshold (L(u)
), you can calculate your Health Factor (H(u)
).
Additional Notation:
B_R(u)
: The total USD value of debt from a specific reserve R
borrowed by you (user u
).
Example: If you borrowed 1000 USDC, then B_USDC(you)
= $1000.
H(u)
: Your Health Factor.
Formula for Health Factor H(u)
:
The Health Factor is calculated by multiplying your Average Liquidation Threshold (L(u)
) by the total USD value of all your collateral, and then dividing this by the total USD value of all your debt.
Where:
L(u)
is your Average Liquidation Threshold.
Σ C_R(u)
is the total USD value of all collateral you've deposited.
Σ B_R(u)
is the total USD value of all assets you've borrowed.
Alternatively, by substituting the formula for L(u)
into the H(u)
formula, we get a more direct calculation:
This simplifies to:
This simplified formula directly shows that the Health Factor is the ratio of your risk-adjusted collateral value (sum of each collateral's value multiplied by its liquidation threshold) to your total debt value. Lending protocols typically calculate L(u)
first and then use it to find H(u)
.
Liquidation of your collateral becomes a possibility if your Health Factor H(u)
drops below 1. When H(u) < 1
, it signifies that the risk-adjusted value of your collateral is no longer sufficient to safely cover your outstanding debt according to the protocol's parameters.
The prices of your collateral and borrowed assets are dynamic and directly influence your Health Factor. Let's consider a simplified example to illustrate this:
Imagine Alice has deposited only ETH as collateral and borrowed only USDC. For this illustrative example, we'll temporarily assume her Average Liquidation Threshold (L(u)
) is a constant value (e.g., 1.0 or 0.8) to focus on the ratio of collateral to debt. In reality, L(u)
would be determined by L_ETH
.
Let Σ C_R(u)
be the total USD value of Alice's ETH collateral.
Let Σ B_R(u)
be the total USD value of Alice's borrowed USDC.
Initial Scenario (Healthy Position):
Alice deposits 1 ETH when 1 ETH = $3000 USD. Thus, Σ C_R(u) = $3000
.
Alice borrows $1000 USDC. Thus, Σ B_R(u) = $1000
.
The core ratio of collateral to debt is $3000 / $1000 = 3
.
If, for simplicity, L(u)
= 0.8 (meaning ETH has an 80% liquidation threshold and it's her only collateral), her Health Factor would be H(Alice) = 0.8 * ($3000 / $1000) = 0.8 * 3 = 2.4
. This is well above 1, indicating a healthy position.
Scenario: Price of Collateral (ETH) Drops:
Suppose the price of ETH plummets, and 1 ETH is now worth only $1500 USD.
Alice's Σ C_R(u)
(USD value of her 1 ETH) becomes $1500.
Her Σ B_R(u)
(USD value of her USDC debt) remains $1000 (as USDC is a stablecoin).
The core ratio becomes $1500 / $1000 = 1.5
.
Her Health Factor, assuming L(u)
remains 0.8 (as L_ETH
is fixed, but the average L(u)
could change if she had multiple collaterals with shifting values), would now be H(Alice) = 0.8 * ($1500 / $1000) = 0.8 * 1.5 = 1.2
.
Her position is still safe, but closer to the liquidation threshold.
Now, suppose ETH drops further to $1200 USD.
Alice's Σ C_R(u)
becomes $1200.
The core ratio becomes $1200 / $1000 = 1.2
.
Her Health Factor would be H(Alice) = 0.8 * ($1200 / $1000) = 0.8 * 1.2 = 0.96
.
Since H(Alice) = 0.96 < 1
, her position is now eligible for liquidation.
Key Takeaways from Price Changes:
Decrease in Collateral Value: If the price of your collateralized assets falls, your Health Factor decreases, increasing the risk of liquidation.
Increase in Collateral Value: If the price of your collateralized assets rises, your Health Factor increases, making your position safer.
Increase in Borrowed Asset Value (for non-stablecoins): If you've borrowed a volatile asset and its price increases, the USD value of your debt (Σ B_R(u)
) increases. This causes your Health Factor to decrease, increasing liquidation risk.
Decrease in Borrowed Asset Value (for non-stablecoins): Conversely, if the price of a borrowed volatile asset decreases, the USD value of your debt decreases, causing your Health Factor to increase.
Proactive management is key to avoiding liquidation and utilizing DeFi borrowing services safely.
Active Monitoring: Regularly check your Health Factor, especially during periods of high market volatility. Price fluctuations can rapidly alter your risk profile.
Initial Borrowing Margin: Protocols enforce that your Health Factor must be above 1 when you initiate a loan. It's wise to start with a Health Factor significantly higher than 1 to provide a buffer against market swings.
Multiple Assets: The formulas for L(u)
and H(u)
are designed to handle complex positions involving multiple types of collateral and various borrowed assets.
Understand Asset-Specific Liquidation Thresholds (L_R
): Each collateral type has its own L_R
. This threshold is crucial as it dictates how much that specific asset contributes to the safety of your loan. Assets with higher volatility generally have lower liquidation thresholds (e.g., 75-80%), while more stable assets might have higher ones (e.g., 80-85%).
Your Health Factor (H(u)
) is a dynamic value influenced by several interconnected factors:
Your Average Liquidation Threshold (L(u)
):
This, in turn, depends on the specific Liquidation Threshold (L_R
) of each asset you've supplied as collateral.
It also depends on the current USD value of each collateral asset (C_R(u)
) you've supplied, as this affects the weighting in the L(u)
calculation.
The total current USD value of all your collateral (Σ C_R(u)
).
The total current USD value of all your debt (Σ B_R(u)
).
By understanding these components and how they interact, you can make more informed decisions when borrowing in DeFi, manage your risk effectively, and protect your collateral from liquidation.
A definitive walkthrough to Understanding Your Health Factor in DeFi Borrowing - This lesson illuminates the Health Factor, DeFi's crucial shield against loan liquidation, clarifying why values below 1 are perilous. Master its calculation, involving the Average Liquidation Threshold, total collateral, and debt, and see how market movements affect your borrowing safety.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Aave V3 core functionalities and key features
APY & APR, market forces, utilization rates, interest rate models
Reserves, ATokens, debt tokens, liquidity and borrow index
Aave smart contracts architecture
Supply, borrow, repay, withdrawal, liquidation
Compound interest
Reserve factors, liquidation pricing, credit delegation, LTV
Aave V3 flash loans
How to buy long and sell short using Aave V3
How to build a functional app to buy long, sell short, and close a position.
Last updated on July 20, 2025
Duration: 8min
Duration: 49min
Duration: 43min
Duration: 12min
Course Overview
About the course
Aave V3 core functionalities and key features
APY & APR, market forces, utilization rates, interest rate models
Reserves, ATokens, debt tokens, liquidity and borrow index
Aave smart contracts architecture
Supply, borrow, repay, withdrawal, liquidation
Compound interest
Reserve factors, liquidation pricing, credit delegation, LTV
Aave V3 flash loans
How to buy long and sell short using Aave V3
How to build a functional app to buy long, sell short, and close a position.
Last updated on July 20, 2025