Module 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_token_logic

@title Pool Token Logic Module @author Aave @notice Implements token-related logic for the Aave protocol pool

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<address>)

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<address>)

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<address>, 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)