Aave Health Factor Calculator for Users on Chain


I'm curious about how often the health factor for each user is recalculated on chain. Is it schedule-based or events-based? I would like to gain some insights into the frequency of recalculation of the health factor to assist me in developing my financial application.

Answers 2

The HF is not stored on-chain, is the output of a mathematical function and calculated when needed, i would encourage you to take a look at the code [here ](https://github.com/aave/aave-v3-core/blob/f3e037b3638e3b7c98f0c09c56c5efde54f7c5d2/contracts/protocol/libraries/logic/GenericLogic.sol#L183).

Have same question