5ī¸Storage
Essential reserves and users information.
This module provides key information related to the reserves in the lending pool and user-specific data, such as asset holdings and balances. They are crucial for tracking the state of the protocol and individual user interactions, helping developers and users manage their assets within the NAVI protocol.
get_reserves_count
Description: This function returns the number of reserve assets available in the storage pool. It provides an overview of how many different assets are being managed in the lending protocol.
Use Cases: This function is used when a developer or user needs to know the total number of asset reserves in the pool, typically for pool status checks or when initializing interactions with multiple reserves.
get_user_assets
Description: This function retrieves the list of assets and their respective balances held by a specific user within the storage pool. It returns vectors representing the asset IDs and their corresponding values.
Use Cases: This function is used to get a comprehensive view of a user's asset holdings in the lending pool, useful for portfolio management or determining eligibility for borrowing and rewards.
get_user_balance
Description: This function returns the balance of a specific asset for a given user, including both supply and borrow amounts. It is essential for tracking the user's positions within the lending protocol.
Use Cases: This function is used when a user or developer needs to check the current balance of an asset supplied or borrowed by a specific user, which is critical for monitoring positions and potential liquidation risks.
Last updated