aave-config

Only Asset Listing Or Pool Admins Methods

init_reserves

public entry fun init_reserves(    account: &signer,    underlying_asset: vector<address>,    treasury: vector<address>,    a_token_name: vector<String>,    a_token_symbol: vector<String>,    variable_debt_token_name: vector<String>,    variable_debt_token_symbol: vector<String>)

Initializes multiple reserves using the arrays of initialization parameters as input. Only callable by accounts with the Asset Listing Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
underlying_assetvector<address>The addresses of the underlying assets
treasuryvector<address>The addresses of the aToken contract implementations
a_token_namevector<String>The addresses of the variable debt token contracts
a_token_symbolvector<String>The addresses of the interest rate strategy contracts
variable_debt_token_namevector<String>The names of the aTokens
variable_debt_token_symbolvector<String>The symbols of the aTokens

Only Emergency Admin Methods

set_pool_pause

public entry fun set_pool_pause(    account: &signer, paused: bool, grace_period: u64)

Pauses or unpauses all the protocol reserves. In the paused state all the protocol interactions are suspended. Only callable by accounts with the Emergency Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
pausedbooltrue if the protocol needs to be paused, otherwise false
grace_periodu64Count of seconds after unpause during which liquidations will not be available

Only Emergency Or Pool Admin Methods

set_reserve_pause

public entry fun set_reserve_pause(    account: &signer,    asset: address,    paused: bool,    grace_period: u64)

Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay, liquidate, atoken transfers). Only callable by accounts with the Emergency Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
pausedbooltrue if pausing the reserve, false if unpausing the reserve
grace_periodu64Count of seconds after unpause during which liquidations will not be available

Only Pool Admin Methods

drop_reserve

public entry fun drop_reserve(    account: &signer,    asset: address)

Drops a reserve entirely. Only callable by accounts with the Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the reserve to drop

set_reserve_active

public entry fun set_reserve_active(    account: &signer,    asset: address,    active: bool)

Activate or deactivate a reserve. Only callable by accounts with the Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
activebooltrue if the reserve needs to be active, false otherwise

update_flashloan_premium_total

public entry fun update_flashloan_premium_total(    account: &signer,    new_flashloan_premium_total: u128)

Updates the total flash loan premium. The premium is calculated on the total amount borrowed, and is expressed in bps. Only callable by accounts with the Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
new_flashloan_premium_totalu128The total flashloan premium

update_flashloan_premium_to_protocol

public entry fun update_flashloan_premium_to_protocol(    account: &signer,    new_flashloan_premium_to_protocol: u128)

Updates the flash loan premium collected by protocol reserves. The premium to protocol is calculated on the total flashloan premium, and is expressed in bps. Only callable by accounts with the Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
new_flashloan_premium_to_protocolu128The part of the flashloan premium sent to the protocol treasury

Only Risk Or Pool Admins Methods

set_reserve_borrowing

public entry fun set_reserve_borrowing(    account: &signer,    asset: address,    enabled: bool)

Enables or disables borrowing on a reserve. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
enabledbooltrue if borrowing needs to be enabled, false otherwise

set_reserve_flash_loaning

public entry fun set_reserve_flash_loaning(    account: &signer,    asset: address,    enabled: bool)

Enables or disables flash loans for a reserve. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressAddress of the reserve asset
enabledbooltrue to enable, false to disable

configure_reserve_as_collateral

public entry fun configure_reserve_as_collateral(    account: &signer,    asset: address,    ltv: u256,    liquidation_threshold: u256,    liquidation_bonus: u256)

Configures the reserve collateralization parameters. All the values are expressed in bps. A value of 10000 results in 100.00%. The liquidation_bonus is always above 100%. A value of 10500 means the liquidator will receive a 5% bonus. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
ltvu256The loan to value of the asset when used as collateral
liquidation_thresholdu256The threshold at which loans using this asset as collateral will be considered undercollateralized
liquidation_bonusu256The bonus liquidators receive to liquidate this asset

set_reserve_freeze

public entry fun set_reserve_freeze(    account: &signer,    asset: address,    freeze: bool)

Freeze or unfreeze a reserve. A frozen reserve doesn't allow any new supply or borrow but allows repayments, liquidations, rate rebalances and withdrawals. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
freezebooltrue if the reserve needs to be frozen, false otherwise

set_borrowable_in_isolation

public entry fun set_borrowable_in_isolation(    account: &signer,    asset: address,    borrowable: bool)

Sets the borrowable in isolation flag for the reserve. 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. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
borrowablebooltrue if the asset should be borrowable in isolation, false otherwise

set_reserve_factor

public entry fun set_reserve_factor(    account: &signer,    asset: address,    new_reserve_factor: u256)

Updates the reserve factor of a reserve. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
new_reserve_factoru256The new reserve factor of the reserve

set_debt_ceiling

public entry fun set_debt_ceiling(    account: &signer,    asset: address,    new_debt_ceiling: u256)

Sets the debt ceiling for an asset. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
new_debt_ceilingu256The new debt ceiling

set_siloed_borrowing

public entry fun set_siloed_borrowing(    account: &signer,    asset: address,    new_siloed: bool)

Sets siloed borrowing for an asset. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
new_siloedboolThe new siloed borrowing state - enable or disable siloed borrowing for the reserve

set_borrow_cap

public entry fun set_borrow_cap(    account: &signer,    asset: address,    new_borrow_cap: u256)

Updates the borrow cap of a reserve. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
new_borrow_capu256The new borrow cap of the reserve in whole tokens. A borrow cap of 0 signifies that there is no cap

set_supply_cap

public entry fun set_supply_cap(    account: &signer,    asset: address,    new_supply_cap: u256)

Updates the supply cap of a reserve. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
new_supply_capu256The new supply cap of the reserve in whole tokens. A supply cap of 0 signifies that there is no cap

disable_liquidation_grace_period

public entry fun disable_liquidation_grace_period(    account: &signer,    asset: address)

Disables the liquidation grace period for a reserve. Only callable by accounts with the Emergency Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressAddress of the reserve asset

set_liquidation_protocol_fee

public entry fun set_liquidation_protocol_fee(    account: &signer,    asset: address,    new_fee: u256)

Updates the liquidation protocol fee of reserve. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
new_feeu256The new liquidation protocol fee of the reserve, expressed in bps

set_emode_category

public entry fun set_emode_category(    account: &signer,    category_id: u8,    ltv: u16,    liquidation_threshold: u16,    liquidation_bonus: u16,    label: String)

Adds a new efficiency mode (eMode) category. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
category_idu8The id of the category to be configured. category_id ≠ 0. NOTE: category 0 is reserved for the default category i.e. non-eMode
ltvu16The loan to value for the associated eMode category. It must be less than or equal to the liquidationThreshold
liquidation_thresholdu16The liquidation threshold associated with the category
liquidation_bonusu16The liquidation bonus associated with the category
labelStringA custom label identifying the category

set_asset_emode_category

public entry fun set_asset_emode_category(    account: &signer,    asset: address,    new_category_id: u8)

Sets the efficiency mode category for an asset. Only callable by accounts with the Risk Admin or Pool Admin role.

Input Parameters:

NameTypeDescription
account&signerThe signer account of the caller
assetaddressThe address of the underlying asset of the reserve
new_category_idu8The new eMode category for the asset

Aave.com provides information and resources about the fundamentals of the decentralised non-custodial liquidity protocol called the Aave Protocol, comprised of open-source self-executing smart contracts that are deployed on various permissionless public blockchains, such as Ethereum (the "Aave Protocol" or the "Protocol"). Aave Labs does not control or operate any version of the Aave Protocol on any blockchain network.