Degen Code

Degen Code

Aave — Part V

Liquidation Valuation & User Asset Discovery

Dec 18, 2025
∙ Paid

We discovered in Part IV that liquidatable positions are frequently present on Aave. But it’s not enough to find all the positions below the liquidation threshold and clear them out — position size and gas fees factor into the overall profit.

An Aave user can have multiple collateral deposits and borrows across the platform. But Aave tracks only that user’s overall health factor. We saw this when calling the getUserAccountData function on the Pool contract.

The collateral, debt, and available borrowing capacity values reported by that function are expressed in terms of a common base currency. This base currency is not defined by Aave, it is largely a function of the oracles used for each reserve asset. For example, to determine the collateral value of WETH against the debt value of USDC, an intermediate base currency is used. The Mainnet market uses USD as this intermediate.

So we must always be aware that Aave measures user health against this base currency. Aave reserve assets move against USD and against each other, which makes accounting more complex.

Example: if you’re considering a liquidation of a WBTC loan backed by WETH, you must be aware of at least three prices:

Keep reading with a 7-day free trial

Subscribe to Degen Code to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 BowTiedDevil · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture