1/5
## Understanding the Close Factor in Liquidation In decentralized finance (DeFi) protocols like Aave V3, the "Close Factor" is a critical parameter that governs the liquidation process. When a user's loan becomes undercollateralized (meaning the value of their collateral is no longer sufficient to safely cover their debt), a portion of that collateral can be seized and sold to repay a corresponding portion of the debt. This process is known as liquidation. The Close Factor specifically defines the maximum percentage of a user's debt for a particular asset that can be repaid during a single liquidation event. Consequently, it also determines the maximum amount of collateral that can be liquidated at one time. ## Maximum Debt Repayment During Liquidation: Key Scenarios Within the Aave V3 protocol, the maximum amount of debt that a liquidator can repay for a specific undercollateralized asset is determined by one of two primary scenarios: 1. **Default Case: Up to 100% of the Specific Asset's Debt** By default, a liquidator can repay up to 100% of the outstanding debt for the specific asset being liquidated. For instance, if a user has borrowed 1000 USDC and this loan becomes subject to liquidation, the liquidator can typically repay the full 1000 USDC. 2. **Special Condition Case: Capped at 50% of the User's Total Debt** Under certain, clearly defined circumstances, the maximum amount of a specific asset's debt that can be repaid is limited. This limit is set to 50% of the user's *total debt* across all assets borrowed on the protocol, not just the asset being liquidated. ## The 50% Total Debt Cap: Conditions for Application For the maximum repayable debt of a specific asset to be capped at 50% of the user's total debt, **all three** of the following conditions must be simultaneously met: 1. **Collateral and Debt Value Threshold:** * The USD value of the `collateral to be liquidated` AND the USD value of the `debt to be repaid` (for the specific asset undergoing liquidation) must both be greater than a predefined constant, `MIN_BASE_MAX_CLOSE_FACTOR_THRESHOLD`. * **Constant:** `MIN_BASE_MAX_CLOSE_FACTOR_THRESHOLD` * **Current Value:** $2,000 USD. This condition ensures that this special capping rule only applies to liquidations of a significant size. 2. **Specific Health Factor Range:** * The user's `health factor` must be greater than another constant, `CLOSE_FACTOR_HF_THRESHOLD`. * **Constant:** `CLOSE_FACTOR_HF_THRESHOLD` * **Current Value:** 0.95. * **Explanation:** For any liquidation to occur, a user's health factor must fall below 1. This condition narrows the applicability of the 50% total debt cap rule to positions where the health factor is specifically within the range of (0.95, 1.0). Positions with a health factor below 0.95 would not trigger this specific cap based on this condition alone. 3. **Proportion of Specific Debt to Total Debt:** * The `debt to be repaid` (for the specific asset being liquidated) must be greater than the `user's total debt` (across all borrowed assets) multiplied by the `DEFAULT_LIQUIDATION_CLOSE_FACTOR`. * **Constant:** `DEFAULT_LIQUIDATION_CLOSE_FACTOR` * **Current Value:** 50%. * **Explanation:** This means the debt of the specific asset under consideration for liquidation must represent more than 50% of the user's total outstanding debt across all their borrowed positions in the protocol. If, and only if, all three of these sub-conditions are satisfied, the maximum amount of debt for that particular asset that can be repaid in a single liquidation event is capped at 50% of the user's total debt. ## Illustrative Example: The 50% Total Debt Cap in Action Consider the following scenario to understand how the "50% of user's total debt" rule is applied: * **Scenario Setup:** * A user has borrowed multiple assets on the Aave V3 protocol. * Their total outstanding debt across all borrowed assets is $10,000 USD. * Part of this total debt is $6,000 USD in "Token A." This $6,000 debt in Token A constitutes 60% of the user's total debt ($6,000 / $10,000 = 0.60), which is greater than 50%. * **Assumption of Other Conditions:** Let's assume the other two necessary conditions for the 50% total debt cap are also met: 1. The USD value of the collateral to be liquidated for Token A and the $6,000 Token A debt are both greater than $2,000 (`MIN_BASE_MAX_CLOSE_FACTOR_THRESHOLD`). 2. The user's health factor is between 0.95 and 1.0 (i.e., > `CLOSE_FACTOR_HF_THRESHOLD`). * **Calculating Maximum Debt Repayable for Token A:** Since all three conditions are satisfied: * The specific debt in Token A ($6,000) is > 50% of the total debt ($10,000). * The values meet the `MIN_BASE_MAX_CLOSE_FACTOR_THRESHOLD`. * The health factor is within the (0.95, 1.0) range. Therefore, the maximum amount of Token A debt that can be repaid in this liquidation event is 50% of the user's *total debt*: Max debt to repay (for Token A) = 50% * $10,000 (user's total debt) = $5,000 USD. * **Important Implication:** Even though the user owes $6,000 in Token A, only $5,000 of this Token A debt will be repaid (and a corresponding amount of collateral liquidated) in this specific liquidation event. This leaves $1,000 of Token A debt ($6,000 - $5,000) remaining for that user. This remaining debt might be subject to future liquidation if the user's health factor does not improve. ## Purpose of the 50% Total Debt Cap Rule This "50% of user's total debt" rule serves a crucial purpose in maintaining protocol health and liquidator engagement. It is primarily designed to prevent the creation of "dust" debt positions. If a large portion of a user's debt is concentrated in a single asset, and that asset is liquidated entirely or almost entirely based on the default Close Factor (which could be up to 100% of that asset's debt), it might leave very small, economically insignificant amounts of debt in other assets, or even a tiny residual amount in the liquidated asset itself. Such small, "dust" amounts of debt might not offer sufficient financial incentive for liquidators to process. The potential profit (liquidation bonus) from liquidating a tiny debt position could be less than the gas fees required to execute the liquidation transaction. This could lead to undercollateralized positions with very small debt amounts lingering on the protocol, posing a theoretical risk. By capping the liquidation at 50% of the *total debt* under the specified conditions, the protocol aims to ensure that if a position is partially liquidated, the remaining debt (like the $1,000 of Token A in the example) is still substantial enough. A more significant remaining debt amount is more likely to incentivize liquidators to act if the position's health deteriorates further, thus contributing to the overall stability and solvency of the protocol. ## Critical Constants Governing the Close Factor The behavior of the Close Factor, particularly the application of the 50% total debt cap, is governed by several key constants within the Aave V3 protocol: * **`MIN_BASE_MAX_CLOSE_FACTOR_THRESHOLD`:** * **Current Value:** $2,000 USD. * **Purpose:** This threshold ensures that the special 50% total debt cap rule is considered only for liquidations involving substantial amounts of collateral and debt, filtering out very small liquidations from this specific logic. * **`CLOSE_FACTOR_HF_THRESHOLD`:** * **Current Value:** 0.95. * **Purpose:** This constant defines a narrow health factor window (between 0.95 and 1.0) where the 50% total debt cap rule can be activated. It targets positions that are only slightly undercollateralized. * **`DEFAULT_LIQUIDATION_CLOSE_FACTOR`:** * **Current Value:** 50%. * **Purpose:** This is the percentage used to calculate the cap itself (50% of the user's total debt) when all triggering conditions are met. It also serves as the threshold for the third condition, determining if the specific asset's debt is a large enough proportion of the total debt. ## Conclusion: The Close Factor's Role in Protocol Stability The Close Factor, along with its associated conditional logic like the 50% total debt cap, represents a sophisticated mechanism for managing liquidations within DeFi lending protocols. These rules are carefully designed to balance several objectives: enabling efficient repayment of undercollateralized debt, ensuring that liquidators are adequately incentivized to maintain protocol health, and preventing the accumulation of economically unviable "dust" debt positions. By fine-tuning these parameters, protocols like Aave V3 strive to optimize the liquidation process, contributing significantly to their overall robustness and security.
In decentralized finance (DeFi) protocols like Aave V3, the "Close Factor" is a critical parameter that governs the liquidation process. When a user's loan becomes undercollateralized (meaning the value of their collateral is no longer sufficient to safely cover their debt), a portion of that collateral can be seized and sold to repay a corresponding portion of the debt. This process is known as liquidation. The Close Factor specifically defines the maximum percentage of a user's debt for a particular asset that can be repaid during a single liquidation event. Consequently, it also determines the maximum amount of collateral that can be liquidated at one time.
Within the Aave V3 protocol, the maximum amount of debt that a liquidator can repay for a specific undercollateralized asset is determined by one of two primary scenarios:
Default Case: Up to 100% of the Specific Asset's Debt
By default, a liquidator can repay up to 100% of the outstanding debt for the specific asset being liquidated. For instance, if a user has borrowed 1000 USDC and this loan becomes subject to liquidation, the liquidator can typically repay the full 1000 USDC.
Special Condition Case: Capped at 50% of the User's Total Debt
Under certain, clearly defined circumstances, the maximum amount of a specific asset's debt that can be repaid is limited. This limit is set to 50% of the user's total debt across all assets borrowed on the protocol, not just the asset being liquidated.
For the maximum repayable debt of a specific asset to be capped at 50% of the user's total debt, all three of the following conditions must be simultaneously met:
Collateral and Debt Value Threshold:
The USD value of the collateral to be liquidated
AND the USD value of the debt to be repaid
(for the specific asset undergoing liquidation) must both be greater than a predefined constant, MIN_BASE_MAX_CLOSE_FACTOR_THRESHOLD
.
Constant: MIN_BASE_MAX_CLOSE_FACTOR_THRESHOLD
Current Value: $2,000 USD.
This condition ensures that this special capping rule only applies to liquidations of a significant size.
Specific Health Factor Range:
The user's health factor
must be greater than another constant, CLOSE_FACTOR_HF_THRESHOLD
.
Constant: CLOSE_FACTOR_HF_THRESHOLD
Current Value: 0.95.
Explanation: For any liquidation to occur, a user's health factor must fall below 1. This condition narrows the applicability of the 50% total debt cap rule to positions where the health factor is specifically within the range of (0.95, 1.0). Positions with a health factor below 0.95 would not trigger this specific cap based on this condition alone.
Proportion of Specific Debt to Total Debt:
The debt to be repaid
(for the specific asset being liquidated) must be greater than the user's total debt
(across all borrowed assets) multiplied by the DEFAULT_LIQUIDATION_CLOSE_FACTOR
.
Constant: DEFAULT_LIQUIDATION_CLOSE_FACTOR
Current Value: 50%.
Explanation: This means the debt of the specific asset under consideration for liquidation must represent more than 50% of the user's total outstanding debt across all their borrowed positions in the protocol.
If, and only if, all three of these sub-conditions are satisfied, the maximum amount of debt for that particular asset that can be repaid in a single liquidation event is capped at 50% of the user's total debt.
Consider the following scenario to understand how the "50% of user's total debt" rule is applied:
Scenario Setup:
A user has borrowed multiple assets on the Aave V3 protocol.
Their total outstanding debt across all borrowed assets is $10,000 USD.
Part of this total debt is $6,000 USD in "Token A." This 6,000 / $10,000 = 0.60), which is greater than 50%.
Assumption of Other Conditions:
Let's assume the other two necessary conditions for the 50% total debt cap are also met:
The USD value of the collateral to be liquidated for Token A and the $6,000 Token A debt are both greater than $2,000 (MIN_BASE_MAX_CLOSE_FACTOR_THRESHOLD
).
The user's health factor is between 0.95 and 1.0 (i.e., > CLOSE_FACTOR_HF_THRESHOLD
).
Calculating Maximum Debt Repayable for Token A:
Since all three conditions are satisfied:
The specific debt in Token A (10,000).
The values meet the MIN_BASE_MAX_CLOSE_FACTOR_THRESHOLD
.
The health factor is within the (0.95, 1.0) range.
Therefore, the maximum amount of Token A debt that can be repaid in this liquidation event is 50% of the user's total debt:
Max debt to repay (for Token A) = 50% * $10,000 (user's total debt) = $5,000 USD.
Important Implication:
Even though the user owes $6,000 in Token A, only $5,000 of this Token A debt will be repaid (and a corresponding amount of collateral liquidated) in this specific liquidation event. This leaves 6,000 - $5,000) remaining for that user. This remaining debt might be subject to future liquidation if the user's health factor does not improve.
This "50% of user's total debt" rule serves a crucial purpose in maintaining protocol health and liquidator engagement. It is primarily designed to prevent the creation of "dust" debt positions.
If a large portion of a user's debt is concentrated in a single asset, and that asset is liquidated entirely or almost entirely based on the default Close Factor (which could be up to 100% of that asset's debt), it might leave very small, economically insignificant amounts of debt in other assets, or even a tiny residual amount in the liquidated asset itself.
Such small, "dust" amounts of debt might not offer sufficient financial incentive for liquidators to process. The potential profit (liquidation bonus) from liquidating a tiny debt position could be less than the gas fees required to execute the liquidation transaction. This could lead to undercollateralized positions with very small debt amounts lingering on the protocol, posing a theoretical risk.
By capping the liquidation at 50% of the total debt under the specified conditions, the protocol aims to ensure that if a position is partially liquidated, the remaining debt (like the $1,000 of Token A in the example) is still substantial enough. A more significant remaining debt amount is more likely to incentivize liquidators to act if the position's health deteriorates further, thus contributing to the overall stability and solvency of the protocol.
The behavior of the Close Factor, particularly the application of the 50% total debt cap, is governed by several key constants within the Aave V3 protocol:
MIN_BASE_MAX_CLOSE_FACTOR_THRESHOLD
:
Current Value: $2,000 USD.
Purpose: This threshold ensures that the special 50% total debt cap rule is considered only for liquidations involving substantial amounts of collateral and debt, filtering out very small liquidations from this specific logic.
CLOSE_FACTOR_HF_THRESHOLD
:
Current Value: 0.95.
Purpose: This constant defines a narrow health factor window (between 0.95 and 1.0) where the 50% total debt cap rule can be activated. It targets positions that are only slightly undercollateralized.
DEFAULT_LIQUIDATION_CLOSE_FACTOR
:
Current Value: 50%.
Purpose: This is the percentage used to calculate the cap itself (50% of the user's total debt) when all triggering conditions are met. It also serves as the threshold for the third condition, determining if the specific asset's debt is a large enough proportion of the total debt.
The Close Factor, along with its associated conditional logic like the 50% total debt cap, represents a sophisticated mechanism for managing liquidations within DeFi lending protocols. These rules are carefully designed to balance several objectives: enabling efficient repayment of undercollateralized debt, ensuring that liquidators are adequately incentivized to maintain protocol health, and preventing the accumulation of economically unviable "dust" debt positions. By fine-tuning these parameters, protocols like Aave V3 strive to optimize the liquidation process, contributing significantly to their overall robustness and security.
A detailed walkthrough to Aave V3's Liquidation Close Factor: Rules and Rationale - Explore the Aave V3 Close Factor, which defines the maximum debt repayable in one liquidation event. Learn the specific conditions for the 50% total debt cap and its role in preventing "dust" and incentivizing liquidators.
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