Module 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::ui_pool_data_provider_v3
@title UI Pool Data Provider V3 Module @author Aave @notice Provides data for UI about Aave protocol pool and user reserve states
- Resource
AggregatedReserveData
- Resource
UserReserveData
- Resource
BaseCurrencyInfo
- Constants
- Function
get_reserves_list
- Function
get_reserves_data
- Function
get_user_reserves_data
use 0x1::aptos_coin;
use 0x1::dispatchable_fungible_asset;
use 0x1::fungible_asset;
use 0x1::object;
use 0x1::primary_fungible_store;
use 0x1::string;
use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config;
use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config;
use 0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9::oracle;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::coin_migrator;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::default_reserve_interest_rate_strategy;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::emode_logic;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_data_provider;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::variable_debt_token_factory;
Resource AggregatedReserveData
@notice Aggregated reserve data structure @param underlying_asset The address of the underlying asset @param name The name of the reserve @param symbol The symbol of the reserve @param decimals The number of decimals of the reserve @param base_ltv_as_collateral The base LTV as collateral @param reserve_liquidation_threshold The reserve liquidation threshold @param reserve_liquidation_bonus The reserve liquidation bonus @param reserve_factor The reserve factor @param usage_as_collateral_enabled Whether the reserve can be used as collateral @param borrowing_enabled Whether borrowing is enabled @param is_active Whether the reserve is active @param is_frozen Whether the reserve is frozen @param liquidity_index The liquidity index @param variable_borrow_index The variable borrow index @param liquidity_rate The liquidity rate @param variable_borrow_rate The variable borrow rate @param last_update_timestamp The last update timestamp @param a_token_address The address of the aToken @param variable_debt_token_address The address of the variable debt token @param available_liquidity The available liquidity @param total_scaled_variable_debt The total scaled variable debt @param price_in_market_reference_currency The price in market reference currency @param variable_rate_slope1 The variable rate slope 1 @param variable_rate_slope2 The variable rate slope 2 @param base_variable_borrow_rate The base variable borrow rate @param optimal_usage_ratio The optimal usage ratio @param is_paused Whether the reserve is paused @param is_siloed_borrowing Whether siloed borrowing is enabled @param accrued_to_treasury The amount accrued to the treasury @param isolation_mode_total_debt The isolation mode total debt @param flash_loan_enabled Whether flash loans are enabled @param debt_ceiling The debt ceiling @param debt_ceiling_decimals The debt ceiling decimals @param e_mode_category_id The e-mode category ID @param borrow_cap The borrow cap @param supply_cap The supply cap @param e_mode_ltv The e-mode LTV @param e_mode_liquidation_threshold The e-mode liquidation threshold @param e_mode_liquidation_bonus The e-mode liquidation bonus @param e_mode_label The e-mode label @param borrowable_in_isolation Whether the reserve is borrowable in isolation @param deficit The deficit @param virtual_underlying_balance The virtual underlying balance @param is_virtual_acc_active Whether the virtual account is active
struct AggregatedReserveData has drop, store, key
Resource UserReserveData
@notice User reserve data structure @param decimals The number of decimals of the reserve @param underlying_asset The address of the underlying asset @param scaled_a_token_balance The scaled aToken balance @param usage_as_collateral_enabled_on_user Whether usage as collateral is enabled for the user @param scaled_variable_debt The scaled variable debt
struct UserReserveData has drop, store, key
Resource BaseCurrencyInfo
@notice Base currency information structure @param market_reference_currency_unit The market reference currency unit @param market_reference_currency_price_in_usd The market reference currency price in USD @param network_base_token_price_in_usd The network base token price in USD @param network_base_token_price_decimals The network base token price decimals
struct BaseCurrencyInfo has drop, store, key
Constants
@notice Currency unit for USD representation
const USD_CURRENCY_UNIT: u256 = 1000000000000000000;
Function get_reserves_list
@notice Gets the list of reserves in the pool @return Vector of reserve addresses
#[view]
public fun get_reserves_list(): vector<address>
Function get_reserves_data
@notice Gets data for all reserves in the pool @return Tuple containing vector of aggregated reserve data and base currency information
#[view]
public fun get_reserves_data(): (vector<ui_pool_data_provider_v3::AggregatedReserveData>, ui_pool_data_provider_v3::BaseCurrencyInfo)
Function get_user_reserves_data
@notice Gets data for all reserves for a specific user @param user The address of the user @return Tuple containing vector of user reserve data and the user's e-mode category ID
#[view]
public fun get_user_reserves_data(user: address): (vector<ui_pool_data_provider_v3::UserReserveData>, u8)