# Table of Contents - [Wad Ray Utils - Aave Aptos Docs](#wad-ray-utils-aave-aptos-docs) - [Generic Logic - Aave Aptos Docs](#generic-logic-aave-aptos-docs) - [Liquidation Logic - Aave Aptos Docs](#liquidation-logic-aave-aptos-docs) - [Collector - Aave Aptos Docs](#collector-aave-aptos-docs) - [User Config - Aave Aptos Docs](#user-config-aave-aptos-docs) - [Pool Data Provider - Aave Aptos Docs](#pool-data-provider-aave-aptos-docs) - [Default IR Strategy - Aave Aptos Docs](#default-ir-strategy-aave-aptos-docs) - [Math Utils - Aave Aptos Docs](#math-utils-aave-aptos-docs) - [Flashloan Logic - Aave Aptos Docs](#flashloan-logic-aave-aptos-docs) - [Reserve Config - Aave Aptos Docs](#reserve-config-aave-aptos-docs) - [Helper - Aave Aptos Docs](#helper-aave-aptos-docs) - [Aave Aptos Docs](#aave-aptos-docs) - [Borrow Logic - Aave Aptos Docs](#borrow-logic-aave-aptos-docs) - [Events - Aave Aptos Docs](#events-aave-aptos-docs) - [Isolation Mode Logic - Aave Aptos Docs](#isolation-mode-logic-aave-aptos-docs) - [Pool Fee Manager - Aave Aptos Docs](#pool-fee-manager-aave-aptos-docs) - [Emode Logic - Aave Aptos Docs](#emode-logic-aave-aptos-docs) - [Revision - Aave Aptos Docs](#revision-aave-aptos-docs) - [Manage - Aave Aptos Docs](#manage-aave-aptos-docs) - [Oracle - Aave Aptos Docs](#oracle-aave-aptos-docs) - [Rewards Distributor - Aave Aptos Docs](#rewards-distributor-aave-aptos-docs) - [Pool Logic - Aave Aptos Docs](#pool-logic-aave-aptos-docs) - [Error Config - Aave Aptos Docs](#error-config-aave-aptos-docs) - [Large Packages - Aave Aptos Docs](#large-packages-aave-aptos-docs) - [Pool - Aave Aptos Docs](#pool-aave-aptos-docs) - [Pool Configurator - Aave Aptos Docs](#pool-configurator-aave-aptos-docs) - [Supply Logic - Aave Aptos Docs](#supply-logic-aave-aptos-docs) - [Pool Token Logic - Aave Aptos Docs](#pool-token-logic-aave-aptos-docs) - [Fungible Asset Manager - Aave Aptos Docs](#fungible-asset-manager-aave-aptos-docs) - [Coin Migrator - Aave Aptos Docs](#coin-migrator-aave-aptos-docs) - [Emission Manager - Aave Aptos Docs](#emission-manager-aave-aptos-docs) - [UI Incentive Data Provider V3 - Aave Aptos Docs](#ui-incentive-data-provider-v3-aave-aptos-docs) - [Rewards Controller - Aave Aptos Docs](#rewards-controller-aave-aptos-docs) - [A Token Factory - Aave Aptos Docs](#a-token-factory-aave-aptos-docs) - [Mock Underlyings Token - Aave Aptos Docs](#mock-underlyings-token-aave-aptos-docs) - [Token Base - Aave Aptos Docs](#token-base-aave-aptos-docs) - [Transfer Strategy - Aave Aptos Docs](#transfer-strategy-aave-aptos-docs) - [User Logic - Aave Aptos Docs](#user-logic-aave-aptos-docs) - [Variable Debt Token Factory - Aave Aptos Docs](#variable-debt-token-factory-aave-aptos-docs) - [Validation Logic - Aave Aptos Docs](#validation-logic-aave-aptos-docs) - [UI Pool Data Provider V3 - Aave Aptos Docs](#ui-pool-data-provider-v3-aave-aptos-docs) --- # Wad Ray Utils - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Math * Wad Ray Utils * * * Module `0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math` ========================================================================================= @title WadRayMath library @author Aave @notice Provides functions to perform calculations with Wad and Ray units @dev Provides mul and div function for wads (decimal numbers with 18 digits of precision) and rays (decimal numbers with 27 digits of precision) @dev Operations are rounded. If a value is >=.5, will be rounded up, otherwise rounded down. * [Constants](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#@Constants_0) * [Function `wad`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_wad) * [Function `half_wad`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_half_wad) * [Function `ray`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_ray) * [Function `half_ray`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_half_ray) * [Function `wad_mul`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_wad_mul) * [Function `wad_div`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_wad_div) * [Function `ray_mul`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_ray_mul) * [Function `ray_mul_up`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_ray_mul_up) * [Function `ray_mul_down`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_ray_mul_down) * [Function `ray_div`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_ray_div) * [Function `ray_div_up`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_ray_div_up) * [Function `ray_div_down`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_ray_div_down) * [Function `ray_to_wad`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_ray_to_wad) * [Function `wad_to_ray`](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_wad_ray_math_wad_to_ray) use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; Constants --------- @notice Maximum value for u256 const U256_MAX: u256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935; @notice 5 \* 10^26 - Half RAY, used for rounding const HALF_RAY: u256 = 500000000000000000000000000; @notice 5 \* 10^17 - Half WAD, used for rounding const HALF_WAD: u256 = 500000000000000000; @notice 10^27 - Used for calculations in ray (27 decimals) const RAY: u256 = 1000000000000000000000000000; @notice 10^18 - Used for calculations in wad (18 decimals) const WAD: u256 = 1000000000000000000; @notice 10^9 - The ratio between ray and wad (ray/wad) const WAD_RAY_RATIO: u256 = 1000000000; Function `wad` -------------- @notice Returns the WAD value (10^18) @return The WAD constant public fun wad(): u256 Function `half_wad` ------------------- @notice Returns the HALF\_WAD value (5 \* 10^17) @return The HALF\_WAD constant public fun half_wad(): u256 Function `ray` -------------- @notice Returns the RAY value (10^27) @return The RAY constant public fun ray(): u256 Function `half_ray` ------------------- @notice Returns the HALF\_RAY value (5 \* 10^26) @return The HALF\_RAY constant public fun half_ray(): u256 Function `wad_mul` ------------------ @notice Multiplies two wad, rounding half up to the nearest wad @param a First wad value @param b Second wad value @return c Result of a\*b, in wad public fun wad_mul(a: u256, b: u256): u256 Function `wad_div` ------------------ @notice Divides two wad, rounding half up to the nearest wad @param a Wad numerator @param b Wad denominator @return c Result of a/b, in wad public fun wad_div(a: u256, b: u256): u256 Function `ray_mul` ------------------ @notice Multiplies two ray, rounding half up to the nearest ray @param a First ray value @param b Second ray value @return c Result of a\*b, in ray public fun ray_mul(a: u256, b: u256): u256 Function `ray_mul_up` --------------------- @notice Multiplies two ray, always rounding up to the nearest ray @param a First ray value @param b Second ray value @return c Result of a\*b, in ray, rounded up public fun ray_mul_up(a: u256, b: u256): u256 Function `ray_mul_down` ----------------------- @notice Multiplies two ray, always rounding down to the nearest ray @param a First ray value @param b Second ray value @return c Result of a\*b, in ray, rounded down public fun ray_mul_down(a: u256, b: u256): u256 Function `ray_div` ------------------ @notice Divides two ray, rounding half up to the nearest ray @param a Ray numerator @param b Ray denominator @return c Result of a/b, in ray public fun ray_div(a: u256, b: u256): u256 Function `ray_div_up` --------------------- @notice Divides two ray, always rounding up to the nearest ray @param a Ray numerator @param b Ray denominator @return c Result of a/b, in ray, rounded up public fun ray_div_up(a: u256, b: u256): u256 Function `ray_div_down` ----------------------- @notice Divides two ray, always rounding down to the nearest ray @param a Ray numerator @param b Ray denominator @return c Result of a/b, in ray, rounded down public fun ray_div_down(a: u256, b: u256): u256 Function `ray_to_wad` --------------------- @notice Casts ray down to wad @param a Ray value to convert @return b The value converted to wad, rounded half up to the nearest wad public fun ray_to_wad(a: u256): u256 Function `wad_to_ray` --------------------- @notice Converts wad up to ray @param a Wad value to convert @return b The value converted to ray, rounded half up to the nearest ray public fun wad_to_ray(a: u256): u256 [« Previous](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/) [Next »](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/) --- # Generic Logic - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Generic Logic * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::generic_logic` ========================================================================================== @title Generic Logic module @author Aave @notice Implements protocol-level logic to calculate and validate the state of a user * [Function `calculate_user_account_data`](https://aave.github.io/aptos-aave-v3/aave-pool/generic_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_generic_logic_calculate_user_account_data) * [Function `calculate_available_borrows`](https://aave.github.io/aptos-aave-v3/aave-pool/generic_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_generic_logic_calculate_available_borrows) use 0x1::object; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9::oracle; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::variable_debt_token_factory; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Function `calculate_user_account_data` -------------------------------------- @notice Calculates the user data across the reserves. @dev It includes the total liquidity/collateral/borrow balances in the base currency used by the price feed, the average Loan To Value, the average Liquidation Ratio, and the Health factor. @param user\_config\_map The user configuration map @param reserves\_count The number of reserves @param user The address of the user @param user\_emode\_category The category of the user in the emode @param emode\_ltv The ltv of the user in the emode @param emode\_liq\_threshold The liquidation threshold of the user in the emode @return The total collateral of the user in the base currency used by the price feed @return The total debt of the user in the base currency used by the price feed @return The average ltv of the user @return The average liquidation threshold of the user @return The health factor of the user @return True if the user has a zero-LTV asset enabled as collateral public fun calculate_user_account_data(user_config_map: &user_config::UserConfigurationMap, reserves_count: u256, user: address, user_emode_category: u8, emode_ltv: u256, emode_liq_threshold: u256): (u256, u256, u256, u256, u256, bool) Function `calculate_available_borrows` -------------------------------------- @notice Calculates the maximum amount that can be borrowed depending on the available collateral, the total debt and the average Loan To Value @param total\_collateral\_in\_base\_currency The total collateral in the base currency used by the price feed @param total\_debt\_in\_base\_currency The total borrow balance in the base currency used by the price feed @param ltv The average loan to value @return The amount available to borrow in the base currency of the used by the price feed public fun calculate_available_borrows(total_collateral_in_base_currency: u256, total_debt_in_base_currency: u256, ltv: u256): u256 [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/fungible_asset_manager/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/isolation_mode_logic/) --- # Liquidation Logic - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Liquidation Logic * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::liquidation_logic` ============================================================================================== @title liquidation\_logic module @author Aave @notice Implements actions involving management of collateral in the protocol, the main one being the liquidations * [Struct `DeficitCreated`](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_liquidation_logic_DeficitCreated) * [Struct `LiquidationCall`](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_liquidation_logic_LiquidationCall) * [Struct `LiquidationCallLocalVars`](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_liquidation_logic_LiquidationCallLocalVars) * [Struct `ExecuteLiquidationCallParams`](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_liquidation_logic_ExecuteLiquidationCallParams) * [Struct `AvailableCollateralToLiquidateLocalVars`](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_liquidation_logic_AvailableCollateralToLiquidateLocalVars) * [Constants](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/#@Constants_0) * [Function `liquidation_call`](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_liquidation_logic_liquidation_call) use 0x1::event; use 0x1::object; use 0x1::signer; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9::oracle; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::emode_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::events; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::fungible_asset_manager; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::generic_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::isolation_mode_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::validation_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::variable_debt_token_factory; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Struct `DeficitCreated` ----------------------- @notice Emitted when a deficit is created in the protocol @param user The address of the user whose debt created the deficit @param debt\_asset The address of the debt asset @param amount\_created The amount of deficit created #[event] struct DeficitCreated has drop, store Struct `LiquidationCall` ------------------------ @dev Emitted when a borrower is liquidated. @param collateral\_asset The address of the underlying asset used as collateral, to receive as result of the liquidation @param debt\_asset The address of the underlying borrowed asset to be repaid with the liquidation @param user The address of the borrower getting liquidated @param debt\_to\_cover The debt amount of borrowed `asset` the liquidator wants to cover @param liquidated\_collateral\_amount The amount of collateral received by the liquidator @param liquidator The address of the liquidator @param receive\_a\_token True if the liquidators wants to receive the collateral aTokens, `**false**` if he wants to receive the underlying collateral asset directly #[event] struct LiquidationCall has drop, store Struct `LiquidationCallLocalVars` --------------------------------- @notice Local variables for liquidation call function @dev Used to avoid stack too deep errors struct LiquidationCallLocalVars has drop Struct `ExecuteLiquidationCallParams` ------------------------------------- @notice Parameters for execute liquidation call function @dev Used to pass parameters to helper functions struct ExecuteLiquidationCallParams has drop Struct `AvailableCollateralToLiquidateLocalVars` ------------------------------------------------ @notice Local variables for calculate available collateral to liquidate function @dev Used to avoid stack too deep errors struct AvailableCollateralToLiquidateLocalVars has drop Constants --------- @dev This constant represents below which health factor value it is possible to liquidate an amount of debt corresponding to `MAX_LIQUIDATION_CLOSE_FACTOR`. A value of 0.95e18 results in 0.95 0.95 \* 10 \*\* 18 const CLOSE_FACTOR_HF_THRESHOLD: u256 = 950000000000000000; @dev Default percentage of borrower's debt to be repaid in a liquidation. @dev Percentage applied when the users health factor is above `[CLOSE_FACTOR_HF_THRESHOLD](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/liquidation_logic.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_liquidation_logic_CLOSE_FACTOR_HF_THRESHOLD) ` Expressed in bps, a value of 0.5e4 results in 50.00% 5 \* 10 \*\* 3 const DEFAULT_LIQUIDATION_CLOSE_FACTOR: u256 = 5000; @dev This constant represents a base value threshold. If the total collateral or debt on a position is below this threshold, the close factor is raised to 100%. @notice The default value assumes that the basePrice is usd denominated by 18 decimals and needs to be adjusted in a non USD-denominated pool. 2000 \* 10 \*\* 18, since CL's price is always 18 decimals on Aptos. const MIN_BASE_MAX_CLOSE_FACTOR_THRESHOLD: u256 = 500000000000000000000; @dev This constant represents the minimum amount of assets in base currency that need to be leftover after a liquidation, if not clearing a position completely. This parameter is inferred from MIN\_BASE\_MAX\_CLOSE\_FACTOR\_THRESHOLD as the logic is dependent. Assuming a MIN\_BASE\_MAX\_CLOSE\_FACTOR\_THRESHOLD of `n` a liquidation of `n+1` might result in `n/2` leftover which is assumed to be still economically liquidatable. This mechanic was introduced to ensure liquidators don't optimize gas by leaving some wei on the liquidation. const MIN_LEFTOVER_BASE: u256 = 250000000000000000000; Function `liquidation_call` --------------------------- @notice Function to liquidate a position if its Health Factor drops below 1. The caller (liquidator) @dev Emits the `[LiquidationCall](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/liquidation_logic.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_liquidation_logic_LiquidationCall) ()` event, and the `[DeficitCreated](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/liquidation_logic.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_liquidation_logic_DeficitCreated) ()` event if the liquidation results in bad debt @param account The account signer of the caller @param collateral\_asset The address of the underlying asset used as collateral, to receive as result of the liquidation @param debt\_asset The address of the underlying borrowed asset to be repaid with the liquidation @param user The address of the borrower getting liquidated @param debt\_to\_cover The debt amount of borrowed `asset` the liquidator wants to cover @param receive\_a\_token True if the liquidators wants to receive the collateral aTokens, `**false**` if he wants to receive the underlying collateral asset directly public entry fun liquidation_call(account: &signer, collateral_asset: address, debt_asset: address, user: address, debt_to_cover: u256, receive_a_token: bool) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/isolation_mode_logic/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/pool/) --- # Collector - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Collector * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::collector` ====================================================================================== @title Collector Module @author Aave @notice Implements functionality to manage collected fees in the protocol * [Resource `CollectorData`](https://aave.github.io/aptos-aave-v3/aave-pool/collector/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_collector_CollectorData) * [Constants](https://aave.github.io/aptos-aave-v3/aave-pool/collector/#@Constants_0) * [Function `is_funds_admin`](https://aave.github.io/aptos-aave-v3/aave-pool/collector/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_collector_is_funds_admin) * [Function `collector_address`](https://aave.github.io/aptos-aave-v3/aave-pool/collector/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_collector_collector_address) * [Function `get_collected_fees`](https://aave.github.io/aptos-aave-v3/aave-pool/collector/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_collector_get_collected_fees) * [Function `withdraw`](https://aave.github.io/aptos-aave-v3/aave-pool/collector/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_collector_withdraw) use 0x1::account; use 0x1::fungible_asset; use 0x1::object; use 0x1::primary_fungible_store; use 0x1::signer; use 0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_token_logic; Resource `CollectorData` ------------------------ @notice Data structure to store the collector's resource account capability struct CollectorData has key Constants --------- @notice Collector name for resource account creation const COLLECTOR_NAME: vector = [65, 65, 86, 69, 95, 67, 79, 76, 76, 69, 67, 84, 79, 82]; Function `is_funds_admin` ------------------------- @notice Checks if an account is a funds admin @param account The address to check @return True if the account is a funds admin, false otherwise #[view] public fun is_funds_admin(account: address): bool Function `collector_address` ---------------------------- @notice Returns the address of the collector @return The address of the collector resource account #[view] public fun collector_address(): address Function `get_collected_fees` ----------------------------- @notice Gets the amount of collected fees for a specific asset @param asset The address of the asset to check @return The amount of collected fees #[view] public fun get_collected_fees(asset: address): u64 Function `withdraw` ------------------- @notice Withdraws collected fees from the collector @dev Only callable by funds admin @param sender The signer account of the caller @param asset The address of the asset to withdraw @param receiver The address that will receive the withdrawn assets @param amount The amount to withdraw public entry fun withdraw(sender: &signer, asset: address, receiver: address, amount: u64) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/coin_migrator/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/) --- # User Config - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Config * User Config * * * Module `0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config` ======================================================================================== @title UserConfiguration library @author Aave @notice Implements the bitmap logic to handle the user configuration * [Struct `UserConfigurationMap`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_UserConfigurationMap) * [Constants](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#@Constants_0) * [Function `get_interest_rate_mode_none`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_get_interest_rate_mode_none) * [Function `get_interest_rate_mode_variable`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_get_interest_rate_mode_variable) * [Function `get_borrowing_mask`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_get_borrowing_mask) * [Function `get_collateral_mask`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_get_collateral_mask) * [Function `get_minimum_health_factor_liquidation_threshold`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_get_minimum_health_factor_liquidation_threshold) * [Function `get_health_factor_liquidation_threshold`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_get_health_factor_liquidation_threshold) * [Function `is_using_as_collateral_or_borrowing`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_is_using_as_collateral_or_borrowing) * [Function `is_borrowing`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_is_borrowing) * [Function `is_using_as_collateral`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_is_using_as_collateral) * [Function `is_using_as_collateral_one`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_is_using_as_collateral_one) * [Function `is_using_as_collateral_any`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_is_using_as_collateral_any) * [Function `is_borrowing_one`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_is_borrowing_one) * [Function `is_borrowing_any`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_is_borrowing_any) * [Function `is_empty`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_is_empty) * [Function `get_first_asset_id_by_mask`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_get_first_asset_id_by_mask) * [Function `init`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_init) * [Function `set_borrowing`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_set_borrowing) * [Function `set_using_as_collateral`](https://aave.github.io/aptos-aave-v3/aave-config/user_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_user_config_set_using_as_collateral) use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::helper; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; Struct `UserConfigurationMap` ----------------------------- @notice Structure that stores the user configuration as a bitmap struct UserConfigurationMap has copy, drop, store Constants --------- @notice Bitmap mask for borrowing bits const BORROWING_MASK: u256 = 38597363079105398474523661669562635951089994888546854679819194669304376546645; @notice Bitmap mask for collateral bits const COLLATERAL_MASK: u256 = 77194726158210796949047323339125271902179989777093709359638389338608753093290; @notice Minimum health factor to consider a user position healthy @dev A value of 1e18 results in 1 @dev 1 \* 10 \*\* 18 const HEALTH_FACTOR_LIQUIDATION_THRESHOLD: u256 = 1000000000000000000; @notice Interest rate mode constant indicating no interest rate const INTEREST_RATE_MODE_NONE: u8 = 0; @notice Interest rate mode constant for variable rate @dev 1 = Stable Rate, 2 = Variable Rate, Since the Stable Rate service has been removed, only the Variable Rate service is retained. const INTEREST_RATE_MODE_VARIABLE: u8 = 2; @notice Minimum health factor allowed under any circumstance @dev A value of 0.95e18 results in 0.95 @dev 0.95 \* 10 \*\* 18 const MINIMUM_HEALTH_FACTOR_LIQUIDATION_THRESHOLD: u256 = 950000000000000000; Function `get_interest_rate_mode_none` -------------------------------------- @notice Returns the interest rate mode none constant @return The interest rate mode none value public fun get_interest_rate_mode_none(): u8 Function `get_interest_rate_mode_variable` ------------------------------------------ @notice Returns the interest rate mode variable constant @return The interest rate mode variable value public fun get_interest_rate_mode_variable(): u8 Function `get_borrowing_mask` ----------------------------- @notice Returns the borrowing mask constant @return The borrowing mask value public fun get_borrowing_mask(): u256 Function `get_collateral_mask` ------------------------------ @notice Returns the collateral mask constant @return The collateral mask value public fun get_collateral_mask(): u256 Function `get_minimum_health_factor_liquidation_threshold` ---------------------------------------------------------- @notice Returns the minimum health factor liquidation threshold constant @return The minimum health factor liquidation threshold value public fun get_minimum_health_factor_liquidation_threshold(): u256 Function `get_health_factor_liquidation_threshold` -------------------------------------------------- @notice Returns the health factor liquidation threshold constant @return The health factor liquidation threshold value public fun get_health_factor_liquidation_threshold(): u256 Function `is_using_as_collateral_or_borrowing` ---------------------------------------------- @notice Returns if a user has been using the reserve for borrowing or as collateral @param self The configuration object @param reserve\_index The index of the reserve in the bitmap @return True if the user has been using a reserve for borrowing or as collateral, false otherwise public fun is_using_as_collateral_or_borrowing(self: &user_config::UserConfigurationMap, reserve_index: u256): bool Function `is_borrowing` ----------------------- @notice Validate a user has been using the reserve for borrowing @param self The configuration object @param reserve\_index The index of the reserve in the bitmap @return True if the user has been using a reserve for borrowing, false otherwise public fun is_borrowing(self: &user_config::UserConfigurationMap, reserve_index: u256): bool Function `is_using_as_collateral` --------------------------------- @notice Validate a user has been using the reserve as collateral @param self The configuration object @param reserve\_index The index of the reserve in the bitmap @return True if the user has been using a reserve as collateral, false otherwise public fun is_using_as_collateral(self: &user_config::UserConfigurationMap, reserve_index: u256): bool Function `is_using_as_collateral_one` ------------------------------------- @notice Checks if a user has been supplying only one reserve as collateral @dev This uses a simple trick - a number is a power of two (only one bit set) if and only if n & (n - 1) == 0 @param self The configuration object @return True if the user has been supplying as collateral one reserve, false otherwise public fun is_using_as_collateral_one(self: &user_config::UserConfigurationMap): bool Function `is_using_as_collateral_any` ------------------------------------- @notice Checks if a user has been supplying any reserve as collateral @param self The configuration object @return True if the user has been supplying as collateral any reserve, false otherwise public fun is_using_as_collateral_any(self: &user_config::UserConfigurationMap): bool Function `is_borrowing_one` --------------------------- @notice Checks if a user has been borrowing only one asset @dev This uses a simple trick - a number is a power of two (only one bit set) if and only if n & (n - 1) == 0 @param self The configuration object @return True if the user has been supplying as collateral one reserve, false otherwise public fun is_borrowing_one(self: &user_config::UserConfigurationMap): bool Function `is_borrowing_any` --------------------------- @notice Checks if a user has been borrowing from any reserve @param self The configuration object @return True if the user has been borrowing any reserve, false otherwise public fun is_borrowing_any(self: &user_config::UserConfigurationMap): bool Function `is_empty` ------------------- @notice Checks if a user has not been using any reserve for borrowing or supply @param self The configuration object @return True if the user has not been borrowing or supplying any reserve, false otherwise public fun is_empty(self: &user_config::UserConfigurationMap): bool Function `get_first_asset_id_by_mask` ------------------------------------- @notice Returns the address of the first asset flagged in the bitmap given the corresponding bitmask @param self The configuration object @param mask The mask to apply to the bitmap @return The index of the first asset flagged in the bitmap once the corresponding mask is applied public fun get_first_asset_id_by_mask(self: &user_config::UserConfigurationMap, mask: u256): u256 Function `init` --------------- @notice Initializes the user configuration map @return A new UserConfigurationMap with zero data public fun init(): user_config::UserConfigurationMap Function `set_borrowing` ------------------------ @notice Sets if the user is borrowing the reserve identified by reserve\_index @param self The configuration object @param reserve\_index The index of the reserve in the bitmap @param borrowing True if the user is borrowing the reserve, false otherwise public fun set_borrowing(self: &mut user_config::UserConfigurationMap, reserve_index: u256, borrowing: bool) Function `set_using_as_collateral` ---------------------------------- @notice Sets if the user is using as collateral the reserve identified by reserve\_index @param self The configuration object @param reserve\_index The index of the reserve in the bitmap @param using\_as\_collateral True if the user is using the reserve as collateral, false otherwise public fun set_using_as_collateral(self: &mut user_config::UserConfigurationMap, reserve_index: u256, using_as_collateral: bool) [« Previous](https://aave.github.io/aptos-aave-v3/aave-config/revision/) [Next »](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/) --- # Pool Data Provider - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Pool Data Provider * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_data_provider` =============================================================================================== @title Pool Data Provider Module @author Aave @notice Provides data about the Aave protocol pool and its reserves * [Struct `TokenData`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_TokenData) * [Function `get_all_reserves_tokens`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_all_reserves_tokens) * [Function `get_all_a_tokens`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_all_a_tokens) * [Function `get_all_var_tokens`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_all_var_tokens) * [Function `get_reserve_configuration_data`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_reserve_configuration_data) * [Function `get_reserve_emode_category`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_reserve_emode_category) * [Function `get_reserve_caps`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_reserve_caps) * [Function `get_paused`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_paused) * [Function `get_siloed_borrowing`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_siloed_borrowing) * [Function `get_liquidation_protocol_fee`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_liquidation_protocol_fee) * [Function `get_debt_ceiling`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_debt_ceiling) * [Function `get_debt_ceiling_decimals`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_debt_ceiling_decimals) * [Function `get_reserve_data`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_reserve_data) * [Function `get_a_token_total_supply`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_a_token_total_supply) * [Function `get_total_debt`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_total_debt) * [Function `get_user_reserve_data`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_user_reserve_data) * [Function `get_reserve_tokens_addresses`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_reserve_tokens_addresses) * [Function `get_flash_loan_enabled`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_flash_loan_enabled) * [Function `get_reserve_deficit`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_data_provider_get_reserve_deficit) use 0x1::object; use 0x1::string; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::fungible_asset_manager; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::variable_debt_token_factory; Struct `TokenData` ------------------ @notice Data structure containing token information @param symbol The token symbol @param token\_address The token address struct TokenData has drop Function `get_all_reserves_tokens` ---------------------------------- @notice Returns the list of the existing reserves in the pool @return The list of reserves, pairs of symbols and addresses #[view] public fun get_all_reserves_tokens(): vector Function `get_all_a_tokens` --------------------------- @notice Returns the list of the existing ATokens in the pool @return The list of ATokens, pairs of symbols and addresses #[view] public fun get_all_a_tokens(): vector Function `get_all_var_tokens` ----------------------------- @notice Returns the list of the existing variable debt Tokens in the pool @return The list of variableDebtTokens, pairs of symbols and addresses #[view] public fun get_all_var_tokens(): vector Function `get_reserve_configuration_data` ----------------------------------------- @notice Returns the configuration data of the reserve @dev Not returning borrow and supply caps for compatibility, nor pause flag @param asset The address of the underlying asset of the reserve @return decimals The number of decimals of the reserve @return ltv The ltv of the reserve @return liquidation\_threshold The liquidationThreshold of the reserve @return liquidation\_bonus The liquidationBonus of the reserve @return reserve\_factor The reserveFactor of the reserve @return usage\_as\_collateral\_enabled True if the usage as collateral is enabled, false otherwise @return borrowing\_enabled True if borrowing is enabled, false otherwise @return is\_active True if it is active, false otherwise @return is\_frozen True if it is frozen, false otherwise #[view] public fun get_reserve_configuration_data(asset: address): (u256, u256, u256, u256, u256, bool, bool, bool, bool) Function `get_reserve_emode_category` ------------------------------------- @notice Returns the efficiency mode category of the reserve @param asset The address of the underlying asset of the reserve @return The eMode id of the reserve #[view] public fun get_reserve_emode_category(asset: address): u256 Function `get_reserve_caps` --------------------------- @notice Returns the caps parameters of the reserve @param asset The address of the underlying asset of the reserve @return borrow\_cap The borrow cap of the reserve @return supply\_cap The supply cap of the reserve #[view] public fun get_reserve_caps(asset: address): (u256, u256) Function `get_paused` --------------------- @notice Returns if the pool is paused @param asset The address of the underlying asset of the reserve @return isPaused True if the pool is paused, false otherwise #[view] public fun get_paused(asset: address): bool Function `get_siloed_borrowing` ------------------------------- @notice Returns the siloed borrowing flag @param asset The address of the underlying asset of the reserve @return True if the asset is siloed for borrowing #[view] public fun get_siloed_borrowing(asset: address): bool Function `get_liquidation_protocol_fee` --------------------------------------- @notice Returns the protocol fee on the liquidation bonus @param asset The address of the underlying asset of the reserve @return The protocol fee on liquidation #[view] public fun get_liquidation_protocol_fee(asset: address): u256 Function `get_debt_ceiling` --------------------------- @notice Returns the debt ceiling of the reserve @param asset The address of the underlying asset of the reserve @return The debt ceiling of the reserve #[view] public fun get_debt_ceiling(asset: address): u256 Function `get_debt_ceiling_decimals` ------------------------------------ @notice Returns the debt ceiling decimals @return The debt ceiling decimals #[view] public fun get_debt_ceiling_decimals(): u256 Function `get_reserve_data` --------------------------- @notice Returns the reserve data @param asset The address of the underlying asset of the reserve @return accrued\_to\_treasury\_scaled The scaled amount of tokens accrued to treasury that is to be minted @return total\_a\_token The total supply of the aToken @return total\_variable\_debt The total variable debt of the reserve @return liquidity\_rate The liquidity rate of the reserve @return variable\_borrow\_rate The variable borrow rate of the reserve @return liquidity\_index The liquidity index of the reserve @return variable\_borrow\_index The variable borrow index of the reserve @return last\_update\_timestamp The timestamp of the last update of the reserve #[view] public fun get_reserve_data(asset: address): (u256, u256, u256, u256, u256, u256, u256, u64) Function `get_a_token_total_supply` ----------------------------------- @notice Returns the total supply of aTokens for a given asset @param asset The address of the underlying asset of the reserve @return The total supply of the aToken #[view] public fun get_a_token_total_supply(asset: address): u256 Function `get_total_debt` ------------------------- @notice Returns the total debt for a given asset @param asset The address of the underlying asset of the reserve @return The total debt for asset #[view] public fun get_total_debt(asset: address): u256 Function `get_user_reserve_data` -------------------------------- @notice Returns the user data in a reserve @param asset The address of the underlying asset of the reserve @param user The address of the user @return current\_a\_token\_balance The current AToken balance of the user @return current\_variable\_debt The current variable debt of the user @return scaled\_variable\_debt The scaled variable debt of the user @return liquidity\_rate The liquidity rate of the reserve @return usage\_as\_collateral\_enabled True if the user is using the asset as collateral, false otherwise #[view] public fun get_user_reserve_data(asset: address, user: address): (u256, u256, u256, u256, bool) Function `get_reserve_tokens_addresses` --------------------------------------- @notice Returns the token addresses of the reserve @param asset The address of the underlying asset of the reserve @return a\_token\_address The AToken address of the reserve @return variable\_debt\_token\_address The VariableDebtToken address of the reserve #[view] public fun get_reserve_tokens_addresses(asset: address): (address, address) Function `get_flash_loan_enabled` --------------------------------- @notice Returns whether the reserve has FlashLoans enabled or disabled @param asset The address of the underlying asset of the reserve @return True if FlashLoans are enabled, false otherwise #[view] public fun get_flash_loan_enabled(asset: address): bool Function `get_reserve_deficit` ------------------------------ @notice Returns the current deficit of a reserve @param asset The address of the underlying asset of the reserve @return The current deficit of the reserve #[view] public fun get_reserve_deficit(asset: address): u128 [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/) --- # Default IR Strategy - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Default IR Strategy * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::default_reserve_interest_rate_strategy` =================================================================================================================== @title Default Reserve Interest Rate Strategy Module @author Aave @notice Default interest rate strategy used by the Aave protocol * [Struct `RateDataUpdate`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_RateDataUpdate) * [Struct `InterestRateData`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_InterestRateData) * [Struct `InterestRateDataRay`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_InterestRateDataRay) * [Resource `ReserveInterestRateStrategyMap`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_ReserveInterestRateStrategyMap) * [Struct `CalcInterestRatesLocalVars`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_CalcInterestRatesLocalVars) * [Constants](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#@Constants_0) * [Function `get_reserve_interest_rate_strategy`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_get_reserve_interest_rate_strategy) * [Function `get_reserve_interest_rate_strategy_bps`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_get_reserve_interest_rate_strategy_bps) * [Function `get_optimal_usage_ratio`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_get_optimal_usage_ratio) * [Function `get_variable_rate_slope1`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_get_variable_rate_slope1) * [Function `get_variable_rate_slope2`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_get_variable_rate_slope2) * [Function `get_base_variable_borrow_rate`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_get_base_variable_borrow_rate) * [Function `get_max_variable_borrow_rate`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_get_max_variable_borrow_rate) * [Function `calculate_interest_rates`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_calculate_interest_rates) * [Function `init_interest_rate_strategy`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_init_interest_rate_strategy) * [Function `set_reserve_interest_rate_strategy`](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_default_reserve_interest_rate_strategy_set_reserve_interest_rate_strategy) use 0x1::event; use 0x1::signer; use 0x1::smart_table; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Struct `RateDataUpdate` ----------------------- @notice Emitted when new interest rate data is set in a reserve @param reserve Address of the reserve that has new interest rate data set @param optimal\_usage\_ratio The optimal usage ratio, in bps @param base\_variable\_borrow\_rate The base variable borrow rate, in bps @param variable\_rate\_slope1 The slope of the variable interest curve, before hitting the optimal ratio, in bps @param variable\_rate\_slope2 The slope of the variable interest curve, after hitting the optimal ratio, in bps #[event] struct RateDataUpdate has drop, store Struct `InterestRateData` ------------------------- @notice Holds the interest rate data for a given reserve @dev Since values are in bps, they are multiplied by 1e23 in order to become rays with 27 decimals. This in turn means that the maximum supported interest rate is 4294967295 (2\*\*32-1) bps or 42949672.95%. @param optimal\_usage\_ratio The optimal usage ratio, in bps @param base\_variable\_borrow\_rate The base variable borrow rate, in bps @param variable\_rate\_slope1 The slope of the variable interest curve, before hitting the optimal ratio, in bps @param variable\_rate\_slope2 The slope of the variable interest curve, after hitting the optimal ratio, in bps struct InterestRateData has copy, drop, store Struct `InterestRateDataRay` ---------------------------- @notice The interest rate data, where all values are in ray (fixed-point 27 decimal numbers) for a given reserve, used in in-memory calculations. @param optimal\_usage\_ratio The optimal usage ratio @param base\_variable\_borrow\_rate The base variable borrow rate @param variable\_rate\_slope1 The slope of the variable interest curve, before hitting the optimal ratio @param variable\_rate\_slope2 The slope of the variable interest curve, after hitting the optimal ratio struct InterestRateDataRay has drop Resource `ReserveInterestRateStrategyMap` ----------------------------------------- @notice Map of reserves address and their interest rate data (reserve\_address => InterestRateData) struct ReserveInterestRateStrategyMap has key Struct `CalcInterestRatesLocalVars` ----------------------------------- @notice Local variables for calculating interest rates struct CalcInterestRatesLocalVars has drop Constants --------- @notice The maximum value achievable for variable borrow rate, in bps const MAX_BORROW_RATE: u256 = 100000; @notice The maximum optimal point, in bps const MAX_OPTIMAL_POINT: u256 = 9900; @notice The minimum optimal point, in bps const MIN_OPTIMAL_POINT: u256 = 100; Function `get_reserve_interest_rate_strategy` --------------------------------------------- @notice Returns the full InterestRateData object for the given reserve, in ray @param reserve The reserve to get the data of @return The InterestRateDataRay object for the given reserve #[view] public fun get_reserve_interest_rate_strategy(reserve: address): default_reserve_interest_rate_strategy::InterestRateDataRay Function `get_reserve_interest_rate_strategy_bps` ------------------------------------------------- @notice Returns the full InterestRateDataRay object for the given reserve, in bps @param reserve The reserve to get the data of @return The InterestRateData object for the given reserve #[view] public fun get_reserve_interest_rate_strategy_bps(reserve: address): default_reserve_interest_rate_strategy::InterestRateData Function `get_optimal_usage_ratio` ---------------------------------- @notice Returns the optimal usage rate for the given reserve in ray @param reserve The reserve to get the optimal usage rate of @return The optimal usage rate is the level of borrow / collateral at which the borrow rate #[view] public fun get_optimal_usage_ratio(reserve: address): u256 Function `get_variable_rate_slope1` ----------------------------------- @notice Returns the variable rate slope below optimal usage ratio in ray @dev It's the variable rate when usage ratio > 0 and <= OPTIMAL\_USAGE\_RATIO @param reserve The reserve to get the variable rate slope 1 of @return The variable rate slope #[view] public fun get_variable_rate_slope1(reserve: address): u256 Function `get_variable_rate_slope2` ----------------------------------- @notice Returns the variable rate slope above optimal usage ratio in ray @dev It's the variable rate when usage ratio > OPTIMAL\_USAGE\_RATIO @param reserve The reserve to get the variable rate slope 2 of @return The variable rate slope #[view] public fun get_variable_rate_slope2(reserve: address): u256 Function `get_base_variable_borrow_rate` ---------------------------------------- @notice Returns the base variable borrow rate, in ray @param reserve The reserve to get the base variable borrow rate of @return The base variable borrow rate #[view] public fun get_base_variable_borrow_rate(reserve: address): u256 Function `get_max_variable_borrow_rate` --------------------------------------- @notice Returns the maximum variable borrow rate, in ray @param reserve The reserve to get the maximum variable borrow rate of @return The maximum variable borrow rate #[view] public fun get_max_variable_borrow_rate(reserve: address): u256 Function `calculate_interest_rates` ----------------------------------- @notice Calculates the interest rates depending on the reserve's state and configurations @param unbacked The amount of unbacked liquidity @param liquidity\_added The amount of liquidity added @param liquidity\_taken The amount of liquidity taken @param total\_debt The total debt of the reserve @param reserve\_factor The reserve factor @param reserve The address of the reserve @param virtual\_underlying\_balance The virtual underlying balance of the reserve @return current\_liquidity\_rate The liquidity rate expressed in rays @return current\_variable\_borrow\_rate The variable borrow rate expressed in rays #[view] public fun calculate_interest_rates(unbacked: u256, liquidity_added: u256, liquidity_taken: u256, total_debt: u256, reserve_factor: u256, reserve: address, virtual_underlying_balance: u256): (u256, u256) Function `init_interest_rate_strategy` -------------------------------------- @notice Initializes the interest rate strategy @dev Only callable by the pool\_configurator module @param account The signer account of the caller public(friend) fun init_interest_rate_strategy(account: &signer) Function `set_reserve_interest_rate_strategy` --------------------------------------------- @notice Sets interest rate data for an Aave rate strategy @dev Only callable by the pool\_configurator and pool\_token\_logic module @param reserve The address of the underlying asset of the reserve @param optimal\_usage\_ratio The optimal usage ratio, in bps @param base\_variable\_borrow\_rate The base variable borrow rate, in bps @param variable\_rate\_slope1 The slope of the variable interest curve, before hitting the optimal ratio, in bps @param variable\_rate\_slope2 The slope of the variable interest curve, after hitting the optimal ratio, in bps public(friend) fun set_reserve_interest_rate_strategy(reserve: address, optimal_usage_ratio: u256, base_variable_borrow_rate: u256, variable_rate_slope1: u256, variable_rate_slope2: u256) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/collector/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/) --- # Math Utils - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Math * Math Utils * * * Module `0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils` ======================================================================================= @title Math Utilities @author Aave @notice Utility functions for mathematical operations and calculations * [Constants](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#@Constants_0) * [Function `u256_max`](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_math_utils_u256_max) * [Function `get_percentage_factor`](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_math_utils_get_percentage_factor) * [Function `calculate_linear_interest`](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_math_utils_calculate_linear_interest) * [Function `calculate_compounded_interest`](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_math_utils_calculate_compounded_interest) * [Function `calculate_compounded_interest_now`](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_math_utils_calculate_compounded_interest_now) * [Function `percent_mul`](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_math_utils_percent_mul) * [Function `percent_div`](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_math_utils_percent_div) * [Function `pow`](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_math_utils_pow) * [Function `ceil_div`](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_math_utils_ceil_div) * [Function `min`](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_math_utils_min) * [Function `get_seconds_per_year`](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/#0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96_math_utils_get_seconds_per_year) use 0x1::timestamp; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Constants --------- @notice Maximum value for u256 const U256_MAX: u256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935; @notice Half percentage factor (50.00%) const HALF_PERCENTAGE_FACTOR: u256 = 5000; @notice Maximum percentage factor (100.00%) const PERCENTAGE_FACTOR: u256 = 10000; @notice Seconds per year (ignoring leap years) const SECONDS_PER_YEAR: u256 = 31536000; Function `u256_max` ------------------- @notice Returns the maximum value for u256 @return The maximum u256 value public fun u256_max(): u256 Function `get_percentage_factor` -------------------------------- @notice Returns the percentage factor (10000) @return The percentage factor public fun get_percentage_factor(): u256 Function `calculate_linear_interest` ------------------------------------ @notice Calculates the interest accumulated using a linear interest rate formula @param rate The interest rate, in ray @param last\_update\_timestamp The timestamp of the last update of the interest @return The interest rate linearly accumulated during the timeDelta, in ray public fun calculate_linear_interest(rate: u256, last_update_timestamp: u64): u256 Function `calculate_compounded_interest` ---------------------------------------- @notice Calculates the interest using a compounded interest rate formula @dev To avoid expensive exponentiation, the calculation is performed using a taylor approximation: time\_elapsed\_in\_seconds s = n_t t = s/n, where n is the number of seconds in a year r = rate, annual rate as input parameter (1+r/n)^(n_t) = e^(r_t) e^(r_t) = 1 + r_t + (r_t)^2/2 + (r\*t)^3/6 + ... The approximation slightly underpays liquidity providers and undercharges borrowers, with the advantage of great gas cost reductions. The whitepaper contains reference to the approximation and a table showing the margin of error per different time periods @param rate The interest rate, in ray @param last\_update\_timestamp The timestamp of the last update of the interest @param current\_timestamp The current timestamp at the time of calling the method @return The interest rate compounded during the timeDelta, in ray public fun calculate_compounded_interest(rate: u256, last_update_timestamp: u64, current_timestamp: u64): u256 Function `calculate_compounded_interest_now` -------------------------------------------- @notice Calculates the compounded interest between the timestamp of the last update and the current block timestamp @param rate The interest rate (in ray) @param last\_update\_timestamp The timestamp from which the interest accumulation needs to be calculated @return The interest rate compounded between lastUpdateTimestamp and current block timestamp, in ray public fun calculate_compounded_interest_now(rate: u256, last_update_timestamp: u64): u256 Function `percent_mul` ---------------------- @notice Executes a percentage multiplication @param value The value of which the percentage needs to be calculated @param percentage The percentage of the value to be calculated @return result The value multiplied by the percentage and divided by the percentage factor, rounded half up to the nearest unit public fun percent_mul(value: u256, percentage: u256): u256 Function `percent_div` ---------------------- @notice Executes a percentage division @param value The value of which the percentage needs to be calculated @param percentage The percentage of the value to be calculated @return result The value multiplied by the percentage factor and divided by the percentage, rounded half up to the nearest unit public fun percent_div(value: u256, percentage: u256): u256 Function `pow` -------------- @notice Calculates the power of a base to an exponent @param base The base value @param exponent The exponent value @return The result of base raised to the power of exponent public fun pow(base: u256, exponent: u256): u256 Function `ceil_div` ------------------- @notice Performs division with ceiling (rounding up) @dev This function rounds up the result of division, ensuring that any remainder is accounted for by adding 1 to the quotient @param numerator The numerator value @param denominator The denominator value @return The result of division rounded up public fun ceil_div(numerator: u256, denominator: u256): u256 Function `min` -------------- @notice Finds the minimum of two u256 values @dev This function returns the smaller of the two provided u256 values @param a The first value @param b The second value @return The result of the minimum value between a and b public fun min(a: u256, b: u256): u256 Function `get_seconds_per_year` ------------------------------- @dev Returns the seconds per year value @return Seconds per year constant public fun get_seconds_per_year(): u256 [« Previous](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/) [Next »](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/) --- # Flashloan Logic - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Flashloan Logic * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::flashloan_logic` ============================================================================================ @title Flashloan Logic Module @author Aave @notice Implements the logic for the flash loans * [Struct `FlashLoan`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_FlashLoan) * [Struct `FlashLoanLocalVars`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_FlashLoanLocalVars) * [Struct `SimpleFlashLoansReceipt`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_SimpleFlashLoansReceipt) * [Struct `ComplexFlashLoansReceipt`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_ComplexFlashLoansReceipt) * [Struct `FlashLoanRepaymentParams`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_FlashLoanRepaymentParams) * [Function `flash_loan`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_flash_loan) * [Function `flash_loan_simple`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_flash_loan_simple) * [Function `pay_flash_loan_complex`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_pay_flash_loan_complex) * [Function `pay_flash_loan_simple`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_pay_flash_loan_simple) * [Function `get_simple_flashloan_receipt_sender`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_simple_flashloan_receipt_sender) * [Function `get_simple_flashloan_receipt_receiver`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_simple_flashloan_receipt_receiver) * [Function `get_simple_flashloan_receipt_index`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_simple_flashloan_receipt_index) * [Function `get_simple_flashloan_current_asset`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_simple_flashloan_current_asset) * [Function `get_simple_flashloan_current_amount`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_simple_flashloan_current_amount) * [Function `get_simple_flashloan_total_premium`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_simple_flashloan_total_premium) * [Function `get_simple_flashloan_premium_total`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_simple_flashloan_premium_total) * [Function `get_simple_flashloan_premium_to_protocol`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_simple_flashloan_premium_to_protocol) * [Function `get_simple_flashloan_referral_code`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_simple_flashloan_referral_code) * [Function `get_simple_flashloan_on_behalf_of`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_simple_flashloan_on_behalf_of) * [Function `get_complex_flashloan_receipt_sender`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_complex_flashloan_receipt_sender) * [Function `get_complex_flashloan_receipt_receiver`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_complex_flashloan_receipt_receiver) * [Function `get_complex_flashloan_receipt_index`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_complex_flashloan_receipt_index) * [Function `get_complex_flashloan_current_asset`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_complex_flashloan_current_asset) * [Function `get_complex_flashloan_current_amount`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_complex_flashloan_current_amount) * [Function `get_complex_flashloan_total_premium`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_complex_flashloan_total_premium) * [Function `get_complex_flashloan_premium_total`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_complex_flashloan_premium_total) * [Function `get_complex_flashloan_premium_to_protocol`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_complex_flashloan_premium_to_protocol) * [Function `get_complex_flashloan_referral_code`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_complex_flashloan_referral_code) * [Function `get_complex_flashloan_interest_rate_mode`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_complex_flashloan_interest_rate_mode) * [Function `get_complex_flashloan_on_behalf_of`](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_flashloan_logic_get_complex_flashloan_on_behalf_of) use 0x1::event; use 0x1::object; use 0x1::signer; use 0x1::vector; use 0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::borrow_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::fungible_asset_manager; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_fee_manager; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::validation_logic; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Struct `FlashLoan` ------------------ @dev Emitted on pay\_flash\_loan\_complex() and handle\_flash\_loan\_repayment() @param target The address of the flash loan receiver contract @param initiator The address initiating the flash loan @param asset The address of the asset being flash borrowed @param amount The amount flash borrowed @param interest\_rate\_mode The flashloan mode: 0 for regular flashloan, 2 for Variable debt @param premium The fee flash borrowed @param referral\_code The referral code used #[event] struct FlashLoan has drop, store Struct `FlashLoanLocalVars` --------------------------- @notice Helper struct for internal variables used in the `execute_flash_loan_complex` and `execute_flash_loan_simple` function @dev Holds temporary data during flash loan execution struct FlashLoanLocalVars has copy, drop Struct `SimpleFlashLoansReceipt` -------------------------------- @notice Receipt for simple flash loans containing all information about the flash loan @dev Used to track and validate flash loan repayments struct SimpleFlashLoansReceipt Struct `ComplexFlashLoansReceipt` --------------------------------- @notice Receipt for complex flash loans containing all information about the flash loan @dev Used to track and validate complex flash loan repayments with different interest rate modes struct ComplexFlashLoansReceipt Struct `FlashLoanRepaymentParams` --------------------------------- @notice Parameters for flash loan repayment @dev Used to pass flash loan repayment details to the handle\_flash\_loan\_repayment function struct FlashLoanRepaymentParams has drop Function `flash_loan` --------------------- @notice Allows smartcontracts to access the liquidity of the pool within one transaction, as long as the amount taken plus a fee is returned. @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept into consideration. For further details please visit https://docs.aave.com/developers/ @param initiator The signer account of the flash loan initiator @param receiver\_address The address of the contract receiving the funds @param assets The addresses of the assets being flash-borrowed @param amounts The amounts of the assets being flash-borrowed @param interest\_rate\_modes Types of the debt to open if the flash loan is not returned: 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `on_behalf_of` address @param on\_behalf\_of The address that will receive the debt in the case of using on `interest_rate_modes` 2, on\_behalf\_of Should be the account address @param referral\_code The code used to register the integrator originating the operation, for potential rewards. @return the receipt for the complex flashloan public fun flash_loan(initiator: &signer, receiver_address: address, assets: vector
, amounts: vector, interest_rate_modes: vector, on_behalf_of: address, referral_code: u16): vector Function `flash_loan_simple` ---------------------------- @notice Allows smartcontracts to access the liquidity of the pool within one transaction, as long as the amount taken plus a fee is returned. @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept into consideration. For further details please visit https://docs.aave.com/developers/ @param initiator The signer account of the flash loan initiator @param receiver\_address The address of the contract receiving the funds @param asset The address of the asset being flash-borrowed @param amount The amount of the asset being flash-borrowed @param referral\_code The code used to register the integrator originating the operation, for potential rewards. @return the receipt for the simple flashloan public fun flash_loan_simple(initiator: &signer, receiver_address: address, asset: address, amount: u256, referral_code: u16): flashloan_logic::SimpleFlashLoansReceipt Function `pay_flash_loan_complex` --------------------------------- @notice Repays flashloaned assets + premium @dev Will pull the amount + premium from the receiver @param flash\_loan\_receiver The signer account of the flash loan receiver @param flashloan\_receipts The receipts of the flashloaned assets public fun pay_flash_loan_complex(flash_loan_receiver: &signer, flashloan_receipts: vector) Function `pay_flash_loan_simple` -------------------------------- @notice Repays flashloaned assets + premium @dev Will pull the amount + premium from the receiver @param flash\_loan\_receiver The signer account of flash loan receiver @param flashloan\_receipt The receipt of the flashloaned asset public fun pay_flash_loan_simple(flash_loan_receiver: &signer, flashloan_receipt: flashloan_logic::SimpleFlashLoansReceipt) Function `get_simple_flashloan_receipt_sender` ---------------------------------------------- @notice Returns the simple flashloan receipt sender @param receipt The simple flashloan receipt received @return the address of the sender inside the simple flashloan receipt public fun get_simple_flashloan_receipt_sender(receipt: &flashloan_logic::SimpleFlashLoansReceipt): address Function `get_simple_flashloan_receipt_receiver` ------------------------------------------------ @notice Returns the simple flashloan receipt receiver @param receipt The simple flashloan receipt received @return the address of the receiver inside the simple flashloan receipt public fun get_simple_flashloan_receipt_receiver(receipt: &flashloan_logic::SimpleFlashLoansReceipt): address Function `get_simple_flashloan_receipt_index` --------------------------------------------- @notice Returns the simple flashloan receipt index @param receipt The simple flashloan receipt received @return the simple flashloan receipt index public fun get_simple_flashloan_receipt_index(receipt: &flashloan_logic::SimpleFlashLoansReceipt): u256 Function `get_simple_flashloan_current_asset` --------------------------------------------- @notice Returns the simple flashloan receipt current asset @param receipt The simple flashloan receipt received @return the simple flashloan receipt asset public fun get_simple_flashloan_current_asset(receipt: &flashloan_logic::SimpleFlashLoansReceipt): address Function `get_simple_flashloan_current_amount` ---------------------------------------------- @notice Returns the simple flashloan receipt current amount @param receipt The simple flashloan receipt received @return the simple flashloan receipt amount public fun get_simple_flashloan_current_amount(receipt: &flashloan_logic::SimpleFlashLoansReceipt): u256 Function `get_simple_flashloan_total_premium` --------------------------------------------- @notice Returns the simple flashloan receipt total premium @param receipt The simple flashloan receipt received @return the simple flashloan receipt total premium public fun get_simple_flashloan_total_premium(receipt: &flashloan_logic::SimpleFlashLoansReceipt): u256 Function `get_simple_flashloan_premium_total` --------------------------------------------- @notice Returns the simple flashloan receipt premium total @param receipt The simple flashloan receipt received @return the simple flashloan receipt premium total public fun get_simple_flashloan_premium_total(receipt: &flashloan_logic::SimpleFlashLoansReceipt): u256 Function `get_simple_flashloan_premium_to_protocol` --------------------------------------------------- @notice Returns the simple flashloan receipt premium to protocol @param receipt The simple flashloan receipt received @return the simple flashloan receipt premium to protocol public fun get_simple_flashloan_premium_to_protocol(receipt: &flashloan_logic::SimpleFlashLoansReceipt): u256 Function `get_simple_flashloan_referral_code` --------------------------------------------- @notice Returns the simple flashloan receipt referral code @param receipt The simple flashloan receipt received @return the simple flashloan receipt referral code public fun get_simple_flashloan_referral_code(receipt: &flashloan_logic::SimpleFlashLoansReceipt): u16 Function `get_simple_flashloan_on_behalf_of` -------------------------------------------- @notice Returns the simple flashloan receipt on behalf of @param receipt The simple flashloan receipt received @return the simple flashloan receipt on behalf of public fun get_simple_flashloan_on_behalf_of(receipt: &flashloan_logic::SimpleFlashLoansReceipt): address Function `get_complex_flashloan_receipt_sender` ----------------------------------------------- @notice Returns the complex flashloan receipt sender @param receipt The complex flashloan receipt received @return the complex flashloan receipt sender public fun get_complex_flashloan_receipt_sender(receipt: &flashloan_logic::ComplexFlashLoansReceipt): address Function `get_complex_flashloan_receipt_receiver` ------------------------------------------------- @notice Returns the complex flashloan receipt receiver @param receipt The complex flashloan receipt received @return the complex flashloan receipt receiver public fun get_complex_flashloan_receipt_receiver(receipt: &flashloan_logic::ComplexFlashLoansReceipt): address Function `get_complex_flashloan_receipt_index` ---------------------------------------------- @notice Returns the complex flashloan receipt index @param receipt The complex flashloan receipt received @return the complex flashloan receipt index public fun get_complex_flashloan_receipt_index(receipt: &flashloan_logic::ComplexFlashLoansReceipt): u256 Function `get_complex_flashloan_current_asset` ---------------------------------------------- @notice Returns the complex flashloan receipt current asset @param receipt The complex flashloan receipt received @return the complex flashloan receipt asset public fun get_complex_flashloan_current_asset(receipt: &flashloan_logic::ComplexFlashLoansReceipt): address Function `get_complex_flashloan_current_amount` ----------------------------------------------- @notice Returns the complex flashloan receipt current amount @param receipt The complex flashloan receipt received @return the complex flashloan receipt amount public fun get_complex_flashloan_current_amount(receipt: &flashloan_logic::ComplexFlashLoansReceipt): u256 Function `get_complex_flashloan_total_premium` ---------------------------------------------- @notice Returns the complex flashloan receipt total premium @param receipt The complex flashloan receipt received @return the complex flashloan receipt total premium public fun get_complex_flashloan_total_premium(receipt: &flashloan_logic::ComplexFlashLoansReceipt): u256 Function `get_complex_flashloan_premium_total` ---------------------------------------------- @notice Returns the complex flashloan receipt premium total @param receipt The complex flashloan receipt received @return the complex flashloan receipt total premium public fun get_complex_flashloan_premium_total(receipt: &flashloan_logic::ComplexFlashLoansReceipt): u256 Function `get_complex_flashloan_premium_to_protocol` ---------------------------------------------------- @notice Returns the complex flashloan receipt premium to protocol @param receipt The complex flashloan receipt received @return the complex flashloan receipt premium to protocol public fun get_complex_flashloan_premium_to_protocol(receipt: &flashloan_logic::ComplexFlashLoansReceipt): u256 Function `get_complex_flashloan_referral_code` ---------------------------------------------- @notice Returns the complex flashloan receipt referral code @param receipt The complex flashloan receipt received @return the complex flashloan receipt referral code public fun get_complex_flashloan_referral_code(receipt: &flashloan_logic::ComplexFlashLoansReceipt): u16 Function `get_complex_flashloan_interest_rate_mode` --------------------------------------------------- @notice Returns the complex flashloan receipt interest rate mode @param receipt The complex flashloan receipt received @return the complex flashloan receipt interest rate mode public fun get_complex_flashloan_interest_rate_mode(receipt: &flashloan_logic::ComplexFlashLoansReceipt): u8 Function `get_complex_flashloan_on_behalf_of` --------------------------------------------- @notice Returns the complex flashloan receipt on behalf of @param receipt The complex flashloan receipt received @return the complex flashloan receipt on behalf of public fun get_complex_flashloan_on_behalf_of(receipt: &flashloan_logic::ComplexFlashLoansReceipt): address [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/events/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/fungible_asset_manager/) --- # Reserve Config - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Config * Reserve Config * * * Module `0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config` =========================================================================================== @title ReserveConfiguration module @author Aave @notice Implements the bitmap logic to handle the reserve configuration * [Struct `ReserveConfigurationMap`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_ReserveConfigurationMap) * [Constants](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#@Constants_0) * [Function `init`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_init) * [Function `get_ltv`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_ltv) * [Function `get_liquidation_threshold`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_liquidation_threshold) * [Function `get_liquidation_bonus`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_liquidation_bonus) * [Function `get_decimals`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_decimals) * [Function `get_active`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_active) * [Function `get_frozen`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_frozen) * [Function `get_paused`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_paused) * [Function `get_borrowable_in_isolation`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_borrowable_in_isolation) * [Function `get_siloed_borrowing`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_siloed_borrowing) * [Function `get_borrowing_enabled`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_borrowing_enabled) * [Function `get_reserve_factor`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_reserve_factor) * [Function `get_borrow_cap`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_borrow_cap) * [Function `get_supply_cap`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_supply_cap) * [Function `get_debt_ceiling`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_debt_ceiling) * [Function `get_liquidation_protocol_fee`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_liquidation_protocol_fee) * [Function `get_emode_category`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_emode_category) * [Function `get_flash_loan_enabled`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_flash_loan_enabled) * [Function `get_flags`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_flags) * [Function `get_params`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_params) * [Function `get_caps`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_caps) * [Function `get_debt_ceiling_decimals`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_debt_ceiling_decimals) * [Function `get_max_reserves_count`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_max_reserves_count) * [Function `get_min_reserve_asset_decimals`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_min_reserve_asset_decimals) * [Function `get_max_valid_liquidation_grace_period`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_get_max_valid_liquidation_grace_period) * [Function `set_ltv`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_ltv) * [Function `set_liquidation_threshold`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_liquidation_threshold) * [Function `set_liquidation_bonus`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_liquidation_bonus) * [Function `set_decimals`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_decimals) * [Function `set_active`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_active) * [Function `set_frozen`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_frozen) * [Function `set_paused`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_paused) * [Function `set_borrowable_in_isolation`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_borrowable_in_isolation) * [Function `set_siloed_borrowing`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_siloed_borrowing) * [Function `set_borrowing_enabled`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_borrowing_enabled) * [Function `set_reserve_factor`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_reserve_factor) * [Function `set_borrow_cap`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_borrow_cap) * [Function `set_supply_cap`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_supply_cap) * [Function `set_debt_ceiling`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_debt_ceiling) * [Function `set_liquidation_protocol_fee`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_liquidation_protocol_fee) * [Function `set_emode_category`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_emode_category) * [Function `set_flash_loan_enabled`](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_reserve_config_set_flash_loan_enabled) use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::helper; Struct `ReserveConfigurationMap` -------------------------------- @notice Main structure for storing reserve configuration as a bitmap struct ReserveConfigurationMap has copy, drop, store Constants --------- const ACTIVE_MASK: u256 = 115792089237316195423570985008687907853269984665640564039457511950319091711999; const BORROWABLE_IN_ISOLATION_MASK: u256 = 115792089237316195423570985008687907853269984665640564039455278164903915945983; const BORROWABLE_IN_ISOLATION_START_BIT_POSITION: u8 = 61; const BORROWING_ENABLED_START_BIT_POSITION: u8 = 58; const BORROWING_MASK: u256 = 115792089237316195423570985008687907853269984665640564039457295777536977928191; const BORROW_CAP_MASK: u256 = 115792089237316195423570985008687907853269901588890828691141347134601036824575; const BORROW_CAP_START_BIT_POSITION: u8 = 80; const DEBT_CEILING_DECIMALS: u256 = 2; const DEBT_CEILING_MASK: u256 = 108555083659990515227827083269813533489170840026057959730454019326871953473535; const DEBT_CEILING_START_BIT_POSITION: u8 = 212; const DECIMALS_MASK: u256 = 115792089237316195423570985008687907853269984665640564039457512231794068422655; const EMODE_CATEGORY_MASK: u256 = 115792089237316195423570889601861022891927484329094684320502060868636724166655; const EMODE_CATEGORY_START_BIT_POSITION: u8 = 168; const FLASHLOAN_ENABLED_MASK: u256 = 115792089237316195423570985008687907853269984665640564039448360635876274864127; const FLASHLOAN_ENABLED_START_BIT_POSITION: u8 = 63; const FROZEN_MASK: u256 = 115792089237316195423570985008687907853269984665640564039457439892725053784063; const IS_ACTIVE_START_BIT_POSITION: u8 = 56; const IS_FROZEN_START_BIT_POSITION: u8 = 57; const IS_PAUSED_START_BIT_POSITION: u8 = 60; const LIQUIDATION_BONUS_MASK: u256 = 115792089237316195423570985008687907853269984665640564039457583726442447896575; const LIQUIDATION_BONUS_START_BIT_POSITION: u8 = 32; const LIQUIDATION_PROTOCOL_FEE_MASK: u256 = 115792089237316195423570984634549197687329661445021480007966928956539929624575; const LIQUIDATION_PROTOCOL_FEE_START_BIT_POSITION: u8 = 152; const LIQUIDATION_THRESHOLD_MASK: u256 = 115792089237316195423570985008687907853269984665640564039457584007908834738175; @notice For the LTV, the start bit is 0 (up to 15), hence no bitshifting is needed const LIQUIDATION_THRESHOLD_START_BIT_POSITION: u8 = 16; const LTV_MASK: u256 = 115792089237316195423570985008687907853269984665640564039457584007913129574400; const MAX_RESERVES_COUNT: u256 = 128; const MAX_VALID_BORROW_CAP: u256 = 68719476735; const MAX_VALID_DEBT_CEILING: u256 = 1099511627775; const MAX_VALID_DECIMALS: u256 = 18; const MAX_VALID_EMODE_CATEGORY: u256 = 255; const MAX_VALID_LIQUIDATION_BONUS: u256 = 65535; const MAX_VALID_LIQUIDATION_GRACE_PERIOD: u256 = 14400; const MAX_VALID_LIQUIDATION_PROTOCOL_FEE: u256 = 65535; const MAX_VALID_LIQUIDATION_THRESHOLD: u256 = 65535; const MAX_VALID_LTV: u256 = 65535; const MAX_VALID_RESERVE_FACTOR: u256 = 65535; const MAX_VALID_SUPPLY_CAP: u256 = 68719476735; const MIN_RESERVE_ASSET_DECIMALS: u256 = 6; @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled const PAUSED_MASK: u256 = 115792089237316195423570985008687907853269984665640564039456431086408522792959; const RESERVE_DECIMALS_START_BIT_POSITION: u8 = 48; const RESERVE_FACTOR_MASK: u256 = 115792089237316195423570985008687907853269984665640562830550211137357664485375; const RESERVE_FACTOR_START_BIT_POSITION: u8 = 64; const SILOED_BORROWING_MASK: u256 = 115792089237316195423570985008687907853269984665640564039452972321894702252031; const SILOED_BORROWING_START_BIT_POSITION: u8 = 62; const SUPPLY_CAP_MASK: u256 = 115792089237316195423570985008682198862499243902866067452821842515308866174975; const SUPPLY_CAP_START_BIT_POSITION: u8 = 116; Function `init` --------------- @notice Initialize the reserve configuration @return A new ReserveConfigurationMap with zero data public fun init(): reserve_config::ReserveConfigurationMap Function `get_ltv` ------------------ @notice Gets the Loan to Value of the reserve @param self The reserve configuration @return The loan to value public fun get_ltv(self: &reserve_config::ReserveConfigurationMap): u256 Function `get_liquidation_threshold` ------------------------------------ @notice Gets the liquidation threshold of the reserve @param self The reserve configuration @return The liquidation threshold public fun get_liquidation_threshold(self: &reserve_config::ReserveConfigurationMap): u256 Function `get_liquidation_bonus` -------------------------------- @notice Gets the liquidation bonus of the reserve @param self The reserve configuration @return The liquidation bonus public fun get_liquidation_bonus(self: &reserve_config::ReserveConfigurationMap): u256 Function `get_decimals` ----------------------- @notice Gets the decimals of the underlying asset of the reserve @param self The reserve configuration @return The decimals public fun get_decimals(self: &reserve_config::ReserveConfigurationMap): u256 Function `get_active` --------------------- @notice Gets the active state of the reserve @param self The reserve configuration @return The active state public fun get_active(self: &reserve_config::ReserveConfigurationMap): bool Function `get_frozen` --------------------- @notice Gets the frozen state of the reserve @param self The reserve configuration @return The frozen state public fun get_frozen(self: &reserve_config::ReserveConfigurationMap): bool Function `get_paused` --------------------- @notice Gets the paused state of the reserve @param self The reserve configuration @return The paused state public fun get_paused(self: &reserve_config::ReserveConfigurationMap): bool Function `get_borrowable_in_isolation` -------------------------------------- @notice Gets the borrowable in isolation flag for the reserve. @dev If the returned flag is true, the asset is borrowable against isolated collateral. Assets borrowed with isolated collateral is accounted for in the isolated collateral's total debt exposure. @dev Only assets of the same family (eg USD stablecoins) should be borrowable in isolation mode to keep consistency in the debt ceiling calculations. @param self The reserve configuration @return The borrowable in isolation flag public fun get_borrowable_in_isolation(self: &reserve_config::ReserveConfigurationMap): bool Function `get_siloed_borrowing` ------------------------------- @notice Gets the siloed borrowing flag for the reserve. @dev When this flag is set to true, users borrowing this asset will not be allowed to borrow any other asset. @param self The reserve configuration @return The siloed borrowing flag public fun get_siloed_borrowing(self: &reserve_config::ReserveConfigurationMap): bool Function `get_borrowing_enabled` -------------------------------- @notice Gets the borrowing state of the reserve @param self The reserve configuration @return The borrowing state public fun get_borrowing_enabled(self: &reserve_config::ReserveConfigurationMap): bool Function `get_reserve_factor` ----------------------------- @notice Gets the reserve factor of the reserve @param self The reserve configuration @return The reserve factor public fun get_reserve_factor(self: &reserve_config::ReserveConfigurationMap): u256 Function `get_borrow_cap` ------------------------- @notice Gets the borrow cap of the reserve @param self The reserve configuration @return The borrow cap public fun get_borrow_cap(self: &reserve_config::ReserveConfigurationMap): u256 Function `get_supply_cap` ------------------------- @notice Gets the supply cap of the reserve @param self The reserve configuration @return The supply cap public fun get_supply_cap(self: &reserve_config::ReserveConfigurationMap): u256 Function `get_debt_ceiling` --------------------------- @notice Gets the debt ceiling for the asset if the asset is in isolation mode @param self The reserve configuration @return The debt ceiling (0 = isolation mode disabled) public fun get_debt_ceiling(self: &reserve_config::ReserveConfigurationMap): u256 Function `get_liquidation_protocol_fee` --------------------------------------- @notice Gets the liquidation protocol fee @param self The reserve configuration @return The liquidation protocol fee public fun get_liquidation_protocol_fee(self: &reserve_config::ReserveConfigurationMap): u256 Function `get_emode_category` ----------------------------- @notice Gets the eMode asset category @param self The reserve configuration @return The eMode category for the asset public fun get_emode_category(self: &reserve_config::ReserveConfigurationMap): u256 Function `get_flash_loan_enabled` --------------------------------- @notice Gets the flashloanable flag for the reserve @param self The reserve configuration @return The flashloanable flag public fun get_flash_loan_enabled(self: &reserve_config::ReserveConfigurationMap): bool Function `get_flags` -------------------- @notice Gets the configuration flags of the reserve @param self The reserve configuration @return The state flag representing active @return The state flag representing frozen @return The state flag representing borrowing enabled @return The state flag representing paused public fun get_flags(self: &reserve_config::ReserveConfigurationMap): (bool, bool, bool, bool) Function `get_params` --------------------- @notice Gets the configuration parameters of the reserve from storage @param self The reserve configuration @return The state param representing ltv @return The state param representing liquidation threshold @return The state param representing liquidation bonus @return The state param representing reserve decimals @return The state param representing reserve factor @return The state param representing eMode category public fun get_params(self: &reserve_config::ReserveConfigurationMap): (u256, u256, u256, u256, u256, u256) Function `get_caps` ------------------- @notice Gets the caps parameters of the reserve from storage @param self The reserve configuration @return The state param representing borrow cap @return The state param representing supply cap. public fun get_caps(self: &reserve_config::ReserveConfigurationMap): (u256, u256) Function `get_debt_ceiling_decimals` ------------------------------------ @notice Gets the debt ceiling decimals @return The debt ceiling decimals public fun get_debt_ceiling_decimals(): u256 Function `get_max_reserves_count` --------------------------------- @notice Gets the maximum number of reserves @return The maximum number of reserves allowed public fun get_max_reserves_count(): u256 Function `get_min_reserve_asset_decimals` ----------------------------------------- @notice Gets the minimum number of reserve asset decimals @return The minimum decimals required for reserve assets public fun get_min_reserve_asset_decimals(): u256 Function `get_max_valid_liquidation_grace_period` ------------------------------------------------- @notice Gets the maximum valid liquidation grace period @return The maximum allowed liquidation grace period public fun get_max_valid_liquidation_grace_period(): u256 Function `set_ltv` ------------------ @notice Sets the Loan to Value of the reserve @param self The reserve configuration @param ltv The new ltv public fun set_ltv(self: &mut reserve_config::ReserveConfigurationMap, ltv: u256) Function `set_liquidation_threshold` ------------------------------------ @notice Sets the liquidation threshold of the reserve @param self The reserve configuration @param liquidation\_threshold The new liquidation threshold public fun set_liquidation_threshold(self: &mut reserve_config::ReserveConfigurationMap, liquidation_threshold: u256) Function `set_liquidation_bonus` -------------------------------- @notice Sets the liquidation bonus of the reserve @param self The reserve configuration @param liquidation\_bonus The new liquidation bonus public fun set_liquidation_bonus(self: &mut reserve_config::ReserveConfigurationMap, liquidation_bonus: u256) Function `set_decimals` ----------------------- @notice Sets the decimals of the underlying asset of the reserve @param self The reserve configuration @param decimals The decimals public fun set_decimals(self: &mut reserve_config::ReserveConfigurationMap, decimals: u256) Function `set_active` --------------------- @notice Sets the active state of the reserve @param self The reserve configuration @param active The new active state public fun set_active(self: &mut reserve_config::ReserveConfigurationMap, active: bool) Function `set_frozen` --------------------- @notice Sets the frozen state of the reserve @param self The reserve configuration @param frozen The new frozen state public fun set_frozen(self: &mut reserve_config::ReserveConfigurationMap, frozen: bool) Function `set_paused` --------------------- @notice Sets the paused state of the reserve @param self The reserve configuration @param paused The new paused state public fun set_paused(self: &mut reserve_config::ReserveConfigurationMap, paused: bool) Function `set_borrowable_in_isolation` -------------------------------------- @notice Sets the borrowing in isolation state of the reserve @dev When this flag is set to true, the asset will be borrowable against isolated collaterals and the borrowed amount will be accumulated in the isolated collateral's total debt exposure. @dev Only assets of the same family (eg USD stablecoins) should be borrowable in isolation mode to keep consistency in the debt ceiling calculations. @param self The reserve configuration @param borrowable The new borrowing in isolation state public fun set_borrowable_in_isolation(self: &mut reserve_config::ReserveConfigurationMap, borrowable: bool) Function `set_siloed_borrowing` ------------------------------- @notice Sets the siloed borrowing flag for the reserve. @dev When this flag is set to true, users borrowing this asset will not be allowed to borrow any other asset. @param self The reserve configuration @param siloed\_borrowing True if the asset is siloed public fun set_siloed_borrowing(self: &mut reserve_config::ReserveConfigurationMap, siloed_borrowing: bool) Function `set_borrowing_enabled` -------------------------------- @notice Enables or disables borrowing on the reserve @param self The reserve configuration @param borrowing\_enabled True if the borrowing needs to be enabled, false otherwise public fun set_borrowing_enabled(self: &mut reserve_config::ReserveConfigurationMap, borrowing_enabled: bool) Function `set_reserve_factor` ----------------------------- @notice Sets the reserve factor of the reserve @param self The reserve configuration @param reserve\_factor The reserve factor public fun set_reserve_factor(self: &mut reserve_config::ReserveConfigurationMap, reserve_factor: u256) Function `set_borrow_cap` ------------------------- @notice Sets the borrow cap of the reserve @param self The reserve configuration @param borrow\_cap The borrow cap public fun set_borrow_cap(self: &mut reserve_config::ReserveConfigurationMap, borrow_cap: u256) Function `set_supply_cap` ------------------------- @notice Sets the supply cap of the reserve @param self The reserve configuration @param supply\_cap The supply cap public fun set_supply_cap(self: &mut reserve_config::ReserveConfigurationMap, supply_cap: u256) Function `set_debt_ceiling` --------------------------- @notice Sets the debt ceiling in isolation mode for the asset @param self The reserve configuration @param debt\_ceiling The maximum debt ceiling for the asset public fun set_debt_ceiling(self: &mut reserve_config::ReserveConfigurationMap, debt_ceiling: u256) Function `set_liquidation_protocol_fee` --------------------------------------- @notice Sets the liquidation protocol fee of the reserve @param self The reserve configuration @param liquidation\_protocol\_fee The liquidation protocol fee public fun set_liquidation_protocol_fee(self: &mut reserve_config::ReserveConfigurationMap, liquidation_protocol_fee: u256) Function `set_emode_category` ----------------------------- @notice Sets the eMode asset category @param self The reserve configuration @param emode\_category The asset category when the user selects the eMode public fun set_emode_category(self: &mut reserve_config::ReserveConfigurationMap, emode_category: u256) Function `set_flash_loan_enabled` --------------------------------- @notice Sets the flashloanable flag for the reserve @param self The reserve configuration @param flash\_loan\_enabled True if the asset is flashloanable, false otherwise public fun set_flash_loan_enabled(self: &mut reserve_config::ReserveConfigurationMap, flash_loan_enabled: bool) [« Previous](https://aave.github.io/aptos-aave-v3/aave-config/helper/) [Next »](https://aave.github.io/aptos-aave-v3/aave-config/revision/) --- # Helper - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Config * Helper * * * Module `0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::helper` =================================================================================== @title Helper @author Aave @notice Provides utility functions for various operations * [Constants](https://aave.github.io/aptos-aave-v3/aave-config/helper/#@Constants_0) * [Function `bitwise_negation`](https://aave.github.io/aptos-aave-v3/aave-config/helper/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_helper_bitwise_negation) Constants --------- @notice Constant representing a u256 value with all bits set to 1 const ALL_ONES: u256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935; Function `bitwise_negation` --------------------------- @notice Get the result of bitwise negation for a u256 value @param m The u256 value to negate @return The bitwise negation result as u256 public fun bitwise_negation(m: u256): u256 [« Previous](https://aave.github.io/aptos-aave-v3/aave-config/error_config/) [Next »](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/) --- # Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Home * * * Welcome to MkDocs ================= For full documentation visit [mkdocs.org](https://www.mkdocs.org/) . Commands -------- * `mkdocs new [dir-name]` - Create a new project. * `mkdocs serve` - Start the live-reloading docs server. * `mkdocs build` - Build the documentation site. * `mkdocs -h` - Print help message and exit. Project layout -------------- mkdocs.yml # The configuration file. docs/ index.md # The documentation homepage. ... # Other markdown pages, images and other files. [Next »](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/) --- # Borrow Logic - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Borrow Logic * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::borrow_logic` ========================================================================================= @title Borrow Logic Module @author Aave @notice Implements the base logic for all the actions related to borrowing * [Struct `Borrow`](https://aave.github.io/aptos-aave-v3/aave-pool/borrow_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_borrow_logic_Borrow) * [Struct `Repay`](https://aave.github.io/aptos-aave-v3/aave-pool/borrow_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_borrow_logic_Repay) * [Function `borrow`](https://aave.github.io/aptos-aave-v3/aave-pool/borrow_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_borrow_logic_borrow) * [Function `repay`](https://aave.github.io/aptos-aave-v3/aave-pool/borrow_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_borrow_logic_repay) * [Function `repay_with_a_tokens`](https://aave.github.io/aptos-aave-v3/aave-pool/borrow_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_borrow_logic_repay_with_a_tokens) * [Function `internal_borrow`](https://aave.github.io/aptos-aave-v3/aave-pool/borrow_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_borrow_logic_internal_borrow) use 0x1::event; use 0x1::object; use 0x1::signer; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::emode_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::events; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::fungible_asset_manager; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::isolation_mode_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_fee_manager; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::validation_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::variable_debt_token_factory; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; Struct `Borrow` --------------- @notice Emitted when a borrow occurs @dev Emitted on borrow() and flash\_loan() when debt needs to be opened @param reserve The address of the underlying asset being borrowed @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just initiator of the transaction on flash\_loan() @param on\_behalf\_of The address that will be getting the debt @param amount The amount borrowed out @param interest\_rate\_mode The rate mode: 2 for Variable @param borrow\_rate The numeric rate at which the user has borrowed, expressed in ray @param referral\_code The referral code used #[event] struct Borrow has drop, store Struct `Repay` -------------- @notice Emitted when a repayment occurs @dev Emitted on repay() @param reserve The address of the underlying asset of the reserve @param user The beneficiary of the repayment, getting his debt reduced @param repayer The address of the user initiating the repay(), providing the funds @param amount The amount repaid @param use\_a\_tokens True if the repayment is done using aTokens, `**false**` if done with underlying asset directly #[event] struct Repay has drop, store Function `borrow` ----------------- @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower already supplied enough collateral - E.g. User borrows 100 USDC passing as `on_behalf_of` his own address, receiving the 100 USDC in his wallet and 100 variable debt tokens, depending on the `interest_rate_mode` @dev Emits the `[Borrow](https://aave.github.io/aptos-aave-v3/aave-pool/borrow_logic/borrow_logic.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_borrow_logic_Borrow) ()` event @param account The signer account of the caller @param asset The address of the underlying asset to borrow @param amount The amount to be borrowed @param interest\_rate\_mode The interest rate mode at which the user wants to borrow: 2 for Variable @param referral\_code The code used to register the integrator originating the operation, for potential rewards. 0 if the action is executed directly by the user, without any middle-man @param on\_behalf\_of The address of the user who will receive the debt. Should be the address of the borrower itself public entry fun borrow(account: &signer, asset: address, amount: u256, interest_rate_mode: u8, referral_code: u16, on_behalf_of: address) Function `repay` ---------------- @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned - E.g. User repays 100 USDC, burning 100 variable debt tokens of the `on_behalf_of` address @param account The signer account of the caller @param asset The address of the borrowed underlying asset previously borrowed @param amount The amount to repay - Send the value math\_utils::u256\_max() in order to repay the whole debt for `asset` on the specific `interest_rate_mode` @param interest\_rate\_mode The interest rate mode at of the debt the user wants to repay: 2 for Variable @param on\_behalf\_of The address of the user who will get his debt reduced/removed. Should be the address of the user calling the function if he wants to reduce/remove his own debt, or the address of any other other borrower whose debt should be removed public entry fun repay(account: &signer, asset: address, amount: u256, interest_rate_mode: u8, on_behalf_of: address) Function `repay_with_a_tokens` ------------------------------ @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the equivalent debt tokens - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens @dev Passing math\_utils::u256\_max() as amount will clean up any residual aToken dust balance, if the user aToken balance is not enough to cover the whole debt @param account The signer account of the caller @param asset The address of the borrowed underlying asset previously borrowed @param amount The amount to repay @param interest\_rate\_mode The interest rate mode at of the debt the user wants to repay: 2 for Variable public entry fun repay_with_a_tokens(account: &signer, asset: address, amount: u256, interest_rate_mode: u8) Function `internal_borrow` -------------------------- @notice Implements the borrow feature. Borrowing allows users that provided collateral to draw liquidity from the Aave protocol proportionally to their collateralization power. For isolated positions, it also increases the isolated debt. @dev Only callable by the borrow\_logic and flashloan\_logic module @dev Emits the `[Borrow](https://aave.github.io/aptos-aave-v3/aave-pool/borrow_logic/borrow_logic.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_borrow_logic_Borrow) ()` event @param user The address of the caller @param asset The address of the underlying asset to borrow @param amount The amount to be borrowed @param interest\_rate\_mode The interest rate mode at which the user wants to borrow: 2 for Variable @param referral\_code The code used to register the integrator originating the operation, for potential rewards. 0 if the action is executed directly by the user, without any middle @param on\_behalf\_of The address of the user who will receive the debt. Should be the address of the borrower itself @param release\_underlying If true, the underlying asset will be transferred to the user, otherwise it will stay public(friend) fun internal_borrow(user: address, asset: address, amount: u256, interest_rate_mode: u8, referral_code: u16, on_behalf_of: address, release_underlying: bool) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/coin_migrator/) --- # Events - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Events * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::events` =================================================================================== @title Events module @author Aave @notice Implements the common events for different submodules * [Struct `IsolationModeTotalDebtUpdated`](https://aave.github.io/aptos-aave-v3/aave-pool/events/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_events_IsolationModeTotalDebtUpdated) * [Struct `ReserveUsedAsCollateralEnabled`](https://aave.github.io/aptos-aave-v3/aave-pool/events/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_events_ReserveUsedAsCollateralEnabled) * [Struct `ReserveUsedAsCollateralDisabled`](https://aave.github.io/aptos-aave-v3/aave-pool/events/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_events_ReserveUsedAsCollateralDisabled) * [Struct `BalanceTransfer`](https://aave.github.io/aptos-aave-v3/aave-pool/events/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_events_BalanceTransfer) * [Function `emit_isolated_mode_total_debt_updated`](https://aave.github.io/aptos-aave-v3/aave-pool/events/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_events_emit_isolated_mode_total_debt_updated) * [Function `emit_reserve_used_as_collateral_enabled`](https://aave.github.io/aptos-aave-v3/aave-pool/events/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_events_emit_reserve_used_as_collateral_enabled) * [Function `emit_reserve_used_as_collateral_disabled`](https://aave.github.io/aptos-aave-v3/aave-pool/events/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_events_emit_reserve_used_as_collateral_disabled) * [Function `emit_balance_transfer`](https://aave.github.io/aptos-aave-v3/aave-pool/events/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_events_emit_balance_transfer) use 0x1::event; Struct `IsolationModeTotalDebtUpdated` -------------------------------------- @notice Emitted when the total debt in isolation mode is updated @dev Emitted on borrow(), repay() and liquidation\_call() when using isolated assets @param asset The address of the underlying asset of the reserve @param total\_debt The total isolation mode debt for the reserve #[event] struct IsolationModeTotalDebtUpdated has drop, store Struct `ReserveUsedAsCollateralEnabled` --------------------------------------- @notice Emitted when a reserve is enabled as collateral for a user @dev Emitted on supply(), set\_user\_use\_reserve\_as\_collateral() @param reserve The address of the underlying asset of the reserve @param user The address of the user enabling the usage as collateral #[event] struct ReserveUsedAsCollateralEnabled has drop, store Struct `ReserveUsedAsCollateralDisabled` ---------------------------------------- @notice Emitted when a reserve is disabled as collateral for a user @dev Emitted on finalize\_transfer() @param reserve The address of the underlying asset of the reserve @param user The address of the user disabling the usage as collateral #[event] struct ReserveUsedAsCollateralDisabled has drop, store Struct `BalanceTransfer` ------------------------ @notice Emitted when a balance transfer occurs @dev Emitted during the transfer action @param from The user whose tokens are being transferred @param to The recipient @param value The scaled amount being transferred @param index The next liquidity index of the reserve @param a\_token\_address The address of the aToken #[event] struct BalanceTransfer has drop, store Function `emit_isolated_mode_total_debt_updated` ------------------------------------------------ @notice Emits an event when isolation mode total debt is updated @param asset The address of the underlying asset @param total\_debt The updated total debt amount public(friend) fun emit_isolated_mode_total_debt_updated(asset: address, total_debt: u256) Function `emit_reserve_used_as_collateral_enabled` -------------------------------------------------- @notice Emits an event when a reserve is enabled as collateral @param reserve The address of the reserve @param user The address of the user public(friend) fun emit_reserve_used_as_collateral_enabled(reserve: address, user: address) Function `emit_reserve_used_as_collateral_disabled` --------------------------------------------------- @notice Emits an event when a reserve is disabled as collateral @param reserve The address of the reserve @param user The address of the user public(friend) fun emit_reserve_used_as_collateral_disabled(reserve: address, user: address) Function `emit_balance_transfer` -------------------------------- @notice Emits an event when a balance transfer occurs @param from The source address @param to The destination address @param value The amount being transferred (scaled) @param index The liquidity index @param a\_token\_address The address of the aToken public(friend) fun emit_balance_transfer(from: address, to: address, value: u256, index: u256, a_token_address: address) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/) --- # Isolation Mode Logic - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Isolation Mode Logic * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::isolation_mode_logic` ================================================================================================= @title Isolation Mode Logic Module @author Aave @notice Implements the logic for the isolation mode functionality * [Function `update_isolated_debt_if_isolated`](https://aave.github.io/aptos-aave-v3/aave-pool/isolation_mode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_isolation_mode_logic_update_isolated_debt_if_isolated) * [Function `update_isolated_debt`](https://aave.github.io/aptos-aave-v3/aave-pool/isolation_mode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_isolation_mode_logic_update_isolated_debt) use 0x1::object; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::events; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_logic; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; Function `update_isolated_debt_if_isolated` ------------------------------------------- @notice Updates the isolated debt whenever a position collateralized by an isolated asset is repaid @dev Only callable by the borrow\_logic module @param user\_config\_map The user configuration map @param reserve\_cache The reserve cache @param repay\_amount The amount being repaid public(friend) fun update_isolated_debt_if_isolated(user_config_map: &user_config::UserConfigurationMap, reserve_cache: &pool_logic::ReserveCache, repay_amount: u256) Function `update_isolated_debt` ------------------------------- @notice Updates the isolated debt whenever a position collateralized by an isolated asset is liquidated @dev Only callable by the liquidation\_logic module @param reserve\_cache The reserve cache @param repay\_amount The amount being repaid @param isolation\_mode\_collateral\_address The address of the underlying asset of the reserve public(friend) fun update_isolated_debt(reserve_cache: &pool_logic::ReserveCache, repay_amount: u256, isolation_mode_collateral_address: address) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/generic_logic/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/) --- # Pool Fee Manager - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Pool Fee Manager * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_fee_manager` ============================================================================================= @title Fee Manager Module @author Aave @notice A fee module to add/manage a txn fee to mitigate the rounding error of integer arithmetic * [Resource `FeeConfigMetadata`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_FeeConfigMetadata) * [Resource `FeeConfig`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_FeeConfig) * [Struct `FeeChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_FeeChanged) * [Struct `FeeCollected`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_FeeCollected) * [Struct `FeeWithdrawn`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_FeeWithdrawn) * [Constants](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#@Constants_0) * [Function `get_apt_fee`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_get_apt_fee) * [Function `get_fee_collector_address`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_get_fee_collector_address) * [Function `get_fee_collector_apt_balance`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_get_fee_collector_apt_balance) * [Function `get_total_fees`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_get_total_fees) * [Function `get_fee_config_object_address`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_get_fee_config_object_address) * [Function `withdraw_apt_fee`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_withdraw_apt_fee) * [Function `set_apt_fee`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_set_apt_fee) * [Function `collect_apt_fee`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_fee_manager_collect_apt_fee) use 0x1::account; use 0x1::aptos_account; use 0x1::aptos_coin; use 0x1::coin; use 0x1::event; use 0x1::object; use 0x1::signer; use 0x1::smart_table; use 0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; Resource `FeeConfigMetadata` ---------------------------- @notice Metadata holding the address of the sticky object (used to access FeeConfig resource) struct FeeConfigMetadata has key Resource `FeeConfig` -------------------- @notice Configuration for fee management struct FeeConfig has key Struct `FeeChanged` ------------------- @notice Event emitted when the fee is updated via `set_apt_fee` @param caller Address who updated the fee @param asset The address of the underlying asset of the reserve @param old\_fee Previous fee value (micro APT) @param new\_fee New fee value (micro APT) #[event] struct FeeChanged has drop, store Struct `FeeCollected` --------------------- @notice Event emitted when APT fees are collected @param from Who initiated the transfer @param recipient Address receiving the transferred fee @param asset The address of the underlying asset of the reserve @param amount Amount transferred in micro APT #[event] struct FeeCollected has drop, store Struct `FeeWithdrawn` --------------------- @notice Event emitted when APT fees are withdrawn @param caller Who initiated the transfer @param recipient Address receiving the transferred fee @param amount Amount transferred in micro APT #[event] struct FeeWithdrawn has drop, store Constants --------- @notice Default apt fee 0 APT const DEFAULT_APT_FEE: u64 = 0; @notice Seed value used to create a deterministic resource account for fee management. This seed is passed to `[account::create_resource_account](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/_create_resource_account) ` to generate a unique resource account that will be used to collect and manage transaction fees. The resource account's address is deterministically derived from this seed and the source account's address. const FEE_MANAGER: vector = [70, 69, 69, 95, 77, 65, 78, 65, 71, 69, 82]; @notice Maximum APT fee allowed (10 APT = 1\_000\_000\_000 micro APT) const MAX_APT_FEE: u64 = 1000000000; Function `get_apt_fee` ---------------------- @notice Returns the current configured APT fee (in micro APT) @param asset The address of the underlying asset of the reserve @return The fee in micro APT #[view] public fun get_apt_fee(asset: address): u64 Function `get_fee_collector_address` ------------------------------------ @notice Returns the address of the fee collector resource account @return The address of the fee collector #[view] public fun get_fee_collector_address(): address Function `get_fee_collector_apt_balance` ---------------------------------------- @notice Returns the current balance of APT held by the fee collection resource account @dev This represents the real-time available fees that have been collected but not yet distributed @return The balance in micro APT #[view] public fun get_fee_collector_apt_balance(): u64 Function `get_total_fees` ------------------------- @notice Returns the total amount of fees collected historically @return The total fees in micro APT #[view] public fun get_total_fees(): u128 Function `get_fee_config_object_address` ---------------------------------------- @notice Returns the address of the sticky object that stores the fee configuration @return The address of the fee config object #[view] public fun get_fee_config_object_address(): address Function `withdraw_apt_fee` --------------------------- @notice Allows pool admin to transfer collected APT fees from the fee collector account to a target address @dev Can be used to withdraw accumulated fees to a treasury or reward distribution contract @dev Emits a FeeWithdrawn event on successful update @param from The signer of the pool admin account @param to The recipient address @param amount The amount to transfer in micro APT public entry fun withdraw_apt_fee(from: &signer, to: address, amount: u128) Function `set_apt_fee` ---------------------- @notice Updates the global APT fee rate (in micro APT units) @dev Only callable by pool\_configurator module @dev The new apt fee must be less than or equal to MAX\_APT\_FEE (10 APT) @dev Emits a FeeChanged event on successful update @param caller The signer of the pool admin or risk admin account @param asset The address of the underlying asset of the reserve @param new\_apt\_fee The new fee value in micro APT public(friend) fun set_apt_fee(caller: &signer, asset: address, new_apt_fee: u64) Function `collect_apt_fee` -------------------------- @notice Charges the configured APT fee from the caller and transfers it to the fee collector account @dev Only callable by internal `[supply_logic](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/supply_logic.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_supply_logic) `, `[borrow_logic](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/borrow_logic.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_borrow_logic) ` and flashloan\_logic modules @dev Emits a FeeCollected event on successful update @dev Accumulates the fee into `total_fees` for historical auditing @param from The signer of the account paying the fee @param asset The address of the underlying asset of the reserve public(friend) fun collect_apt_fee(from: &signer, asset: address) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/) --- # Emode Logic - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Emode Logic * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::emode_logic` ======================================================================================== @title Emode Logic Module @author Aave @notice Implements the base logic for all the actions related to the eMode * [Struct `UserEModeSet`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_UserEModeSet) * [Struct `EModeCategory`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_EModeCategory) * [Resource `EModeCategoryList`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_EModeCategoryList) * [Resource `UsersEmodeCategory`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_UsersEmodeCategory) * [Constants](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#@Constants_0) * [Function `get_user_emode`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_get_user_emode) * [Function `get_emode_configuration`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_get_emode_configuration) * [Function `get_emode_e_mode_label`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_get_emode_e_mode_label) * [Function `get_emode_e_mode_liquidation_bonus`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_get_emode_e_mode_liquidation_bonus) * [Function `is_in_emode_category`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_is_in_emode_category) * [Function `get_emode_category_data`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_get_emode_category_data) * [Function `set_user_emode`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_set_user_emode) * [Function `get_emode_category_ltv`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_get_emode_category_ltv) * [Function `get_emode_category_liquidation_threshold`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_get_emode_category_liquidation_threshold) * [Function `get_emode_category_liquidation_bonus`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_get_emode_category_liquidation_bonus) * [Function `get_emode_category_label`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_get_emode_category_label) * [Function `init_emode`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_init_emode) * [Function `configure_emode_category`](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_configure_emode_category) use 0x1::event; use 0x1::signer; use 0x1::smart_table; use 0x1::string; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::validation_logic; Struct `UserEModeSet` --------------------- @dev Emitted when the user selects a certain asset category for eMode @param user The address of the user @param category\_id The category id #[event] struct UserEModeSet has drop, store Struct `EModeCategory` ---------------------- struct EModeCategory has copy, drop, store Resource `EModeCategoryList` ---------------------------- List of eMode categories as a map (emode\_category\_id => EModeCategory). struct EModeCategoryList has key Resource `UsersEmodeCategory` ----------------------------- Map of users address and their eMode category (user\_address => emode\_category\_id) struct UsersEmodeCategory has key Constants --------- const EMPTY_STRING: vector = []; Function `get_user_emode` ------------------------- @notice Returns the eMode the user is using @param user The address of the user @return The eMode id #[view] public fun get_user_emode(user: address): u8 Function `get_emode_configuration` ---------------------------------- @notice Gets the eMode configuration and calculates the eMode asset price if a custom oracle is configured @param user\_emode\_category The user eMode category @return The eMode ltv @return The eMode liquidation threshold #[view] public fun get_emode_configuration(user_emode_category: u8): (u256, u256) Function `get_emode_e_mode_label` --------------------------------- @notice Gets the eMode category label @param user\_emode\_category The user eMode category @return The label of the eMode category #[view] public fun get_emode_e_mode_label(user_emode_category: u8): string::String Function `get_emode_e_mode_liquidation_bonus` --------------------------------------------- @notice Gets the eMode category liquidation\_bonus @param user\_emode\_category The user eMode category @return The liquidation bonus of the eMode category #[view] public fun get_emode_e_mode_liquidation_bonus(user_emode_category: u8): u16 Function `is_in_emode_category` ------------------------------- @notice Checks if eMode is active for a user and if yes, if the asset belongs to the eMode category chosen @param emode\_user\_category The user eMode category @param emode\_asset\_category The asset eMode category @return True if eMode is active and the asset belongs to the eMode category chosen by the user, false otherwise #[view] public fun is_in_emode_category(emode_user_category: u8, emode_asset_category: u8): bool Function `get_emode_category_data` ---------------------------------- @notice Returns the data of an eMode category @param id The id of the category @return The configuration data of the category #[view] public fun get_emode_category_data(id: u8): emode_logic::EModeCategory Function `set_user_emode` ------------------------- @notice Updates the user efficiency mode category @dev Will revert if user is borrowing non-compatible asset or change will drop HF < HEALTH\_FACTOR\_LIQUIDATION\_THRESHOLD @dev Emits the `[UserEModeSet](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/emode_logic.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emode_logic_UserEModeSet) ` event @param account The account signer of the caller @param category\_id The state of all users efficiency mode category public entry fun set_user_emode(account: &signer, category_id: u8) Function `get_emode_category_ltv` --------------------------------- @notice Get the ltv of the eMode category @param emode\_category The eMode category @return The ltv of the eMode category public fun get_emode_category_ltv(emode_category: &emode_logic::EModeCategory): u16 Function `get_emode_category_liquidation_threshold` --------------------------------------------------- @notice Get the liquidation threshold of the eMode category @param emode\_category The eMode category @return The liquidation threshold of the eMode category public fun get_emode_category_liquidation_threshold(emode_category: &emode_logic::EModeCategory): u16 Function `get_emode_category_liquidation_bonus` ----------------------------------------------- @notice Get the liquidation bonus of the eMode category @param emode\_category The eMode category @return The liquidation bonus of the eMode category public fun get_emode_category_liquidation_bonus(emode_category: &emode_logic::EModeCategory): u16 Function `get_emode_category_label` ----------------------------------- @notice Get the label of the eMode category @param emode\_category The eMode category @return The label of the eMode category public fun get_emode_category_label(emode_category: &emode_logic::EModeCategory): string::String Function `init_emode` --------------------- @notice Initializes the eMode @dev Only callable by the pool\_configurator module @param account The account signer of the caller public(friend) fun init_emode(account: &signer) Function `configure_emode_category` ----------------------------------- @notice Configures a new category for the eMode. @dev Only callable by the pool\_configurator module @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category. The category 0 is reserved as it's the default for volatile assets @param id The id of the category @param ltv The loan to value ratio @param liquidation\_threshold The liquidation threshold @param liquidation\_bonus The liquidation bonus @param label The label of the category public(friend) fun configure_emode_category(id: u8, ltv: u16, liquidation_threshold: u16, liquidation_bonus: u16, label: string::String) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/events/) --- # Revision - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Config * Revision * * * Module `0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::revision` ===================================================================================== @title Revision library @author Aave @notice Implements revision versioning for the protocol * [Constants](https://aave.github.io/aptos-aave-v3/aave-config/revision/#@Constants_0) * [Function `get_revision`](https://aave.github.io/aptos-aave-v3/aave-config/revision/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_revision_get_revision) use 0x1::string; use 0x1::string_utils; Constants --------- @notice Major version number const MAJOR_REVISION: u256 = 1; @notice Minor version number const MINOR_REVISION: u256 = 2; @notice Patch version number const PATCH_REVISION: u256 = 0; Function `get_revision` ----------------------- @notice Returns the full version string in the format "major.minor.patch" @return The version string #[view] public fun get_revision(): string::String [« Previous](https://aave.github.io/aptos-aave-v3/aave-config/reserve_config/) [Next »](https://aave.github.io/aptos-aave-v3/aave-config/user_config/) --- # Manage - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Acl * Manage * * * Module `0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage` ====================================================================================== @title ACLManager @author Aave @notice Access Control List Manager. Main registry of system roles and permissions. Roles are referred to by their `[vector](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/) ` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `**const**` hash digests: const MY_ROLE = b"MY_ROLE"; Roles can be used to represent a set of permissions. To restrict access to a function call, use {has\_role}: public fun foo() { assert!(has_role(MY_ROLE, error_code::ENOT_MANAGEMENT)); ... } Roles can be granted and revoked dynamically via the {grant\_role} and {revoke\_role} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grant\_role} and {revoke\_role}. By default, the admin role for all roles is `[DEFAULT_ADMIN_ROLE](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/acl_manage.md#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_DEFAULT_ADMIN_ROLE) `, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {set\_role\_admin}. WARNING: The `[DEFAULT_ADMIN_ROLE](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/acl_manage.md#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_DEFAULT_ADMIN_ROLE) ` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it. * [Struct `RoleAdminChanged`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_RoleAdminChanged) * [Struct `RoleGranted`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_RoleGranted) * [Struct `RoleRevoked`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_RoleRevoked) * [Struct `RoleData`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_RoleData) * [Resource `Roles`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_Roles) * [Constants](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#@Constants_0) * [Function `default_admin_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_default_admin_role) * [Function `get_role_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_get_role_admin) * [Function `has_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_has_role) * [Function `is_default_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_is_default_admin) * [Function `is_pool_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_is_pool_admin) * [Function `is_emergency_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_is_emergency_admin) * [Function `is_risk_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_is_risk_admin) * [Function `is_flash_borrower`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_is_flash_borrower) * [Function `is_asset_listing_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_is_asset_listing_admin) * [Function `is_funds_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_is_funds_admin) * [Function `is_emission_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_is_emission_admin) * [Function `is_admin_controlled_ecosystem_reserve_funds_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_is_admin_controlled_ecosystem_reserve_funds_admin) * [Function `is_rewards_controller_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_is_rewards_controller_admin) * [Function `get_pool_admin_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_get_pool_admin_role) * [Function `get_emergency_admin_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_get_emergency_admin_role) * [Function `get_risk_admin_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_get_risk_admin_role) * [Function `get_flash_borrower_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_get_flash_borrower_role) * [Function `get_asset_listing_admin_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_get_asset_listing_admin_role) * [Function `get_funds_admin_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_get_funds_admin_role) * [Function `get_emission_admin_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_get_emission_admin_role) * [Function `get_admin_controlled_ecosystem_reserve_funds_admin_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_get_admin_controlled_ecosystem_reserve_funds_admin_role) * [Function `get_rewards_controller_admin_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_get_rewards_controller_admin_role) * [Function `set_role_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_set_role_admin) * [Function `grant_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_grant_role) * [Function `renounce_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_renounce_role) * [Function `revoke_role`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_revoke_role) * [Function `add_default_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_add_default_admin) * [Function `renounce_default_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_renounce_default_admin) * [Function `add_pool_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_add_pool_admin) * [Function `remove_pool_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_remove_pool_admin) * [Function `add_emergency_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_add_emergency_admin) * [Function `remove_emergency_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_remove_emergency_admin) * [Function `add_risk_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_add_risk_admin) * [Function `remove_risk_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_remove_risk_admin) * [Function `add_flash_borrower`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_add_flash_borrower) * [Function `remove_flash_borrower`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_remove_flash_borrower) * [Function `add_asset_listing_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_add_asset_listing_admin) * [Function `remove_asset_listing_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_remove_asset_listing_admin) * [Function `add_funds_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_add_funds_admin) * [Function `remove_funds_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_remove_funds_admin) * [Function `add_emission_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_add_emission_admin) * [Function `remove_emission_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_remove_emission_admin) * [Function `add_admin_controlled_ecosystem_reserve_funds_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_add_admin_controlled_ecosystem_reserve_funds_admin) * [Function `remove_admin_controlled_ecosystem_reserve_funds_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_remove_admin_controlled_ecosystem_reserve_funds_admin) * [Function `add_rewards_controller_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_add_rewards_controller_admin) * [Function `remove_rewards_controller_admin`](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/#0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606_acl_manage_remove_rewards_controller_admin) use 0x1::acl; use 0x1::event; use 0x1::object; use 0x1::signer; use 0x1::smart_table; use 0x1::string; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; Struct `RoleAdminChanged` ------------------------- #[event] struct RoleAdminChanged has drop, store Struct `RoleGranted` -------------------- #[event] struct RoleGranted has drop, store Struct `RoleRevoked` -------------------- #[event] struct RoleRevoked has drop, store Struct `RoleData` ----------------- @dev Main structure for storing role data including members and admin role struct RoleData has store Resource `Roles` ---------------- @dev Root structure holding ACL data for the module struct Roles has key Constants --------- const ADMIN_CONTROLLED_ECOSYSTEM_RESERVE_FUNDS_ADMIN_ROLE: vector = [65, 68, 77, 73, 78, 95, 67, 79, 78, 84, 82, 79, 76, 76, 69, 68, 95, 69, 67, 79, 83, 89, 83, 84, 69, 77, 95, 82, 69, 83, 69, 82, 86, 69, 95, 70, 85, 78, 68, 83, 95, 65, 68, 77, 73, 78]; const ASSET_LISTING_ADMIN_ROLE: vector = [65, 83, 83, 69, 84, 95, 76, 73, 83, 84, 73, 78, 71, 95, 65, 68, 77, 73, 78]; const DEFAULT_ADMIN_ROLE: vector = [68, 69, 70, 65, 85, 76, 84, 95, 65, 68, 77, 73, 78]; const EMERGENCY_ADMIN_ROLE: vector = [69, 77, 69, 82, 71, 69, 78, 67, 89, 95, 65, 68, 77, 73, 78]; const EMISSION_ADMIN_ROLE: vector = [69, 77, 73, 83, 83, 73, 79, 78, 95, 65, 68, 77, 73, 78]; const FLASH_BORROWER_ROLE: vector = [70, 76, 65, 83, 72, 95, 66, 79, 82, 82, 79, 87, 69, 82]; const FUNDS_ADMIN_ROLE: vector = [70, 85, 78, 68, 83, 95, 65, 68, 77, 73, 78]; const POOL_ADMIN_ROLE: vector = [80, 79, 79, 76, 95, 65, 68, 77, 73, 78]; const REWARDS_CONTROLLER_ADMIN_ROLE: vector = [82, 69, 87, 65, 82, 68, 83, 95, 67, 79, 78, 84, 82, 79, 76, 76, 69, 82, 95, 65, 68, 77, 73, 78]; const RISK_ADMIN_ROLE: vector = [82, 73, 83, 75, 95, 65, 68, 77, 73, 78]; Function `default_admin_role` ----------------------------- @notice Returns the default admin role string @return Default admin role as a String #[view] public fun default_admin_role(): string::String Function `get_role_admin` ------------------------- @notice Returns the admin role that controls `role` @param role The role to check the admin for @return Admin role string for the specified role #[view] public fun get_role_admin(role: string::String): string::String Function `has_role` ------------------- @notice Checks if `user` has been granted `role` @param role The role identifier @param user The account to check @return Boolean indicating if the user has the role #[view] public fun has_role(role: string::String, user: address): bool Function `is_default_admin` --------------------------- @notice Checks if the address is the default admin (i.e., a super-admin) @param admin Address to check @return Boolean indicating if the address is the default admin #[view] public fun is_default_admin(admin: address): bool Function `is_pool_admin` ------------------------ @notice Checks if the address is a pool admin @param admin Address to check @return Boolean indicating if the address is a pool admin #[view] public fun is_pool_admin(admin: address): bool Function `is_emergency_admin` ----------------------------- @notice Checks if the address is an emergency admin @param admin Address to check @return Boolean indicating if the address is an emergency admin #[view] public fun is_emergency_admin(admin: address): bool Function `is_risk_admin` ------------------------ @notice Checks if the address is a risk admin @param admin Address to check @return Boolean indicating if the address is a risk admin #[view] public fun is_risk_admin(admin: address): bool Function `is_flash_borrower` ---------------------------- @notice Checks if the address is a flash borrower @param borrower Address to check @return Boolean indicating if the address is a flash borrower #[view] public fun is_flash_borrower(borrower: address): bool Function `is_asset_listing_admin` --------------------------------- @notice Checks if the address is an asset listing admin @param admin Address to check @return Boolean indicating if the address is an asset listing admin #[view] public fun is_asset_listing_admin(admin: address): bool Function `is_funds_admin` ------------------------- @notice Checks if the address is a funds admin @param admin Address to check @return Boolean indicating if the address is a funds admin #[view] public fun is_funds_admin(admin: address): bool Function `is_emission_admin` ---------------------------- @notice Checks if the address is an emission admin @param admin Address to check @return Boolean indicating if the address is an emission admin #[view] public fun is_emission_admin(admin: address): bool Function `is_admin_controlled_ecosystem_reserve_funds_admin` ------------------------------------------------------------ @notice Checks if the address is an admin controlled ecosystem reserve funds admin @param admin Address to check @return Boolean indicating if the address is an admin controlled ecosystem reserve funds admin #[view] public fun is_admin_controlled_ecosystem_reserve_funds_admin(admin: address): bool Function `is_rewards_controller_admin` -------------------------------------- @notice Checks if the address is a rewards controller admin @param admin Address to check @return Boolean indicating if the address is a rewards controller admin #[view] public fun is_rewards_controller_admin(admin: address): bool Function `get_pool_admin_role` ------------------------------ @notice Returns the pool admin role string @return Pool admin role as a String #[view] public fun get_pool_admin_role(): string::String Function `get_emergency_admin_role` ----------------------------------- @notice Returns the emergency admin role string @return Emergency admin role as a String #[view] public fun get_emergency_admin_role(): string::String Function `get_risk_admin_role` ------------------------------ @notice Returns the risk admin role string @return Risk admin role as a String #[view] public fun get_risk_admin_role(): string::String Function `get_flash_borrower_role` ---------------------------------- @notice Returns the flash borrower role string @return Flash borrower role as a String #[view] public fun get_flash_borrower_role(): string::String Function `get_asset_listing_admin_role` --------------------------------------- @notice Returns the asset listing admin role string @return Asset listing admin role as a String #[view] public fun get_asset_listing_admin_role(): string::String Function `get_funds_admin_role` ------------------------------- @notice Returns the funds admin role string @return Funds admin role as a String #[view] public fun get_funds_admin_role(): string::String Function `get_emission_admin_role` ---------------------------------- @notice Returns the emission admin role string @return Emission admin role as a String #[view] public fun get_emission_admin_role(): string::String Function `get_admin_controlled_ecosystem_reserve_funds_admin_role` ------------------------------------------------------------------ @notice Returns the admin controlled ecosystem reserve funds admin role string @return Admin controlled ecosystem reserve funds admin role as a String #[view] public fun get_admin_controlled_ecosystem_reserve_funds_admin_role(): string::String Function `get_rewards_controller_admin_role` -------------------------------------------- @notice Returns the rewards controller admin role string @return Rewards controller admin role as a String #[view] public fun get_rewards_controller_admin_role(): string::String Function `set_role_admin` ------------------------- @notice Sets `admin_role` as `role`'s admin role @param admin Signer with permissions to set role admin @param role The role to modify admin for @param admin\_role The new admin role to set @dev Emits a {RoleAdminChanged} event public entry fun set_role_admin(admin: &signer, role: string::String, admin_role: string::String) Function `grant_role` --------------------- @notice Grants `role` to `[account](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/) ` @param admin Signer with admin role permissions @param role The role to grant @param user Address to grant the role to @dev Errors if the 0x0 address is being used to be granted a role @dev If `[account](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/) ` had not been already granted `role`, emits a {RoleGranted} event @dev Requirements: the caller must have `role`'s admin role public entry fun grant_role(admin: &signer, role: string::String, user: address) Function `renounce_role` ------------------------ @notice Revokes `role` from the calling account @param admin Signer revoking their own role @param role The role to renounce @dev If the calling account had been granted `role`, emits a {RoleRevoked} event @dev Requirements: the caller must be `[account](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/) ` public entry fun renounce_role(admin: &signer, role: string::String) Function `revoke_role` ---------------------- @notice Revokes `role` from `[account](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/) ` @param admin Signer with admin role permissions @param role The role to revoke @param user Address to revoke the role from @dev If `[account](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/) ` had been granted `role`, emits a {RoleRevoked} event @dev Requirements: the caller must have `role`'s admin role public entry fun revoke_role(admin: &signer, role: string::String, user: address) Function `add_default_admin` ---------------------------- @notice Adds a default admin role to the specified address @param admin Signer with permissions to grant roles @param user Address to grant the default admin role to public entry fun add_default_admin(admin: &signer, user: address) Function `renounce_default_admin` --------------------------------- @notice Renounce the default admin role @param admin Signer with permissions to grant roles public entry fun renounce_default_admin(admin: &signer) Function `add_pool_admin` ------------------------- @notice Adds a pool admin role to the specified address @param admin Signer with permissions to grant roles @param user Address to grant the pool admin role to public entry fun add_pool_admin(admin: &signer, user: address) Function `remove_pool_admin` ---------------------------- @notice Removes the pool admin role from the specified address @param admin Signer with permissions to revoke roles @param user Address to revoke the pool admin role from public entry fun remove_pool_admin(admin: &signer, user: address) Function `add_emergency_admin` ------------------------------ @notice Adds an emergency admin role to the specified address @param admin Signer with permissions to grant roles @param user Address to grant the emergency admin role to public entry fun add_emergency_admin(admin: &signer, user: address) Function `remove_emergency_admin` --------------------------------- @notice Removes the emergency admin role from the specified address @param admin Signer with permissions to revoke roles @param user Address to revoke the emergency admin role from public entry fun remove_emergency_admin(admin: &signer, user: address) Function `add_risk_admin` ------------------------- @notice Adds a risk admin role to the specified address @param admin Signer with permissions to grant roles @param user Address to grant the risk admin role to public entry fun add_risk_admin(admin: &signer, user: address) Function `remove_risk_admin` ---------------------------- @notice Removes the risk admin role from the specified address @param admin Signer with permissions to revoke roles @param user Address to revoke the risk admin role from public entry fun remove_risk_admin(admin: &signer, user: address) Function `add_flash_borrower` ----------------------------- @notice Adds a flash borrower role to the specified address @param admin Signer with permissions to grant roles @param borrower Address to grant the flash borrower role to public entry fun add_flash_borrower(admin: &signer, borrower: address) Function `remove_flash_borrower` -------------------------------- @notice Removes the flash borrower role from the specified address @param admin Signer with permissions to revoke roles @param borrower Address to revoke the flash borrower role from public entry fun remove_flash_borrower(admin: &signer, borrower: address) Function `add_asset_listing_admin` ---------------------------------- @notice Adds an asset listing admin role to the specified address @param admin Signer with permissions to grant roles @param user Address to grant the asset listing admin role to public entry fun add_asset_listing_admin(admin: &signer, user: address) Function `remove_asset_listing_admin` ------------------------------------- @notice Removes the asset listing admin role from the specified address @param admin Signer with permissions to revoke roles @param user Address to revoke the asset listing admin role from public entry fun remove_asset_listing_admin(admin: &signer, user: address) Function `add_funds_admin` -------------------------- @notice Adds a funds admin role to the specified address @param admin Signer with permissions to grant roles @param user Address to grant the funds admin role to public entry fun add_funds_admin(admin: &signer, user: address) Function `remove_funds_admin` ----------------------------- @notice Removes the funds admin role from the specified address @param admin Signer with permissions to revoke roles @param user Address to revoke the funds admin role from public entry fun remove_funds_admin(admin: &signer, user: address) Function `add_emission_admin` ----------------------------- @notice Adds an emission admin role to the specified address @param admin Signer with permissions to grant roles @param user Address to grant the emission admin role to public entry fun add_emission_admin(admin: &signer, user: address) Function `remove_emission_admin` -------------------------------- @notice Removes the emission admin role from the specified address @param admin Signer with permissions to revoke roles @param user Address to revoke the emission admin role from public entry fun remove_emission_admin(admin: &signer, user: address) Function `add_admin_controlled_ecosystem_reserve_funds_admin` ------------------------------------------------------------- @notice Adds an admin controlled ecosystem reserve funds admin role to the specified address @param admin Signer with permissions to grant roles @param user Address to grant the admin controlled ecosystem reserve funds admin role to public entry fun add_admin_controlled_ecosystem_reserve_funds_admin(admin: &signer, user: address) Function `remove_admin_controlled_ecosystem_reserve_funds_admin` ---------------------------------------------------------------- @notice Removes the admin controlled ecosystem reserve funds admin role from the specified address @param admin Signer with permissions to revoke roles @param user Address to revoke the admin controlled ecosystem reserve funds admin role from public entry fun remove_admin_controlled_ecosystem_reserve_funds_admin(admin: &signer, user: address) Function `add_rewards_controller_admin` --------------------------------------- @notice Adds a rewards controller admin role to the specified address @param admin Signer with permissions to grant roles @param user Address to grant the rewards controller admin role to public entry fun add_rewards_controller_admin(admin: &signer, user: address) Function `remove_rewards_controller_admin` ------------------------------------------ @notice Removes the rewards controller admin role from the specified address @param admin Signer with permissions to revoke roles @param user Address to revoke the rewards controller admin role from public entry fun remove_rewards_controller_admin(admin: &signer, user: address) [« Previous](https://aave.github.io/aptos-aave-v3/) [Next »](https://aave.github.io/aptos-aave-v3/aave-config/error_config/) --- # Oracle - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Oracle * Oracle * * * Module `0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9::oracle` =================================================================================== @title Oracle @author Aave @notice Provides price feed functionality for the Aave protocol * [Enum `AdapterType`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_AdapterType) * [Struct `AssetPriceFeedUpdated`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_AssetPriceFeedUpdated) * [Struct `AssetCustomPriceUpdated`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_AssetCustomPriceUpdated) * [Struct `AssetMaximumPriceAgeUpdated`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_AssetMaximumPriceAgeUpdated) * [Struct `AssetPriceFeedRemoved`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_AssetPriceFeedRemoved) * [Struct `AssetCustomPriceRemoved`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_AssetCustomPriceRemoved) * [Struct `PriceCapUpdated`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_PriceCapUpdated) * [Struct `PriceCapRemoved`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_PriceCapRemoved) * [Struct `CapParametersUpdated`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_CapParametersUpdated) * [Resource `CappedAssetData`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_CappedAssetData) * [Resource `PriceOracleData`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_PriceOracleData) * [Constants](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#@Constants_0) * [Function `is_asset_price_capped`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_is_asset_price_capped) * [Function `is_custom_price_set`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_is_custom_price_set) * [Function `get_asset_price`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_get_asset_price) * [Function `get_stable_price_cap`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_get_stable_price_cap) * [Function `get_max_asset_price_age`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_get_max_asset_price_age) * [Function `get_assets_prices`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_get_assets_prices) * [Function `get_asset_price_and_timestamp`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_get_asset_price_and_timestamp) * [Function `get_asset_prices_and_timestamps`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_get_asset_prices_and_timestamps) * [Function `oracle_address`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_oracle_address) * [Function `get_asset_price_decimals`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_get_asset_price_decimals) * [Function `set_susde_price_adapter`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_set_susde_price_adapter) * [Function `set_price_cap_stable_adapter`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_set_price_cap_stable_adapter) * [Function `remove_price_cap_stable_adapter`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_remove_price_cap_stable_adapter) * [Function `set_asset_feed_id`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_set_asset_feed_id) * [Function `set_asset_custom_price`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_set_asset_custom_price) * [Function `set_max_asset_price_age`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_set_max_asset_price_age) * [Function `batch_set_asset_feed_ids`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_batch_set_asset_feed_ids) * [Function `batch_set_asset_custom_prices`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_batch_set_asset_custom_prices) * [Function `remove_asset_feed_id`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_remove_asset_feed_id) * [Function `remove_asset_custom_price`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_remove_asset_custom_price) * [Function `batch_remove_asset_feed_ids`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_batch_remove_asset_feed_ids) * [Function `batch_remove_asset_custom_prices`](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/#0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9_oracle_batch_remove_asset_custom_prices) use 0x1::account; use 0x1::event; use 0x1::option; use 0x1::signer; use 0x1::smart_table; use 0x1::timestamp; use 0x1::vector; use 0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; use 0xe93d203a3ece4208d5b91a7615f49f759a709cc10899a4dfc2faf551d9a90459::registry; use 0xe93d203a3ece4208d5b91a7615f49f759a709cc10899a4dfc2faf551d9a90459::router; Enum `AdapterType` ------------------ @notice The type of adapter for retrieving the price enum AdapterType has copy, drop, store Struct `AssetPriceFeedUpdated` ------------------------------ #[event] struct AssetPriceFeedUpdated has drop, store Struct `AssetCustomPriceUpdated` -------------------------------- @notice Emitted when an asset custom price is updated #[event] struct AssetCustomPriceUpdated has drop, store Struct `AssetMaximumPriceAgeUpdated` ------------------------------------ @notice Emitted when an asset maximum price age is updated #[event] struct AssetMaximumPriceAgeUpdated has drop, store Struct `AssetPriceFeedRemoved` ------------------------------ @notice Emitted when an asset price feed is removed #[event] struct AssetPriceFeedRemoved has drop, store Struct `AssetCustomPriceRemoved` -------------------------------- @notice Emitted when an asset custom price is removed #[event] struct AssetCustomPriceRemoved has drop, store Struct `PriceCapUpdated` ------------------------ @notice Emitted when a price cap is updated for an asset #[event] struct PriceCapUpdated has drop, store Struct `PriceCapRemoved` ------------------------ @notice Emitted when a price cap is removed for an asset #[event] struct PriceCapRemoved has drop, store Struct `CapParametersUpdated` ----------------------------- @notice Emitted when the cap parameters are updated for an asset #[event] struct CapParametersUpdated has drop, store Resource `CappedAssetData` -------------------------- @notice Main storage for multiple capped asset data struct CappedAssetData has copy, drop, store, key Resource `PriceOracleData` -------------------------- @notice Main storage for oracle data struct PriceOracleData has key Constants --------- @notice Seed for the resource account const AAVE_ORACLE_SEED: vector = [65, 65, 86, 69, 95, 79, 82, 65, 67, 76, 69]; @notice Decimal precision for Chainlink asset prices @dev Reference: https://docs.chain.link/data-feeds/price-feeds/addresses?network=aptos&page=1 const CHAINLINK_ASSET_DECIMAL_PRECISION: u8 = 18; @notice Default maximum age for an oracle price - in seconds @dev Set for 45 mins for all assets const DEFAULT_MAX_PRICE_AGE_SECS: u64 = 2700; @notice Maximum value for a 192-bit signed integer (192-th bit is sign bit) @dev All positive values are in \[0, 2^191 - 1\] const I192_MAX: u256 = 3138550867693340381917894711603833208051177722232017256447; @notice Minimal ratio increase lifetime in years for overflow protection @dev This constant defines the minimum acceptable timeframe (3 years) before a ratio could potentially overflow due to compound growth in the SUSDE price adapter. It serves as a critical safety mechanism to prevent mathematical overflow in ratio calculations. The 3-year timeframe balances safety (preventing immediate overflow risks) with flexibility (allowing reasonable growth parameters for liquid staking rewards). This is particularly important for SUSDE where the ratio represents the appreciation of staked USDe over time. const MINIMAL_RATIO_INCREASE_LIFETIME: u256 = 3; @notice Test maximum age for an oracle price - in seconds @dev Set to one hour for all assets const TEST_MAX_PRICE_AGE_SECS: u64 = 3600; Function `is_asset_price_capped` -------------------------------- @notice Checks if an asset's price is capped (actual price exceeds cap) @param asset Address of the asset to check @return True if the asset's actual price exceeds its cap #[view] public fun is_asset_price_capped(asset: address): bool Function `is_custom_price_set` ------------------------------ @notice Returns true if a custom price is set for an asset @param asset Address of the asset #[view] public fun is_custom_price_set(asset: address): bool Function `get_asset_price` -------------------------- @notice Gets the current price of an asset, respecting any price cap @param asset Address of the asset @return The asset price (capped if applicable) #[view] public fun get_asset_price(asset: address): u256 Function `get_stable_price_cap` ------------------------------- @notice Gets the price cap for an asset if it exists @param asset Address of the asset @return The price cap if it exists, none otherwise #[view] public fun get_stable_price_cap(asset: address): option::Option Function `get_max_asset_price_age` ---------------------------------- @notice Gets the asset max price age for an asset if it exists @param asset Address of the asset @return The max price age if it exists, none otherwise #[view] public fun get_max_asset_price_age(asset: address): option::Option Function `get_assets_prices` ---------------------------- @notice Gets prices for multiple assets at once @param assets Vector of asset addresses @return Vector of corresponding asset prices #[view] public fun get_assets_prices(assets: vector
): vector Function `get_asset_price_and_timestamp` ---------------------------------------- @notice Gets the current price of an asset and its timestamp, respecting any price cap @param asset Address of the asset @return The asset price and its timestamp as a tuple (capped if applicable) #[view] public fun get_asset_price_and_timestamp(asset: address): (u256, u256) Function `get_asset_prices_and_timestamps` ------------------------------------------ @notice Gets prices and timestamps for multiple assets at once @param assets Vector of asset addresses @return Vectors of corresponding asset prices with their timestamps #[view] public fun get_asset_prices_and_timestamps(assets: vector
): (vector, vector) Function `oracle_address` ------------------------- @notice Gets the oracle's resource account address @return The oracle's address #[view] public fun oracle_address(): address Function `get_asset_price_decimals` ----------------------------------- @notice Gets the decimal precision used for asset prices @return The number of decimal places (always 18) #[view] public fun get_asset_price_decimals(): u8 Function `set_susde_price_adapter` ---------------------------------- @notice Sets up a SUSDE price adapter for an asset with ratio growth parameters @param account Admin account that sets the adapter (must be risk or pool admin) @param asset Address of the asset to configure @param minimum\_snapshot\_delay Minimum delay required between snapshots in seconds @param snapshot\_timestamp Initial timestamp for the snapshot in seconds @param max\_yearly\_ratio\_growth\_percent Maximum yearly ratio growth percentage @param snapshot\_ratio Initial snapshot ratio value @param mapped\_asset\_ratio\_multiplier Mapped asset ration multiplier public entry fun set_susde_price_adapter(account: &signer, asset: address, minimum_snapshot_delay: u256, snapshot_timestamp: u256, max_yearly_ratio_growth_percent: u256, snapshot_ratio: u256, mapped_asset_ratio_multiplier: option::Option
) Function `set_price_cap_stable_adapter` --------------------------------------- @notice Sets a price cap for an asset @param account Admin account that sets the cap @param asset Address of the asset @param price\_cap Maximum price value for the asset public entry fun set_price_cap_stable_adapter(account: &signer, asset: address, stable_price_cap: u256) Function `remove_price_cap_stable_adapter` ------------------------------------------ @notice Removes a price cap for an asset @param account Admin account that removes the cap @param asset Address of the asset public entry fun remove_price_cap_stable_adapter(account: &signer, asset: address) Function `set_asset_feed_id` ---------------------------- @notice Sets a Chainlink feed ID for an asset @param account Admin account that sets the feed @param asset Address of the asset @param feed\_id Chainlink feed ID for the asset public entry fun set_asset_feed_id(account: &signer, asset: address, feed_id: vector) Function `set_asset_custom_price` --------------------------------- @notice Sets a custom price for an asset @param account Admin account that sets the price @param asset Address of the asset @param custom\_price Custom price value public entry fun set_asset_custom_price(account: &signer, asset: address, custom_price: u256) Function `set_max_asset_price_age` ---------------------------------- @notice Sets the max price age for an asset @param account Admin account that sets the price @param asset Address of the asset @param max\_asset\_price\_age Maximum asset price age public entry fun set_max_asset_price_age(account: &signer, asset: address, max_asset_price_age: u64) Function `batch_set_asset_feed_ids` ----------------------------------- @notice Sets Chainlink feed IDs for multiple assets at once @param account Admin account that sets the feeds @param assets Vector of asset addresses @param feed\_ids Vector of corresponding feed IDs public entry fun batch_set_asset_feed_ids(account: &signer, assets: vector
, feed_ids: vector>) Function `batch_set_asset_custom_prices` ---------------------------------------- @notice Sets custom prices for multiple assets at once @param account Admin account that sets the prices @param assets Vector of asset addresses @param custom\_prices Vector of corresponding custom prices public entry fun batch_set_asset_custom_prices(account: &signer, assets: vector
, custom_prices: vector) Function `remove_asset_feed_id` ------------------------------- @notice Removes a Chainlink feed ID for an asset @param account Admin account that removes the feed @param asset Address of the asset public entry fun remove_asset_feed_id(account: &signer, asset: address) Function `remove_asset_custom_price` ------------------------------------ @notice Removes a custom price for an asset @param account Admin account that removes the price @param asset Address of the asset public entry fun remove_asset_custom_price(account: &signer, asset: address) Function `batch_remove_asset_feed_ids` -------------------------------------- @notice Removes Chainlink feed IDs for multiple assets at once @param account Admin account that removes the feeds @param assets Vector of asset addresses public entry fun batch_remove_asset_feed_ids(account: &signer, assets: vector
) Function `batch_remove_asset_custom_prices` ------------------------------------------- @notice Removes custom prices for multiple assets at once @param account Admin account that removes the prices @param assets Vector of asset addresses public entry fun batch_remove_asset_custom_prices(account: &signer, assets: vector
) [« Previous](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/) --- # Rewards Distributor - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Rewards Distributor * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::rewards_distributor` ================================================================================================ @title Rewards Distributor Module @author Aave @notice Implements functionality to distribute rewards to users * [Struct `RewardsClaimed`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_distributor/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_distributor_RewardsClaimed) * [Function `claim_rewards`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_distributor/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_distributor_claim_rewards) * [Function `claim_rewards_on_behalf`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_distributor/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_distributor_claim_rewards_on_behalf) * [Function `claim_rewards_to_self`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_distributor/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_distributor_claim_rewards_to_self) * [Function `claim_all_rewards`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_distributor/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_distributor_claim_all_rewards) * [Function `claim_all_rewards_on_behalf`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_distributor/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_distributor_claim_all_rewards_on_behalf) * [Function `claim_all_rewards_to_self`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_distributor/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_distributor_claim_all_rewards_to_self) use 0x1::event; use 0x1::object; use 0x1::option; use 0x1::signer; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::rewards_controller; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::transfer_strategy; Struct `RewardsClaimed` ----------------------- @notice Emitted when rewards are claimed @param user The address of the user who claimed rewards @param reward The address of the reward @param to The address to which rewards are transferred @param claimer The address of the claimer @param amount The amount of rewards claimed @param rewards\_controller\_address The address of the rewards controller #[event] struct RewardsClaimed has drop, store Function `claim_rewards` ------------------------ @notice Claims rewards for a user @param caller The signer account of the caller @param assets Vector of asset addresses @param amount The amount of rewards to claim @param to The address to which rewards are transferred @param reward The address of the reward @param rewards\_controller\_address The address of the rewards controller @return The amount of rewards claimed public fun claim_rewards(caller: &signer, assets: vector
, amount: u256, to: address, reward: address, rewards_controller_address: address): u256 Function `claim_rewards_on_behalf` ---------------------------------- @notice Claims rewards on behalf of a user @param caller The signer account of the caller @param assets Vector of asset addresses @param amount The amount of rewards to claim @param user The address of the user @param to The address to which rewards are transferred @param reward The address of the reward @param rewards\_controller\_address The address of the rewards controller @return The amount of rewards claimed public fun claim_rewards_on_behalf(caller: &signer, assets: vector
, amount: u256, user: address, to: address, reward: address, rewards_controller_address: address): u256 Function `claim_rewards_to_self` -------------------------------- @notice Claims rewards and transfers them to the caller @param caller The signer account of the caller @param assets Vector of asset addresses @param amount The amount of rewards to claim @param reward The address of the reward @param rewards\_controller\_address The address of the rewards controller @return The amount of rewards claimed public fun claim_rewards_to_self(caller: &signer, assets: vector
, amount: u256, reward: address, rewards_controller_address: address): u256 Function `claim_all_rewards` ---------------------------- @notice Claims all rewards for a user @param caller The signer account of the caller @param assets Vector of asset addresses @param to The address to which rewards are transferred @param rewards\_controller\_address The address of the rewards controller @return Tuple containing vector of reward addresses and vector of reward amounts public fun claim_all_rewards(caller: &signer, assets: vector
, to: address, rewards_controller_address: address): (vector
, vector) Function `claim_all_rewards_on_behalf` -------------------------------------- @notice Claims all rewards on behalf of a user @param caller The signer account of the caller @param assets Vector of asset addresses @param user The address of the user @param to The address to which rewards are transferred @param rewards\_controller\_address The address of the rewards controller @return Tuple containing vector of reward addresses and vector of reward amounts public fun claim_all_rewards_on_behalf(caller: &signer, assets: vector
, user: address, to: address, rewards_controller_address: address): (vector
, vector) Function `claim_all_rewards_to_self` ------------------------------------ @notice Claims all rewards and transfers them to the caller @param caller The signer account of the caller @param assets Vector of asset addresses @param rewards\_controller\_address The address of the rewards controller @return Tuple containing vector of reward addresses and vector of reward amounts public fun claim_all_rewards_to_self(caller: &signer, assets: vector
, rewards_controller_address: address): (vector
, vector) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/supply_logic/) --- # Pool Logic - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Pool Logic * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_logic` ======================================================================================= @title Pool Logic Module @author Aave @notice Implements core logic for Aave protocol pool operations including state updates and interest rate calculations * [Struct `ReserveDataUpdated`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_ReserveDataUpdated) * [Struct `ReserveCache`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_ReserveCache) * [Function `update_state`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_update_state) * [Function `update_interest_rates_and_virtual_balance`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_update_interest_rates_and_virtual_balance) * [Function `cache`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_cache) * [Function `get_reserve_cache_configuration`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_reserve_cache_configuration) * [Function `get_reserve_factor`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_reserve_factor) * [Function `get_curr_liquidity_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_curr_liquidity_index) * [Function `set_curr_liquidity_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_set_curr_liquidity_index) * [Function `get_next_liquidity_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_next_liquidity_index) * [Function `set_next_liquidity_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_set_next_liquidity_index) * [Function `get_curr_variable_borrow_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_curr_variable_borrow_index) * [Function `get_reserve_cache_last_update_timestamp`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_reserve_cache_last_update_timestamp) * [Function `get_next_variable_borrow_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_next_variable_borrow_index) * [Function `set_next_variable_borrow_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_set_next_variable_borrow_index) * [Function `get_curr_liquidity_rate`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_curr_liquidity_rate) * [Function `set_curr_liquidity_rate`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_set_curr_liquidity_rate) * [Function `get_curr_variable_borrow_rate`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_curr_variable_borrow_rate) * [Function `set_curr_variable_borrow_rate`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_set_curr_variable_borrow_rate) * [Function `set_reserve_cache_last_update_timestamp`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_set_reserve_cache_last_update_timestamp) * [Function `get_a_token_address`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_a_token_address) * [Function `get_variable_debt_token_address`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_variable_debt_token_address) * [Function `get_curr_scaled_variable_debt`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_curr_scaled_variable_debt) * [Function `get_next_scaled_variable_debt`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_get_next_scaled_variable_debt) * [Function `set_next_scaled_variable_debt`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_logic_set_next_scaled_variable_debt) use 0x1::event; use 0x1::object; use 0x1::timestamp; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::default_reserve_interest_rate_strategy; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::variable_debt_token_factory; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Struct `ReserveDataUpdated` --------------------------- @notice Emitted when the state of a reserve is updated @param reserve The address of the underlying asset of the reserve @param liquidity\_rate The next liquidity rate @param variable\_borrow\_rate The next variable borrow rate @param liquidity\_index The next liquidity index @param variable\_borrow\_index The next variable borrow index #[event] struct ReserveDataUpdated has drop, store Struct `ReserveCache` --------------------- @notice Cache for pool reserve data to avoid repeated storage reads struct ReserveCache has drop Function `update_state` ----------------------- @notice Updates the liquidity cumulative index and the variable borrow index @dev Only callable by the supply\_logic, borrow\_logic, flashloan\_logic and liquidation\_logic module @param reserve\_data The reserve data @param reserve\_cache The mutable reference of the reserve cache public(friend) fun update_state(reserve_data: object::Object, reserve_cache: &mut pool_logic::ReserveCache) Function `update_interest_rates_and_virtual_balance` ---------------------------------------------------- @notice Updates the reserve the current variable borrow rate and the current liquidity rate @dev Only callable by the supply\_logic, borrow\_logic, flashloan\_logic, liquidation\_logic and pool\_configurator module @param reserve\_data The reserve data @param reserve\_cache The reserve cache @param reserve\_address The address of the reserve to be updated @param liquidity\_added The amount of liquidity added to the protocol (supply or repay) in the previous action @param liquidity\_taken The amount of liquidity taken from the protocol (redeem or borrow) public(friend) fun update_interest_rates_and_virtual_balance(reserve_data: object::Object, reserve_cache: &pool_logic::ReserveCache, reserve_address: address, liquidity_added: u256, liquidity_taken: u256) Function `cache` ---------------- @notice Creates a cache of the reserve data to avoid repeated storage reads @param reserve\_data The reserve data @return A new ReserveCache containing the reserve data public fun cache(reserve_data: object::Object): pool_logic::ReserveCache Function `get_reserve_cache_configuration` ------------------------------------------ @notice Gets the reserve configuration from cache @param reserve\_cache The reserve cache @return The reserve configuration public fun get_reserve_cache_configuration(reserve_cache: &pool_logic::ReserveCache): reserve_config::ReserveConfigurationMap Function `get_reserve_factor` ----------------------------- @notice Gets the reserve factor from cache @param reserve\_cache The reserve cache @return The reserve factor public fun get_reserve_factor(reserve_cache: &pool_logic::ReserveCache): u256 Function `get_curr_liquidity_index` ----------------------------------- @notice Gets the current liquidity index from cache @param reserve\_cache The reserve cache @return The current liquidity index public fun get_curr_liquidity_index(reserve_cache: &pool_logic::ReserveCache): u256 Function `set_curr_liquidity_index` ----------------------------------- @notice Sets the current liquidity index in cache @param reserve\_cache The reserve cache @param index The index to set public fun set_curr_liquidity_index(reserve_cache: &mut pool_logic::ReserveCache, index: u256) Function `get_next_liquidity_index` ----------------------------------- @notice Gets the next liquidity index from cache @param reserve\_cache The reserve cache @return The next liquidity index public fun get_next_liquidity_index(reserve_cache: &pool_logic::ReserveCache): u256 Function `set_next_liquidity_index` ----------------------------------- @notice Sets the next liquidity index in cache @param reserve\_cache The reserve cache @param index The index to set public fun set_next_liquidity_index(reserve_cache: &mut pool_logic::ReserveCache, index: u256) Function `get_curr_variable_borrow_index` ----------------------------------------- @notice Gets the current variable borrow index from cache @param reserve\_cache The reserve cache @return The current variable borrow index public fun get_curr_variable_borrow_index(reserve_cache: &pool_logic::ReserveCache): u256 Function `get_reserve_cache_last_update_timestamp` -------------------------------------------------- @notice Gets the last update timestamp from cache @param reserve\_cache The reserve cache @return The last update timestamp public fun get_reserve_cache_last_update_timestamp(reserve_cache: &pool_logic::ReserveCache): u64 Function `get_next_variable_borrow_index` ----------------------------------------- @notice Gets the next variable borrow index from cache @param reserve\_cache The reserve cache @return The next variable borrow index public fun get_next_variable_borrow_index(reserve_cache: &pool_logic::ReserveCache): u256 Function `set_next_variable_borrow_index` ----------------------------------------- @notice Sets the next variable borrow index in cache @param reserve\_cache The reserve cache @param index The index to set public fun set_next_variable_borrow_index(reserve_cache: &mut pool_logic::ReserveCache, index: u256) Function `get_curr_liquidity_rate` ---------------------------------- @notice Gets the current liquidity rate from cache @param reserve\_cache The reserve cache @return The current liquidity rate public fun get_curr_liquidity_rate(reserve_cache: &pool_logic::ReserveCache): u256 Function `set_curr_liquidity_rate` ---------------------------------- @notice Sets the current liquidity rate in cache @param reserve\_cache The reserve cache @param rate The rate to set public fun set_curr_liquidity_rate(reserve_cache: &mut pool_logic::ReserveCache, rate: u256) Function `get_curr_variable_borrow_rate` ---------------------------------------- @notice Gets the current variable borrow rate from cache @param reserve\_cache The reserve cache @return The current variable borrow rate public fun get_curr_variable_borrow_rate(reserve_cache: &pool_logic::ReserveCache): u256 Function `set_curr_variable_borrow_rate` ---------------------------------------- @notice Sets the current variable borrow rate in cache @param reserve\_cache The reserve cache @param rate The rate to set public fun set_curr_variable_borrow_rate(reserve_cache: &mut pool_logic::ReserveCache, rate: u256) Function `set_reserve_cache_last_update_timestamp` -------------------------------------------------- @notice Sets the last update timestamp in cache @param reserve\_cache The reserve cache @param timestamp The timestamp to set public fun set_reserve_cache_last_update_timestamp(reserve_cache: &mut pool_logic::ReserveCache, timestamp: u64) Function `get_a_token_address` ------------------------------ @notice Gets the aToken address from cache @param reserve\_cache The reserve cache @return The aToken address public fun get_a_token_address(reserve_cache: &pool_logic::ReserveCache): address Function `get_variable_debt_token_address` ------------------------------------------ @notice Gets the variable debt token address from cache @param reserve\_cache The reserve cache @return The variable debt token address public fun get_variable_debt_token_address(reserve_cache: &pool_logic::ReserveCache): address Function `get_curr_scaled_variable_debt` ---------------------------------------- @notice Gets the current scaled variable debt from cache @param reserve\_cache The reserve cache @return The current scaled variable debt public fun get_curr_scaled_variable_debt(reserve_cache: &pool_logic::ReserveCache): u256 Function `get_next_scaled_variable_debt` ---------------------------------------- @notice Gets the next scaled variable debt from cache @param reserve\_cache The reserve cache @return The next scaled variable debt public fun get_next_scaled_variable_debt(reserve_cache: &pool_logic::ReserveCache): u256 Function `set_next_scaled_variable_debt` ---------------------------------------- @notice Sets the next scaled variable debt in cache @param reserve\_cache The reserve cache @param scaled\_debt The scaled debt to set public fun set_next_scaled_variable_debt(reserve_cache: &mut pool_logic::ReserveCache, scaled_debt: u256) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/pool_fee_manager/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/pool_token_logic/) --- # Error Config - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Config * Error Config * * * Module `0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config` ========================================================================================= @title Errors library @author Aave @notice Defines the error messages emitted by the different contracts of the Aave protocol * [Constants](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#@Constants_0) * [Function `get_ecaller_not_pool_admin`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecaller_not_pool_admin) * [Function `get_ecaller_not_emergency_admin`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecaller_not_emergency_admin) * [Function `get_ecaller_not_pool_or_emergency_admin`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecaller_not_pool_or_emergency_admin) * [Function `get_ecaller_not_risk_or_pool_admin`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecaller_not_risk_or_pool_admin) * [Function `get_ecaller_not_risk_or_pool_or_emergency_admin`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecaller_not_risk_or_pool_or_emergency_admin) * [Function `get_ecaller_not_asset_listing_or_pool_admin`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecaller_not_asset_listing_or_pool_admin) * [Function `get_eaddresses_provider_not_registered`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eaddresses_provider_not_registered) * [Function `get_einvalid_addresses_provider_id`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_addresses_provider_id) * [Function `get_enot_contract`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_enot_contract) * [Function `get_ecaller_not_pool_configurator`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecaller_not_pool_configurator) * [Function `get_ecaller_not_atoken`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecaller_not_atoken) * [Function `get_einvalid_addresses_provider`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_addresses_provider) * [Function `get_einvalid_flashloan_executor_return`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_flashloan_executor_return) * [Function `get_ereserve_already_added`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereserve_already_added) * [Function `get_ereserves_storage_count_mismatch`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereserves_storage_count_mismatch) * [Function `get_eno_more_reserves_allowed`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eno_more_reserves_allowed) * [Function `get_eemode_category_reserved`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eemode_category_reserved) * [Function `get_einvalid_emode_category_assignment`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_emode_category_assignment) * [Function `get_ereserve_liquidity_not_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereserve_liquidity_not_zero) * [Function `get_eflashloan_premium_invalid`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eflashloan_premium_invalid) * [Function `get_einvalid_reserve_params`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_reserve_params) * [Function `get_einvalid_emode_category_params`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_emode_category_params) * [Function `get_ecaller_must_be_pool`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecaller_must_be_pool) * [Function `get_einvalid_mint_amount`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_mint_amount) * [Function `get_einvalid_transfer_amount`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_transfer_amount) * [Function `get_ecaller_not_data_owner`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecaller_not_data_owner) * [Function `get_einvalid_burn_amount`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_burn_amount) * [Function `get_einvalid_amount`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_amount) * [Function `get_ereserve_inactive`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereserve_inactive) * [Function `get_ereserve_frozen`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereserve_frozen) * [Function `get_ereserve_paused`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereserve_paused) * [Function `get_eborrowing_not_enabled`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eborrowing_not_enabled) * [Function `get_enot_enough_available_user_balance`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_enot_enough_available_user_balance) * [Function `get_einvalid_interest_rate_mode_selected`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_interest_rate_mode_selected) * [Function `get_ecollateral_balance_is_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecollateral_balance_is_zero) * [Function `get_ehealth_factor_lower_than_liquidation_threshold`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ehealth_factor_lower_than_liquidation_threshold) * [Function `get_ecollateral_cannot_cover_new_borrow`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecollateral_cannot_cover_new_borrow) * [Function `get_ecollateral_same_as_borrowing_currency`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecollateral_same_as_borrowing_currency) * [Function `get_eno_debt_of_selected_type`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eno_debt_of_selected_type) * [Function `get_eno_explicit_amount_to_repay_on_behalf`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eno_explicit_amount_to_repay_on_behalf) * [Function `get_eno_outstanding_variable_debt`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eno_outstanding_variable_debt) * [Function `get_eunderlying_balance_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eunderlying_balance_zero) * [Function `get_ehealth_factor_not_below_threshold`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ehealth_factor_not_below_threshold) * [Function `get_ecollateral_cannot_be_liquidated`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecollateral_cannot_be_liquidated) * [Function `get_especified_currency_not_borrowed_by_user`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_especified_currency_not_borrowed_by_user) * [Function `get_einconsistent_flashloan_params`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einconsistent_flashloan_params) * [Function `get_eborrow_cap_exceeded`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eborrow_cap_exceeded) * [Function `get_esupply_cap_exceeded`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_esupply_cap_exceeded) * [Function `get_edebt_ceiling_exceeded`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_edebt_ceiling_exceeded) * [Function `get_eunderlying_claimable_rights_not_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eunderlying_claimable_rights_not_zero) * [Function `get_evariable_debt_supply_not_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_evariable_debt_supply_not_zero) * [Function `get_eltv_validation_failed`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eltv_validation_failed) * [Function `get_einconsistent_emode_category`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einconsistent_emode_category) * [Function `get_easset_not_borrowable_in_isolation`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_easset_not_borrowable_in_isolation) * [Function `get_ereserve_already_initialized`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereserve_already_initialized) * [Function `get_euser_in_isolation_mode_or_ltv_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_euser_in_isolation_mode_or_ltv_zero) * [Function `get_einvalid_ltv`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_ltv) * [Function `get_einvalid_liq_threshold`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_liq_threshold) * [Function `get_einvalid_liq_bonus`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_liq_bonus) * [Function `get_einvalid_decimals`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_decimals) * [Function `get_einvalid_reserve_factor`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_reserve_factor) * [Function `get_einvalid_borrow_cap`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_borrow_cap) * [Function `get_einvalid_supply_cap`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_supply_cap) * [Function `get_einvalid_liquidation_protocol_fee`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_liquidation_protocol_fee) * [Function `get_einvalid_emode_category`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_emode_category) * [Function `get_einvalid_unbacked_mint_cap`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_unbacked_mint_cap) * [Function `get_einvalid_debt_ceiling`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_debt_ceiling) * [Function `get_einvalid_reserve_index`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_reserve_index) * [Function `get_eacl_admin_cannot_be_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eacl_admin_cannot_be_zero) * [Function `get_einconsistent_params_length`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einconsistent_params_length) * [Function `get_ezero_address_not_valid`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ezero_address_not_valid) * [Function `get_einvalid_expiration`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_expiration) * [Function `get_einvalid_signature`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_signature) * [Function `get_eoperation_not_supported`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eoperation_not_supported) * [Function `get_edebt_ceiling_not_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_edebt_ceiling_not_zero) * [Function `get_easset_not_listed`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_easset_not_listed) * [Function `get_ezero_snapshot_ratio`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ezero_snapshot_ratio) * [Function `get_einvalid_ratio_timestamp`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_ratio_timestamp) * [Function `get_esnapshot_overflow`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_esnapshot_overflow) * [Function `get_ezero_ratio_decimals`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ezero_ratio_decimals) * [Function `get_emismatch_adapter_type`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_emismatch_adapter_type) * [Function `get_einvalid_growth_rate`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_growth_rate) * [Function `get_einvalid_snapshot_delay`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_snapshot_delay) * [Function `get_einvalid_snapshot_ratio`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_snapshot_ratio) * [Function `get_einvalid_snapshot_timestamp`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_snapshot_timestamp) * [Function `get_ecustom_price_above_price_cap`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecustom_price_above_price_cap) * [Function `get_eoracle_price_overflow`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eoracle_price_overflow) * [Function `get_einvalid_optimal_usage_ratio`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_optimal_usage_ratio) * [Function `get_eunderlying_cannot_be_rescued`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eunderlying_cannot_be_rescued) * [Function `get_eaddresses_provider_already_added`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eaddresses_provider_already_added) * [Function `get_epool_addresses_do_not_match`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_epool_addresses_do_not_match) * [Function `get_esiloed_borrowing_violation`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_esiloed_borrowing_violation) * [Function `get_ereserve_debt_not_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereserve_debt_not_zero) * [Function `get_enot_acl_owner`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_enot_acl_owner) * [Function `get_erole_mismatch`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_erole_mismatch) * [Function `get_erole_can_only_renounce_self`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_erole_can_only_renounce_self) * [Function `get_eroles_not_initialized`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eroles_not_initialized) * [Function `get_eoverflow`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eoverflow) * [Function `get_edivision_by_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_edivision_by_zero) * [Function `get_enot_pool_owner`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_enot_pool_owner) * [Function `get_eflashloan_disabled`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eflashloan_disabled) * [Function `get_einvalid_max_rate`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_max_rate) * [Function `get_ewithdraw_to_atoken`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ewithdraw_to_atoken) * [Function `get_esupply_to_atoken`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_esupply_to_atoken) * [Function `get_eslope_2_must_be_gte_slope_1`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eslope_2_must_be_gte_slope_1) * [Function `get_eliquidation_grace_sentinel_check_failed`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eliquidation_grace_sentinel_check_failed) * [Function `get_einvalid_grace_period`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_grace_period) * [Function `get_einvalid_freeze_flag`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_freeze_flag) * [Function `get_emust_not_leave_dust`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_emust_not_leave_dust) * [Function `get_eoracle_not_admin`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eoracle_not_admin) * [Function `get_easset_already_exists`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_easset_already_exists) * [Function `get_eno_asset_feed`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eno_asset_feed) * [Function `get_eno_asset_custom_price`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eno_asset_custom_price) * [Function `get_ezero_asset_custom_price`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ezero_asset_custom_price) * [Function `get_eoralce_benchmark_length_mismatch`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eoralce_benchmark_length_mismatch) * [Function `get_enegative_oracle_price`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_enegative_oracle_price) * [Function `get_ezero_oracle_price`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ezero_oracle_price) * [Function `get_ecaller_not_pool_or_asset_listing_admin`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecaller_not_pool_or_asset_listing_admin) * [Function `get_erequested_feed_ids_assets_mismatch`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_erequested_feed_ids_assets_mismatch) * [Function `get_erequested_custom_prices_assets_mismatch`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_erequested_custom_prices_assets_mismatch) * [Function `get_easset_not_registered_with_oracle`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_easset_not_registered_with_oracle) * [Function `get_ecap_lower_than_actual_price`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ecap_lower_than_actual_price) * [Function `get_easset_no_price_cap`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_easset_no_price_cap) * [Function `get_estale_oracle_price`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_estale_oracle_price) * [Function `get_eoracle_price_timestamp_in_future`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eoracle_price_timestamp_in_future) * [Function `get_ezero_oracle_max_asset_price_age`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ezero_oracle_max_asset_price_age) * [Function `get_edifferent_caller_on_behalf_of`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_edifferent_caller_on_behalf_of) * [Function `get_eempty_feed_id`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eempty_feed_id) * [Function `get_euser_not_listed`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_euser_not_listed) * [Function `get_esigner_and_on_behalf_of_not_same`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_esigner_and_on_behalf_of_not_same) * [Function `get_eaccount_does_not_exist`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eaccount_does_not_exist) * [Function `get_eflashloan_payer_not_receiver`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eflashloan_payer_not_receiver) * [Function `get_eprice_oracle_check_failed`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eprice_oracle_check_failed) * [Function `get_enot_rate_owner`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_enot_rate_owner) * [Function `get_edefault_interest_rate_strategy_not_initialized`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_edefault_interest_rate_strategy_not_initialized) * [Function `get_egho_interest_rate_strategy_not_initialized`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_egho_interest_rate_strategy_not_initialized) * [Function `get_ereserve_list_not_initialized`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereserve_list_not_initialized) * [Function `get_etoken_already_exists`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_etoken_already_exists) * [Function `get_etoken_not_exist`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_etoken_not_exist) * [Function `get_eresource_not_exist`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eresource_not_exist) * [Function `get_etoken_name_already_exist`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_etoken_name_already_exist) * [Function `get_etoken_symbol_already_exist`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_etoken_symbol_already_exist) * [Function `get_emin_asset_decimal_places`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_emin_asset_decimal_places) * [Function `get_ereserve_addresses_list_not_initialized`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereserve_addresses_list_not_initialized) * [Function `get_einvalid_max_apt_fee`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_max_apt_fee) * [Function `get_einsufficient_coins_to_wrap`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einsufficient_coins_to_wrap) * [Function `get_einsufficient_fas_to_unwrap`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einsufficient_fas_to_unwrap) * [Function `get_eunmapped_coin_to_fa`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eunmapped_coin_to_fa) * [Function `get_enot_rewards_admin`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_enot_rewards_admin) * [Function `get_eincentives_controller_mismatch`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eincentives_controller_mismatch) * [Function `get_eunauthorized_claimer`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_eunauthorized_claimer) * [Function `get_ereward_index_overflow`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereward_index_overflow) * [Function `get_einvalid_reward_config`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_reward_config) * [Function `get_edistribution_does_not_exist`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_edistribution_does_not_exist) * [Function `get_ereward_transfer_failed`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereward_transfer_failed) * [Function `get_enot_emission_admin`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_enot_emission_admin) * [Function `get_erewards_controller_not_defined`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_erewards_controller_not_defined) * [Function `get_enot_ecosystem_reserve_funds_admin`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_enot_ecosystem_reserve_funds_admin) * [Function `get_enot_ecosystem_admin_or_recipient`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_enot_ecosystem_admin_or_recipient) * [Function `get_estream_not_exist`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_estream_not_exist) * [Function `get_estream_to_the_contract_itself`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_estream_to_the_contract_itself) * [Function `get_estream_to_the_caller`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_estream_to_the_caller) * [Function `get_estream_deposit_is_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_estream_deposit_is_zero) * [Function `get_estart_time_before_block_timestamp`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_estart_time_before_block_timestamp) * [Function `get_estop_time_before_the_start_time`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_estop_time_before_the_start_time) * [Function `get_edeposit_smaller_than_time_delta`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_edeposit_smaller_than_time_delta) * [Function `get_edeposit_not_multiple_of_time_delta`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_edeposit_not_multiple_of_time_delta) * [Function `get_estream_withdraw_is_zero`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_estream_withdraw_is_zero) * [Function `get_ewithdraw_exceeds_the_available_balance`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ewithdraw_exceeds_the_available_balance) * [Function `get_einvalid_rewards_controller_address`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_rewards_controller_address) * [Function `get_ereward_not_exist`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_ereward_not_exist) * [Function `get_estore_for_asset_not_exist`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_estore_for_asset_not_exist) * [Function `get_einvalid_emission_rate`](https://aave.github.io/aptos-aave-v3/aave-config/error_config/#0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee_error_config_get_einvalid_emission_rate) Constants --------- @notice Cannot divide by zero const EDIVISION_BY_ZERO: u64 = 1102; @notice Account does not exist const EACCOUNT_DOES_NOT_EXIST: u64 = 1405; @notice Invalid signature const EINVALID_SIGNATURE: u64 = 79; @notice ACL admin cannot be set to the zero address const EACL_ADMIN_CANNOT_BE_ZERO: u64 = 75; @notice Reserve has already been added to reserve list const EADDRESSES_PROVIDER_ALREADY_ADDED: u64 = 86; @notice Pool addresses provider is not registered const EADDRESSES_PROVIDER_NOT_REGISTERED: u64 = 7; @notice Asset is already registered with feed const EASSET_ALREADY_EXISTS: u64 = 1202; @notice Asset is not borrowable in isolation mode const EASSET_NOT_BORROWABLE_IN_ISOLATION: u64 = 60; @notice Asset is not listed const EASSET_NOT_LISTED: u64 = 82; @notice The asset is not registered with the oracle const EASSET_NOT_REGISTERED_WITH_ORACLE: u64 = 1214; @notice The asset does not have a price cap const EASSET_NO_PRICE_CAP: u64 = 1216; @notice Borrowing is not enabled const EBORROWING_NOT_ENABLED: u64 = 30; @notice Borrow cap is exceeded const EBORROW_CAP_EXCEEDED: u64 = 50; @notice The caller of this function must be a pool const ECALLER_MUST_BE_POOL: u64 = 23; @notice The caller of the function is not an asset listing or pool admin const ECALLER_NOT_ASSET_LISTING_OR_POOL_ADMIN: u64 = 5; @notice The caller of the function is not an AToken const ECALLER_NOT_ATOKEN: u64 = 11; @notice The caller of the function is not an emergency admin const ECALLER_NOT_EMERGENCY_ADMIN: u64 = 2; @notice The caller of the function is not a pool admin const ECALLER_NOT_POOL_ADMIN: u64 = 1; @notice The caller of the function is not the pool configurator const ECALLER_NOT_POOL_CONFIGURATOR: u64 = 10; @notice The caller of the function is not a pool or asset listing admin const ECALLER_NOT_POOL_OR_ASSET_LISTING_ADMIN: u64 = 1207; @notice The caller of the function is not a pool or emergency admin const ECALLER_NOT_POOL_OR_EMERGENCY_ADMIN: u64 = 3; @notice The caller of the function is not a risk or pool admin const ECALLER_NOT_RISK_OR_POOL_ADMIN: u64 = 4; @notice The caller of the function is neither a risk nor pool admin nor emergency admin const ECALLER_NOT_RISK_OR_POOL_OR_EMERGENCY_ADMIN: u64 = 96; @notice The asset cap is lower than the actual price of the asset const ECAP_LOWER_THAN_ACTUAL_PRICE: u64 = 1215; @notice The collateral balance is 0 const ECOLLATERAL_BALANCE_IS_ZERO: u64 = 34; @notice The collateral chosen cannot be liquidated const ECOLLATERAL_CANNOT_BE_LIQUIDATED: u64 = 46; @notice There is not enough collateral to cover a new borrow const ECOLLATERAL_CANNOT_COVER_NEW_BORROW: u64 = 36; @notice Collateral is (mostly) the same currency that is being borrowed const ECOLLATERAL_SAME_AS_BORROWING_CURRENCY: u64 = 37; The assigned custom price is above the price cap const ECUSTOM_PRICE_ABOVE_PRICE_CAP: u64 = 1229; @notice Debt ceiling is exceeded const EDEBT_CEILING_EXCEEDED: u64 = 53; @notice Debt ceiling is not zero const EDEBT_CEILING_NOT_ZERO: u64 = 81; @notice Default interest rate strategy not initialized const EDEFAULT_INTEREST_RATE_STRATEGY_NOT_INITIALIZED: u64 = 1302; @notice Stream deposit is not a multiple of time delta const EDEPOSIT_NOT_MULTIPLE_OF_TIME_DELTA: u64 = 3019; @notice Stream deposit is smaller than time delta const EDEPOSIT_SMALLER_THAN_TIME_DELTA: u64 = 3018; @notice On behalf of and caller are different for minting const EDIFFERENT_CALLER_ON_BEHALF_OF: u64 = 1209; @notice Distribution does not exist const EDISTRIBUTION_DOES_NOT_EXIST: u64 = 3006; @notice Zero eMode category is reserved for volatile heterogeneous assets const EEMODE_CATEGORY_RESERVED: u64 = 16; @notice Empty oracle feed\_id const EEMPTY_FEED_ID: u64 = 1210; @notice FlashLoaning for this asset is disabled const EFLASHLOAN_DISABLED: u64 = 91; @notice Flashloan payer is different from the flashloan receiver const EFLASHLOAN_PAYER_NOT_RECEIVER: u64 = 1406; @notice Invalid flashloan premium const EFLASHLOAN_PREMIUM_INVALID: u64 = 19; @notice GHO interest rate strategy not initialized const EGHO_INTEREST_RATE_STRATEGY_NOT_INITIALIZED: u64 = 1303; @notice Health factor is lesser than the liquidation threshold const EHEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD: u64 = 35; @notice Health factor is not below the threshold const EHEALTH_FACTOR_NOT_BELOW_THRESHOLD: u64 = 45; @notice Incentives controller mismatch const EINCENTIVES_CONTROLLER_MISMATCH: u64 = 3002; @notice Inconsistent eMode category const EINCONSISTENT_EMODE_CATEGORY: u64 = 58; @notice Inconsistent flashloan parameters const EINCONSISTENT_FLASHLOAN_PARAMS: u64 = 49; @notice Array parameters that should be equal length are not const EINCONSISTENT_PARAMS_LENGTH: u64 = 76; Coin migrations @notice User has insufficient coins to wrap const EINSUFFICIENT_COINS_TO_WRAP: u64 = 1415; @notice User has insufficient fungible assets to unwrap const EINSUFFICIENT_FAS_TO_UNWRAP: u64 = 1416; @notice The address of the pool addresses provider is invalid const EINVALID_ADDRESSES_PROVIDER: u64 = 12; @notice Invalid id for the pool addresses provider const EINVALID_ADDRESSES_PROVIDER_ID: u64 = 8; @notice Amount must be greater than 0 const EINVALID_AMOUNT: u64 = 26; @notice Invalid borrow cap for the reserve const EINVALID_BORROW_CAP: u64 = 68; @notice Invalid amount to burn const EINVALID_BURN_AMOUNT: u64 = 25; @notice Invalid debt ceiling for the reserve const EINVALID_DEBT_CEILING: u64 = 73; @notice Invalid decimals parameter of the underlying asset of the reserve const EINVALID_DECIMALS: u64 = 66; @notice The expect maximum emission rate is invalid const EINVALID_EMISSION_RATE: u64 = 3025; @notice Invalid eMode category for the reserve const EINVALID_EMODE_CATEGORY: u64 = 71; @notice Invalid eMode category assignment to asset const EINVALID_EMODE_CATEGORY_ASSIGNMENT: u64 = 17; @notice Invalid risk parameters for the eMode category const EINVALID_EMODE_CATEGORY_PARAMS: u64 = 21; @notice Invalid expiration const EINVALID_EXPIRATION: u64 = 78; @notice Invalid return value of the flashloan executor function const EINVALID_FLASHLOAN_EXECUTOR_RETURN: u64 = 13; @notice Freeze flag is invalid const EINVALID_FREEZE_FLAG: u64 = 99; @notice Grace period above a valid range const EINVALID_GRACE_PERIOD: u64 = 98; The growth rate is invalid const EINVALID_GROWTH_RATE: u64 = 1225; @notice Invalid interest rate mode selected const EINVALID_INTEREST_RATE_MODE_SELECTED: u64 = 33; @notice Invalid liquidation protocol fee for the reserve const EINVALID_LIQUIDATION_PROTOCOL_FEE: u64 = 70; @notice Invalid liquidity bonus parameter for the reserve const EINVALID_LIQ_BONUS: u64 = 65; @notice Invalid liquidity threshold parameter for the reserve const EINVALID_LIQ_THRESHOLD: u64 = 64; @notice Invalid ltv parameter for the reserve const EINVALID_LTV: u64 = 63; @notice The expect maximum apt fee is invalid const EINVALID_MAX_APT_FEE: u64 = 1410; @notice The expect maximum borrow rate is invalid const EINVALID_MAX_RATE: u64 = 92; @notice Invalid amount to mint const EINVALID_MINT_AMOUNT: u64 = 24; @notice Invalid optimal usage ratio const EINVALID_OPTIMAL_USAGE_RATIO: u64 = 83; The timestamp ratio is invalid const EINVALID_RATIO_TIMESTAMP: u64 = 1221; @notice Invalid reserve factor parameter for the reserve const EINVALID_RESERVE_FACTOR: u64 = 67; @notice Invalid reserve index const EINVALID_RESERVE_INDEX: u64 = 74; @notice Invalid risk parameters for the reserve const EINVALID_RESERVE_PARAMS: u64 = 20; @notice Rewards controller address is not valid const EINVALID_REWARDS_CONTROLLER_ADDRESS: u64 = 3022; @notice Invalid config data used in rewards controller / distributor const EINVALID_REWARD_CONFIG: u64 = 3005; The snapshot delay is invalid const EINVALID_SNAPSHOT_DELAY: u64 = 1226; The snapshot ratio is invalid const EINVALID_SNAPSHOT_RATIO: u64 = 1227; The snapshot timestamp is invalid const EINVALID_SNAPSHOT_TIMESTAMP: u64 = 1228; @notice Invalid supply cap for the reserve const EINVALID_SUPPLY_CAP: u64 = 69; @notice Invalid amount to transfer const EINVALID_TRANSFER_AMOUNT: u64 = 104; @notice Invalid unbacked mint cap for the reserve const EINVALID_UNBACKED_MINT_CAP: u64 = 72; @notice Liquidation grace sentinel validation failed const ELIQUIDATION_GRACE_SENTINEL_CHECK_FAILED: u64 = 97; @notice Ltv validation failed const ELTV_VALIDATION_FAILED: u64 = 57; @notice Asset minimum decimal places requirement is violated const EMIN_ASSET_DECIMAL_PLACES: u64 = 1506; The adapter type that is being updated is not the one stored const EMISMATCH_ADAPTER_TYPE: u64 = 1224; @notice Below a certain threshold liquidators need to take the full position const EMUST_NOT_LEAVE_DUST: u64 = 103; @notice Returned oracle price is negative const ENEGATIVE_ORACLE_PRICE: u64 = 1205; @notice Account is not the acl's owner const ENOT_ACL_OWNER: u64 = 1001; @notice Address is not a contract const ENOT_CONTRACT: u64 = 9; @notice Caller is not the data owner const ENOT_DATA_OWNER: u64 = 105; @notice Caller does not have the ecosystem admin or recipient role const ENOT_ECOSYSTEM_ADMIN_OR_RECIPIENT: u64 = 3011; @notice Caller does not have the ecosystem reserve funds admin role const ENOT_ECOSYSTEM_RESERVE_FUNDS_ADMIN: u64 = 3010; @notice Caller is not emission admin const ENOT_EMISSION_ADMIN: u64 = 3008; @notice User cannot withdraw more than the available balance const ENOT_ENOUGH_AVAILABLE_USER_BALANCE: u64 = 32; @notice Account is not the pool's owner const ENOT_POOL_OWNER: u64 = 1401; @notice Account is not the rate's owner const ENOT_RATE_OWNER: u64 = 1301; @notice Caller is not rewards admin const ENOT_REWARDS_ADMIN: u64 = 3001; @notice No asset feed for the given asset const ENO_ASSET_FEED: u64 = 1203; @notice No custom price for the given asset const ENO_CUSTOM_PRICE: u64 = 1211; @notice For repayment of a specific type of debt, the user needs to have debt that type const ENO_DEBT_OF_SELECTED_TYPE: u64 = 39; @notice To repay on behalf of a user an explicit amount to repay is needed const ENO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF: u64 = 40; @notice Maximum amount of reserves in the pool reached const ENO_MORE_RESERVES_ALLOWED: u64 = 15; @notice User does not have outstanding variable rate debt on this reserve const ENO_OUTSTANDING_VARIABLE_DEBT: u64 = 42; @notice Operation not supported const EOPERATION_NOT_SUPPORTED: u64 = 80; @notice Returned batch of prices equals the requested assets const EORACLE_BENCHMARK_LENGTH_MISMATCH: u64 = 1204; @notice Caller must be only oracle admin const EORACLE_NOT_ADMIN: u64 = 1201; The oracle price computation causes an overflow const EORACLE_PRICE_OVERFLOW: u64 = 1230; @notice The oracle price timestamp is in the future const EORACLE_PRICE_TIMESTAMP_IN_FUTURE: u64 = 1218; @notice Calculation results in overflow const EOVERFLOW: u64 = 1101; @notice The token implementation pool address and the pool address provided by the initializing pool do not match const EPOOL_ADDRESSES_DO_NOT_MATCH: u64 = 87; @notice Price oracle validation failed const EPRICE_ORACLE_CHECK_FAILED: u64 = 1407; @notice Requested assets and custom prices do not match const EREQUESTED_CUSTOM_PRICES_ASSETS_MISMATCH: u64 = 1213; @notice Requested assets and feed ids do not match const EREQUESTED_FEED_IDS_ASSETS_MISMATCH: u64 = 1208; @notice Mismatch of reserves count in storage const ERESERVES_STORAGE_COUNT_MISMATCH: u64 = 1403; @notice Reserve addresses list not initialized const ERESERVE_ADDRESSES_LIST_NOT_INITIALIZED: u64 = 1409; @notice Reserve has already been added to reserve list const ERESERVE_ALREADY_ADDED: u64 = 14; @notice Reserve has already been initialized const ERESERVE_ALREADY_INITIALIZED: u64 = 61; @notice the total debt of the reserve needs to be 0 const ERESERVE_DEBT_NOT_ZERO: u64 = 90; @notice Action cannot be performed because the reserve is frozen const ERESERVE_FROZEN: u64 = 28; @notice Action requires an active reserve const ERESERVE_INACTIVE: u64 = 27; @notice The liquidity of the reserve needs to be 0 const ERESERVE_LIQUIDITY_NOT_ZERO: u64 = 18; @notice Reserve list not initialized const ERESERVE_LIST_NOT_INITIALIZED: u64 = 1408; @notice Action cannot be performed because the reserve is paused const ERESERVE_PAUSED: u64 = 29; @notice Resource not exist const ERESOURCE_NOT_EXIST: u64 = 1503; @notice Rewards controller is not defined const EREWARDS_CONTROLLER_NOT_DEFINED: u64 = 3009; @notice Reward index overflow const EREWARD_INDEX_OVERFLOW: u64 = 3004; @notice Reward does not exist const EREWARD_NOT_EXIST: u64 = 3023; @notice Rewards transfer failed const EREWARD_TRANSFER_FAILED: u64 = 3007; @notice Roles not initialized const EROLES_NOT_INITIALIZED: u64 = 1004; @notice Can only renounce roles for self const EROLE_CAN_ONLY_RENOUNCE_SELF: u64 = 1003; @notice Account is missing role const EROLE_MISMATCH: u64 = 1002; @notice The person who signed must be consistent with on\_behalf\_of const ESIGNER_AND_ON_BEHALF_OF_NOT_SAME: u64 = 1404; @notice User is trying to borrow multiple assets including a siloed one const ESILOED_BORROWING_VIOLATION: u64 = 89; @notice Variable interest rate slope 2 can not be lower than slope 1 const ESLOPE_2_MUST_BE_GTE_SLOPE_1: u64 = 95; The snapshot may overflow very soon const ESNAPSHOT_OVERFLOW: u64 = 1222; @notice User did not borrow the specified currency const ESPECIFIED_CURRENCY_NOT_BORROWED_BY_USER: u64 = 47; @notice The oracle price is stale const ESTALE_ORACLE_PRICE: u64 = 1217; @notice Stream start time is before block timestamp const ESTART_TIME_BEFORE_BLOCK_TIMESTAMP: u64 = 3016; @notice Stream stop time is before start time const ESTOP_TIME_BEFORE_THE_START_TIME: u64 = 3017; @notice Secondrary fungible store does not exist for the asset const ESTORE_FOR_ASSET_NOT_EXIST: u64 = 3024; @notice Stream deposit is zero const ESTREAM_DEPOSIT_IS_ZERO: u64 = 3015; @notice Stream does not exist const ESTREAM_NOT_EXIST: u64 = 3012; @notice Creating a stream to the caller const ESTREAM_TO_THE_CALLER: u64 = 3014; @notice Creating a stream to the contract itself const ESTREAM_TO_THE_CONTRACT_ITSELF: u64 = 3013; @notice Stream withdraw amount is zero const ESTREAM_WITHDRAW_IS_ZERO: u64 = 3020; @notice Supply cap is exceeded const ESUPPLY_CAP_EXCEEDED: u64 = 51; @notice Supplying to the aToken is not allowed const ESUPPLY_TO_ATOKEN: u64 = 94; @notice Token already exists const ETOKEN_ALREADY_EXISTS: u64 = 1501; @notice Token name already exist const ETOKEN_NAME_ALREADY_EXIST: u64 = 1504; @notice Token not exist const ETOKEN_NOT_EXIST: u64 = 1502; @notice Token symbol already exist const ETOKEN_SYMBOL_ALREADY_EXIST: u64 = 1505; @notice Claimer is not authorized to make the reward claim const EUNAUTHORIZED_CLAIMER: u64 = 3003; @notice The underlying balance needs to be greater than 0 const EUNDERLYING_BALANCE_ZERO: u64 = 43; @notice The underlying asset cannot be rescued const EUNDERLYING_CANNOT_BE_RESCUED: u64 = 85; @notice Claimable rights over underlying not zero (aToken supply or accruedToTreasury) const EUNDERLYING_CLAIMABLE_RIGHTS_NOT_ZERO: u64 = 54; @notice The coin has not been mapped to a fungible asset by Aptos const EUNMAPPED_COIN_TO_FA: u64 = 1417; @notice User is in isolation mode or ltv is zero const EUSER_IN_ISOLATION_MODE_OR_LTV_ZERO: u64 = 62; @notice User is not listed const EUSER_NOT_LISTED: u64 = 1402; @notice Variable debt supply is not zero const EVARIABLE_DEBT_SUPPLY_NOT_ZERO: u64 = 56; @notice Stream withdraw amount exceeds available balance const EWITHDRAW_EXCEEDS_THE_AVAILABLE_BALANCE: u64 = 3021; @notice Withdrawing to the aToken is not allowed const EWITHDRAW_TO_ATOKEN: u64 = 93; @notice Zero address not valid const EZERO_ADDRESS_NOT_VALID: u64 = 77; @notice Zero custom price for the given asset const EZERO_CUSTOM_PRICE: u64 = 1212; @notice The max asset price age of the asset is zero const EZERO_ORACLE_MAX_ASSET_PRICE_AGE: u64 = 1219; @notice Returned oracle price is zero const EZERO_ORACLE_PRICE: u64 = 1206; The ratio decimals is zero const EZERO_RATIO_DECIMALS: u64 = 1223; The snapshot ratio is zero const EZERO_SNAPSHOT_RATIO: u64 = 1220; Function `get_ecaller_not_pool_admin` ------------------------------------- @notice Returns the error code for caller not being a pool admin @return Error code as u64 public fun get_ecaller_not_pool_admin(): u64 Function `get_ecaller_not_emergency_admin` ------------------------------------------ @notice Returns the error code for caller not being an emergency admin @return Error code as u64 public fun get_ecaller_not_emergency_admin(): u64 Function `get_ecaller_not_pool_or_emergency_admin` -------------------------------------------------- @notice Returns the error code for caller not being a pool or emergency admin @return Error code as u64 public fun get_ecaller_not_pool_or_emergency_admin(): u64 Function `get_ecaller_not_risk_or_pool_admin` --------------------------------------------- @notice Returns the error code for caller not being a risk or pool admin @return Error code as u64 public fun get_ecaller_not_risk_or_pool_admin(): u64 Function `get_ecaller_not_risk_or_pool_or_emergency_admin` ---------------------------------------------------------- @notice Returns the error code for caller not being a risk, pool, or emergency admin @return Error code as u64 public fun get_ecaller_not_risk_or_pool_or_emergency_admin(): u64 Function `get_ecaller_not_asset_listing_or_pool_admin` ------------------------------------------------------ @notice Returns the error code for caller not being an asset listing or pool admin @return Error code as u64 public fun get_ecaller_not_asset_listing_or_pool_admin(): u64 Function `get_eaddresses_provider_not_registered` ------------------------------------------------- @notice Returns the error code for addresses provider not being registered @return Error code as u64 public fun get_eaddresses_provider_not_registered(): u64 Function `get_einvalid_addresses_provider_id` --------------------------------------------- @notice Returns the error code for invalid addresses provider ID @return Error code as u64 public fun get_einvalid_addresses_provider_id(): u64 Function `get_enot_contract` ---------------------------- @notice Returns the error code for address not being a contract @return Error code as u64 public fun get_enot_contract(): u64 Function `get_ecaller_not_pool_configurator` -------------------------------------------- @notice Returns the error code for caller not being a pool configurator @return Error code as u64 public fun get_ecaller_not_pool_configurator(): u64 Function `get_ecaller_not_atoken` --------------------------------- @notice Returns the error code for caller not being an AToken @return Error code as u64 public fun get_ecaller_not_atoken(): u64 Function `get_einvalid_addresses_provider` ------------------------------------------ @notice Returns the error code for invalid addresses provider @return Error code as u64 public fun get_einvalid_addresses_provider(): u64 Function `get_einvalid_flashloan_executor_return` ------------------------------------------------- @notice Returns the error code for invalid flashloan executor return @return Error code as u64 public fun get_einvalid_flashloan_executor_return(): u64 Function `get_ereserve_already_added` ------------------------------------- @notice Returns the error code for reserve already added @return Error code as u64 public fun get_ereserve_already_added(): u64 Function `get_ereserves_storage_count_mismatch` ----------------------------------------------- @notice Returns the error code for reserves storage count mismatch @return Error code as u64 public fun get_ereserves_storage_count_mismatch(): u64 Function `get_eno_more_reserves_allowed` ---------------------------------------- @notice Returns the error code for no more reserves allowed @return Error code as u64 public fun get_eno_more_reserves_allowed(): u64 Function `get_eemode_category_reserved` --------------------------------------- @notice Returns the error code for eMode category reserved @return Error code as u64 public fun get_eemode_category_reserved(): u64 Function `get_einvalid_emode_category_assignment` ------------------------------------------------- @notice Returns the error code for invalid eMode category assignment @return Error code as u64 public fun get_einvalid_emode_category_assignment(): u64 Function `get_ereserve_liquidity_not_zero` ------------------------------------------ @notice Returns the error code for reserve liquidity not zero @return Error code as u64 public fun get_ereserve_liquidity_not_zero(): u64 Function `get_eflashloan_premium_invalid` ----------------------------------------- @notice Returns the error code for flashloan premium invalid @return Error code as u64 public fun get_eflashloan_premium_invalid(): u64 Function `get_einvalid_reserve_params` -------------------------------------- @notice Returns the error code for invalid reserve parameters @return Error code as u64 public fun get_einvalid_reserve_params(): u64 Function `get_einvalid_emode_category_params` --------------------------------------------- @notice Returns the error code for invalid eMode category parameters @return Error code as u64 public fun get_einvalid_emode_category_params(): u64 Function `get_ecaller_must_be_pool` ----------------------------------- @notice Returns the error code for caller must be pool @return Error code as u64 public fun get_ecaller_must_be_pool(): u64 Function `get_einvalid_mint_amount` ----------------------------------- @notice Returns the error code for invalid mint amount @return Error code as u64 public fun get_einvalid_mint_amount(): u64 Function `get_einvalid_transfer_amount` --------------------------------------- @notice Returns the error code for invalid transfer amount @return Error code as u64 public fun get_einvalid_transfer_amount(): u64 Function `get_ecaller_not_data_owner` ------------------------------------- @notice Returns the error code for caller not being the data owner @return Error code as u64 public fun get_ecaller_not_data_owner(): u64 Function `get_einvalid_burn_amount` ----------------------------------- @notice Returns the error code for invalid burn amount @return Error code as u64 public fun get_einvalid_burn_amount(): u64 Function `get_einvalid_amount` ------------------------------ @notice Returns the error code for invalid amount @return Error code as u64 public fun get_einvalid_amount(): u64 Function `get_ereserve_inactive` -------------------------------- @notice Returns the error code for reserve inactive @return Error code as u64 public fun get_ereserve_inactive(): u64 Function `get_ereserve_frozen` ------------------------------ @notice Returns the error code for reserve frozen @return Error code as u64 public fun get_ereserve_frozen(): u64 Function `get_ereserve_paused` ------------------------------ @notice Returns the error code for reserve paused @return Error code as u64 public fun get_ereserve_paused(): u64 Function `get_eborrowing_not_enabled` ------------------------------------- @notice Returns the error code for borrowing not enabled @return Error code as u64 public fun get_eborrowing_not_enabled(): u64 Function `get_enot_enough_available_user_balance` ------------------------------------------------- @notice Returns the error code for not enough available user balance @return Error code as u64 public fun get_enot_enough_available_user_balance(): u64 Function `get_einvalid_interest_rate_mode_selected` --------------------------------------------------- @notice Returns the error code for invalid interest rate mode selected @return Error code as u64 public fun get_einvalid_interest_rate_mode_selected(): u64 Function `get_ecollateral_balance_is_zero` ------------------------------------------ @notice Returns the error code for collateral balance is zero @return Error code as u64 public fun get_ecollateral_balance_is_zero(): u64 Function `get_ehealth_factor_lower_than_liquidation_threshold` -------------------------------------------------------------- @notice Returns the error code for health factor lower than liquidation threshold @return Error code as u64 public fun get_ehealth_factor_lower_than_liquidation_threshold(): u64 Function `get_ecollateral_cannot_cover_new_borrow` -------------------------------------------------- @notice Returns the error code for collateral cannot cover new borrow @return Error code as u64 public fun get_ecollateral_cannot_cover_new_borrow(): u64 Function `get_ecollateral_same_as_borrowing_currency` ----------------------------------------------------- @notice Returns the error code for collateral same as borrowing currency @return Error code as u64 public fun get_ecollateral_same_as_borrowing_currency(): u64 Function `get_eno_debt_of_selected_type` ---------------------------------------- @notice Returns the error code for no debt of selected type @return Error code as u64 public fun get_eno_debt_of_selected_type(): u64 Function `get_eno_explicit_amount_to_repay_on_behalf` ----------------------------------------------------- @notice Returns the error code for no explicit amount to repay on behalf @return Error code as u64 public fun get_eno_explicit_amount_to_repay_on_behalf(): u64 Function `get_eno_outstanding_variable_debt` -------------------------------------------- @notice Returns the error code for no outstanding variable debt @return Error code as u64 public fun get_eno_outstanding_variable_debt(): u64 Function `get_eunderlying_balance_zero` --------------------------------------- @notice Returns the error code for underlying balance zero @return Error code as u64 public fun get_eunderlying_balance_zero(): u64 Function `get_ehealth_factor_not_below_threshold` ------------------------------------------------- @notice Returns the error code for health factor not below threshold @return Error code as u64 public fun get_ehealth_factor_not_below_threshold(): u64 Function `get_ecollateral_cannot_be_liquidated` ----------------------------------------------- @notice Returns the error code for collateral cannot be liquidated @return Error code as u64 public fun get_ecollateral_cannot_be_liquidated(): u64 Function `get_especified_currency_not_borrowed_by_user` ------------------------------------------------------- @notice Returns the error code for specified currency not borrowed by user @return Error code as u64 public fun get_especified_currency_not_borrowed_by_user(): u64 Function `get_einconsistent_flashloan_params` --------------------------------------------- @notice Returns the error code for inconsistent flashloan parameters @return Error code as u64 public fun get_einconsistent_flashloan_params(): u64 Function `get_eborrow_cap_exceeded` ----------------------------------- @notice Returns the error code for borrow cap exceeded @return Error code as u64 public fun get_eborrow_cap_exceeded(): u64 Function `get_esupply_cap_exceeded` ----------------------------------- @notice Returns the error code for supply cap exceeded @return Error code as u64 public fun get_esupply_cap_exceeded(): u64 Function `get_edebt_ceiling_exceeded` ------------------------------------- @notice Returns the error code for debt ceiling exceeded @return Error code as u64 public fun get_edebt_ceiling_exceeded(): u64 Function `get_eunderlying_claimable_rights_not_zero` ---------------------------------------------------- @notice Returns the error code for underlying claimable rights not zero @return Error code as u64 public fun get_eunderlying_claimable_rights_not_zero(): u64 Function `get_evariable_debt_supply_not_zero` --------------------------------------------- @notice Returns the error code for variable debt supply not zero @return Error code as u64 public fun get_evariable_debt_supply_not_zero(): u64 Function `get_eltv_validation_failed` ------------------------------------- @notice Returns the error code for LTV validation failed @return Error code as u64 public fun get_eltv_validation_failed(): u64 Function `get_einconsistent_emode_category` ------------------------------------------- @notice Returns the error code for inconsistent eMode category @return Error code as u64 public fun get_einconsistent_emode_category(): u64 Function `get_easset_not_borrowable_in_isolation` ------------------------------------------------- @notice Returns the error code for asset not borrowable in isolation @return Error code as u64 public fun get_easset_not_borrowable_in_isolation(): u64 Function `get_ereserve_already_initialized` ------------------------------------------- @notice Returns the error code for reserve already initialized @return Error code as u64 public fun get_ereserve_already_initialized(): u64 Function `get_euser_in_isolation_mode_or_ltv_zero` -------------------------------------------------- @notice Returns the error code for user in isolation mode or LTV zero @return Error code as u64 public fun get_euser_in_isolation_mode_or_ltv_zero(): u64 Function `get_einvalid_ltv` --------------------------- @notice Returns the error code for invalid LTV @return Error code as u64 public fun get_einvalid_ltv(): u64 Function `get_einvalid_liq_threshold` ------------------------------------- @notice Returns the error code for invalid liquidation threshold @return Error code as u64 public fun get_einvalid_liq_threshold(): u64 Function `get_einvalid_liq_bonus` --------------------------------- @notice Returns the error code for invalid liquidation bonus @return Error code as u64 public fun get_einvalid_liq_bonus(): u64 Function `get_einvalid_decimals` -------------------------------- @notice Returns the error code for invalid decimals @return Error code as u64 public fun get_einvalid_decimals(): u64 Function `get_einvalid_reserve_factor` -------------------------------------- @notice Returns the error code for invalid reserve factor @return Error code as u64 public fun get_einvalid_reserve_factor(): u64 Function `get_einvalid_borrow_cap` ---------------------------------- @notice Returns the error code for invalid borrow cap @return Error code as u64 public fun get_einvalid_borrow_cap(): u64 Function `get_einvalid_supply_cap` ---------------------------------- @notice Returns the error code for invalid supply cap @return Error code as u64 public fun get_einvalid_supply_cap(): u64 Function `get_einvalid_liquidation_protocol_fee` ------------------------------------------------ @notice Returns the error code for invalid liquidation protocol fee @return Error code as u64 public fun get_einvalid_liquidation_protocol_fee(): u64 Function `get_einvalid_emode_category` -------------------------------------- @notice Returns the error code for invalid eMode category @return Error code as u64 public fun get_einvalid_emode_category(): u64 Function `get_einvalid_unbacked_mint_cap` ----------------------------------------- @notice Returns the error code for invalid unbacked mint cap @return Error code as u64 public fun get_einvalid_unbacked_mint_cap(): u64 Function `get_einvalid_debt_ceiling` ------------------------------------ @notice Returns the error code for invalid debt ceiling @return Error code as u64 public fun get_einvalid_debt_ceiling(): u64 Function `get_einvalid_reserve_index` ------------------------------------- @notice Returns the error code for invalid reserve index @return Error code as u64 public fun get_einvalid_reserve_index(): u64 Function `get_eacl_admin_cannot_be_zero` ---------------------------------------- @notice Returns the error code for ACL admin cannot be zero @return Error code as u64 public fun get_eacl_admin_cannot_be_zero(): u64 Function `get_einconsistent_params_length` ------------------------------------------ @notice Returns the error code for inconsistent params length @return Error code as u64 public fun get_einconsistent_params_length(): u64 Function `get_ezero_address_not_valid` -------------------------------------- @notice Returns the error code for zero address not valid @return Error code as u64 public fun get_ezero_address_not_valid(): u64 Function `get_einvalid_expiration` ---------------------------------- @notice Returns the error code for invalid expiration @return Error code as u64 public fun get_einvalid_expiration(): u64 Function `get_einvalid_signature` --------------------------------- @notice Returns the error code for invalid signature @return Error code as u64 public fun get_einvalid_signature(): u64 Function `get_eoperation_not_supported` --------------------------------------- @notice Returns the error code for operation not supported @return Error code as u64 public fun get_eoperation_not_supported(): u64 Function `get_edebt_ceiling_not_zero` ------------------------------------- @notice Returns the error code for debt ceiling not zero @return Error code as u64 public fun get_edebt_ceiling_not_zero(): u64 Function `get_easset_not_listed` -------------------------------- @notice Returns the error code for asset not listed @return Error code as u64 public fun get_easset_not_listed(): u64 Function `get_ezero_snapshot_ratio` ----------------------------------- @notice Returns the error code for zero snapshot ratio @return Error code as u64 public fun get_ezero_snapshot_ratio(): u64 Function `get_einvalid_ratio_timestamp` --------------------------------------- @notice Returns the error code for invalid snapshot ratio @return Error code as u64 public fun get_einvalid_ratio_timestamp(): u64 Function `get_esnapshot_overflow` --------------------------------- @notice Returns the error code for snapshot overflow @return Error code as u64 public fun get_esnapshot_overflow(): u64 Function `get_ezero_ratio_decimals` ----------------------------------- @notice Returns the error code for zero ration decimals @return Error code as u64 public fun get_ezero_ratio_decimals(): u64 Function `get_emismatch_adapter_type` ------------------------------------- @notice Returns the error code for a mismatch on the adapter type @return Error code as u64 public fun get_emismatch_adapter_type(): u64 Function `get_einvalid_growth_rate` ----------------------------------- @notice Returns the error code for invalid growth rate @return Error code as u64 public fun get_einvalid_growth_rate(): u64 Function `get_einvalid_snapshot_delay` -------------------------------------- @notice Returns the error code for invalid snapshot delay @return Error code as u64 public fun get_einvalid_snapshot_delay(): u64 Function `get_einvalid_snapshot_ratio` -------------------------------------- @notice Returns the error code for invalid snapshot ratio @return Error code as u64 public fun get_einvalid_snapshot_ratio(): u64 Function `get_einvalid_snapshot_timestamp` ------------------------------------------ @notice Returns the error code for invalid snapshot timestamp @return Error code as u64 public fun get_einvalid_snapshot_timestamp(): u64 Function `get_ecustom_price_above_price_cap` -------------------------------------------- @notice Returns the error code for custom price above price cap @return Error code as u64 public fun get_ecustom_price_above_price_cap(): u64 Function `get_eoracle_price_overflow` ------------------------------------- @notice Returns the error code for oracle price overflow @return Error code as u64 public fun get_eoracle_price_overflow(): u64 Function `get_einvalid_optimal_usage_ratio` ------------------------------------------- @notice Returns the error code for invalid optimal usage ratio @return Error code as u64 public fun get_einvalid_optimal_usage_ratio(): u64 Function `get_eunderlying_cannot_be_rescued` -------------------------------------------- @notice Returns the error code for underlying cannot be rescued @return Error code as u64 public fun get_eunderlying_cannot_be_rescued(): u64 Function `get_eaddresses_provider_already_added` ------------------------------------------------ @notice Returns the error code for addresses provider already added @return Error code as u64 public fun get_eaddresses_provider_already_added(): u64 Function `get_epool_addresses_do_not_match` ------------------------------------------- @notice Returns the error code for pool addresses do not match @return Error code as u64 public fun get_epool_addresses_do_not_match(): u64 Function `get_esiloed_borrowing_violation` ------------------------------------------ @notice Returns the error code for siloed borrowing violation @return Error code as u64 public fun get_esiloed_borrowing_violation(): u64 Function `get_ereserve_debt_not_zero` ------------------------------------- @notice Returns the error code for reserve debt not zero @return Error code as u64 public fun get_ereserve_debt_not_zero(): u64 Function `get_enot_acl_owner` ----------------------------- @notice Returns the error code for not ACL owner @return Error code as u64 public fun get_enot_acl_owner(): u64 Function `get_erole_mismatch` ----------------------------- @notice Returns the error code for role mismatch @return Error code as u64 public fun get_erole_mismatch(): u64 Function `get_erole_can_only_renounce_self` ------------------------------------------- @notice Returns the error code for role can only renounce self @return Error code as u64 public fun get_erole_can_only_renounce_self(): u64 Function `get_eroles_not_initialized` ------------------------------------- @notice Returns the error code for roles not initialized @return Error code as u64 public fun get_eroles_not_initialized(): u64 Function `get_eoverflow` ------------------------ @notice Returns the error code for overflow @return Error code as u64 public fun get_eoverflow(): u64 Function `get_edivision_by_zero` -------------------------------- @notice Returns the error code for division by zero @return Error code as u64 public fun get_edivision_by_zero(): u64 Function `get_enot_pool_owner` ------------------------------ @notice Returns the error code for not pool owner @return Error code as u64 public fun get_enot_pool_owner(): u64 Function `get_eflashloan_disabled` ---------------------------------- @notice Returns the error code for flashloan disabled @return Error code as u64 public fun get_eflashloan_disabled(): u64 Function `get_einvalid_max_rate` -------------------------------- @notice Returns the error code for invalid max rate @return Error code as u64 public fun get_einvalid_max_rate(): u64 Function `get_ewithdraw_to_atoken` ---------------------------------- @notice Returns the error code for withdraw to aToken @return Error code as u64 public fun get_ewithdraw_to_atoken(): u64 Function `get_esupply_to_atoken` -------------------------------- @notice Returns the error code for supply to aToken @return Error code as u64 public fun get_esupply_to_atoken(): u64 Function `get_eslope_2_must_be_gte_slope_1` ------------------------------------------- @notice Returns the error code for slope 2 must be greater than or equal to slope 1 @return Error code as u64 public fun get_eslope_2_must_be_gte_slope_1(): u64 Function `get_eliquidation_grace_sentinel_check_failed` ------------------------------------------------------- @notice Returns the error code for liquidation grace sentinel check failed @return Error code as u64 public fun get_eliquidation_grace_sentinel_check_failed(): u64 Function `get_einvalid_grace_period` ------------------------------------ @notice Returns the error code for invalid grace period @return Error code as u64 public fun get_einvalid_grace_period(): u64 Function `get_einvalid_freeze_flag` ----------------------------------- @notice Returns the error code for invalid freeze flag @return Error code as u64 public fun get_einvalid_freeze_flag(): u64 Function `get_emust_not_leave_dust` ----------------------------------- @notice Returns the error code for must not leave dust @return Error code as u64 public fun get_emust_not_leave_dust(): u64 Function `get_eoracle_not_admin` -------------------------------- @notice Returns the error code for oracle not admin @return Error code as u64 public fun get_eoracle_not_admin(): u64 Function `get_easset_already_exists` ------------------------------------ @notice Returns the error code for asset already exists @return Error code as u64 public fun get_easset_already_exists(): u64 Function `get_eno_asset_feed` ----------------------------- @notice Returns the error code for no asset feed @return Error code as u64 public fun get_eno_asset_feed(): u64 Function `get_eno_asset_custom_price` ------------------------------------- @notice Returns the error code for no asset custom price @return Error code as u64 public fun get_eno_asset_custom_price(): u64 Function `get_ezero_asset_custom_price` --------------------------------------- @notice Returns the error code for zero asset custom price @return Error code as u64 public fun get_ezero_asset_custom_price(): u64 Function `get_eoralce_benchmark_length_mismatch` ------------------------------------------------ @notice Returns the error code for oracle benchmark length mismatch @return Error code as u64 public fun get_eoralce_benchmark_length_mismatch(): u64 Function `get_enegative_oracle_price` ------------------------------------- @notice Returns the error code for negative oracle price @return Error code as u64 public fun get_enegative_oracle_price(): u64 Function `get_ezero_oracle_price` --------------------------------- @notice Returns the error code for zero oracle price @return Error code as u64 public fun get_ezero_oracle_price(): u64 Function `get_ecaller_not_pool_or_asset_listing_admin` ------------------------------------------------------ @notice Returns the error code for caller not pool or asset listing admin @return Error code as u64 public fun get_ecaller_not_pool_or_asset_listing_admin(): u64 Function `get_erequested_feed_ids_assets_mismatch` -------------------------------------------------- @notice Returns the error code for requested feed ids assets mismatch @return Error code as u64 public fun get_erequested_feed_ids_assets_mismatch(): u64 Function `get_erequested_custom_prices_assets_mismatch` ------------------------------------------------------- @notice Returns the error code for requested custom prices assets mismatch @return Error code as u64 public fun get_erequested_custom_prices_assets_mismatch(): u64 Function `get_easset_not_registered_with_oracle` ------------------------------------------------ @notice Returns the error code for asset not registered with oracle @return Error code as u64 public fun get_easset_not_registered_with_oracle(): u64 Function `get_ecap_lower_than_actual_price` ------------------------------------------- @notice Returns the error code for cap lower than actual price @return Error code as u64 public fun get_ecap_lower_than_actual_price(): u64 Function `get_easset_no_price_cap` ---------------------------------- @notice Returns the error code for asset no price cap @return Error code as u64 public fun get_easset_no_price_cap(): u64 Function `get_estale_oracle_price` ---------------------------------- @notice Returns the error code for stale oracle price @return Error code as u64 public fun get_estale_oracle_price(): u64 Function `get_eoracle_price_timestamp_in_future` ------------------------------------------------ @notice Returns the error code for oracle price timestamp being in the future @return Error code as u64 public fun get_eoracle_price_timestamp_in_future(): u64 Function `get_ezero_oracle_max_asset_price_age` ----------------------------------------------- @notice Returns the error code for oracle max asset price age being zero @return Error code as u64 public fun get_ezero_oracle_max_asset_price_age(): u64 Function `get_edifferent_caller_on_behalf_of` --------------------------------------------- @notice Returns the error code for different caller on behalf of @return Error code as u64 public fun get_edifferent_caller_on_behalf_of(): u64 Function `get_eempty_feed_id` ----------------------------- @notice Returns the error code for empty feed id @return Error code as u64 public fun get_eempty_feed_id(): u64 Function `get_euser_not_listed` ------------------------------- @notice Returns the error code for user not listed @return Error code as u64 public fun get_euser_not_listed(): u64 Function `get_esigner_and_on_behalf_of_not_same` ------------------------------------------------ @notice Returns the error code for signer and on behalf of not same @return Error code as u64 public fun get_esigner_and_on_behalf_of_not_same(): u64 Function `get_eaccount_does_not_exist` -------------------------------------- @notice Returns the error code for account does not exist @return Error code as u64 public fun get_eaccount_does_not_exist(): u64 Function `get_eflashloan_payer_not_receiver` -------------------------------------------- @notice Returns the error code for flashloan payer not receiver @return Error code as u64 public fun get_eflashloan_payer_not_receiver(): u64 Function `get_eprice_oracle_check_failed` ----------------------------------------- @notice Returns the error code for price oracle check failed @return Error code as u64 public fun get_eprice_oracle_check_failed(): u64 Function `get_enot_rate_owner` ------------------------------ @notice Returns the error code for not rate owner @return Error code as u64 public fun get_enot_rate_owner(): u64 Function `get_edefault_interest_rate_strategy_not_initialized` -------------------------------------------------------------- @notice Returns the error code for default interest rate strategy not initialized @return Error code as u64 public fun get_edefault_interest_rate_strategy_not_initialized(): u64 Function `get_egho_interest_rate_strategy_not_initialized` ---------------------------------------------------------- @notice Returns the error code for GHO interest rate strategy not initialized @return Error code as u64 public fun get_egho_interest_rate_strategy_not_initialized(): u64 Function `get_ereserve_list_not_initialized` -------------------------------------------- @notice Returns the error code for reserve list not initialized @return Error code as u64 public fun get_ereserve_list_not_initialized(): u64 Function `get_etoken_already_exists` ------------------------------------ @notice Returns the error code for token already exists @return Error code as u64 public fun get_etoken_already_exists(): u64 Function `get_etoken_not_exist` ------------------------------- @notice Returns the error code for token not exist @return Error code as u64 public fun get_etoken_not_exist(): u64 Function `get_eresource_not_exist` ---------------------------------- @notice Returns the error code for resource not exist @return Error code as u64 public fun get_eresource_not_exist(): u64 Function `get_etoken_name_already_exist` ---------------------------------------- @notice Returns the error code for token name already exist @return Error code as u64 public fun get_etoken_name_already_exist(): u64 Function `get_etoken_symbol_already_exist` ------------------------------------------ @notice Returns the error code for token symbol already exist @return Error code as u64 public fun get_etoken_symbol_already_exist(): u64 Function `get_emin_asset_decimal_places` ---------------------------------------- @notice Returns the error code for min asset decimal places @return Error code as u64 public fun get_emin_asset_decimal_places(): u64 Function `get_ereserve_addresses_list_not_initialized` ------------------------------------------------------ @notice Returns the error code for reserve addresses list not initialized @return Error code as u64 public fun get_ereserve_addresses_list_not_initialized(): u64 Function `get_einvalid_max_apt_fee` ----------------------------------- @notice Returns the error code for invalid max APT fee @return Error code as u64 public fun get_einvalid_max_apt_fee(): u64 Function `get_einsufficient_coins_to_wrap` ------------------------------------------ @notice Returns the error code for insufficient coins to wrap @return Error code as u64 public fun get_einsufficient_coins_to_wrap(): u64 Function `get_einsufficient_fas_to_unwrap` ------------------------------------------ @notice Returns the error code for insufficient FAs to unwrap @return Error code as u64 public fun get_einsufficient_fas_to_unwrap(): u64 Function `get_eunmapped_coin_to_fa` ----------------------------------- @notice Returns the error code for unmapped coin to FA @return Error code as u64 public fun get_eunmapped_coin_to_fa(): u64 Function `get_enot_rewards_admin` --------------------------------- @notice Returns the error code for not rewards admin @return Error code as u64 public fun get_enot_rewards_admin(): u64 Function `get_eincentives_controller_mismatch` ---------------------------------------------- @notice Returns the error code for incentives controller mismatch @return Error code as u64 public fun get_eincentives_controller_mismatch(): u64 Function `get_eunauthorized_claimer` ------------------------------------ @notice Returns the error code for unauthorized claimer @return Error code as u64 public fun get_eunauthorized_claimer(): u64 Function `get_ereward_index_overflow` ------------------------------------- @notice Returns the error code for reward index overflow @return Error code as u64 public fun get_ereward_index_overflow(): u64 Function `get_einvalid_reward_config` ------------------------------------- @notice Returns the error code for invalid reward config @return Error code as u64 public fun get_einvalid_reward_config(): u64 Function `get_edistribution_does_not_exist` ------------------------------------------- @notice Returns the error code for distribution does not exist @return Error code as u64 public fun get_edistribution_does_not_exist(): u64 Function `get_ereward_transfer_failed` -------------------------------------- @notice Returns the error code for reward transfer failed @return Error code as u64 public fun get_ereward_transfer_failed(): u64 Function `get_enot_emission_admin` ---------------------------------- @notice Returns the error code for not emission admin @return Error code as u64 public fun get_enot_emission_admin(): u64 Function `get_erewards_controller_not_defined` ---------------------------------------------- @notice Returns the error code for rewards controller not defined @return Error code as u64 public fun get_erewards_controller_not_defined(): u64 Function `get_enot_ecosystem_reserve_funds_admin` ------------------------------------------------- @notice Returns the error code for not ecosystem reserve funds admin @return Error code as u64 public fun get_enot_ecosystem_reserve_funds_admin(): u64 Function `get_enot_ecosystem_admin_or_recipient` ------------------------------------------------ @notice Returns the error code for not ecosystem admin or recipient @return Error code as u64 public fun get_enot_ecosystem_admin_or_recipient(): u64 Function `get_estream_not_exist` -------------------------------- @notice Returns the error code for stream not exist @return Error code as u64 public fun get_estream_not_exist(): u64 Function `get_estream_to_the_contract_itself` --------------------------------------------- @notice Returns the error code for stream to the contract itself @return Error code as u64 public fun get_estream_to_the_contract_itself(): u64 Function `get_estream_to_the_caller` ------------------------------------ @notice Returns the error code for stream to the caller @return Error code as u64 public fun get_estream_to_the_caller(): u64 Function `get_estream_deposit_is_zero` -------------------------------------- @notice Returns the error code for stream deposit is zero @return Error code as u64 public fun get_estream_deposit_is_zero(): u64 Function `get_estart_time_before_block_timestamp` ------------------------------------------------- @notice Returns the error code for start time before block timestamp @return Error code as u64 public fun get_estart_time_before_block_timestamp(): u64 Function `get_estop_time_before_the_start_time` ----------------------------------------------- @notice Returns the error code for stop time before the start time @return Error code as u64 public fun get_estop_time_before_the_start_time(): u64 Function `get_edeposit_smaller_than_time_delta` ----------------------------------------------- @notice Returns the error code for deposit smaller than time delta @return Error code as u64 public fun get_edeposit_smaller_than_time_delta(): u64 Function `get_edeposit_not_multiple_of_time_delta` -------------------------------------------------- @notice Returns the error code for deposit not multiple of time delta @return Error code as u64 public fun get_edeposit_not_multiple_of_time_delta(): u64 Function `get_estream_withdraw_is_zero` --------------------------------------- @notice Returns the error code for stream withdraw is zero @return Error code as u64 public fun get_estream_withdraw_is_zero(): u64 Function `get_ewithdraw_exceeds_the_available_balance` ------------------------------------------------------ @notice Returns the error code for withdraw exceeds the available balance @return Error code as u64 public fun get_ewithdraw_exceeds_the_available_balance(): u64 Function `get_einvalid_rewards_controller_address` -------------------------------------------------- @notice Returns the error code for invalid rewards controller address @return Error code as u64 public fun get_einvalid_rewards_controller_address(): u64 Function `get_ereward_not_exist` -------------------------------- @notice Returns the error code for reward not exist @return Error code as u64 public fun get_ereward_not_exist(): u64 Function `get_estore_for_asset_not_exist` ----------------------------------------- @notice Returns the error code for store for asset not exist @return Error code as u64 public fun get_estore_for_asset_not_exist(): u64 Function `get_einvalid_emission_rate` ------------------------------------- @notice Returns the error code for invalid emission rate @return Error code as u64 public fun get_einvalid_emission_rate(): u64 [« Previous](https://aave.github.io/aptos-aave-v3/aave-acl/acl_manage/) [Next »](https://aave.github.io/aptos-aave-v3/aave-config/helper/) --- # Large Packages - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Large Packages * Large Packages * * * Module `0xf0b20e8fe3907b72b00d66e898e508b1f652eaa67f4defd99346123ea5ee8afd::large_packages` =========================================================================================== @title Large Packages Uploader @author Aptos @notice This provides a framework for uploading large packages to standard accounts or objects. In each pass, the caller pushes more code by calling `stage_code_chunk`. In the final call, the caller can use `stage_code_chunk_and_publish_to_account`, `stage_code_chunk_and_publish_to_object`, or `stage_code_chunk_and_upgrade_object_code` to upload the final data chunk and publish or upgrade the package on-chain. Note that `code_indices` must not have gaps. For example, if `code_indices` are provided as \[0, 1, 3\] (skipping index 2), the inline function `assemble_module_code` will abort. This is because `[StagingArea](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/large_packages.md#0xf0b20e8fe3907b72b00d66e898e508b1f652eaa67f4defd99346123ea5ee8afd_large_packages_StagingArea) .last_module_idx` is set to the maximum value from `code_indices`. When `assemble_module_code` iterates over the range from 0 to `[StagingArea](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/large_packages.md#0xf0b20e8fe3907b72b00d66e898e508b1f652eaa67f4defd99346123ea5ee8afd_large_packages_StagingArea) .last_module_idx`, it expects each index to be present in the `[StagingArea](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/large_packages.md#0xf0b20e8fe3907b72b00d66e898e508b1f652eaa67f4defd99346123ea5ee8afd_large_packages_StagingArea) .[code](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/) ` SmartTable. Any missing index in this range will cause the function to fail. * [Resource `StagingArea`](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/#0xf0b20e8fe3907b72b00d66e898e508b1f652eaa67f4defd99346123ea5ee8afd_large_packages_StagingArea) * [Constants](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/#@Constants_0) * [Function `stage_code_chunk`](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/#0xf0b20e8fe3907b72b00d66e898e508b1f652eaa67f4defd99346123ea5ee8afd_large_packages_stage_code_chunk) * [Function `stage_code_chunk_and_publish_to_account`](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/#0xf0b20e8fe3907b72b00d66e898e508b1f652eaa67f4defd99346123ea5ee8afd_large_packages_stage_code_chunk_and_publish_to_account) * [Function `stage_code_chunk_and_publish_to_object`](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/#0xf0b20e8fe3907b72b00d66e898e508b1f652eaa67f4defd99346123ea5ee8afd_large_packages_stage_code_chunk_and_publish_to_object) * [Function `stage_code_chunk_and_upgrade_object_code`](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/#0xf0b20e8fe3907b72b00d66e898e508b1f652eaa67f4defd99346123ea5ee8afd_large_packages_stage_code_chunk_and_upgrade_object_code) * [Function `cleanup_staging_area`](https://aave.github.io/aptos-aave-v3/aave-large-packages/large_packages/#0xf0b20e8fe3907b72b00d66e898e508b1f652eaa67f4defd99346123ea5ee8afd_large_packages_cleanup_staging_area) use 0x1::code; use 0x1::error; use 0x1::object; use 0x1::object_code_deployment; use 0x1::signer; use 0x1::smart_table; use 0x1::vector; Resource `StagingArea` ---------------------- @notice Storage for staging package code before publishing struct StagingArea has key Constants --------- @notice Error code when code\_indices and code\_chunks have different lengths const ECODE_MISMATCH: u64 = 1; @notice Error code when object reference is missing when upgrading object code const EMISSING_OBJECT_REFERENCE: u64 = 2; Function `stage_code_chunk` --------------------------- @notice Stages a chunk of code for later publishing @param owner The account that will store the staging area @param metadata\_chunk Metadata for the package (or empty vector if not the first chunk) @param code\_indices Indices indicating the position of each code chunk @param code\_chunks The actual code chunks to stage public entry fun stage_code_chunk(owner: &signer, metadata_chunk: vector, code_indices: vector, code_chunks: vector>) Function `stage_code_chunk_and_publish_to_account` -------------------------------------------------- @notice Stages the final code chunk and publishes the package to an account @param owner The account that will own the package @param metadata\_chunk Final metadata for the package (or empty vector) @param code\_indices Indices indicating the position of each code chunk @param code\_chunks The actual code chunks to stage public entry fun stage_code_chunk_and_publish_to_account(owner: &signer, metadata_chunk: vector, code_indices: vector, code_chunks: vector>) Function `stage_code_chunk_and_publish_to_object` ------------------------------------------------- @notice Stages the final code chunk and publishes the package to an object @param owner The account that will own the object @param metadata\_chunk Final metadata for the package (or empty vector) @param code\_indices Indices indicating the position of each code chunk @param code\_chunks The actual code chunks to stage public entry fun stage_code_chunk_and_publish_to_object(owner: &signer, metadata_chunk: vector, code_indices: vector, code_chunks: vector>) Function `stage_code_chunk_and_upgrade_object_code` --------------------------------------------------- @notice Stages the final code chunk and upgrades an existing object package @param owner The account that owns the object @param metadata\_chunk Final metadata for the package (or empty vector) @param code\_indices Indices indicating the position of each code chunk @param code\_chunks The actual code chunks to stage @param code\_object The object with the PackageRegistry to upgrade public entry fun stage_code_chunk_and_upgrade_object_code(owner: &signer, metadata_chunk: vector, code_indices: vector, code_chunks: vector>, code_object: object::Object) Function `cleanup_staging_area` ------------------------------- @notice Cleans up the staging area after publishing or if aborting the process @param owner The account that owns the staging area public entry fun cleanup_staging_area(owner: &signer) [« Previous](https://aave.github.io/aptos-aave-v3/aave-config/user_config/) [Next »](https://aave.github.io/aptos-aave-v3/aave-math/math_utils/) --- # Pool - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Pool * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool` ================================================================================= @title Pool Module @author Aave @notice Main module for the Aave protocol, managing the state of all reserves and users * [Resource `ReserveExtendConfiguration`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_ReserveExtendConfiguration) * [Resource `ReserveData`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_ReserveData) * [Struct `ReserveInfo`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_ReserveInfo) * [Resource `Reserves`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_Reserves) * [Resource `UsersConfig`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_UsersConfig) * [Function `get_reserve_data`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_data) * [Function `number_of_active_reserves`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_number_of_active_reserves) * [Function `number_of_active_and_dropped_reserves`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_number_of_active_and_dropped_reserves) * [Function `get_reserve_configuration`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_configuration) * [Function `get_reserve_configuration_by_reserve_data`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_configuration_by_reserve_data) * [Function `get_reserve_last_update_timestamp`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_last_update_timestamp) * [Function `get_reserve_id`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_id) * [Function `get_reserve_a_token_address`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_a_token_address) * [Function `get_reserve_accrued_to_treasury`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_accrued_to_treasury) * [Function `get_reserve_variable_borrow_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_variable_borrow_index) * [Function `get_reserve_liquidity_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_liquidity_index) * [Function `get_reserve_current_liquidity_rate`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_current_liquidity_rate) * [Function `get_reserve_current_variable_borrow_rate`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_current_variable_borrow_rate) * [Function `get_reserve_variable_debt_token_address`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_variable_debt_token_address) * [Function `get_reserve_isolation_mode_total_debt`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_isolation_mode_total_debt) * [Function `get_reserve_virtual_underlying_balance`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_virtual_underlying_balance) * [Function `get_liquidation_grace_period`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_liquidation_grace_period) * [Function `get_reserve_deficit`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_deficit) * [Function `get_user_configuration`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_user_configuration) * [Function `get_reserve_normalized_income`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_normalized_income) * [Function `get_normalized_income_by_reserve_data`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_normalized_income_by_reserve_data) * [Function `get_reserve_normalized_variable_debt`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_normalized_variable_debt) * [Function `get_normalized_debt_by_reserve_data`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_normalized_debt_by_reserve_data) * [Function `get_reserves_list`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserves_list) * [Function `get_reserve_address_by_id`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_reserve_address_by_id) * [Function `get_flashloan_premium_total`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_flashloan_premium_total) * [Function `get_flashloan_premium_to_protocol`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_flashloan_premium_to_protocol) * [Function `max_number_reserves`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_max_number_reserves) * [Function `asset_exists`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_asset_exists) * [Function `get_isolation_mode_state`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_isolation_mode_state) * [Function `get_siloed_borrowing_state`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_get_siloed_borrowing_state) * [Function `set_reserve_configuration_with_guard`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_reserve_configuration_with_guard) * [Function `init_pool`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_init_pool) * [Function `new_reserve_data`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_new_reserve_data) * [Function `delete_reserve_data`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_delete_reserve_data) * [Function `set_reserve_last_update_timestamp`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_reserve_last_update_timestamp) * [Function `set_reserve_accrued_to_treasury`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_reserve_accrued_to_treasury) * [Function `set_reserve_variable_borrow_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_reserve_variable_borrow_index) * [Function `set_reserve_liquidity_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_reserve_liquidity_index) * [Function `set_reserve_current_liquidity_rate`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_reserve_current_liquidity_rate) * [Function `set_reserve_current_variable_borrow_rate`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_reserve_current_variable_borrow_rate) * [Function `set_reserve_isolation_mode_total_debt`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_reserve_isolation_mode_total_debt) * [Function `set_reserve_virtual_underlying_balance`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_reserve_virtual_underlying_balance) * [Function `set_liquidation_grace_period`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_liquidation_grace_period) * [Function `set_reserve_deficit`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_reserve_deficit) * [Function `set_reserve_configuration`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_reserve_configuration) * [Function `set_user_configuration`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_set_user_configuration) * [Function `cumulate_to_liquidity_index`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_cumulate_to_liquidity_index) * [Function `reset_isolation_mode_total_debt`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_reset_isolation_mode_total_debt) * [Function `update_flashloan_premiums`](https://aave.github.io/aptos-aave-v3/aave-pool/pool/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_update_flashloan_premiums) use 0x1::object; use 0x1::signer; use 0x1::smart_table; use 0x1::table_with_length; use 0x1::timestamp; use 0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::events; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Resource `ReserveExtendConfiguration` ------------------------------------- @notice Configuration for reserve extensions like flashloan premiums struct ReserveExtendConfiguration has drop, store, key Resource `ReserveData` ---------------------- @notice Stateful information about a reserve #[resource_group_member(#[group = 0x1::object::ObjectGroup])] struct ReserveData has key Struct `ReserveInfo` -------------------- @notice A wrapper over the `[ReserveData](https://aave.github.io/aptos-aave-v3/aave-pool/pool/pool.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_ReserveData) ` object with its associated delete ref struct ReserveInfo has store Resource `Reserves` ------------------- @notice Information of all reserves struct Reserves has key Resource `UsersConfig` ---------------------- @notice Map of users address and their configuration data (user\_address => UserConfigurationMap) struct UsersConfig has key Function `get_reserve_data` --------------------------- @notice Get an object that points to the state of the reserve @param asset The address of the underlying asset of the reserve @return The object that refers to the state of the reserve #[view] public fun get_reserve_data(asset: address): object::Object Function `number_of_active_reserves` ------------------------------------ @notice Return the number of active reserves @return The number of active reserves #[view] public fun number_of_active_reserves(): u256 Function `number_of_active_and_dropped_reserves` ------------------------------------------------ @notice Return the number of active and dropped reserves @return The number of active and dropped reserves #[view] public fun number_of_active_and_dropped_reserves(): u256 Function `get_reserve_configuration` ------------------------------------ @notice Returns the configuration of the reserve @param asset The address of the underlying asset of the reserve @return The configuration of the reserve #[view] public fun get_reserve_configuration(asset: address): reserve_config::ReserveConfigurationMap Function `get_reserve_configuration_by_reserve_data` ---------------------------------------------------- @notice Returns the configuration of the reserve by reserve data @param reserve\_data The reserve data object @return The configuration of the reserve #[view] public fun get_reserve_configuration_by_reserve_data(reserve_data: object::Object): reserve_config::ReserveConfigurationMap Function `get_reserve_last_update_timestamp` -------------------------------------------- @notice Returns the last update timestamp of the reserve @param reserve\_data The reserve data object @return The last update timestamp #[view] public fun get_reserve_last_update_timestamp(reserve_data: object::Object): u64 Function `get_reserve_id` ------------------------- @notice Returns the ID of the reserve @param reserve\_data The reserve data object @return The ID of the reserve #[view] public fun get_reserve_id(reserve_data: object::Object): u16 Function `get_reserve_a_token_address` -------------------------------------- @notice Returns the aToken address of the reserve @param reserve\_data The reserve data object @return The aToken address #[view] public fun get_reserve_a_token_address(reserve_data: object::Object): address Function `get_reserve_accrued_to_treasury` ------------------------------------------ @notice Returns the accrued to treasury amount of the reserve @param reserve\_data The reserve data object @return The accrued to treasury amount #[view] public fun get_reserve_accrued_to_treasury(reserve_data: object::Object): u256 Function `get_reserve_variable_borrow_index` -------------------------------------------- @notice Returns the variable borrow index of the reserve @param reserve\_data The reserve data object @return The variable borrow index #[view] public fun get_reserve_variable_borrow_index(reserve_data: object::Object): u128 Function `get_reserve_liquidity_index` -------------------------------------- @notice Returns the liquidity index of the reserve @param reserve\_data The reserve data object @return The liquidity index #[view] public fun get_reserve_liquidity_index(reserve_data: object::Object): u128 Function `get_reserve_current_liquidity_rate` --------------------------------------------- @notice Returns the current liquidity rate of the reserve @param reserve\_data The reserve data object @return The current liquidity rate #[view] public fun get_reserve_current_liquidity_rate(reserve_data: object::Object): u128 Function `get_reserve_current_variable_borrow_rate` --------------------------------------------------- @notice Returns the current variable borrow rate of the reserve @param reserve\_data The reserve data object @return The current variable borrow rate #[view] public fun get_reserve_current_variable_borrow_rate(reserve_data: object::Object): u128 Function `get_reserve_variable_debt_token_address` -------------------------------------------------- @notice Returns the variable debt token address of the reserve @param reserve\_data The reserve data object @return The variable debt token address #[view] public fun get_reserve_variable_debt_token_address(reserve_data: object::Object): address Function `get_reserve_isolation_mode_total_debt` ------------------------------------------------ @notice Returns the isolation mode total debt of the reserve @param reserve\_data The reserve data object @return The isolation mode total debt #[view] public fun get_reserve_isolation_mode_total_debt(reserve_data: object::Object): u128 Function `get_reserve_virtual_underlying_balance` ------------------------------------------------- @notice Returns the virtual underlying balance of the reserve @param reserve\_data The reserve data object @return The virtual underlying balance #[view] public fun get_reserve_virtual_underlying_balance(reserve_data: object::Object): u128 Function `get_liquidation_grace_period` --------------------------------------- @notice Returns the liquidation grace period of the given asset @param reserve\_data The reserve data object @return Timestamp when the liquidation grace period will end #[view] public fun get_liquidation_grace_period(reserve_data: object::Object): u64 Function `get_reserve_deficit` ------------------------------ @notice Returns the current deficit of a reserve @param reserve\_data The reserve data object @return The current deficit of the reserve #[view] public fun get_reserve_deficit(reserve_data: object::Object): u128 Function `get_user_configuration` --------------------------------- @notice Returns the user configuration @param user The address of the user @return The user configuration #[view] public fun get_user_configuration(user: address): user_config::UserConfigurationMap Function `get_reserve_normalized_income` ---------------------------------------- @notice Returns the normalized income of the reserve @param asset The address of the underlying asset of the reserve @return The reserve's normalized income #[view] public fun get_reserve_normalized_income(asset: address): u256 Function `get_normalized_income_by_reserve_data` ------------------------------------------------ @notice Returns the ongoing normalized income for the reserve @dev A value of 1e27 means there is no income. As time passes, the income is accrued @dev A value of 2\*1e27 means for each unit of asset one unit of income has been accrued @param reserve The reserve data object @return The normalized income, expressed in ray #[view] public fun get_normalized_income_by_reserve_data(reserve_data: object::Object): u256 Function `get_reserve_normalized_variable_debt` ----------------------------------------------- @notice Returns the normalized variable debt per unit of asset @dev WARNING: This function is intended to be used primarily by the protocol itself to get a "dynamic" variable index based on time, current stored index and virtual rate at the current moment (approx. a borrower would get if opening a position). This means that is always used in combination with variable debt supply/balances. If using this function externally, consider that is possible to have an increasing normalized variable debt that is not equivalent to how the variable debt index would be updated in storage (e.g. only updates with non-zero variable debt supply) @param asset The address of the underlying asset of the reserve @return The reserve normalized variable debt #[view] public fun get_reserve_normalized_variable_debt(asset: address): u256 Function `get_normalized_debt_by_reserve_data` ---------------------------------------------- @notice Returns the ongoing normalized variable debt for the reserve @dev A value of 1e27 means there is no debt. As time passes, the debt is accrued @dev A value of 2\*1e27 means that for each unit of debt, one unit worth of interest has been accumulated @param reserve The reserve data object @return The normalized variable debt, expressed in ray #[view] public fun get_normalized_debt_by_reserve_data(reserve_data: object::Object): u256 Function `get_reserves_list` ---------------------------- @notice Returns the list of the underlying assets of all the initialized reserves @dev It does not include dropped reserves @return The addresses of the underlying assets of the initialized reserves #[view] public fun get_reserves_list(): vector
Function `get_reserve_address_by_id` ------------------------------------ @notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the ReserveData struct @param id The id of the reserve as stored in the ReserveData struct @return The address of the reserve associated with id #[view] public fun get_reserve_address_by_id(id: u256): address Function `get_flashloan_premium_total` -------------------------------------- @notice Returns the total flashloan premium @return The total flashloan premium #[view] public fun get_flashloan_premium_total(): u128 Function `get_flashloan_premium_to_protocol` -------------------------------------------- @notice Returns the flashloan premium to protocol @return The flashloan premium to protocol #[view] public fun get_flashloan_premium_to_protocol(): u128 Function `max_number_reserves` ------------------------------ @notice Returns the maximum number of reserves supported to be listed in this Pool @return The maximum number of reserves supported #[view] public fun max_number_reserves(): u16 Function `asset_exists` ----------------------- @notice Checks if a specified asset exists in the reserve list @dev Ensures the reserve list is initialized before checking for the asset's presence @param asset The address of the asset to check in the reserve list @return A boolean indicating whether the asset exists in the reserve list #[view] public fun asset_exists(asset: address): bool Function `get_isolation_mode_state` ----------------------------------- @notice Returns the Isolation Mode state of the user @param user\_config\_map The configuration of the user @return True if the user is in isolation mode, false otherwise @return The address of the only asset used as collateral @return The debt ceiling of the reserve public fun get_isolation_mode_state(user_config_map: &user_config::UserConfigurationMap): (bool, address, u256) Function `get_siloed_borrowing_state` ------------------------------------- @notice Returns the siloed borrowing state for the user @param account The address of the user @return True if the user has borrowed a siloed asset, false otherwise @return The address of the only borrowed asset #[view] public fun get_siloed_borrowing_state(account: address): (bool, address) Function `set_reserve_configuration_with_guard` ----------------------------------------------- @notice Sets the reserve configuration with guard @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param reserve\_config\_map The new configuration bitmap public fun set_reserve_configuration_with_guard(account: &signer, asset: address, reserve_config_map: reserve_config::ReserveConfigurationMap) Function `init_pool` -------------------- @notice Initializes the pool @dev Only callable by the pool\_configurator module @param account The account signer of the caller public(friend) fun init_pool(account: &signer) Function `new_reserve_data` --------------------------- @notice Constructor for the `[ReserveData](https://aave.github.io/aptos-aave-v3/aave-pool/pool/pool.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_ReserveData) ` struct @param owner The owner of the reserve @param underlying\_asset The address of the underlying asset of the reserve @param a\_token\_address The address of the aToken @param variable\_debt\_token\_address The address of the variable debt token @param configuration The configuration of the reserve @return The object that refers to the state of the reserve public(friend) fun new_reserve_data(owner: &signer, underlying_asset: address, a_token_address: address, variable_debt_token_address: address, configuration: reserve_config::ReserveConfigurationMap): object::Object Function `delete_reserve_data` ------------------------------ @notice This function is used to delete the reserve data for a specified asset @dev Only callable by the pool\_token\_logic module @param asset The address of the underlying asset of the reserve public(friend) fun delete_reserve_data(asset: address) Function `set_reserve_last_update_timestamp` -------------------------------------------- @notice This function sets the last update timestamp for a specified asset's reserve data @dev Only callable by the pool\_logic module @param reserve\_data The reserve data object to update @param last\_update\_timestamp The new last update timestamp to set, expressed as a u64 value public(friend) fun set_reserve_last_update_timestamp(reserve_data: object::Object, last_update_timestamp: u64) Function `set_reserve_accrued_to_treasury` ------------------------------------------ @notice Update accrued\_to\_treasury of the reserve @dev Only callable by the pool and flashloan\_logic module @param reserve\_data The reserve data object to update @param accrued\_to\_treasury The new accrued\_to\_treasury value public(friend) fun set_reserve_accrued_to_treasury(reserve_data: object::Object, accrued_to_treasury: u256) Function `set_reserve_variable_borrow_index` -------------------------------------------- @notice This function sets the variable borrow index for a specified asset's reserve data @dev Only callable by the pool\_logic module @param reserve\_data The reserve data object to update @param variable\_borrow\_index The new variable borrow index to set, expressed as a u128 value public(friend) fun set_reserve_variable_borrow_index(reserve_data: object::Object, variable_borrow_index: u128) Function `set_reserve_liquidity_index` -------------------------------------- @notice This function sets the liquidity index for a specified asset's reserve data @dev Only callable by the pool, pool\_logic module @param reserve\_data The reserve data object to update @param liquidity\_index The new liquidity index to set, expressed as a u128 value public(friend) fun set_reserve_liquidity_index(reserve_data: object::Object, liquidity_index: u128) Function `set_reserve_current_liquidity_rate` --------------------------------------------- @notice This function sets the current liquidity rate for a specified asset's reserve data @dev Only callable by the pool\_logic module @param reserve\_data The reserve data object to update @param current\_liquidity\_rate The new current liquidity rate to set, expressed as a u128 value public(friend) fun set_reserve_current_liquidity_rate(reserve_data: object::Object, current_liquidity_rate: u128) Function `set_reserve_current_variable_borrow_rate` --------------------------------------------------- @notice This function sets the current variable borrow rate for a specified asset's reserve data @dev Only callable by the pool\_logic module @param reserve\_data The reserve data object to update @param current\_variable\_borrow\_rate The new current variable borrow rate to set, expressed as a u128 value public(friend) fun set_reserve_current_variable_borrow_rate(reserve_data: object::Object, current_variable_borrow_rate: u128) Function `set_reserve_isolation_mode_total_debt` ------------------------------------------------ @notice Updates isolation\_mode\_total\_debt of the reserve @dev Only callable by the borrow\_logic and isolation\_mode\_logic module @param reserve\_data The reserve data object to update @param isolation\_mode\_total\_debt The new isolation\_mode\_total\_debt value public(friend) fun set_reserve_isolation_mode_total_debt(reserve_data: object::Object, isolation_mode_total_debt: u128) Function `set_reserve_virtual_underlying_balance` ------------------------------------------------- @notice Sets the virtual underlying balance of the reserve @param reserve\_data The reserve data object to update @param balance The new virtual underlying balance public(friend) fun set_reserve_virtual_underlying_balance(reserve_data: object::Object, balance: u128) Function `set_liquidation_grace_period` --------------------------------------- @notice Sets the liquidation grace period of the given asset @dev To enable a liquidation grace period, a timestamp in the future should be set, To disable a liquidation grace period, any timestamp in the past works, like 0 @dev Only callable by the pool\_configurator module @param reserve\_data The reserve data object to update @param until Timestamp when the liquidation grace period will end public(friend) fun set_liquidation_grace_period(reserve_data: object::Object, until: u64) Function `set_reserve_deficit` ------------------------------ @notice Sets the deficit of the reserve @dev Only callable by the liquidation\_logic module @param reserve\_data The reserve data object to update @param deficit The new deficit of the reserve public(friend) fun set_reserve_deficit(reserve_data: object::Object, deficit: u128) Function `set_reserve_configuration` ------------------------------------ @notice Sets the configuration bitmap of the reserve as a whole @dev Only callable by the pool\_configurator and pool module @param asset The address of the underlying asset of the reserve @param reserve\_config\_map The new configuration bitmap public(friend) fun set_reserve_configuration(asset: address, reserve_config_map: reserve_config::ReserveConfigurationMap) Function `set_user_configuration` --------------------------------- @notice Sets the configuration bitmap of the user @dev Only callable by the supply\_logic, borrow\_logic and liquidation\_logic module @param user The address of the user @param user\_config\_map The new configuration bitmap public(friend) fun set_user_configuration(user: address, user_config_map: user_config::UserConfigurationMap) Function `cumulate_to_liquidity_index` -------------------------------------- @notice Accumulates a predefined amount of asset to the reserve as a fixed, instantaneous income. Used for example to accumulate the flashloan fee to the reserve, and spread it between all the suppliers @dev Only callable by the flashloan\_logic module @param reserve\_data The reserve data object to update @param total\_liquidity The total liquidity available in the reserve @param amount The amount to accumulate @return The next liquidity index of the reserve public(friend) fun cumulate_to_liquidity_index(reserve_data: object::Object, total_liquidity: u256, amount: u256): u256 Function `reset_isolation_mode_total_debt` ------------------------------------------ @notice Resets the isolation mode total debt of the given asset to zero @dev Only callable by the pool\_configurator module @dev It requires the given asset has zero debt ceiling @param asset The address of the underlying asset to reset the isolation\_mode\_total\_debt public(friend) fun reset_isolation_mode_total_debt(asset: address) Function `update_flashloan_premiums` ------------------------------------ @notice Updates flash loan premiums. Flash loan premium consists of two parts: - A part is sent to aToken holders as extra, one time accumulated interest - A part is collected by the protocol treasury @dev The total premium is calculated on the total borrowed amount @dev The premium to protocol is calculated on the total premium, being a percentage of `flash_loan_premium_total` @dev Only callable by the pool\_configurator module @param flash\_loan\_premium\_total The total premium, expressed in bps @param flash\_loan\_premium\_to\_protocol The part of the premium sent to the protocol treasury, expressed in bps public(friend) fun update_flashloan_premiums(flash_loan_premium_total: u128, flash_loan_premium_to_protocol: u128) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/liquidation_logic/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/) --- # Pool Configurator - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Pool Configurator * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_configurator` ============================================================================================== @title Pool Configurator Module @author Aave @notice Implements functionality to configure the Aave protocol pool parameters * [Resource `InternalData`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_InternalData) * [Struct `ReserveInterestRateDataChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_ReserveInterestRateDataChanged) * [Struct `ReserveBorrowing`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_ReserveBorrowing) * [Struct `ReserveFlashLoaning`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_ReserveFlashLoaning) * [Struct `CollateralConfigurationChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_CollateralConfigurationChanged) * [Struct `PendingLtvChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_PendingLtvChanged) * [Struct `ReserveActive`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_ReserveActive) * [Struct `ReserveFrozen`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_ReserveFrozen) * [Struct `ReservePaused`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_ReservePaused) * [Struct `ReserveDropped`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_ReserveDropped) * [Struct `ReserveFactorChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_ReserveFactorChanged) * [Struct `BorrowCapChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_BorrowCapChanged) * [Struct `SupplyCapChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_SupplyCapChanged) * [Struct `LiquidationProtocolFeeChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_LiquidationProtocolFeeChanged) * [Struct `LiquidationGracePeriodChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_LiquidationGracePeriodChanged) * [Struct `LiquidationGracePeriodDisabled`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_LiquidationGracePeriodDisabled) * [Struct `EModeAssetCategoryChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_EModeAssetCategoryChanged) * [Struct `EModeCategoryAdded`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_EModeCategoryAdded) * [Struct `DebtCeilingChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_DebtCeilingChanged) * [Struct `SiloedBorrowingChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_SiloedBorrowingChanged) * [Struct `FlashloanPremiumTotalUpdated`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_FlashloanPremiumTotalUpdated) * [Struct `FlashloanPremiumToProtocolUpdated`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_FlashloanPremiumToProtocolUpdated) * [Struct `BorrowableInIsolationChanged`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_BorrowableInIsolationChanged) * [Function `get_pending_ltv`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_get_pending_ltv) * [Function `init_reserves`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_init_reserves) * [Function `drop_reserve`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_drop_reserve) * [Function `set_reserve_borrowing`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_reserve_borrowing) * [Function `update_interest_rate_strategy`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_update_interest_rate_strategy) * [Function `configure_reserve_as_collateral`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_configure_reserve_as_collateral) * [Function `set_reserve_flash_loaning`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_reserve_flash_loaning) * [Function `set_reserve_active`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_reserve_active) * [Function `set_reserve_freeze`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_reserve_freeze) * [Function `set_borrowable_in_isolation`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_borrowable_in_isolation) * [Function `set_reserve_pause`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_reserve_pause) * [Function `set_reserve_pause_no_grace_period`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_reserve_pause_no_grace_period) * [Function `disable_liquidation_grace_period`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_disable_liquidation_grace_period) * [Function `set_reserve_factor`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_reserve_factor) * [Function `set_debt_ceiling`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_debt_ceiling) * [Function `set_siloed_borrowing`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_siloed_borrowing) * [Function `set_borrow_cap`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_borrow_cap) * [Function `set_supply_cap`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_supply_cap) * [Function `set_liquidation_protocol_fee`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_liquidation_protocol_fee) * [Function `set_emode_category`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_emode_category) * [Function `set_asset_emode_category`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_asset_emode_category) * [Function `set_pool_pause`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_pool_pause) * [Function `set_pool_pause_no_grace_period`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_pool_pause_no_grace_period) * [Function `update_flashloan_premium_total`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_update_flashloan_premium_total) * [Function `update_flashloan_premium_to_protocol`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_update_flashloan_premium_to_protocol) * [Function `set_apt_fee`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_set_apt_fee) use 0x1::event; use 0x1::object; use 0x1::option; use 0x1::signer; use 0x1::smart_table; use 0x1::string; use 0x1::timestamp; use 0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::default_reserve_interest_rate_strategy; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::emode_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_fee_manager; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_token_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::variable_debt_token_factory; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; Resource `InternalData` ----------------------- @notice Internal module data struct InternalData has key Struct `ReserveInterestRateDataChanged` --------------------------------------- @notice Emitted when reserve interest rate strategy configuration is updated @param asset The address of the underlying asset of the reserve @param optimal\_usage\_ratio Optimal utilization ratio used in the interest rate calculation @param base\_variable\_borrow\_rate Base variable borrow rate when usage rate is 0 (expressed in ray) @param variable\_rate\_slope1 Slope of the variable rate curve when usage <= optimal (expressed in ray) @param variable\_rate\_slope2 Slope of the variable rate curve when usage > optimal (expressed in ray) #[event] struct ReserveInterestRateDataChanged has drop, store Struct `ReserveBorrowing` ------------------------- @notice Emitted when borrowing is enabled or disabled on a reserve @param asset The address of the underlying asset of the reserve @param enabled True if borrowing is enabled, false otherwise #[event] struct ReserveBorrowing has drop, store Struct `ReserveFlashLoaning` ---------------------------- @notice Emitted when flashloans are enabled or disabled on a reserve @param asset The address of the underlying asset of the reserve @param enabled True if flashloans are enabled, false otherwise #[event] struct ReserveFlashLoaning has drop, store Struct `CollateralConfigurationChanged` --------------------------------------- @notice Emitted when the collateralization risk parameters for the specified asset are updated @param asset The address of the underlying asset of the reserve @param ltv The loan to value of the asset when used as collateral @param liquidation\_threshold The threshold at which loans using this asset as collateral will be considered undercollateralized @param liquidation\_bonus The bonus liquidators receive to liquidate this asset #[event] struct CollateralConfigurationChanged has drop, store Struct `PendingLtvChanged` -------------------------- @notice Emitted when the pending ltv has changed during reserve freezing @param asset The address of the underlying asset of the reserve @param pending\_ltv\_set The pending loan to value of the asset when used as collateral #[event] struct PendingLtvChanged has drop, store Struct `ReserveActive` ---------------------- @notice Emitted when a reserve is activated or deactivated @param asset The address of the underlying asset of the reserve @param active True if reserve is active, false otherwise #[event] struct ReserveActive has drop, store Struct `ReserveFrozen` ---------------------- @notice Emitted when a reserve is frozen or unfrozen @param asset The address of the underlying asset of the reserve @param frozen True if reserve is frozen, false otherwise #[event] struct ReserveFrozen has drop, store Struct `ReservePaused` ---------------------- @notice Emitted when a reserve is paused or unpaused @param asset The address of the underlying asset of the reserve @param paused True if reserve is paused, false otherwise #[event] struct ReservePaused has drop, store Struct `ReserveDropped` ----------------------- @notice Emitted when a reserve is dropped @param asset The address of the underlying asset of the reserve #[event] struct ReserveDropped has drop, store Struct `ReserveFactorChanged` ----------------------------- @notice Emitted when a reserve factor is updated @param asset The address of the underlying asset of the reserve @param old\_reserve\_factor The old reserve factor, expressed in bps @param new\_reserve\_factor The new reserve factor, expressed in bps #[event] struct ReserveFactorChanged has drop, store Struct `BorrowCapChanged` ------------------------- @notice Emitted when the borrow cap of a reserve is updated @param asset The address of the underlying asset of the reserve @param old\_borrow\_cap The old borrow cap @param new\_borrow\_cap The new borrow cap #[event] struct BorrowCapChanged has drop, store Struct `SupplyCapChanged` ------------------------- @notice Emitted when the supply cap of a reserve is updated @param asset The address of the underlying asset of the reserve @param old\_supply\_cap The old supply cap @param new\_supply\_cap The new supply cap #[event] struct SupplyCapChanged has drop, store Struct `LiquidationProtocolFeeChanged` -------------------------------------- @notice Emitted when the liquidation protocol fee of a reserve is updated @param asset The address of the underlying asset of the reserve @param old\_fee The old liquidation protocol fee, expressed in bps @param new\_fee The new liquidation protocol fee, expressed in bps #[event] struct LiquidationProtocolFeeChanged has drop, store Struct `LiquidationGracePeriodChanged` -------------------------------------- @notice Emitted when the liquidation grace period is updated @param asset The address of the underlying asset of the reserve @param grace\_period\_until Timestamp until when liquidations will not be allowed post-unpause #[event] struct LiquidationGracePeriodChanged has drop, store Struct `LiquidationGracePeriodDisabled` --------------------------------------- @notice Emitted when the liquidation grace period is disabled @param asset The address of the underlying asset of the reserve #[event] struct LiquidationGracePeriodDisabled has drop, store Struct `EModeAssetCategoryChanged` ---------------------------------- @notice Emitted when the category of an asset in eMode is changed @param asset The address of the underlying asset of the reserve @param old\_category\_id The old eMode asset category @param new\_category\_id The new eMode asset category #[event] struct EModeAssetCategoryChanged has drop, store Struct `EModeCategoryAdded` --------------------------- @notice Emitted when a new eMode category is added @param category\_id The new eMode category id @param ltv The ltv for the asset category in eMode @param liquidation\_threshold The liquidationThreshold for the asset category in eMode @param liquidation\_bonus The liquidationBonus for the asset category in eMode @param oracle The optional address of the price oracle specific for this category @param label A human readable identifier for the category #[event] struct EModeCategoryAdded has drop, store Struct `DebtCeilingChanged` --------------------------- @notice Emitted when the debt ceiling of an asset is set @param asset The address of the underlying asset of the reserve @param old\_debt\_ceiling The old debt ceiling @param new\_debt\_ceiling The new debt ceiling #[event] struct DebtCeilingChanged has drop, store Struct `SiloedBorrowingChanged` ------------------------------- @notice Emitted when the the siloed borrowing state for an asset is changed @param asset The address of the underlying asset of the reserve @param old\_state The old siloed borrowing state @param new\_state The new siloed borrowing state #[event] struct SiloedBorrowingChanged has drop, store Struct `FlashloanPremiumTotalUpdated` ------------------------------------- @notice Emitted when the total premium on flashloans is updated @param old\_flashloan\_premium\_total The old premium, expressed in bps @param new\_flashloan\_premium\_total The new premium, expressed in bps #[event] struct FlashloanPremiumTotalUpdated has drop, store Struct `FlashloanPremiumToProtocolUpdated` ------------------------------------------ @notice Emitted when the part of the premium that goes to protocol is updated @param old\_flashloan\_premium\_to\_protocol The old premium, expressed in bps @param new\_flashloan\_premium\_to\_protocol The new premium, expressed in bps #[event] struct FlashloanPremiumToProtocolUpdated has drop, store Struct `BorrowableInIsolationChanged` ------------------------------------- @notice Emitted when the reserve is set as borrowable/non borrowable in isolation mode @param asset The address of the underlying asset of the reserve @param borrowable True if the reserve is borrowable in isolation, false otherwise #[event] struct BorrowableInIsolationChanged has drop, store Function `get_pending_ltv` -------------------------- @notice Returns the pending Loan-to-Value (LTV) ratio for the given asset @dev Reads from the `[InternalData](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/pool_configurator.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_InternalData) ` resource but does not modify state @param asset The address of the underlying asset @return The pending LTV value as a `u256`, or 0 if not set #[view] public fun get_pending_ltv(asset: address): u256 Function `init_reserves` ------------------------ @notice Initializes multiple reserves @param account The account signer of the caller @param underlying\_asset The list of the underlying assets of the reserves @param treasury The list of the treasury addresses of the reserves @param a\_token\_name The list of the aToken names of the reserves @param a\_token\_symbol The list of the aToken symbols of the reserves @param variable\_debt\_token\_name The list of the variable debt token names of the reserves @param variable\_debt\_token\_symbol The list of the variable debt token symbols of the reserves @param incentives\_controller The list of incentives controllers for the reserves @param optimal\_usage\_ratio The optimal usage ratio, in bps @param base\_variable\_borrow\_rate The base variable borrow rate, in bps @param variable\_rate\_slope1 The slope of the variable interest curve, before hitting the optimal ratio, in bps @param variable\_rate\_slope2 The slope of the variable interest curve, after hitting the optimal ratio, in bps @dev The caller needs to be an asset listing or pool admin public entry fun init_reserves(account: &signer, underlying_asset: vector
, treasury: vector
, a_token_name: vector, a_token_symbol: vector, variable_debt_token_name: vector, variable_debt_token_symbol: vector, incentives_controller: vector>, optimal_usage_ratio: vector, base_variable_borrow_rate: vector, variable_rate_slope1: vector, variable_rate_slope2: vector) Function `drop_reserve` ----------------------- @notice Drops a reserve entirely @dev Emits the `[ReserveDropped](https://aave.github.io/aptos-aave-v3/aave-pool/pool_configurator/pool_configurator.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_configurator_ReserveDropped) ` event @param account The account signer of the caller @param asset The address of the reserve to drop public entry fun drop_reserve(account: &signer, asset: address) Function `set_reserve_borrowing` -------------------------------- @notice Configures borrowing on a reserve @dev Emits the ReserveBorrowing event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param enabled True if borrowing needs to be enabled, false otherwise public entry fun set_reserve_borrowing(account: &signer, asset: address, enabled: bool) Function `update_interest_rate_strategy` ---------------------------------------- @notice Forcefully updates the interest rate strategy of the pool reserve @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param optimal\_usage\_ratio The optimal usage ratio, in bps @param base\_variable\_borrow\_rate The base variable borrow rate, in bps @param variable\_rate\_slope1 The slope of the variable interest curve, before hitting the optimal ratio, in bps @param variable\_rate\_slope2 The slope of the variable interest curve, after hitting the optimal ratio, in bps public entry fun update_interest_rate_strategy(account: &signer, asset: address, optimal_usage_ratio: u256, base_variable_borrow_rate: u256, variable_rate_slope1: u256, variable_rate_slope2: u256) Function `configure_reserve_as_collateral` ------------------------------------------ @notice Configures the reserve collateralization parameters @dev Emits the CollateralConfigurationChanged event @dev All the values are expressed in bps. A value of 10000, results in 100.00% @dev The `liquidation_bonus` is always above 100%. A value of 105% means the liquidator will receive a 5% bonus @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param ltv The loan to value of the asset when used as collateral @param liquidation\_threshold The threshold at which loans using this asset as collateral will be considered undercollateralized @param liquidation\_bonus The bonus liquidators receive to liquidate this asset public entry fun configure_reserve_as_collateral(account: &signer, asset: address, ltv: u256, liquidation_threshold: u256, liquidation_bonus: u256) Function `set_reserve_flash_loaning` ------------------------------------ @notice Enable or disable flashloans on a reserve @dev Emits the ReserveFlashLoaning event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param enabled True if flashloans need to be enabled, false otherwise public entry fun set_reserve_flash_loaning(account: &signer, asset: address, enabled: bool) Function `set_reserve_active` ----------------------------- @notice Activate or deactivate a reserve @dev Emits the ReserveActive event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param active True if the reserve needs to be active, false otherwise public entry fun set_reserve_active(account: &signer, asset: address, active: bool) Function `set_reserve_freeze` ----------------------------- @notice Freeze or unfreeze a reserve. A frozen reserve doesn't allow any new supply, borrow or rate swap but allows repayments, liquidations, rate rebalances and withdrawals @dev Emits the ReserveFrozen event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param freeze True if the reserve needs to be frozen, false otherwise public entry fun set_reserve_freeze(account: &signer, asset: address, freeze: bool) Function `set_borrowable_in_isolation` -------------------------------------- @notice Sets the borrowable in isolation flag for the reserve @dev When this flag is set to true, the asset will be borrowable against isolated collaterals and the borrowed amount will be accumulated in the isolated collateral's total debt exposure @dev Only assets of the same family (e.g. USD stablecoins) should be borrowable in isolation mode to keep consistency in the debt ceiling calculations @dev Emits the BorrowableInIsolationChanged event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param borrowable True if the asset should be borrowable in isolation, false otherwise public entry fun set_borrowable_in_isolation(account: &signer, asset: address, borrowable: bool) Function `set_reserve_pause` ---------------------------- @notice Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay, swap interest rate, liquidate, atoken transfers) @dev Emits the ReservePaused event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param paused True if pausing the reserve, false if unpausing @param grace\_period Count of seconds after unpause during which liquidations will not be available - Only applicable whenever unpausing (`paused` as false) - Passing 0 means no grace period - Capped to maximum MAX\_GRACE\_PERIOD public entry fun set_reserve_pause(account: &signer, asset: address, paused: bool, grace_period: u64) Function `set_reserve_pause_no_grace_period` -------------------------------------------- @notice Pauses/unpauses a reserve with no grace period @dev Emits the ReservePaused event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param paused True if pausing the reserve, false if unpausing public entry fun set_reserve_pause_no_grace_period(account: &signer, asset: address, paused: bool) Function `disable_liquidation_grace_period` ------------------------------------------- @notice Disables liquidation grace period for the asset. The liquidation grace period is set in the past so that liquidations are allowed for the asset @param account The account signer of the caller @param asset The address of the underlying asset of the reserve public entry fun disable_liquidation_grace_period(account: &signer, asset: address) Function `set_reserve_factor` ----------------------------- @notice Updates the reserve factor of a reserve @dev Emits the ReserveFactorChanged event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param new\_reserve\_factor The new reserve factor of the reserve public entry fun set_reserve_factor(account: &signer, asset: address, new_reserve_factor: u256) Function `set_debt_ceiling` --------------------------- @notice Sets the debt ceiling for an asset @dev Emits the DebtCeilingChanged event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param new\_debt\_ceiling The new debt ceiling public entry fun set_debt_ceiling(account: &signer, asset: address, new_debt_ceiling: u256) Function `set_siloed_borrowing` ------------------------------- @notice Sets siloed borrowing for an asset @dev Emits the SiloedBorrowingChanged event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param new\_siloed The new siloed borrowing state public entry fun set_siloed_borrowing(account: &signer, asset: address, new_siloed: bool) Function `set_borrow_cap` ------------------------- @notice Updates the borrow cap of a reserve @dev Emits the BorrowCapChanged event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param new\_borrow\_cap The new borrow cap of the reserve public entry fun set_borrow_cap(account: &signer, asset: address, new_borrow_cap: u256) Function `set_supply_cap` ------------------------- @notice Updates the supply cap of a reserve @dev Emits the SupplyCapChanged event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param new\_supply\_cap The new supply cap of the reserve public entry fun set_supply_cap(account: &signer, asset: address, new_supply_cap: u256) Function `set_liquidation_protocol_fee` --------------------------------------- @notice Updates the liquidation protocol fee of reserve @dev Emits the LiquidationProtocolFeeChanged event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param new\_fee The new liquidation protocol fee of the reserve, expressed in bps public entry fun set_liquidation_protocol_fee(account: &signer, asset: address, new_fee: u256) Function `set_emode_category` ----------------------------- @notice Adds a new efficiency mode (eMode) category or alters an existing one. @dev The new ltv and liquidation threshold must be greater than the base ltvs and liquidation thresholds of all assets within the eMode category @dev Emits the EModeCategoryAdded event @param account The account signer of the caller @param category\_id The id of the category to be configured @param ltv The ltv associated with the category @param liquidation\_threshold The liquidation threshold associated with the category @param liquidation\_bonus The liquidation bonus associated with the category @param label A label identifying the category public entry fun set_emode_category(account: &signer, category_id: u8, ltv: u16, liquidation_threshold: u16, liquidation_bonus: u16, label: string::String) Function `set_asset_emode_category` ----------------------------------- @notice Assign an efficiency mode (eMode) category to asset @dev Emits the EModeAssetCategoryChanged event @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param new\_category\_id The new category id of the asset public entry fun set_asset_emode_category(account: &signer, asset: address, new_category_id: u8) Function `set_pool_pause` ------------------------- @notice Pauses or unpauses all the protocol reserves. In the paused state all the protocol interactions are suspended @dev Emits the ReservePaused event for each reserve @param account The account signer of the caller @param paused True if protocol needs to be paused, false otherwise @param grace\_period Count of seconds after unpause during which liquidations will not be available - Only applicable whenever unpausing (`paused` as false) - Passing 0 means no grace period - Capped to maximum MAX\_GRACE\_PERIOD public entry fun set_pool_pause(account: &signer, paused: bool, grace_period: u64) Function `set_pool_pause_no_grace_period` ----------------------------------------- @notice Pauses or unpauses all the protocol reserves with no grace period. In the paused state all the protocol interactions are suspended @dev Emits the ReservePaused event for each reserve @param account The account signer of the caller @param paused True if protocol needs to be paused, false otherwise public entry fun set_pool_pause_no_grace_period(account: &signer, paused: bool) Function `update_flashloan_premium_total` ----------------------------------------- @notice Updates the total flash loan premium. Total flash loan premium consists of two parts: - A part is sent to aToken holders as extra balance - A part is collected by the protocol reserves @dev Expressed in bps @dev The premium is calculated on the total amount borrowed @dev Emits the FlashloanPremiumTotalUpdated event @param account The account signer of the caller @param new\_flashloan\_premium\_total The total flashloan premium public entry fun update_flashloan_premium_total(account: &signer, new_flashloan_premium_total: u128) Function `update_flashloan_premium_to_protocol` ----------------------------------------------- @notice Updates the flash loan premium collected by protocol reserves @dev Expressed in bps @dev The premium to protocol is calculated on the total flashloan premium @dev Emits the FlashloanPremiumToProtocolUpdated event @param account The account signer of the caller @param new\_flashloan\_premium\_to\_protocol The part of the flashloan premium sent to the protocol treasury public entry fun update_flashloan_premium_to_protocol(account: &signer, new_flashloan_premium_to_protocol: u128) Function `set_apt_fee` ---------------------- @notice Updates the global APT fee rate (in micro APT units) @dev The new apt fee must be less than or equal to MAX\_APT\_FEE (10 APT) @dev Emits a FeeChanged event on successful update @param account The account signer of the caller @param asset The address of the underlying asset of the reserve @param new\_apt\_fee The new fee value in micro APT public entry fun set_apt_fee(account: &signer, asset: address, new_apt_fee: u64) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/pool/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/pool_data_provider/) --- # Supply Logic - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Supply Logic * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::supply_logic` ========================================================================================= @title Supply Logic Module @author Aave @notice Implements the logic for supply and withdraw operations * [Struct `Supply`](https://aave.github.io/aptos-aave-v3/aave-pool/supply_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_supply_logic_Supply) * [Struct `Withdraw`](https://aave.github.io/aptos-aave-v3/aave-pool/supply_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_supply_logic_Withdraw) * [Function `supply`](https://aave.github.io/aptos-aave-v3/aave-pool/supply_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_supply_logic_supply) * [Function `supply_coin`](https://aave.github.io/aptos-aave-v3/aave-pool/supply_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_supply_logic_supply_coin) * [Function `withdraw`](https://aave.github.io/aptos-aave-v3/aave-pool/supply_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_supply_logic_withdraw) * [Function `set_user_use_reserve_as_collateral`](https://aave.github.io/aptos-aave-v3/aave-pool/supply_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_supply_logic_set_user_use_reserve_as_collateral) use 0x1::event; use 0x1::fungible_asset; use 0x1::object; use 0x1::signer; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::coin_migrator; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::emode_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::events; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::fungible_asset_manager; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_fee_manager; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::validation_logic; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Struct `Supply` --------------- @dev Emitted on supply() @param reserve The address of the underlying asset of the reserve @param user The address initiating the supply @param on\_behalf\_of The beneficiary of the supply, receiving the aTokens @param amount The amount supplied @param referral\_code The referral code used #[event] struct Supply has drop, store Struct `Withdraw` ----------------- @dev Emitted on withdraw() @param reserve The address of the underlying asset being withdrawn @param user The address initiating the withdrawal, owner of aTokens @param to The address that will receive the underlying @param amount The amount to be withdrawn #[event] struct Withdraw has drop, store Function `supply` ----------------- @notice Supplies an `amount` of underlying fungible asset into the reserve, receiving in return overlying aTokens. - E.g. User supplies 100 USDC and gets in return 100 aUSDC @param account The account signer that will supply the asset @param asset The address of the underlying fungible asset to supply @param amount The amount to be supplied @param on\_behalf\_of The address that will receive the aTokens, same as account address if the user wants to receive them on his own wallet, or a different address if the beneficiary of aTokens is a different wallet @param referral\_code Code used to register the integrator originating the operation, for potential rewards. 0 if the action is executed directly by the user, without any middle-man public entry fun supply(account: &signer, asset: address, amount: u256, on_behalf_of: address, referral_code: u16) Function `supply_coin` ---------------------- @notice Supplies an `amount` of underlying asset of type Coin into the reserve, receiving in return overlying aTokens. - E.g. User supplies 100 APT and gets in return 100 aAPT @param account The account signer that will supply the asset @param asset The address of the underlying asset of type coin to supply @param amount The amount to be supplied @param on\_behalf\_of The address that will receive the aTokens, same as account address if the user wants to receive them on his own wallet, or a different address if the beneficiary of aTokens is a different wallet @param referral\_code Code used to register the integrator originating the operation, for potential rewards. 0 if the action is executed directly by the user, without any middle-man public entry fun supply_coin(account: &signer, amount: u256, on_behalf_of: address, referral_code: u16) Function `withdraw` ------------------- @notice Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC @param account The account signer that will withdraw the asset @param asset The address of the underlying asset to withdraw @param amount The underlying amount to be withdrawn - Send the value math\_utils::u256\_max() in order to withdraw the whole aToken balance @param to The address that will receive the underlying, same as account address if the user wants to receive it on his own wallet, or a different address if the beneficiary is a different wallet public entry fun withdraw(account: &signer, asset: address, amount: u256, to: address) Function `set_user_use_reserve_as_collateral` --------------------------------------------- @notice Allows suppliers to enable/disable a specific supplied asset as collateral @dev Emits the `ReserveUsedAsCollateralEnabled()` event if the asset can be activated as collateral. @dev In case the asset is being deactivated as collateral, `ReserveUsedAsCollateralDisabled()` is emitted. @param account The account signer that will enable/disable the usage of the asset as collateral @param asset The address of the underlying asset supplied @param use\_as\_collateral True if the user wants to use the supply as collateral, false otherwise public entry fun set_user_use_reserve_as_collateral(account: &signer, asset: address, use_as_collateral: bool) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_distributor/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/) --- # Pool Token Logic - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Pool Token Logic * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_token_logic` ============================================================================================= @title Pool Token Logic Module @author Aave @notice Implements token-related logic for the Aave protocol pool * [Struct `ReserveInitialized`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_token_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_token_logic_ReserveInitialized) * [Struct `MintedToTreasury`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_token_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_token_logic_MintedToTreasury) * [Function `set_incentives_controller`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_token_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_token_logic_set_incentives_controller) * [Function `mint_to_treasury`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_token_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_token_logic_mint_to_treasury) * [Function `transfer`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_token_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_token_logic_transfer) * [Function `init_reserve`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_token_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_token_logic_init_reserve) * [Function `drop_reserve`](https://aave.github.io/aptos-aave-v3/aave-pool/pool_token_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_pool_token_logic_drop_reserve) use 0x1::event; use 0x1::object; use 0x1::option; use 0x1::signer; use 0x1::string; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::default_reserve_interest_rate_strategy; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::emode_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::events; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::fungible_asset_manager; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::token_base; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::validation_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::variable_debt_token_factory; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Struct `ReserveInitialized` --------------------------- @notice Emitted when a reserve is initialized @param asset The address of the underlying asset of the reserve @param a\_token The address of the associated aToken contract @param variable\_debt\_token The address of the associated variable rate debt token #[event] struct ReserveInitialized has drop, store Struct `MintedToTreasury` ------------------------- @notice Emitted when the protocol treasury receives minted aTokens from the accrued interest @param reserve The address of the reserve @param amount\_minted The amount minted to the treasury #[event] struct MintedToTreasury has drop, store Function `set_incentives_controller` ------------------------------------ @notice Sets an incentives controller for the both aToken and variable debt token of a given underlying asset @param admin The address of the admin calling the method @param underlying\_asset The address of the underlying asset @param incentives\_controller The address of the incentives controller public entry fun set_incentives_controller(admin: &signer, underlying_asset: address, incentives_controller: option::Option
) Function `mint_to_treasury` --------------------------- @notice Mints the assets accrued through the reserve factor to the treasury in the form of aTokens @param assets The list of reserves for which the minting needs to be executed public entry fun mint_to_treasury(assets: vector
) Function `transfer` ------------------- @notice Transfers aTokens from the user to the recipient @param sender The account signer of the caller @param recipient The recipient of the aTokens @param amount The amount of aTokens to transfer @param a\_token\_address The address of the aToken public entry fun transfer(sender: &signer, recipient: address, amount: u256, a_token_address: address) Function `init_reserve` ----------------------- @notice Initializes a reserve, activating it, assigning an aToken and debt tokens and an interest rate strategy @dev Only callable by the pool\_configurator module @param account The address of the caller @param underlying\_asset The address of the underlying asset of the reserve @param treasury The address of the treasury @param incentives\_controller The address of the incentives controller, if any @param a\_token\_name The name of the aToken @param a\_token\_symbol The symbol of the aToken @param variable\_debt\_token\_name The name of the variable debt token @param variable\_debt\_token\_symbol The symbol of the variable debt token @param optimal\_usage\_ratio The optimal usage ratio, in bps @param base\_variable\_borrow\_rate The base variable borrow rate, in bps @param variable\_rate\_slope1 The slope of the variable interest curve, before hitting the optimal ratio, in bps @param variable\_rate\_slope2 The slope of the variable interest curve, after hitting the optimal ratio, in bps public(friend) fun init_reserve(account: &signer, underlying_asset: address, treasury: address, incentives_controller: option::Option
, a_token_name: string::String, a_token_symbol: string::String, variable_debt_token_name: string::String, variable_debt_token_symbol: string::String, optimal_usage_ratio: u256, base_variable_borrow_rate: u256, variable_rate_slope1: u256, variable_rate_slope2: u256) Function `drop_reserve` ----------------------- @notice Drop a reserve @dev Only callable by the pool\_configurator module @param asset The address of the underlying asset of the reserve public(friend) fun drop_reserve(asset: address) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/pool_logic/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/) --- # Fungible Asset Manager - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Fungible Asset Manager * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::fungible_asset_manager` =================================================================================================== @title Fungible Asset Manager Module @author Aave @notice A utility module to manage fungible assets in the Aave protocol @dev Provides a standardized interface for interacting with fungible assets * [Function `balance_of`](https://aave.github.io/aptos-aave-v3/aave-pool/fungible_asset_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_fungible_asset_manager_balance_of) * [Function `supply`](https://aave.github.io/aptos-aave-v3/aave-pool/fungible_asset_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_fungible_asset_manager_supply) * [Function `maximum`](https://aave.github.io/aptos-aave-v3/aave-pool/fungible_asset_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_fungible_asset_manager_maximum) * [Function `name`](https://aave.github.io/aptos-aave-v3/aave-pool/fungible_asset_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_fungible_asset_manager_name) * [Function `symbol`](https://aave.github.io/aptos-aave-v3/aave-pool/fungible_asset_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_fungible_asset_manager_symbol) * [Function `decimals`](https://aave.github.io/aptos-aave-v3/aave-pool/fungible_asset_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_fungible_asset_manager_decimals) * [Function `assert_token_exists`](https://aave.github.io/aptos-aave-v3/aave-pool/fungible_asset_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_fungible_asset_manager_assert_token_exists) * [Function `transfer`](https://aave.github.io/aptos-aave-v3/aave-pool/fungible_asset_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_fungible_asset_manager_transfer) use 0x1::fungible_asset; use 0x1::object; use 0x1::option; use 0x1::primary_fungible_store; use 0x1::string; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; Function `balance_of` --------------------- @notice Get the balance of a given store @param owner The address of the account to check balance for @param metadata\_address The address of the metadata object @return The balance of the owner's store #[view] public fun balance_of(owner: address, metadata_address: address): u64 Function `supply` ----------------- @notice Get the current supply from the metadata object @param metadata\_address The address of the metadata object @return The current supply of the fungible asset #[view] public fun supply(metadata_address: address): option::Option Function `maximum` ------------------ @notice Get the maximum supply from the metadata object @param metadata\_address The address of the metadata object @return The maximum supply of the fungible asset #[view] public fun maximum(metadata_address: address): option::Option Function `name` --------------- @notice Get the name of the fungible asset from the metadata object @param metadata\_address The address of the metadata object @return The name of the fungible asset #[view] public fun name(metadata_address: address): string::String Function `symbol` ----------------- @notice Get the symbol of the fungible asset from the metadata object @param metadata\_address The address of the metadata object @return The symbol of the fungible asset #[view] public fun symbol(metadata_address: address): string::String Function `decimals` ------------------- @notice Get the decimals from the metadata object @param metadata\_address The address of the metadata object @return The number of decimals of the fungible asset #[view] public fun decimals(metadata_address: address): u8 Function `assert_token_exists` ------------------------------ @notice Verifies that a token exists at the given metadata address @param metadata\_address The address of the metadata object to check @dev Aborts if the token does not exist public fun assert_token_exists(metadata_address: address) Function `transfer` ------------------- @notice Transfer a given amount of the asset to a recipient @dev Only callable by the supply\_logic, borrow\_logic, liquidation\_logic, flashloan\_logic and a\_token\_factory module @param from The account signer of the caller @param to The recipient of the asset @param amount The amount to transfer @param metadata\_address The address of the metadata object public(friend) fun transfer(from: &signer, to: address, amount: u64, metadata_address: address) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/flashloan_logic/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/generic_logic/) --- # Coin Migrator - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Coin Migrator * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::coin_migrator` ========================================================================================== @title Coin Migrator Module @author Aave @notice Implements functionality to convert Aptos Coin to FungibleAsset * [Struct `CoinToFaConvertion`](https://aave.github.io/aptos-aave-v3/aave-pool/coin_migrator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_coin_migrator_CoinToFaConvertion) * [Function `coin_to_fa`](https://aave.github.io/aptos-aave-v3/aave-pool/coin_migrator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_coin_migrator_coin_to_fa) * [Function `get_fa_address`](https://aave.github.io/aptos-aave-v3/aave-pool/coin_migrator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_coin_migrator_get_fa_address) * [Function `get_fa_balance`](https://aave.github.io/aptos-aave-v3/aave-pool/coin_migrator/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_coin_migrator_get_fa_balance) use 0x1::coin; use 0x1::dispatchable_fungible_asset; use 0x1::event; use 0x1::fungible_asset; use 0x1::object; use 0x1::option; use 0x1::primary_fungible_store; use 0x1::signer; use 0x1::string; use 0x1::type_info; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; Struct `CoinToFaConvertion` --------------------------- @notice Emitted when a Coin is converted to a FungibleAsset @param user The address of the user who performed the conversion @param amount The amount of coins converted @param name The name of the fungible asset @param symbol The symbol of the fungible asset @param decimals The number of decimals for the fungible asset @param coin\_address The address of the coin type @param fa\_address The address of the fungible asset #[event] struct CoinToFaConvertion has drop, store Function `coin_to_fa` --------------------- @notice Converts Aptos Coin to FungibleAsset @dev Withdraws coins from the user's account and converts them to fungible assets @param account The signer account of the user @param amount The amount of coins to convert public fun coin_to_fa(account: &signer, amount: u64): object::Object Function `get_fa_address` ------------------------- @notice Gets the address of the fungible asset that corresponds to a coin type @dev Returns the address of the fungible asset metadata object @return The address of the fungible asset #[view] public fun get_fa_address(): address Function `get_fa_balance` ------------------------- @notice Gets the balance of fungible assets for a given coin type and owner @dev Returns 0 if the coin type is not mapped to a fungible asset @param owner The address of the owner @return The balance of fungible assets #[view] public fun get_fa_balance(owner: address): u64 [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/borrow_logic/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/collector/) --- # Emission Manager - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Emission Manager * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::emission_manager` ============================================================================================= @title Emission Manager Module @author Aave @notice Implements the management of emissions for protocol rewards * [Resource `EmissionManagerData`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_EmissionManagerData) * [Struct `EmissionAdminUpdated`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_EmissionAdminUpdated) * [Constants](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#@Constants_0) * [Function `initialize`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_initialize) * [Function `configure_assets`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_configure_assets) * [Function `set_pull_rewards_transfer_strategy`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_set_pull_rewards_transfer_strategy) * [Function `set_distribution_end`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_set_distribution_end) * [Function `set_emission_per_second`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_set_emission_per_second) * [Function `set_claimer`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_set_claimer) * [Function `set_emission_admin`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_set_emission_admin) * [Function `set_rewards_controller`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_set_rewards_controller) * [Function `emission_manager_address`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_emission_manager_address) * [Function `emission_manager_object`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_emission_manager_object) * [Function `get_rewards_controller`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_get_rewards_controller) * [Function `get_emission_admin`](https://aave.github.io/aptos-aave-v3/aave-pool/emission_manager/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_emission_manager_get_emission_admin) use 0x1::event; use 0x1::object; use 0x1::option; use 0x1::signer; use 0x1::smart_table; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::rewards_controller; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::transfer_strategy; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::variable_debt_token_factory; Resource `EmissionManagerData` ------------------------------ @notice Data structure for managing emissions @dev Stores emission admins and rewards controller information #[resource_group_member(#[group = 0x1::object::ObjectGroup])] struct EmissionManagerData has key Struct `EmissionAdminUpdated` ----------------------------- @notice Emitted when an emission admin is updated for a reward @param reward The address of the reward @param old\_admin The address of the previous admin @param new\_admin The address of the new admin #[event] struct EmissionAdminUpdated has drop, store Constants --------- @notice Name for the emission manager object const EMISSION_MANAGER_NAME: vector = [69, 77, 73, 83, 83, 73, 79, 78, 95, 77, 65, 78, 65, 71, 69, 82]; Function `initialize` --------------------- @notice Initializes the rewards controller @dev Only callable by the pool @param sender The signer account of the caller @param seed The seed for initializing the rewards controller public entry fun initialize(sender: &signer, seed: vector) Function `configure_assets` --------------------------- @notice Configures assets for emissions @dev Configures multiple assets with their emission parameters @param account The signer account of the caller (must be emission admin for all rewards) @param emissions\_per\_second The emission rates per second for each asset @param max\_emission\_rates The maximum emission rates for each asset @param distribution\_ends The distribution end timestamps for each asset @param assets The addresses of the assets to configure @param rewards The addresses of the rewards for each asset @param pull\_rewards\_transfer\_strategies The transfer strategies for pulling rewards public entry fun configure_assets(account: &signer, emissions_per_second: vector, max_emission_rates: vector, distribution_ends: vector, assets: vector
, rewards: vector
, pull_rewards_transfer_strategies: vector>) Function `set_pull_rewards_transfer_strategy` --------------------------------------------- @notice Sets the pull rewards transfer strategy for a reward @dev Only callable by the emission admin for the reward @param caller The signer account of the caller @param reward The address of the reward @param pull\_rewards\_transfer\_strategy The transfer strategy for pulling rewards public entry fun set_pull_rewards_transfer_strategy(caller: &signer, reward: address, pull_rewards_transfer_strategy: object::Object) Function `set_distribution_end` ------------------------------- @notice Sets the distribution end timestamp for a reward on an asset @dev Only callable by the emission admin for the reward @param caller The signer account of the caller @param asset The address of the asset @param reward The address of the reward @param new\_distribution\_end The new distribution end timestamp public entry fun set_distribution_end(caller: &signer, asset: address, reward: address, new_distribution_end: u32) Function `set_emission_per_second` ---------------------------------- @notice Sets the emission rate per second for rewards on an asset @dev Only callable by the emission admin for all rewards @param caller The signer account of the caller @param asset The address of the asset @param rewards The addresses of the rewards @param new\_emissions\_per\_second The new emission rates per second public entry fun set_emission_per_second(caller: &signer, asset: address, rewards: vector
, new_emissions_per_second: vector) Function `set_claimer` ---------------------- @notice Sets a claimer for a user @dev Only callable by the admin @param account The signer account of the caller @param user The address of the user @param claimer The address of the claimer public entry fun set_claimer(account: &signer, user: address, claimer: address) Function `set_emission_admin` ----------------------------- @notice Sets the emission admin for a reward @dev Only callable by the admin @param account The signer account of the caller @param reward The address of the reward @param new\_admin The address of the new admin public entry fun set_emission_admin(account: &signer, reward: address, new_admin: address) Function `set_rewards_controller` --------------------------------- @notice Sets the rewards controller address @dev Only callable by the admin @param account The signer account of the caller @param rewards\_controller The new rewards controller address (or None to unset) public entry fun set_rewards_controller(account: &signer, rewards_controller: option::Option
) Function `emission_manager_address` ----------------------------------- @notice Gets the address of the emission manager @return The address of the emission manager object #[view] public fun emission_manager_address(): address Function `emission_manager_object` ---------------------------------- @notice Gets the emission manager object @return The emission manager object #[view] public fun emission_manager_object(): object::Object Function `get_rewards_controller` --------------------------------- @notice Gets the rewards controller @return The address of the rewards controller (or None if not set) #[view] public fun get_rewards_controller(): option::Option
Function `get_emission_admin` ----------------------------- @notice Gets the emission admin for a reward @param reward The address of the reward @return The address of the emission admin #[view] public fun get_emission_admin(reward: address): address [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/default_reserve_interest_rate_strategy/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/emode_logic/) --- # UI Incentive Data Provider V3 - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * UI Incentive Data Provider V3 * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::ui_incentive_data_provider_v3` ========================================================================================================== @title UI Incentive Data Provider V3 Module @author Aave @notice Provides data for UI regarding incentives for Aave protocol assets * [Struct `AggregatedReserveIncentiveData`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_incentive_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_incentive_data_provider_v3_AggregatedReserveIncentiveData) * [Struct `IncentiveData`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_incentive_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_incentive_data_provider_v3_IncentiveData) * [Struct `RewardInfo`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_incentive_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_incentive_data_provider_v3_RewardInfo) * [Struct `UserReserveIncentiveData`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_incentive_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_incentive_data_provider_v3_UserReserveIncentiveData) * [Struct `UserIncentiveData`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_incentive_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_incentive_data_provider_v3_UserIncentiveData) * [Struct `UserRewardInfo`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_incentive_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_incentive_data_provider_v3_UserRewardInfo) * [Function `get_full_reserves_incentive_data`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_incentive_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_incentive_data_provider_v3_get_full_reserves_incentive_data) * [Function `get_reserves_incentives_data`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_incentive_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_incentive_data_provider_v3_get_reserves_incentives_data) * [Function `get_user_reserves_incentives_data`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_incentive_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_incentive_data_provider_v3_get_user_reserves_incentives_data) use 0x1::fungible_asset; use 0x1::object; use 0x1::option; use 0x1::string; use 0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9::oracle; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::rewards_controller; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::token_base; Struct `AggregatedReserveIncentiveData` --------------------------------------- @notice Aggregated reserve incentive data structure @param underlying\_asset The address of the underlying asset @param a\_incentive\_data The incentive data for the aToken @param v\_incentive\_data The incentive data for the variable debt token struct AggregatedReserveIncentiveData has drop, store Struct `IncentiveData` ---------------------- @notice Incentive data structure @param token\_address The address of the token @param incentive\_controller\_address The address of the incentive controller @param rewards\_token\_information Vector of reward information struct IncentiveData has drop, store Struct `RewardInfo` ------------------- @notice Reward information structure @param reward\_token\_symbol The symbol of the reward token @param reward\_token\_address The address of the reward token @param emission\_per\_second The emission per second @param incentives\_last\_update\_timestamp The last update timestamp for incentives @param token\_incentives\_index The token incentives index @param emission\_end\_timestamp The emission end timestamp @param reward\_price\_feed The price feed for the reward @param reward\_token\_decimals The decimals of the reward token @param precision The precision of the reward @param price\_feed\_decimals The decimals of the price feed struct RewardInfo has drop, store Struct `UserReserveIncentiveData` --------------------------------- @notice User reserve incentive data structure @param underlying\_asset The address of the underlying asset @param a\_token\_incentives\_user\_data The user incentive data for the aToken @param v\_token\_incentives\_user\_data The user incentive data for the variable debt token struct UserReserveIncentiveData has drop, store Struct `UserIncentiveData` -------------------------- @notice User incentive data structure @param token\_address The address of the token @param incentive\_controller\_address The address of the incentive controller @param user\_rewards\_information Vector of user reward information struct UserIncentiveData has drop, store Struct `UserRewardInfo` ----------------------- @notice User reward information structure @param reward\_token\_symbol The symbol of the reward token @param reward\_token\_address The address of the reward token @param user\_unclaimed\_rewards The user's unclaimed rewards @param token\_incentives\_user\_index The token incentives user index @param reward\_price\_feed The price feed for the reward @param price\_feed\_decimals The decimals of the price feed @param reward\_token\_decimals The decimals of the reward token struct UserRewardInfo has drop, store Function `get_full_reserves_incentive_data` ------------------------------------------- @notice Gets full reserves incentive data for a user @param user The address of the user @return Tuple containing aggregate reserve incentive data and user reserve incentive data #[view] public fun get_full_reserves_incentive_data(user: address): (vector, vector) Function `get_reserves_incentives_data` --------------------------------------- @notice Gets reserves incentives data @return Vector of aggregated reserve incentive data #[view] public fun get_reserves_incentives_data(): vector Function `get_user_reserves_incentives_data` -------------------------------------------- @notice Gets user reserves incentives data @param user The address of the user @return Vector of user reserve incentive data #[view] public fun get_user_reserves_incentives_data(user: address): vector [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/transfer_strategy/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/ui_pool_data_provider_v3/) --- # Rewards Controller - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Rewards Controller * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::rewards_controller` =============================================================================================== @title Rewards Controller Module @author Aave @notice Implements functionality to manage and distribute rewards for Aave protocol assets * [Resource `RewardsControllerData`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_RewardsControllerData) * [Struct `RewardsConfigInput`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_RewardsConfigInput) * [Resource `AssetData`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_AssetData) * [Resource `RewardData`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_RewardData) * [Resource `UserData`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_UserData) * [Struct `UserAssetBalance`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_UserAssetBalance) * [Struct `ClaimerSet`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_ClaimerSet) * [Struct `Accrued`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_Accrued) * [Struct `AssetConfigUpdated`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_AssetConfigUpdated) * [Struct `PullRewardsTransferStrategyInstalled`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_PullRewardsTransferStrategyInstalled) * [Function `rewards_controller_address`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_rewards_controller_address) * [Function `rewards_controller_object`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_rewards_controller_object) * [Function `get_claimer`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_claimer) * [Function `get_pull_rewards_transfer_strategy`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_pull_rewards_transfer_strategy) * [Function `lookup_asset_data`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_lookup_asset_data) * [Function `lookup_rewards_data`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_lookup_rewards_data) * [Function `lookup_user_data`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_lookup_user_data) * [Function `get_rewards_data`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_rewards_data) * [Function `get_user_data`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_user_data) * [Function `get_asset_index`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_asset_index) * [Function `get_distribution_end`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_distribution_end) * [Function `get_rewards_by_asset`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_rewards_by_asset) * [Function `get_rewards_list`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_rewards_list) * [Function `get_user_asset_index`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_user_asset_index) * [Function `get_user_accrued_rewards`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_user_accrued_rewards) * [Function `get_user_rewards`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_user_rewards) * [Function `get_all_user_rewards`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_all_user_rewards) * [Function `get_asset_decimals`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_asset_decimals) * [Function `get_reward_from_config`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_reward_from_config) * [Function `get_rewards_transfer_strategy_from_config`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_get_rewards_transfer_strategy_from_config) * [Function `initialize`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_initialize) * [Function `create_reward_input_config`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_create_reward_input_config) * [Function `configure_assets`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_configure_assets) * [Function `set_pull_rewards_transfer_strategy`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_set_pull_rewards_transfer_strategy) * [Function `handle_action`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_handle_action) * [Function `set_claimer`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_set_claimer) * [Function `claim_rewards_internal_update_data`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_claim_rewards_internal_update_data) * [Function `claim_all_rewards_internal_update_data`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_claim_all_rewards_internal_update_data) * [Function `set_distribution_end`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_set_distribution_end) * [Function `set_emission_per_second`](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_controller/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_rewards_controller_set_emission_per_second) use 0x1::event; use 0x1::fungible_asset; use 0x1::object; use 0x1::option; use 0x1::primary_fungible_store; use 0x1::simple_map; use 0x1::smart_table; use 0x1::timestamp; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9::oracle; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; Resource `RewardsControllerData` -------------------------------- #[resource_group_member(#[group = 0x1::object::ObjectGroup])] struct RewardsControllerData has key Struct `RewardsConfigInput` --------------------------- struct RewardsConfigInput has drop, store Resource `AssetData` -------------------- struct AssetData has copy, drop, store, key Resource `RewardData` --------------------- struct RewardData has copy, drop, store, key Resource `UserData` ------------------- struct UserData has copy, drop, store, key Struct `UserAssetBalance` ------------------------- struct UserAssetBalance has copy, drop, store Struct `ClaimerSet` ------------------- #[event] struct ClaimerSet has drop, store Struct `Accrued` ---------------- #[event] struct Accrued has drop, store Struct `AssetConfigUpdated` --------------------------- #[event] struct AssetConfigUpdated has drop, store Struct `PullRewardsTransferStrategyInstalled` --------------------------------------------- #[event] struct PullRewardsTransferStrategyInstalled has drop, store Function `rewards_controller_address` ------------------------------------- @notice Gets the address of the rewards controller @param seed The seed used to create the rewards controller object @return The address of the rewards controller #[view] public fun rewards_controller_address(seed: vector): address Function `rewards_controller_object` ------------------------------------ @notice Gets the rewards controller object @param seed The seed used to create the rewards controller object @return The rewards controller object #[view] public fun rewards_controller_object(seed: vector): object::Object Function `get_claimer` ---------------------- @notice Gets the claimer for a user @param user The user address @param rewards\_controller\_address The address of the rewards controller @return Option containing the claimer address if one exists #[view] public fun get_claimer(user: address, rewards_controller_address: address): option::Option
Function `get_pull_rewards_transfer_strategy` --------------------------------------------- @notice Gets the pull rewards transfer strategy for a reward @param reward The reward address @param rewards\_controller\_address The address of the rewards controller @return Option containing the strategy address if one exists #[view] public fun get_pull_rewards_transfer_strategy(reward: address, rewards_controller_address: address): option::Option
Function `lookup_asset_data` ---------------------------- @notice Looks up asset data for a specific asset @param asset The asset address @param rewards\_controller\_address The address of the rewards controller @return Option containing the asset data if it exists #[view] public fun lookup_asset_data(asset: address, rewards_controller_address: address): option::Option Function `lookup_rewards_data` ------------------------------ @notice Looks up rewards data for a specific asset and reward @param asset The asset address @param reward The reward address @param rewards\_controller\_address The address of the rewards controller @return Tuple containing Options for asset data and reward data #[view] public fun lookup_rewards_data(asset: address, reward: address, rewards_controller_address: address): (option::Option, option::Option) Function `lookup_user_data` --------------------------- @notice Looks up user data for a specific asset, reward, and user @param asset The asset address @param reward The reward address @param user The user address @param rewards\_controller\_address The address of the rewards controller @return Tuple containing Options for asset data, reward data, and user data #[view] public fun lookup_user_data(asset: address, reward: address, user: address, rewards_controller_address: address): (option::Option, option::Option, option::Option) Function `get_rewards_data` --------------------------- @notice Gets rewards data for a specific asset and reward @param asset The asset address @param reward The reward address @param rewards\_controller\_address The address of the rewards controller @return Tuple containing index, emission per second, last update timestamp, and distribution end #[view] public fun get_rewards_data(asset: address, reward: address, rewards_controller_address: address): (u256, u256, u256, u256) Function `get_user_data` ------------------------ @notice Gets user data for a specific asset, reward, and user @param asset The asset address @param reward The reward address @param user The user address @param rewards\_controller\_address The address of the rewards controller @return Tuple containing user index and accrued rewards #[view] public fun get_user_data(asset: address, reward: address, user: address, rewards_controller_address: address): (u256, u256) Function `get_asset_index` -------------------------- @notice Gets the asset index for a specific asset and reward @param asset The asset address @param reward The reward address @param rewards\_controller\_address The address of the rewards controller @return Tuple containing the current asset index and new asset index #[view] public fun get_asset_index(asset: address, reward: address, rewards_controller_address: address): (u256, u256) Function `get_distribution_end` ------------------------------- @notice Gets the distribution end for a specific asset and reward @param asset The asset address @param reward The reward address @param rewards\_controller\_address The address of the rewards controller @return The distribution end timestamp #[view] public fun get_distribution_end(asset: address, reward: address, rewards_controller_address: address): u256 Function `get_rewards_by_asset` ------------------------------- @notice Gets all rewards for a specific asset @param asset The asset address @param rewards\_controller\_address The address of the rewards controller @return Vector of reward addresses #[view] public fun get_rewards_by_asset(asset: address, rewards_controller_address: address): vector
Function `get_rewards_list` --------------------------- @notice Gets all available rewards @param rewards\_controller\_address The address of the rewards controller @return Vector of reward addresses #[view] public fun get_rewards_list(rewards_controller_address: address): vector
Function `get_user_asset_index` ------------------------------- @notice Gets the user asset index for a specific user, asset, and reward @param user The user address @param asset The asset address @param reward The reward address @param rewards\_controller\_address The address of the rewards controller @return The user asset index #[view] public fun get_user_asset_index(user: address, asset: address, reward: address, rewards_controller_address: address): u256 Function `get_user_accrued_rewards` ----------------------------------- @notice Gets the user accrued rewards for a specific user and reward @param user The user address @param reward The reward address @param rewards\_controller\_address The address of the rewards controller @return The user accrued rewards #[view] public fun get_user_accrued_rewards(user: address, reward: address, rewards_controller_address: address): u256 Function `get_user_rewards` --------------------------- @notice Gets the user rewards for specific assets, user and reward @param assets Vector of asset addresses @param user The user address @param reward The reward address @param rewards\_controller\_address The address of the rewards controller @return The user rewards #[view] public fun get_user_rewards(assets: vector
, user: address, reward: address, rewards_controller_address: address): u256 Function `get_all_user_rewards` ------------------------------- @notice Gets all user rewards for specific assets and user @param assets Vector of asset addresses @param user The user address @param rewards\_controller\_address The address of the rewards controller @return Tuple containing vector of reward addresses and vector of reward amounts #[view] public fun get_all_user_rewards(assets: vector
, user: address, rewards_controller_address: address): (vector
, vector) Function `get_asset_decimals` ----------------------------- @notice Gets the decimals for a specific asset @param asset The asset address @param rewards\_controller\_address The address of the rewards controller @return The asset decimals #[view] public fun get_asset_decimals(asset: address, rewards_controller_address: address): u8 Function `get_reward_from_config` --------------------------------- @notice Gets the reward from a reward config @param config The reward config @return The reward address public fun get_reward_from_config(config: &rewards_controller::RewardsConfigInput): address Function `get_rewards_transfer_strategy_from_config` ---------------------------------------------------- @notice Gets the rewards transfer strategy from a reward config @param config The reward config @return The rewards transfer strategy address public fun get_rewards_transfer_strategy_from_config(config: &rewards_controller::RewardsConfigInput): address Function `initialize` --------------------- @notice Initializes the rewards controller @param sender The sender account @param seed The seed used to create the rewards controller object public(friend) fun initialize(sender: &signer, seed: vector) Function `create_reward_input_config` ------------------------------------- @notice Creates a reward input config @param emission\_per\_second The emission per second @param max\_emission\_rate The maximum emission rate @param total\_supply The total supply @param distribution\_end The distribution end timestamp @param asset The asset address @param reward The reward address @param pull\_rewards\_transfer\_strategy The pull rewards transfer strategy address @return The created reward input config public(friend) fun create_reward_input_config(emission_per_second: u128, max_emission_rate: u128, total_supply: u256, distribution_end: u32, asset: address, reward: address, pull_rewards_transfer_strategy: address): rewards_controller::RewardsConfigInput Function `configure_assets` --------------------------- @notice Configures assets with reward parameters @param config\_inputs Vector of reward config inputs @param rewards\_controller\_address The address of the rewards controller public(friend) fun configure_assets(config_inputs: vector, rewards_controller_address: address) Function `set_pull_rewards_transfer_strategy` --------------------------------------------- @notice Sets the pull rewards transfer strategy for a reward @param reward The reward address @param strategy The strategy address @param rewards\_controller\_address The address of the rewards controller public(friend) fun set_pull_rewards_transfer_strategy(reward: address, strategy: address, rewards_controller_address: address) Function `handle_action` ------------------------ @notice Handles an action for an asset, user, total supply, and user balance @dev This function is called when a user performs an action that will trigger the mint, burn, or transfer function of a ScaledBalanceToken @param asset The asset address @param user The user address @param total\_supply The total supply @param user\_balance The user balance @param rewards\_controller\_address The address of the rewards controller public(friend) fun handle_action(asset: address, user: address, total_supply: u256, user_balance: u256, rewards_controller_address: address) Function `set_claimer` ---------------------- @notice Sets the claimer for a user @param user The user address @param claimer The claimer address @param rewards\_controller\_address The address of the rewards controller public(friend) fun set_claimer(user: address, claimer: address, rewards_controller_address: address) Function `claim_rewards_internal_update_data` --------------------------------------------- @notice Claims rewards internal update data @param assets Vector of asset addresses @param amount The amount to claim @param user The user address @param reward The reward address @param rewards\_controller\_address The address of the rewards controller @return The claimed amount public(friend) fun claim_rewards_internal_update_data(assets: vector
, amount: u256, user: address, reward: address, rewards_controller_address: address): u256 Function `claim_all_rewards_internal_update_data` ------------------------------------------------- @notice Claims all rewards internal update data @param assets Vector of asset addresses @param user The user address @param rewards\_controller\_address The address of the rewards controller @return Tuple containing vector of reward addresses and vector of claimed amounts public(friend) fun claim_all_rewards_internal_update_data(assets: vector
, user: address, rewards_controller_address: address): (vector
, vector) Function `set_distribution_end` ------------------------------- @notice Sets the distribution end for an asset and reward @param asset The asset address @param reward The reward address @param new\_distribution\_end The new distribution end timestamp @param rewards\_controller\_address The address of the rewards controller public(friend) fun set_distribution_end(asset: address, reward: address, new_distribution_end: u32, rewards_controller_address: address) Function `set_emission_per_second` ---------------------------------- @notice Sets the emission per second for assets and rewards @param asset The asset address @param rewards Vector of reward addresses @param new\_emissions\_per\_second Vector of new emissions per second @param rewards\_controller\_address The address of the rewards controller public(friend) fun set_emission_per_second(asset: address, rewards: vector
, new_emissions_per_second: vector, rewards_controller_address: address) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/pool_token_logic/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/rewards_distributor/) --- # A Token Factory - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * A Token Factory * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory` ============================================================================================ @title a\_token\_factory Module @author Aave @notice Factory module for creating and managing aTokens in the Aave protocol @dev This module manages the creation, minting, burning, and various operations of aTokens * [Struct `Initialized`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_Initialized) * [Struct `TokenRescued`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_TokenRescued) * [Resource `TokenData`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_TokenData) * [Resource `TokenMap`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_TokenMap) * [Function `is_atoken`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_is_atoken) * [Function `get_token_account_address`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_get_token_account_address) * [Function `get_reserve_treasury_address`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_get_reserve_treasury_address) * [Function `get_underlying_asset_address`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_get_underlying_asset_address) * [Function `get_previous_index`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_get_previous_index) * [Function `get_scaled_user_balance_and_supply`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_get_scaled_user_balance_and_supply) * [Function `scaled_balance_of`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_scaled_balance_of) * [Function `balance_of`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_balance_of) * [Function `scaled_total_supply`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_scaled_total_supply) * [Function `total_supply`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_total_supply) * [Function `name`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_name) * [Function `symbol`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_symbol) * [Function `decimals`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_decimals) * [Function `token_address`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_token_address) * [Function `asset_metadata`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_asset_metadata) * [Function `rescue_tokens`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_rescue_tokens) * [Function `handle_repayment`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_handle_repayment) * [Function `create_token`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_create_token) * [Function `mint`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_mint) * [Function `burn`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_burn) * [Function `mint_to_treasury`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_mint_to_treasury) * [Function `set_incentives_controller`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_set_incentives_controller) * [Function `transfer_underlying_to`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_transfer_underlying_to) * [Function `transfer_on_liquidation`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_transfer_on_liquidation) * [Function `drop_token`](https://aave.github.io/aptos-aave-v3/aave-pool/a_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory_drop_token) use 0x1::account; use 0x1::event; use 0x1::fungible_asset; use 0x1::object; use 0x1::option; use 0x1::signer; use 0x1::smart_table; use 0x1::string; use 0x1::table_with_length; use 0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::events; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::fungible_asset_manager; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::token_base; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Struct `Initialized` -------------------- @notice Emitted when an aToken is initialized @param underlying\_asset The address of the underlying asset @param treasury The address of the treasury @param incentives\_controller The address of the incentives controller @param a\_token\_decimals The decimals of the underlying @param a\_token\_name The name of the aToken @param a\_token\_symbol The symbol of the aToken #[event] struct Initialized has drop, store Struct `TokenRescued` --------------------- @notice Emitted when a token is being rescued @dev Emitted during the the rescue tokens method @param from The account from which the token is being transferred/rescued @param to The receiver of the rescued tokens @param amount The amount being transferred during rescue @param a\_token\_address The address of the aToken #[event] struct TokenRescued has drop, store Resource `TokenData` -------------------- @notice Data structure that stores aToken-specific information @param underlying\_asset The address of the underlying asset @param treasury The address of the treasury @param signer\_cap The signer capability for the resource account #[resource_group_member(#[group = 0x1::object::ObjectGroup])] struct TokenData has drop, key Resource `TokenMap` ------------------- @notice Bi-directional mapping between underlying tokens and aTokens @dev This serves two purposes: 1. Ensures the same underlying token has only one aToken (underlying\_to\_token) 2. Provides quick lookup to check if an address is an aToken (token\_to\_underlying) @param underlying\_to\_token Maps underlying token address to aToken address @param token\_to\_underlying Maps aToken address to underlying token address struct TokenMap has key Function `is_atoken` -------------------- @notice Checks if the given address represents an aToken @param metadata\_address The address to check @return True if the address is an aToken, false otherwise #[view] public fun is_atoken(metadata_address: address): bool Function `get_token_account_address` ------------------------------------ @notice Retrieves the account address of the managed fungible asset for a specific aToken @dev Creates a signer capability for the resource account managing the fungible asset @param metadata\_address The address of the aToken @return The address of the managed fungible asset account #[view] public fun get_token_account_address(metadata_address: address): address Function `get_reserve_treasury_address` --------------------------------------- @notice Returns the address of the Aave treasury that receives fees on this aToken @param metadata\_address The address of the aToken @return Address of the Aave treasury #[view] public fun get_reserve_treasury_address(metadata_address: address): address Function `get_underlying_asset_address` --------------------------------------- @notice Returns the address of the underlying asset of this aToken @param metadata\_address The address of the aToken @return The address of the underlying asset #[view] public fun get_underlying_asset_address(metadata_address: address): address Function `get_previous_index` ----------------------------- @notice Returns last index interest was accrued to the user's balance @param user The address of the user @param metadata\_address The address of the aToken @return The last index interest was accrued to the user's balance, expressed in ray #[view] public fun get_previous_index(user: address, metadata_address: address): u256 Function `get_scaled_user_balance_and_supply` --------------------------------------------- @notice Returns the scaled balance of the user and the scaled total supply @param owner The address of the user @param metadata\_address The address of the aToken @return The scaled balance of the user @return The scaled total supply #[view] public fun get_scaled_user_balance_and_supply(owner: address, metadata_address: address): (u256, u256) Function `scaled_balance_of` ---------------------------- @notice Returns the scaled balance of the user @dev The scaled balance is the sum of all the updated stored balance divided by the reserve's liquidity index at the moment of the update @param owner The user whose balance is calculated @param metadata\_address The address of the aToken @return The scaled balance of the user #[view] public fun scaled_balance_of(owner: address, metadata_address: address): u256 Function `balance_of` --------------------- @notice Returns the amount of tokens owned by the owner @param owner The address of the token owner @param metadata\_address The address of the aToken @return The balance of tokens for the owner #[view] public fun balance_of(owner: address, metadata_address: address): u256 Function `scaled_total_supply` ------------------------------ @notice Returns the scaled total supply of the scaled balance token @dev Represents sum(debt/index) @param metadata\_address The address of the aToken @return The scaled total supply #[view] public fun scaled_total_supply(metadata_address: address): u256 Function `total_supply` ----------------------- @notice Returns the amount of tokens in existence @param metadata\_address The address of the aToken @return The total supply of tokens #[view] public fun total_supply(metadata_address: address): u256 Function `name` --------------- @notice Returns the name of the token @param metadata\_address The address of the aToken @return The name of the token #[view] public fun name(metadata_address: address): string::String Function `symbol` ----------------- @notice Returns the symbol of the token @param metadata\_address The address of the aToken @return The symbol of the token #[view] public fun symbol(metadata_address: address): string::String Function `decimals` ------------------- @notice Returns the number of decimals of the token @param metadata\_address The address of the aToken @return The number of decimals #[view] public fun decimals(metadata_address: address): u8 Function `token_address` ------------------------ @notice Returns the address of an aToken by its symbol @param symbol The symbol of the aToken to find @return The address of the aToken #[view] public fun token_address(symbol: string::String): address Function `asset_metadata` ------------------------- @notice Returns the metadata object of an aToken by its symbol @param symbol The symbol of the aToken to find @return The metadata object of the aToken #[view] public fun asset_metadata(symbol: string::String): object::Object Function `rescue_tokens` ------------------------ @notice Transfers out any token that is not the underlying token from an aToken's resource account @param account The account signer of the caller @param token The address of the token to transfer @param to The address of the recipient @param amount The amount of token to transfer @param metadata\_address The address of the aToken public entry fun rescue_tokens(account: &signer, token: address, to: address, amount: u256, metadata_address: address) Function `handle_repayment` --------------------------- @notice Handles repayment by potentially performing actions with the underlying asset @dev The default implementation is empty, but subclasses may override to stake or use the asset @param \_user The user executing the repayment @param \_on\_behalf\_of The address of the user who will get his debt reduced/removed @param \_amount The amount getting repaid @param \_metadata\_address The address of the aToken public fun handle_repayment(_user: address, _on_behalf_of: address, _amount: u256, _metadata_address: address) Function `create_token` ----------------------- @notice Creates a new aToken @dev Only callable by the pool\_token\_logic module @param signer The signer of the caller @param name The name of the aToken @param symbol The symbol of the aToken @param decimals The decimals of the aToken @param icon\_uri The icon URI of the aToken @param project\_uri The project URI of the aToken @param incentives\_controller The incentive controller address, if any, of the Token @param underlying\_asset The address of the underlying asset @param treasury The address of the treasury @return The address of the aToken public(friend) fun create_token(signer: &signer, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String, incentives_controller: option::Option
, underlying_asset: address, treasury: address): address Function `mint` --------------- @notice Mints `amount` aTokens to `on_behalf_of` @dev Only callable by the supply\_logic module @param caller The address performing the mint @param on\_behalf\_of The address of the user that will receive the minted aTokens @param amount The amount of tokens getting minted @param index The next liquidity index of the reserve @param metadata\_address The address of the aToken @return whether this is the first time we mint aTokens to `on_behalf_of` public(friend) fun mint(caller: address, on_behalf_of: address, amount: u256, index: u256, metadata_address: address): bool Function `burn` --------------- @notice Burns aTokens from `from` and sends the equivalent amount of underlying to `receiver_of_underlying` @dev Only callable by the supply\_logic, borrow\_logic and liquidation\_logic module @dev In some instances, the mint event could be emitted from a burn transaction if the amount to burn is less than the interest that the user accrued @param from The address from which the aTokens will be burned @param receiver\_of\_underlying The address that will receive the underlying @param amount The amount being burned @param index The next liquidity index of the reserve @param metadata\_address The address of the aToken public(friend) fun burn(from: address, receiver_of_underlying: address, amount: u256, index: u256, metadata_address: address) Function `mint_to_treasury` --------------------------- @notice Mints aTokens to the reserve treasury @dev Only callable by the pool\_token\_logic module @param amount The amount of tokens getting minted @param index The next liquidity index of the reserve @param metadata\_address The address of the aToken public(friend) fun mint_to_treasury(amount: u256, index: u256, metadata_address: address) Function `set_incentives_controller` ------------------------------------ @notice Sets an incentives controller for the aToken @dev Only callable by the pool\_token\_logic module @param admin The address of the admin calling the method @param metadata\_address The address of the aToken @param incentives\_controller The address of the incentives controller public(friend) fun set_incentives_controller(admin: &signer, metadata_address: address, incentives_controller: option::Option
) Function `transfer_underlying_to` --------------------------------- @notice Transfers the underlying asset to `**to**` @dev Only callable by the borrow\_logic and flashloan\_logic module @param to The recipient of the underlying @param amount The amount getting transferred @param metadata\_address The address of the aToken public(friend) fun transfer_underlying_to(to: address, amount: u256, metadata_address: address) Function `transfer_on_liquidation` ---------------------------------- @notice Transfers aTokens in the event of a borrow being liquidated, in case the liquidators reclaims the aToken @dev Only callable by the liquidation\_logic module @param from The address getting liquidated, current owner of the aTokens @param to The recipient @param amount The amount of tokens getting transferred @param index The next liquidity index of the reserve @param metadata\_address The address of the aToken @param rounding\_up Whether to round up: true=ray\_div\_up, false=ray\_div (round half up) public(friend) fun transfer_on_liquidation(from: address, to: address, amount: u256, index: u256, metadata_address: address, rounding_up: bool) Function `drop_token` --------------------- @notice Drops the a token associated data @dev Only callable by the pool\_token\_logic module @param metadata\_address The address of the metadata object public(friend) fun drop_token(metadata_address: address) [« Previous](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/borrow_logic/) --- # Mock Underlyings Token - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Mock Underlyings * Mock Underlyings Token * * * Module `0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933::mock_underlying_token_factory` ========================================================================================================= @title Mock Underlying Token Factory @author Aave @notice Provides functionality to create and manage fungible assets for testing * [Resource `ManagedFungibleAsset`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_ManagedFungibleAsset) * [Resource `CoinList`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_CoinList) * [Constants](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#@Constants_0) * [Function `create_token`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_create_token) * [Function `mint`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_mint) * [Function `transfer_from`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_transfer_from) * [Function `burn`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_burn) * [Function `assert_token_exists`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_assert_token_exists) * [Function `get_metadata_by_symbol`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_get_metadata_by_symbol) * [Function `get_token_account_address`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_get_token_account_address) * [Function `supply`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_supply) * [Function `maximum`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_maximum) * [Function `name`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_name) * [Function `symbol`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_symbol) * [Function `decimals`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_decimals) * [Function `balance_of`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_balance_of) * [Function `token_address`](https://aave.github.io/aptos-aave-v3/aave-mock-underlyings/mock_underlying_token_factory/#0x14066b3e527b0b87a6216b7cf1379f1f828de5e0aceea9b4a0b9a421945a933_mock_underlying_token_factory_token_address) use 0x1::error; use 0x1::fungible_asset; use 0x1::object; use 0x1::option; use 0x1::primary_fungible_store; use 0x1::signer; use 0x1::smart_table; use 0x1::string; Resource `ManagedFungibleAsset` ------------------------------- @notice Hold refs to control the minting, transfer and burning of fungible assets #[resource_group_member(#[group = 0x1::object::ObjectGroup])] struct ManagedFungibleAsset has key Resource `CoinList` ------------------- @notice Mapping of token addresses to existence flags struct CoinList has key Constants --------- @notice Only fungible asset metadata owner can make changes const ENOT_OWNER: u64 = 1; @notice Token with this address already exists const E_TOKEN_ALREADY_EXISTS: u64 = 2; Function `create_token` ----------------------- @notice Creates a new underlying token @param signer The signer of the transaction @param maximum\_supply Maximum supply for the token (0 for unlimited) @param name The name of the underlying token @param symbol The symbol of the underlying token @param decimals The decimals of the underlying token @param icon\_uri The icon URI of the underlying token @param project\_uri The project URI of the underlying token public entry fun create_token(signer: &signer, maximum_supply: u128, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String) Function `mint` --------------- @notice Mints tokens as the owner of metadata object @param admin Admin signer with minting permission @param to Address to receive the minted tokens @param amount Amount of tokens to mint @param metadata\_address Address of the token metadata public entry fun mint(admin: &signer, to: address, amount: u64, metadata_address: address) Function `transfer_from` ------------------------ @notice Transfers tokens from one address to another @param from Source address @param to Destination address @param amount Amount of tokens to transfer @param metadata\_address Address of the token metadata public fun transfer_from(from: address, to: address, amount: u64, metadata_address: address) Function `burn` --------------- @notice Burns fungible assets as the owner of metadata object @param from Address to burn tokens from @param amount Amount of tokens to burn @param metadata\_address Address of the token metadata public fun burn(from: address, amount: u64, metadata_address: address) Function `assert_token_exists` ------------------------------ @notice Verifies that a token exists @param token\_metadata\_address Address of the token metadata public fun assert_token_exists(token_metadata_address: address) Function `get_metadata_by_symbol` --------------------------------- @notice Gets the metadata object by symbol @param symbol Token symbol @return The metadata object #[view] public fun get_metadata_by_symbol(symbol: string::String): object::Object Function `get_token_account_address` ------------------------------------ @notice Gets the token account address @return The token account address #[view] public fun get_token_account_address(): address Function `supply` ----------------- @notice Gets the current supply from the metadata object @param metadata\_address Address of the token metadata @return The current supply, or none if unlimited #[view] public fun supply(metadata_address: address): option::Option Function `maximum` ------------------ @notice Gets the maximum supply from the metadata object @param metadata\_address Address of the token metadata @return The maximum supply, or none if unlimited #[view] public fun maximum(metadata_address: address): option::Option Function `name` --------------- @notice Gets the name of the fungible asset from the metadata object @param metadata\_address Address of the token metadata @return The token name #[view] public fun name(metadata_address: address): string::String Function `symbol` ----------------- @notice Gets the symbol of the fungible asset from the metadata object @param metadata\_address Address of the token metadata @return The token symbol #[view] public fun symbol(metadata_address: address): string::String Function `decimals` ------------------- @notice Gets the decimals from the metadata object @param metadata\_address Address of the token metadata @return The token decimals #[view] public fun decimals(metadata_address: address): u8 Function `balance_of` --------------------- @notice Gets the balance of a given store @param owner Address of the account to check @param metadata\_address Address of the token metadata @return The token balance #[view] public fun balance_of(owner: address, metadata_address: address): u64 Function `token_address` ------------------------ @notice Gets the token address from its symbol @param symbol Token symbol @return The token address #[view] public fun token_address(symbol: string::String): address [« Previous](https://aave.github.io/aptos-aave-v3/aave-math/wad_ray_math/) [Next »](https://aave.github.io/aptos-aave-v3/aave-oracle/oracle/) --- # Token Base - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Token Base * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::token_base` ======================================================================================= @title Token Base Module @author Aave @notice Base module for token implementations in the Aave protocol @dev Provides core functionality for aTokens and debt tokens with scaled balances * [Struct `Transfer`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_Transfer) * [Struct `Mint`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_Mint) * [Struct `Burn`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_Burn) * [Struct `UserState`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_UserState) * [Resource `ManagedFungibleAsset`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_ManagedFungibleAsset) * [Resource `TokenBaseState`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_TokenBaseState) * [Function `get_previous_index`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_get_previous_index) * [Function `get_incentives_controller`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_get_incentives_controller) * [Function `scaled_balance_of`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_scaled_balance_of) * [Function `scaled_total_supply`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_scaled_total_supply) * [Function `get_scaled_user_balance_and_supply`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_get_scaled_user_balance_and_supply) * [Function `name`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_name) * [Function `symbol`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_symbol) * [Function `decimals`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_decimals) * [Function `only_pool_admin`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_only_pool_admin) * [Function `only_token_admin`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_only_token_admin) * [Function `set_incentives_controller`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_set_incentives_controller) * [Function `create_token`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_create_token) * [Function `mint_scaled`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_mint_scaled) * [Function `burn_scaled`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_burn_scaled) * [Function `transfer`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_transfer) * [Function `drop_token`](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_token_base_drop_token) use 0x1::event; use 0x1::fungible_asset; use 0x1::object; use 0x1::option; use 0x1::primary_fungible_store; use 0x1::signer; use 0x1::smart_table; use 0x1::string; use 0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::rewards_controller; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Struct `Transfer` ----------------- @notice Emitted when tokens are moved from one account to another @dev Note that value may be zero @param from The address sending the tokens @param to The address receiving the tokens @param value The amount of tokens transferred @param token The address of the token #[event] struct Transfer has drop, store Struct `Mint` ------------- @notice Emitted after a mint action @param caller The address performing the mint @param on\_behalf\_of The address of the user that will receive the minted tokens @param value The scaled-up amount being minted (based on user entered amount and balance increase from interest) @param balance\_increase The increase in scaled-up balance since the last action of 'on\_behalf\_of' @param index The next liquidity index of the reserve @param token The a/v token address #[event] struct Mint has drop, store Struct `Burn` ------------- @notice Emitted after a burn action @dev If the burn function does not involve a transfer of the underlying asset, the target defaults to zero address @param from The address from which the tokens will be burned @param target The address that will receive the underlying, if any @param value The scaled-up amount being burned (user entered amount - balance increase from interest) @param balance\_increase The increase in scaled-up balance since the last action of 'from' @param index The next liquidity index of the reserve @param token The a/v token address #[event] struct Burn has drop, store Struct `UserState` ------------------ @notice Stores user-specific token data @param balance The scaled balance of the user @param additional\_data The liquidity index at the time of last balance update struct UserState has copy, drop, store Resource `ManagedFungibleAsset` ------------------------------- @notice Hold refs to control the minting, transfer and burning of fungible assets @param mint\_ref Reference for minting tokens @param transfer\_ref Reference for transferring tokens @param burn\_ref Reference for burning tokens #[resource_group_member(#[group = 0x1::object::ObjectGroup])] struct ManagedFungibleAsset has drop, key Resource `TokenBaseState` ------------------------- @notice Hold stateful information about tokens based on `ScaledBalanceTokenBase` @param scaled\_total\_supply The total supply of the token in scaled units @param user\_state Mapping of user addresses to their state @param incentives\_controller Address of the incentives controller, if set #[resource_group_member(#[group = 0x1::object::ObjectGroup])] struct TokenBaseState has key Function `get_previous_index` ----------------------------- @notice Returns the last index when interest was accrued to the user's balance @param user The address of the user @param metadata\_address The address of the token @return The last index when interest was accrued to the user's balance, in ray #[view] public fun get_previous_index(user: address, metadata_address: address): u256 Function `get_incentives_controller` ------------------------------------ @notice Returns the incentives controller address @param metadata\_address The address of the token @return The address of the incentives controller, if set #[view] public fun get_incentives_controller(metadata_address: address): option::Option
Function `scaled_balance_of` ---------------------------- @notice Returns the scaled balance of a user @dev The scaled balance is the balance divided by the reserve's liquidity index at the time of the update @param owner The address of the user @param metadata\_address The address of the token @return The scaled balance of the user #[view] public fun scaled_balance_of(owner: address, metadata_address: address): u256 Function `scaled_total_supply` ------------------------------ @notice Returns the total supply in scaled units @param metadata\_address The address of the token @return The total supply in scaled units #[view] public fun scaled_total_supply(metadata_address: address): u256 Function `get_scaled_user_balance_and_supply` --------------------------------------------- @notice Returns the scaled balance of a user and the scaled total supply @param owner The address of the user @param metadata\_address The address of the token @return The scaled balance of the user and the scaled total supply #[view] public fun get_scaled_user_balance_and_supply(owner: address, metadata_address: address): (u256, u256) Function `name` --------------- @notice Returns the name of the token @param metadata\_address The address of the token @return The name of the token #[view] public fun name(metadata_address: address): string::String Function `symbol` ----------------- @notice Returns the symbol of the token @param metadata\_address The address of the token @return The symbol of the token #[view] public fun symbol(metadata_address: address): string::String Function `decimals` ------------------- @notice Returns the number of decimals of the token @param metadata\_address The address of the token @return The number of decimals #[view] public fun decimals(metadata_address: address): u8 Function `only_pool_admin` -------------------------- @notice Checks if the caller is a pool admin @param account The account to check @dev Aborts if the account is not a pool admin public fun only_pool_admin(account: &signer) Function `only_token_admin` --------------------------- @notice Checks if the caller is a token admin @param account The account to check @dev Aborts if the account is not a token admin public fun only_token_admin(account: &signer) Function `set_incentives_controller` ------------------------------------ @notice Sets the incentives controller for the token @dev Only callable by friend modules @param admin The signer of the admin account @param metadata\_address The address of the token @param incentives\_controller The address of the incentives controller public(friend) fun set_incentives_controller(admin: &signer, metadata_address: address, incentives_controller: option::Option
) Function `create_token` ----------------------- @notice Creates a new token @dev Only callable by the a\_token\_factory and variable\_debt\_token\_factory module @param constructor\_ref The constructor reference of the token @param name The name of the token @param symbol The symbol of the token @param decimals The decimals of the token @param icon\_uri The icon URI of the token @param project\_uri The project URI of the token @param incentives\_controller The incentive controller address, if any public(friend) fun create_token(constructor_ref: &object::ConstructorRef, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String, incentives_controller: option::Option
) Function `mint_scaled` ---------------------- @notice Mints tokens to a recipient @dev Only callable by the a\_token\_factory and variable\_debt\_token\_factory module @param caller The address performing the mint @param on\_behalf\_of The address of the user that will receive the minted tokens @param amount The amount of tokens to mint @param index The next liquidity index of the reserve @param metadata\_address The address of the token @param rounding\_up If true, rounds up the scaled amount (for debt tokens); if false, rounds down (for asset tokens) @return Whether this is the first time tokens are minted to the recipient public(friend) fun mint_scaled(caller: address, on_behalf_of: address, amount: u256, index: u256, metadata_address: address, rounding_up: bool): bool Function `burn_scaled` ---------------------- @notice Burns tokens from a user @dev Only callable by the a\_token\_factory and variable\_debt\_token\_factory module @dev In some instances, the mint event could be emitted from a burn transaction if the amount to burn is less than the interest that the user accrued @param user The address from which the tokens will be burned @param target The address that will receive the underlying @param amount The amount being burned @param index The next liquidity index of the reserve @param metadata\_address The address of the token @param rounding\_up If true, rounds up the scaled amount (for asset tokens); if false, rounds down (for debt tokens) public(friend) fun burn_scaled(user: address, target: address, amount: u256, index: u256, metadata_address: address, rounding_up: bool) Function `transfer` ------------------- @notice Transfers tokens between accounts @dev Only callable by the a\_token\_factory and pool\_token\_logic module @param sender The address from which the tokens will be transferred @param recipient The address that will receive the tokens @param amount The amount being transferred @param index The next liquidity index of the reserve @param metadata\_address The address of the token @param rounding\_up If true, rounds up the scaled amount; if false, rounds half up public(friend) fun transfer(sender: address, recipient: address, amount: u256, index: u256, metadata_address: address, rounding_up: bool) Function `drop_token` --------------------- @notice Drops the token data from the token map @dev Only callable by the a\_token\_factory and variable\_debt\_token\_factory module @param metadata\_address The address of the token public(friend) fun drop_token(metadata_address: address) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/supply_logic/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/transfer_strategy/) --- # Transfer Strategy - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Transfer Strategy * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::transfer_strategy` ============================================================================================== @title Transfer Strategy Module @author Aave @notice Implements functionality to transfer rewards using various strategies * [Resource `PullRewardsTransferStrategy`](https://aave.github.io/aptos-aave-v3/aave-pool/transfer_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_transfer_strategy_PullRewardsTransferStrategy) * [Struct `EmergencyWithdrawal`](https://aave.github.io/aptos-aave-v3/aave-pool/transfer_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_transfer_strategy_EmergencyWithdrawal) * [Function `pull_rewards_transfer_strategy_get_incentives_controller`](https://aave.github.io/aptos-aave-v3/aave-pool/transfer_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_transfer_strategy_pull_rewards_transfer_strategy_get_incentives_controller) * [Function `pull_rewards_transfer_strategy_get_rewards_admin`](https://aave.github.io/aptos-aave-v3/aave-pool/transfer_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_transfer_strategy_pull_rewards_transfer_strategy_get_rewards_admin) * [Function `pull_rewards_transfer_strategy_get_rewards_vault`](https://aave.github.io/aptos-aave-v3/aave-pool/transfer_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_transfer_strategy_pull_rewards_transfer_strategy_get_rewards_vault) * [Function `create_pull_rewards_transfer_strategy`](https://aave.github.io/aptos-aave-v3/aave-pool/transfer_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_transfer_strategy_create_pull_rewards_transfer_strategy) * [Function `pull_rewards_transfer_strategy_emergency_withdrawal`](https://aave.github.io/aptos-aave-v3/aave-pool/transfer_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_transfer_strategy_pull_rewards_transfer_strategy_emergency_withdrawal) * [Function `pull_rewards_transfer_strategy_perform_transfer`](https://aave.github.io/aptos-aave-v3/aave-pool/transfer_strategy/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_transfer_strategy_pull_rewards_transfer_strategy_perform_transfer) use 0x1::account; use 0x1::dispatchable_fungible_asset; use 0x1::event; use 0x1::fungible_asset; use 0x1::object; use 0x1::primary_fungible_store; use 0x1::signer; use 0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_token_logic; Resource `PullRewardsTransferStrategy` -------------------------------------- @notice An object representing the pull-reward transfer strategy @dev This strategy pulls rewards (as `FungibleAsset`) from a vault resource account to the recipient address. #[resource_group_member(#[group = 0x1::object::ObjectGroup])] struct PullRewardsTransferStrategy has key Struct `EmergencyWithdrawal` ---------------------------- @notice Emitted when an emergency withdrawal is performed @param caller The address of the caller @param token The address of the token @param to The address to which tokens are transferred @param amount The amount of tokens transferred #[event] struct EmergencyWithdrawal has drop, store Function `pull_rewards_transfer_strategy_get_incentives_controller` ------------------------------------------------------------------- @notice Gets the incentives controller for a pull rewards transfer strategy @param strategy The pull rewards transfer strategy object @return The address of the incentives controller #[view] public fun pull_rewards_transfer_strategy_get_incentives_controller(strategy: object::Object): address Function `pull_rewards_transfer_strategy_get_rewards_admin` ----------------------------------------------------------- @notice Gets the rewards admin for a pull rewards transfer strategy @param strategy The pull rewards transfer strategy object @return The address of the rewards admin #[view] public fun pull_rewards_transfer_strategy_get_rewards_admin(strategy: object::Object): address Function `pull_rewards_transfer_strategy_get_rewards_vault` ----------------------------------------------------------- @notice Gets the rewards vault for a pull rewards transfer strategy @param strategy The pull rewards transfer strategy object @return The address of the rewards vault #[view] public fun pull_rewards_transfer_strategy_get_rewards_vault(strategy: object::Object): address Function `create_pull_rewards_transfer_strategy` ------------------------------------------------ @notice Creates a new pull rewards transfer strategy @param sender The signer account of the sender @param constructor\_ref The constructor reference @param rewards\_admin The address of the rewards admin @param incentives\_controller The address of the incentives controller @param rewards\_vault The signer capability of the rewards vault @return The pull rewards transfer strategy object public fun create_pull_rewards_transfer_strategy(sender: &signer, constructor_ref: &object::ConstructorRef, rewards_admin: address, incentives_controller: address, rewards_vault: account::SignerCapability): object::Object Function `pull_rewards_transfer_strategy_emergency_withdrawal` -------------------------------------------------------------- @notice Performs an emergency withdrawal of rewards @param caller The signer account of the caller @param token The address of the token @param to The address to which tokens are transferred @param amount The amount of tokens to transfer @param strategy The pull rewards transfer strategy object public entry fun pull_rewards_transfer_strategy_emergency_withdrawal(caller: &signer, token: address, to: address, amount: u256, strategy: object::Object) Function `pull_rewards_transfer_strategy_perform_transfer` ---------------------------------------------------------- @notice Performs a transfer using a pull rewards transfer strategy @param incentives\_controller The address of the incentives controller @param to The address to which rewards are transferred @param reward The address of the reward @param amount The amount of rewards to transfer @param strategy The pull rewards transfer strategy object @return Whether the transfer was successful public(friend) fun pull_rewards_transfer_strategy_perform_transfer(incentives_controller: address, to: address, reward: address, amount: u256, strategy: object::Object): bool [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/token_base/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/ui_incentive_data_provider_v3/) --- # User Logic - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * User Logic * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::user_logic` ======================================================================================= @title User Logic Module @author Aave @notice Implements logic to retrieve user account data across all reserves * [Function `get_user_account_data`](https://aave.github.io/aptos-aave-v3/aave-pool/user_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_user_logic_get_user_account_data) use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::emode_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::generic_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; Function `get_user_account_data` -------------------------------- @notice Returns the user account data across all the reserves @param user The address of the user @return total\_collateral\_base The total collateral of the user in the base currency used by the price feed @return total\_debt\_base The total debt of the user in the base currency used by the price feed @return available\_borrows\_base The borrowing power left of the user in the base currency used by the price feed @return current\_liquidation\_threshold The liquidation threshold of the user @return ltv The loan to value of The user @return health\_factor The current health factor of the user #[view] public fun get_user_account_data(user: address): (u256, u256, u256, u256, u256, u256) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/ui_pool_data_provider_v3/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/) --- # Variable Debt Token Factory - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Variable Debt Token Factory * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::variable_debt_token_factory` ======================================================================================================== @title Variable Debt Token Factory Module @author Aave @notice Factory for creating and managing variable debt tokens in the Aave protocol @dev Manages the creation, minting, burning, and operations of variable debt tokens * [Struct `Initialized`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_Initialized) * [Resource `TokenData`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_TokenData) * [Resource `TokenMap`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_TokenMap) * [Function `is_variable_debt_token`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_is_variable_debt_token) * [Function `get_underlying_asset_address`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_get_underlying_asset_address) * [Function `get_previous_index`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_get_previous_index) * [Function `scaled_balance_of`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_scaled_balance_of) * [Function `balance_of`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_balance_of) * [Function `scaled_total_supply`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_scaled_total_supply) * [Function `total_supply`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_total_supply) * [Function `get_scaled_user_balance_and_supply`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_get_scaled_user_balance_and_supply) * [Function `name`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_name) * [Function `symbol`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_symbol) * [Function `decimals`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_decimals) * [Function `token_address`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_token_address) * [Function `asset_metadata`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_asset_metadata) * [Function `create_token`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_create_token) * [Function `mint`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_mint) * [Function `set_incentives_controller`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_set_incentives_controller) * [Function `burn`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_burn) * [Function `drop_token`](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_drop_token) use 0x1::event; use 0x1::fungible_asset; use 0x1::object; use 0x1::option; use 0x1::signer; use 0x1::smart_table; use 0x1::string; use 0x1::table_with_length; use 0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::token_base; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Struct `Initialized` -------------------- @notice Emitted when a debt token is initialized @param underlying\_asset The address of the underlying asset @param incentives\_controller The address of the incentives controller @param debt\_token\_decimals The decimals of the debt token @param debt\_token\_name The name of the debt token @param debt\_token\_symbol The symbol of the debt token #[event] struct Initialized has drop, store Resource `TokenData` -------------------- @notice Data structure that stores token-specific information @param underlying\_asset The address of the underlying asset struct TokenData has drop, key Resource `TokenMap` ------------------- @notice Bi-directional mapping between underlying tokens and variable debt tokens @dev See NOTES of `[TokenMap](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/variable_debt_token_factory.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_variable_debt_token_factory_TokenMap) ` in `[a_token_factory](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/a_token_factory.md#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_a_token_factory) .**move**` for why this design is used @param underlying\_to\_token Maps underlying token address to variable debt token address @param token\_to\_underlying Maps variable debt token address to underlying token address struct TokenMap has key Function `is_variable_debt_token` --------------------------------- @notice Checks if the given address represents a variable debt token @param metadata\_address The address to check @return True if the address is a variable debt token, false otherwise #[view] public fun is_variable_debt_token(metadata_address: address): bool Function `get_underlying_asset_address` --------------------------------------- @notice Returns the address of the underlying asset of this debt token @param metadata\_address The address of the metadata object @return The address of the underlying asset #[view] public fun get_underlying_asset_address(metadata_address: address): address Function `get_previous_index` ----------------------------- @notice Returns last index interest was accrued to the user's balance @param user The address of the user @param metadata\_address The address of the variable debt token @return The last index interest was accrued to the user's balance, expressed in ray #[view] public fun get_previous_index(user: address, metadata_address: address): u256 Function `scaled_balance_of` ---------------------------- @notice Returns the scaled balance of the user @dev The scaled balance is the sum of all the updated stored balance divided by the reserve's liquidity index at the moment of the update @param owner The user whose balance is calculated @param metadata\_address The address of the variable debt token @return The scaled balance of the user #[view] public fun scaled_balance_of(owner: address, metadata_address: address): u256 Function `balance_of` --------------------- @notice Returns the amount of tokens owned by the account @param owner The address of the token owner @param metadata\_address The address of the variable debt token @return The balance of tokens for the owner #[view] public fun balance_of(owner: address, metadata_address: address): u256 Function `scaled_total_supply` ------------------------------ @notice Returns the scaled total supply of the scaled balance token @dev Represents sum(debt/index) @param metadata\_address The address of the variable debt token @return The scaled total supply #[view] public fun scaled_total_supply(metadata_address: address): u256 Function `total_supply` ----------------------- @notice Returns the amount of tokens in existence @param metadata\_address The address of the variable debt token @return The total supply of tokens #[view] public fun total_supply(metadata_address: address): u256 Function `get_scaled_user_balance_and_supply` --------------------------------------------- @notice Returns the scaled balance of the user and the scaled total supply @param owner The address of the user @param metadata\_address The address of the variable debt token @return The scaled balance of the user @return The scaled total supply #[view] public fun get_scaled_user_balance_and_supply(owner: address, metadata_address: address): (u256, u256) Function `name` --------------- @notice Get the name of the fungible asset @param metadata\_address The address of the variable debt token @return The name of the fungible asset #[view] public fun name(metadata_address: address): string::String Function `symbol` ----------------- @notice Get the symbol of the fungible asset @param metadata\_address The address of the variable debt token @return The symbol of the fungible asset #[view] public fun symbol(metadata_address: address): string::String Function `decimals` ------------------- @notice Get the decimals of the fungible asset @param metadata\_address The address of the variable debt token @return The number of decimals #[view] public fun decimals(metadata_address: address): u8 Function `token_address` ------------------------ @notice Returns the address of a variable debt token by its symbol @param symbol The symbol of the variable debt token to find @return The address of the variable debt token #[view] public fun token_address(symbol: string::String): address Function `asset_metadata` ------------------------- @notice Returns the metadata object of a variable debt token by its symbol @param symbol The symbol of the variable debt token to find @return The metadata object of the variable debt token #[view] public fun asset_metadata(symbol: string::String): object::Object Function `create_token` ----------------------- @notice Creates a new variable debt token @dev Callable by the pool\_token\_logic module @param signer The signer of the caller @param name The name of the variable debt token @param symbol The symbol of the variable debt token @param decimals The decimals of the variable debt token @param icon\_uri The icon URI of the variable debt token @param project\_uri The project URI of the variable debt token @param incentives\_controller The incentive controller address, if any @param underlying\_asset The address of the underlying asset @return The address of the variable debt token public(friend) fun create_token(signer: &signer, name: string::String, symbol: string::String, decimals: u8, icon_uri: string::String, project_uri: string::String, incentives_controller: option::Option
, underlying_asset: address): address Function `mint` --------------- @notice Mints debt token to the `on_behalf_of` address @dev Only callable by the borrow\_logic module @param caller The address receiving the borrowed underlying, being the delegatee in case of credit delegate, or same as `on_behalf_of` otherwise @param on\_behalf\_of The address receiving the debt tokens @param amount The amount of debt being minted @param index The variable debt index of the reserve @param metadata\_address The address of the metadata object @return whether this is the first time we mint the VariableDebt token to `on_behalf_of` public(friend) fun mint(caller: address, on_behalf_of: address, amount: u256, index: u256, metadata_address: address): bool Function `set_incentives_controller` ------------------------------------ @notice Sets an incentives controller for the variable debt token @dev Callable by the pool\_token\_logic module @param admin The address of the admin calling the method @param metadata\_address The address of the variable debt token @param incentives\_controller The address of the incentives controller public(friend) fun set_incentives_controller(admin: &signer, metadata_address: address, incentives_controller: option::Option
) Function `burn` --------------- @notice Burns user variable debt @dev Only callable by the borrow\_logic and liquidation\_logic module @dev In some instances, a burn transaction will emit a mint event if the amount to burn is less than the interest that the user accrued @param from The address from which the debt will be burned @param amount The amount getting burned @param index The variable debt index of the reserve @param metadata\_address The address of the metadata object public(friend) fun burn(from: address, amount: u256, index: u256, metadata_address: address) Function `drop_token` --------------------- @notice Drops the variable debt token associated data @dev Callable by the pool\_token\_logic module @param metadata\_address The address of the metadata object public(friend) fun drop_token(metadata_address: address) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/) --- # Validation Logic - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * Validation Logic * * * Module `0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::validation_logic` ============================================================================================= @title Validation Logic Module @author Aave @notice Implements the validation logic for the various actions of the protocol * [Function `validate_flashloan_complex`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_flashloan_complex) * [Function `validate_flashloan_simple`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_flashloan_simple) * [Function `validate_supply`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_supply) * [Function `validate_withdraw`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_withdraw) * [Function `validate_transfer`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_transfer) * [Function `validate_set_use_reserve_as_collateral`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_set_use_reserve_as_collateral) * [Function `validate_borrow`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_borrow) * [Function `validate_repay`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_repay) * [Function `validate_liquidation_call`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_liquidation_call) * [Function `validate_hf_and_ltv`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_hf_and_ltv) * [Function `validate_automatic_use_as_collateral`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_automatic_use_as_collateral) * [Function `validate_use_as_collateral`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_use_as_collateral) * [Function `validate_health_factor`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_health_factor) * [Function `validate_set_user_emode`](https://aave.github.io/aptos-aave-v3/aave-pool/validation_logic/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_validation_logic_validate_set_user_emode) use 0x1::object; use 0x1::simple_map; use 0x1::timestamp; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::reserve_config; use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::user_config; use 0xc1b23ac8ce67df6361b241bfa30a22c9b177fe39c471334a514eea977e6673a9::oracle; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::generic_logic; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool; use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_logic; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::math_utils; use 0xd63343bff7977cb364b17dcdcdeb64e77b7bc9b4ec252f481ace51b6de3bbd96::wad_ray_math; Function `validate_flashloan_complex` ------------------------------------- @notice Validates a flashloan action. @param assets The assets being flash-borrowed @param amounts The amounts for each asset being borrowed @param interest\_rate\_modes The interest rate modes for each asset public fun validate_flashloan_complex(assets: &vector
, amounts: &vector, interest_rate_modes: &vector) Function `validate_flashloan_simple` ------------------------------------ @notice Validates a flashloan action. @param reserve\_data The reserve data the reserve @param amount The amount being flash-borrowed public fun validate_flashloan_simple(reserve_data: object::Object, amount: u256) Function `validate_supply` -------------------------- @notice Validates a supply action. @param reserve\_cache The reserve cache of the reserve @param reserve\_data The reserve data of the reserve @param amount The amount to be supplied @param on\_behalf\_of The account on which behalf the amount is being supplied public fun validate_supply(reserve_cache: &pool_logic::ReserveCache, reserve_data: object::Object, amount: u256, on_behalf_of: address) Function `validate_withdraw` ---------------------------- @notice Validates a withdraw action. @param reserve\_cache The reserve cache of the reserve @param amount The amount to be withdrawn @param user\_balance The balance of the user public fun validate_withdraw(reserve_cache: &pool_logic::ReserveCache, amount: u256, user_balance: u256) Function `validate_transfer` ---------------------------- @notice Validates a transfer action. @param reserve\_data The reserve data the reserve public fun validate_transfer(reserve_data: object::Object) Function `validate_set_use_reserve_as_collateral` ------------------------------------------------- @notice Validates the action of setting an asset as collateral. @param reserve\_cache The reserve cache of the reserve @param user\_balance The balance of the user @param is\_collateral Indicates whether the asset is currently used as collateral in the user config @param use\_as\_collateral True if the user wants to use the supply as collateral, false otherwise public fun validate_set_use_reserve_as_collateral(reserve_cache: &pool_logic::ReserveCache, user_balance: u256, is_collateral: bool, use_as_collateral: bool) Function `validate_borrow` -------------------------- @notice Validates a borrow action. @param reserve\_cache The reserve cache of the reserve @param user\_config\_map The UserConfigurationMap object @param asset The address of the asset to be borrowed @param user\_address The address of the user @param amount The amount to be borrowed @param interest\_rate\_mode The interest rate mode @param reserves\_count The number of reserves @param user\_emode\_category The user's eMode category @param emode\_ltv The eMode LTV @param emode\_liq\_threshold The eMode liquidation threshold @param isolation\_mode\_active The isolation mode state @param isolation\_mode\_collateral\_address The address of the collateral reserve in isolation mode @param isolation\_mode\_debt\_ceiling The debt ceiling in isolation mode public fun validate_borrow(reserve_cache: &pool_logic::ReserveCache, user_config_map: &user_config::UserConfigurationMap, asset: address, user_address: address, amount: u256, interest_rate_mode: u8, reserves_count: u256, user_emode_category: u8, emode_ltv: u256, emode_liq_threshold: u256, isolation_mode_active: bool, isolation_mode_collateral_address: address, isolation_mode_debt_ceiling: u256) Function `validate_repay` ------------------------- @notice Validates a repay action. @param account\_address The address of the user repaying the debt @param reserve\_cache The reserve cache of the reserve @param amount\_sent The amount sent for the repayment. Can be an actual value or uint(-1) @param interest\_rate\_mode The interest rate mode of the debt being repaid @param on\_behalf\_of The address of the user account\_address is repaying for @param variable\_debt The borrow balance of the user public fun validate_repay(account_address: address, reserve_cache: &pool_logic::ReserveCache, amount_sent: u256, interest_rate_mode: u8, on_behalf_of: address, variable_debt: u256) Function `validate_liquidation_call` ------------------------------------ @notice Validates the liquidation action. @param user\_config\_map The user configuration mapping @param collateral\_reserve\_data The reserve data of the collateral @param debt\_reserve\_data The reserve data of the debt @param debt\_reserve\_cache The reserve cache of the debt reserve @param total\_debt The total debt of the user @param health\_factor The health factor of the user public fun validate_liquidation_call(user_config_map: &user_config::UserConfigurationMap, collateral_reserve_data: object::Object, debt_reserve_data: object::Object, debt_reserve_cache: &pool_logic::ReserveCache, total_debt: u256, health_factor: u256) Function `validate_hf_and_ltv` ------------------------------ @notice Validates the health factor of a user and the ltv of the asset being withdrawn. @param user\_config\_map the user configuration map @param asset The address of the underlying asset of the reserve @param from The user from which the aTokens are being transferred @param reserves\_count The number of available reserves @param user\_emode\_category The users active efficiency mode category @param emode\_ltv The ltv of the efficiency mode category @param emode\_liq\_threshold The liquidation threshold of the efficiency mode category public fun validate_hf_and_ltv(user_config_map: &user_config::UserConfigurationMap, asset: address, from: address, reserves_count: u256, user_emode_category: u8, emode_ltv: u256, emode_liq_threshold: u256) Function `validate_automatic_use_as_collateral` ----------------------------------------------- @notice Validates if an asset should be automatically activated as collateral in the following actions: supply, transfer and liquidate @dev Auto-collateralization is disabled to improve user control and protocol predictability. Users must explicitly call set\_user\_use\_reserve\_as\_collateral to enable collateral. @param \_user\_config\_map the user configuration map @param \_reserve\_config\_map The reserve configuration map @return Always returns false. No asset will be automatically activated as collateral. public fun validate_automatic_use_as_collateral(_user_config_map: &user_config::UserConfigurationMap, _reserve_config_map: &reserve_config::ReserveConfigurationMap): bool Function `validate_use_as_collateral` ------------------------------------- @notice Validates the action of activating the asset as collateral. @dev Only possible if the asset has non-zero LTV and the user is not in isolation mode @param user\_config\_map the user configuration map @param reserve\_config\_map The reserve configuration map @return True if the asset can be activated as collateral, false otherwise public fun validate_use_as_collateral(user_config_map: &user_config::UserConfigurationMap, reserve_config_map: &reserve_config::ReserveConfigurationMap): bool Function `validate_health_factor` --------------------------------- @notice Validates the health factor of a user. @param user\_config\_map the user configuration map @param user The user to validate health factor of @param user\_emode\_category The users active efficiency mode category @param reserves\_count The number of available reserves @param emode\_ltv The ltv of the efficiency mode category @param emode\_liq\_threshold The liquidation threshold of the efficiency mode category @return The health factor and whether the user has a zero-LTV collateral public fun validate_health_factor(user_config_map: &user_config::UserConfigurationMap, user: address, user_emode_category: u8, reserves_count: u256, emode_ltv: u256, emode_liq_threshold: u256): (u256, bool) Function `validate_set_user_emode` ---------------------------------- @notice Validates the action of setting efficiency mode. @param user\_config\_map the user configuration map @param reserves\_count The total number of valid reserves @param category\_id The id of the category @param liquidation\_threshold The liquidation threshold public fun validate_set_user_emode(user_config_map: &user_config::UserConfigurationMap, reserves_count: u256, category_id: u8, liquidation_threshold: u16) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/user_logic/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/variable_debt_token_factory/) --- # UI Pool Data Provider V3 - Aave Aptos Docs * [](https://aave.github.io/aptos-aave-v3/) * Aave Pool * UI Pool Data Provider V3 * * * 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`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_pool_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_pool_data_provider_v3_AggregatedReserveData) * [Resource `UserReserveData`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_pool_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_pool_data_provider_v3_UserReserveData) * [Resource `BaseCurrencyInfo`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_pool_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_pool_data_provider_v3_BaseCurrencyInfo) * [Constants](https://aave.github.io/aptos-aave-v3/aave-pool/ui_pool_data_provider_v3/#@Constants_0) * [Function `get_reserves_list`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_pool_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_pool_data_provider_v3_get_reserves_list) * [Function `get_reserves_data`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_pool_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_pool_data_provider_v3_get_reserves_data) * [Function `get_user_reserves_data`](https://aave.github.io/aptos-aave-v3/aave-pool/ui_pool_data_provider_v3/#0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea_ui_pool_data_provider_v3_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
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::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, u8) [« Previous](https://aave.github.io/aptos-aave-v3/aave-pool/ui_incentive_data_provider_v3/) [Next »](https://aave.github.io/aptos-aave-v3/aave-pool/user_logic/) ---