Pool Configurator

The PoolConfigurator contract implements the configuration methods for the Aave Protocol. The 'write methods' below are grouped by permissioned system roles that are managed by ACLManager.

The source code is available on GitHub.

Write Methods

Only Asset Listing Or Pool Admins Methods

initReserves

function initReserves(ConfiguratorInputTypes.InitReserveInput[] calldata input) external override onlyAssetListingOrPoolAdmins

Initializes multiple reserves using the array of initialization parameters as input.

Input Parameters:

NameTypeDescription
inputConfiguratorInputTypes.InitReserveInput[]The array of initialization parameters

The ConfiguratorInputTypes.InitReserveInput[] struct is composed of the following fields:

NameTypeDescription
aTokenImpladdressThe address of the aToken contract implementation
variableDebtTokenImpladdressThe address of the variable debt token contract
useVirtualBalancebooltrue if reserve is utilising virtual balance accounting
interestRateStrategyAddressaddressThe address of the interest rate strategy contract for this reserve
underlyingAssetaddressThe address of the underlying asset
treasuryaddressThe address of the treasury
incentivesControlleraddressThe address of the incentives controller for this aToken
aTokenNamestringThe name of the aToken
aTokenSymbolstringThe symbol of the aToken
variableDebtTokenNamestringThe name of the variable debt token
variableDebtTokenSymbolstringThe symbol of the variable debt token
paramsbytesA set of encoded parameters for additional initialization
interestRateDatabytesEncoded interest rate strategy data

Only Emergency Admin Methods

setPoolPause

function setPoolPause(bool paused) external override onlyEmergencyOrPoolAdmin

Pauses or unpauses all the protocol reserves. In the paused state all the protocol interactions are suspended.

Input Parameters:

NameTypeDescription
pausedbooltrue if the protocol needs to be paused, otherwise false

Only Emergency Or Pool Admin Methods

setReservePause

function setReservePause(address asset, bool paused) public override onlyEmergencyOrPoolAdmin

Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay, liquidate, atoken transfers).

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
pausedbooltrue if pausing the reserve, false if unpausing the reserve

Only Pool Admin Methods

dropReserve

function dropReserve(address asset) external override onlyPoolAdmin

Drops a reserve entirely.

Input Parameters:

NameTypeDescription
assetaddressThe address of the reserve to drop

updateAToken

function updateAToken(ConfiguratorInputTypes.UpdateATokenInput calldata input) external override onlyPoolAdmin

Updates the aToken implementation for the reserve. Takes the aToken update parameters as input.

Input Parameters:

NameTypeDescription
inputConfiguratorInputTypes.UpdateATokenInputThe aToken update parameters

The ConfiguratorInputTypes.UpdateATokenInput struct is composed of the following fields:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
treasuryaddressThe address of the treasury
incentivesControlleraddressThe address of the incentives controller for this aToken
namestringThe name of the aToken
symbolstringThe symbol of the aToken
implementationaddressThe new aToken implementation
paramsbytesA set of encoded parameters for additional initialization

updateVariableDebtToken

function updateVariableDebtToken(ConfiguratorInputTypes.UpdateDebtTokenInput calldata input) external override onlyPoolAdmin

Input Parameters:

NameTypeDescription
inputConfiguratorInputTypes.UpdateDebtTokenInputThe variableDebtToken update parameters

The ConfiguratorInputTypes.UpdateDebtTokenInput struct is composed of the following fields:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
incentivesControlleraddressThe address of the incentives controller for this variableDebtToken
namestringThe name of the variableDebtToken
symbolstringThe symbol of the variableDebtToken
implementationaddressThe new variableDebtToken implementation
paramsbytesA set of encoded parameters for additional initialization

setReserveActive

function setReserveActive(address asset, bool active) external override onlyPoolAdmin

Activate or deactivate a reserve.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
activebooltrue if the reserve needs to be active, false otherwise

updateBridgeProtocolFee

function updateBridgeProtocolFee(uint256 newBridgeProtocolFee) external override onlyPoolAdmin

Updates the bridge fee collected by the protocol reserves.

Input Parameters:

NameTypeDescription
newBridgeProtocolFeeuint256The part of the fee sent to the protocol treasury, expressed in bps

setReserveFlashLoaning

function setReserveFlashLoaning(address asset, bool enabled) external override onlyRiskOrPoolAdmins

Enables or disables flash loans for a reserve.

Input Parameters:

NameTypeDescription
assetaddressAddress of the reserve asset
enabledbooltrue to enable, false to disable

updateFlashloanPremiumTotal

function updateFlashloanPremiumTotal(uint128 newFlashloanPremiumTotal) external override onlyPoolAdmin

Updates the total flash loan premium. The premium is calculated on the total amount borrowed, and is expressed in bps.

The total flash loan premium consists of two parts:

  • A part is sent to aToken holders as extra balance, and

  • A part is collected by the protocol reserves.

Input Parameters:

NameTypeDescription
newFlashloanPremiumTotaluint128The total flashloan premium

updateFlashloanPremiumToProtocol

function updateFlashloanPremiumToProtocol(uint128 newFlashloanPremiumToProtocol) external override onlyPoolAdmin

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.

Input Parameters:

NameTypeDescription
newFlashloanPremiumToProtocoluint128The part of the flashloan premium sent to the protocol treasury

Only Risk Or Pool Admins Methods

setReserveBorrowing

function setReserveBorrowing(address asset, bool enabled) external override onlyRiskOrPoolAdmins

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
enabledbooltrue if borrowing needs to be enabled, false otherwise

configureReserveAsCollateral

function configureReserveAsCollateral(    address asset,    uint256 ltv,    uint256 liquidationThreshold,    uint256 liquidationBonus) external override onlyRiskOrPoolAdmins

Configures the reserve collateralization parameters. All the values are expressed in bps. A value of 10000 results in 100.00%. The liquidationBonus is always above 100%. A value of 105% means the liquidator will receive a 5% bonus.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
ltvuint256The loan to value of the asset when used as collateral
liquidationThresholduint256The threshold at which loans using this asset as collateral will be considered undercollateralized
liquidationBonusuint256The bonus liquidators receive to liquidate this asset

setReserveFreeze

function setReserveFreeze(address asset, bool freeze) external override onlyRiskOrPoolAdmins

Freeze or unfreeze a reserve. A frozen reserve doesn't allow any new supply or borrow but allows repayments, liquidations, rate rebalances and withdrawals.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
freezebooltrue if the reserve needs to be frozen, false otherwise

setBorrowableInIsolation

function setBorrowableInIsolation(address asset, bool borrowable) external override onlyRiskOrPoolAdmins

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 assets of the same family (e.g. USD stablecoins) should be borrowable in isolation mode to keep consistency in the debt ceiling calculations.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
borrowablebooltrue if the asset should be borrowable in isolation, false otherwise

setReserveFactor

function setReserveFactor(address asset, uint256 newReserveFactor) external override onlyRiskOrPoolAdmins

Updates the reserve factor of a reserve.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
newReserveFactoruint256The new reserve factor of the reserve

setDebtCeiling

function setDebtCeiling(address asset, uint256 newDebtCeiling) external override onlyRiskOrPoolAdmins

Sets the debt ceiling for an asset.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
newDebtCeilinguint256The new debt ceiling

setSiloedBorrowing

function setSiloedBorrowing(address asset, bool newSiloed) external override onlyRiskOrPoolAdmins

Sets siloed borrowing for an asset

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
newSiloedboolThe new siloed borrowing state - enable or disable siloed borrowing for the reserve

setBorrowCap

function setBorrowCap(address asset, uint256 newBorrowCap) external override onlyRiskOrPoolAdmins

Updates the borrow cap of a reserve. Allows RISK_ADMIN and POOL_ADMIN to add/update cap on the total borrow that can be borrowed from the reserve. Once the borrow cap is reached, no more borrow positions for the given reserve asset can be initiated.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
newBorrowCapuint256The new borrow cap of the reserve in whole tokens. A borrow cap of 0 signifies that there is no cap

setSupplyCap

function setSupplyCap(address asset, uint256 newSupplyCap) external override onlyRiskOrPoolAdmins

Updates the supply cap of a reserve. Allows RISK_ADMIN and POOL_ADMIN to add/update liquidity supply cap on the reserve. Once the supply cap is reached, no more liquidity for the given reserve asset can be supplied to the pool.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
newSupplyCapuint256The new supply cap of the reserve in whole tokens. A supply cap of 0 signifies that there is no cap

disableLiquidationGracePeriod

function disableLiquidationGracePeriod(address asset) external override onlyEmergencyOrPoolAdmin

Disables the liquidation grace period for a reserve.

Input Parameters

NameTypeDescription
assetaddressAddress of the reserve asset

setLiquidationProtocolFee

function setLiquidationProtocolFee(address asset, uint256 newFee) external override onlyRiskOrPoolAdmins

Updates the liquidation protocol fee of reserve.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
newFeeuint256The new liquidation protocol fee of the reserve, expressed in bps

setEModeCategory

function setEModeCategory(    uint8 categoryId,    uint16 ltv,    uint16 liquidationThreshold,    uint16 liquidationBonus,    string calldata label) external override onlyRiskOrPoolAdmins

Adds a new efficiency mode (eMode) category. Allows RISK_ADMIN and POOL_ADMIN to configure existing or add new eModeCategory

If zero is provided as oracle address, the default asset oracles will be used to compute the overall debt and overcollateralization of the users using this category. The new ltv and liquidation threshold must be greater than the base ltvs and liquidation thresholds of all assets within the eMode category.

Input Parameters:

NameTypeDescription
categoryIduint8The id of the category to be configured. categoryId ≠ 0. NOTE: category 0 is reserved for the default category i.e. non-eMode
ltvuint16The loan to value for the associated eMode category. It must be less than or equal to the liquidationThreshold
liquidationThresholduint16The liquidation threshold associated with the category
liquidationBonusuint16The liquidation bonus associated with the category
labelstringA custom label identifying the category

setAssetCollateralInEMode

function setAssetCollateralInEMode(address asset, uint8 categoryId, bool allowed) external override onlyRiskOrPoolAdmins

Assign collateral status to an asset for a particular efficiency mode (eMode) category. Allows RISK_ADMIN and POOL_ADMIN to configure eModeCategory of an asset.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
categoryIduint8eMode category id to set asset collateral status for
allowedbooltrue if asset is enabled as collateral in designated categoryId

setAssetBorrowableInEMode

function setAssetBorrowableInEMode(address asset, uint8 categoryId, bool borrowable) external override onlyRiskOrPoolAdmins

Configures if an asset can be borrowed in a specific eMode category.

Input Parameters:

NameTypeDescription
assetaddressAddress of the reserve asset
categoryIduint8eMode category ID
borrowablebooltrue to enable, false to disable

setUnbackedMintCap

function setUnbackedMintCap(address asset, uint256 newUnbackedMintCap) external override onlyRiskOrPoolAdmins

Updates the unbacked mint cap of reserve.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
newUnbackedMintCapuint256The new unbacked mint cap of the reserve

setReserveInterestRateData

function setReserveInterestRateData(address asset, bytes calldata rateData) external onlyRiskOrPoolAdmins

Sets custom interest rate parameters for a reserve.

Input Parameters:

NameTypeDescription
assetaddressAddress of the reserve asset
rateDatabytesEncodes rate strategy parameters

setReserveInterestRateStrategyAddress

function setReserveInterestRateStrategyAddress(address asset, address rateStrategyAddress, bytes calldata rateData) external override onlyRiskOrPoolAdmins

Sets the interest rate strategy of a reserve.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
rateStrategyAddressaddressThe address of the interest strategy contract
rateDatabytesEncoded interst rate strategy data

Pure Methods

getRevision

function getRevision() internal pure virtual override returns (uint256)

Returns the revision number of the contract. Needs to be defined in the inherited class as a constant.

Returns 0x1.

Return Values:

TypeDescription
uint256The revision number

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.