Verification checklist
- From one getUserAccountData call, read collateral, debt, available borrows, liquidation threshold, LTV, and health factor. Do not keep only one of the two percentages.
- Base amounts use 8 decimals. LTV and the liquidation threshold are percentages with 4 decimals. The health factor has 18 decimals. 8000 means 80.00 percent, not 8000 percent.
- The health factor's numerator uses the liquidation threshold, not LTV. When debt is above max borrow and below the liquidation line, write "borrowing blocked, not yet liquidatable."
- Call the position liquidatable only when the health factor is below 10 to the 18th. The bonus and the close factor are questions for after that line.
1. Max borrow and liquidation eligibility are not the same line
A common sentence in a note is "the borrow is maxed, so the next dip liquidates it." That sentence welds two gates into one. Aave's risk-parameter notes separate them. LTV is the maximum that can be borrowed against a collateral. The liquidation threshold is the percentage at which the position is defined as undercollateralised. The gap between them is described as a safety buffer for the borrower. The health factor's numerator is collateral value times the liquidation threshold, not times LTV. The same page says a position may be liquidated when the health factor is below 1. Aave's liquidation page uses the same formula: total collateral value times the weighted liquidation threshold, divided by total borrows.
The site's earlier liquidation note asks something else: how an oracle delay can push many positions over the line together, and how the bonus and the close factor split the position once it is over. That worked example uses one collateral factor for both the borrow cap and the health factor, and only mentions in passing that some protocols store two parameters. This note assumes the price scale has already been checked, and asks about the gap those two parameters open. Debt can already exceed max borrow while the health factor is still above 1. It is also not the utilization note. That one asks whether the displayed APY still has pool capacity at your size. This one asks which of two gates on the same position decides "liquidatable."
2. A worked example: debt of 8200 sits between 8000 and 8500
The teaching position has one collateral and one debt. The parameters are chosen so the debt falls in the gap. They are not a live market's current governance values. Collateral is worth 10000 in the quote unit. LTV is 80 percent, so max borrow is 8000. The liquidation threshold is 85 percent, so the liquidation line is 8500. Current debt is 8200. Because 8200 is above 8000, available borrows are 0 and a new borrow fails the LTV gate. Because 8200 is below 8500, the health factor is 8500 divided by 8200, about 1.0366, which is above 1. Under the documented rule, that is not yet liquidatable.
| Field | Teaching value | Reading |
|---|---|---|
| Collateral value | 10000 | One collateral, already in quote units |
| LTV | 80 percent | Max borrow 8000 |
| Liquidation threshold | 85 percent | Liquidation line 8500 |
| Current debt | 8200 | Between 8000 and 8500 |
| Health factor | about 1.0366 | 8500 / 8200, above 1 |
| If LTV is substituted | about 0.9756 | 8000 / 8200, below 1, the boolean flips |
The raw integers from the same call belong in the record. On Aave V3's scales, base amounts have 8 decimals, so 10000 is 1000000000000 and 8200 is 820000000000. LTV and the liquidation threshold are percentages with 4 decimals: 80 percent is 8000, and 85 percent is 8500. The health factor has 18 decimals. Collateral times the threshold, divided by debt in wad math, is 1036585365853658537, which is above 10 to the 18th. Substituting 8000 in the numerator produces 975609756097560976, which is below 10 to the 18th. One position, two formulas, two opposite booleans. If the red label on a panel comes from the second formula, a note that copies "liquidatable" has painted over the buffer.
For the liquidation line to fall exactly onto 8200, collateral value has to fall to about 9647, roughly 3.53 percent below 10000. Inside that 3.53 percent, new borrowing has already stopped and liquidation has not started. That interval is the gap the risk parameters say they keep. A note that rewrites "cannot borrow more" as "already in liquidation" sets the width of the interval to zero.
3. Six return values, one call, three scales
Pool.getUserAccountData returns total collateral, total debt, available borrows, the current liquidation threshold, LTV, and the health factor together. The account-level threshold is already the value-weighted average of the collateral assets. When the position holds two collaterals, do not replace currentLiquidationThreshold with the configured threshold of only one asset. The pair on an asset's configuration page and the pair on the account at this block can differ.
The scales do not mix. 8000 is not 8000 percent. Multiplying collateral by that raw integer inflates borrow capacity a hundredfold. Compare the raw health factor with 10 to the 18th, not with the integer 1. Compared with 1, almost every healthy position looks already below the line. Available borrows of 0 only say the LTV gate is full, or that price moves have pushed debt past max borrow. That field does not read the liquidation threshold, so it cannot stand in for the health factor. With no debt, the health factor comes back as a very large integer, meaning the division has no denominator. That large value is "nothing to liquidate," not "risk is unbounded."
4. A screen: debt between the lines is not "liquidatable"
The teaching screen is ordered. First, the same call has to contain both LTV and the liquidation threshold. A protocol that stores only one percentage is recorded as "gap not observable." Do not invent a buffer the contract does not have. Second, scale each field before comparing. Third, when debt is above collateral times LTV, below collateral times the liquidation threshold, and the health factor is at or above 10 to the 18th, write that borrowing is blocked and the position is not yet liquidatable. Fourth, call it liquidatable only when the health factor is below 10 to the 18th. The docs use strictly below 1. Equal to 1 has not crossed. The 0.9756 produced by substituting LTV does not override the fourth step.
The liquidation bonus and the fraction that can be repaid in one call come after the line. They decide how much a liquidator can clear and at what discount. They do not decide whether the position has crossed. Reading a 50 percent close factor backwards as "so the liquidation line should sit lower" is a different mistake. The site's liquidation note covers the bonus, the keepers, and the cascade after the cross. This screen stops before the cross. A wrong price scale moves both lines together. That is the feed-decimals note, and rereading LTV next to the threshold does not repair it. A correct scale also does not merge the two lines.
5. Keep a record another researcher can replay
The minimum fields are: chain id, block number and hash, Pool address, user address, the six raw return values, scaled collateral, debt, LTV, liquidation threshold, health factor, and available borrows, plus which percentage entered the health factor. Two reads a block apart are two rows. Do not pair a new debt with an old threshold. With several collaterals, also store each asset's configured threshold, and state that the account return is the weighted result.
Reconcile in a fixed order: whether all six fields came from one read, whether the three scales were kept apart, which side of the two lines the debt is on, how the health factor compares with 10 to the 18th, and only then the bonus and the close factor. A note that only copies a front-end sentence "borrow limit reached" stops at "the two lines were not separated." If reproducing a repayment's effect on the health factor means acquiring a small amount of the debt asset, put the swap in a fee footnote. It does not belong in the liquidatable-or-not result.
6. Liquidatable refers to the threshold line only
The weak sentence is "new borrowing is blocked, so this position can be liquidated." A useful one is "LTV; liquidation threshold; which side the debt is on; whether the raw health factor is below 10 to the 18th." LTV closes new borrowing. The liquidation threshold is what enters the health factor. The stretch between the lines is a buffer the parameters are built to keep. It is not a rounding error a red label can erase.
This is a research framework. The definitions of LTV, the liquidation threshold, and the health factor come from Aave's risk parameters, liquidation page, and Pool interface. The figures 8000, 8500, 8200, and the health factor computed from them are hypothetical. No live market or account was measured, and this is not investment advice.