DEV Community

叶稼辰
叶稼辰

Posted on

Aave V3 Liquidation Explained — How to Calculate Your Safety Buffer

Aave V3 Liquidation Explained — How to Calculate Your Safety Buffer

If you use Aave for leveraged positions, understanding exactly when liquidation happens is critical. Here is how to calculate your liquidation price.

The Formula

Health Factor = (Collateral × Liquidation Threshold) / Total Debt

Liquidation occurs when Health Factor drops below 1.0. To find your liquidation price, work backwards from the current numbers.

If you have WETH as collateral at $1445 with a collateral value of $22.32 and debt of $17.56, your health factor is approximately 1.055. The liquidation threshold for WETH on Aave V3 is typically 83 percent. This means your WETH collateral would need to drop about 5.2 percent to approximately $1369 for liquidation to trigger.

Why This Matters

A 5 percent buffer is very thin. Crypto assets can move 5 percent in minutes during volatile periods. If you are running with a health factor below 1.1, you should either add collateral, repay some debt, or set price alerts.

How to Monitor

Use web3.py to query the Aave Pool contract on Polygon. The getUserAccountData function returns all the numbers you need. Poll every few minutes and trigger an alert if the health factor drops below 1.1.

Never rely on the Aave UI alone. Build your own monitoring. The difference between catching a liquidation early and finding out after the fact can be your entire collateral.

Part of my DeFi safety series. Follow for more.

Top comments (0)