This module contains calculation functions used for determining user-specific and potential future state values in the NAVI lending and borrowing.
This module includes functions to dynamically calculate a user's health factor, collateral value, loan value, APY, and more, accounting for potential changes in the user's balances.
It is utilized for risk management and user-interface purposes, such as determining whether a user's actions might put their account at risk of liquidation, or providing insights into the potential impact of a user's intended actions on their account.
dynamic_health_factor
Description: This function calculates a user's dynamic health factor, considering potential changes in their supply and borrow balances. It helps assess the user's risk level in relation to liquidation.
Use Cases: This function is used when estimating how a user's health factor would be affected by an increase or decrease in their supplied or borrowed assets. It is critical for risk management and liquidation prevention.
Since the upgrade to V3 incentives, V2 is no longer in use, so its APY will remain at 0. Don't use this function to fetch APY data.
Description: This function calculates the dynamic APY for IncentiveV2 based on changes in a user's supply and borrow balances. It provides both the supply APY and borrow APY.
Use Cases: This function is used to estimate how changes in a user's supply and borrow amounts will impact their expected yield. It is essential for users deciding whether to adjust their positions in a lending pool.