Skip to Content
docs

Aave V3 Pool Configurator Contract

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.

Asset Listing or Pool Admin Methods

initReserves

Solidity
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
underlyingAssetaddressThe address of the underlying asset
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

Emergency or Pool Admin Methods

setPoolPause

Solidity
function setPoolPause(bool paused, uint40 gracePeriod) public override onlyEmergencyOrPoolAdmin
function setPoolPause(bool paused) external override onlyEmergencyOrPoolAdmin

Pauses or unpauses all the protocol reserves. In the paused state all the protocol interactions are suspended. The overload without gracePeriod uses a grace period of 0.

Input Parameters:

NameTypeDescription
pausedbooltrue if the protocol needs to be paused, otherwise false
gracePerioduint40Seconds after unpausing during which liquidations stay blocked, capped by MAX_GRACE_PERIOD()

setReservePause

Solidity
function setReservePause(address asset, bool paused, uint40 gracePeriod) public override onlyEmergencyOrPoolAdmin
function setReservePause(address asset, bool paused) external override onlyEmergencyOrPoolAdmin

Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay, liquidate, aToken transfers). The overload without gracePeriod uses a grace period of 0.

Input Parameters:

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
pausedbooltrue if pausing the reserve, false if unpausing the reserve
gracePerioduint40Seconds after unpausing during which liquidations stay blocked, capped by MAX_GRACE_PERIOD()

disableLiquidationGracePeriod

Solidity
function disableLiquidationGracePeriod(address asset) external override onlyEmergencyOrPoolAdmin

Disables the liquidation grace period for a reserve.

Input Parameters:

NameTypeDescription
assetaddressAddress of the reserve asset

Pool Admin Methods

updateAToken

Solidity
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
namestringThe name of the aToken
symbolstringThe symbol of the aToken
implementationaddressThe new aToken implementation
paramsbytesA set of encoded parameters for additional initialization

updateVariableDebtToken

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

Updates the variable debt token implementation for the reserve.

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
namestringThe name of the variableDebtToken
symbolstringThe symbol of the variableDebtToken
implementationaddressThe new variableDebtToken implementation
paramsbytesA set of encoded parameters for additional initialization

setReserveActive

Solidity
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

updateFlashloanPremium

Solidity
function updateFlashloanPremium(uint128 newFlashloanPremium) external override onlyPoolAdmin

Updates the flash loan premium. The premium is calculated on the total amount borrowed, is expressed in bps, and is collected in full by the protocol treasury.

Input Parameters:

NameTypeDescription
newFlashloanPremiumuint128The flash loan premium, expressed in bps

Risk or Pool Admin Methods

setReserveFlashLoaning

Solidity
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

setReserveBorrowing

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

Enables or disables borrowing on a reserve.

Input Parameters:

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

configureReserveAsCollateral

Solidity
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

setReserveFactor

Solidity
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

setBorrowCap

Solidity
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

Solidity
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

setLiquidationProtocolFee

Solidity
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

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

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

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-E-Mode
ltvuint16The loan to value for the associated E-Mode 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
isolatedboolIf true, users with collateral outside the category cannot enter it, and assets outside the category get LTV 0 (Aave V3.7)

setAssetCollateralInEMode

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

Assign collateral status to an asset for a particular efficiency mode (E-Mode) 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
categoryIduint8E-Mode category id to set asset collateral status for
allowedbooltrue if asset is enabled as collateral in designated categoryId

setAssetBorrowableInEMode

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

Configures if an asset can be borrowed in a specific E-Mode category.

Input Parameters:

NameTypeDescription
assetaddressAddress of the reserve asset
categoryIduint8E-Mode category ID
borrowablebooltrue to enable, false to disable

setReserveInterestRateData

Solidity
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

Risk, Pool or Emergency Admin Methods

setReserveFreeze

Solidity
function setReserveFreeze(address asset, bool freeze) external override onlyRiskOrPoolOrEmergencyAdmins

Freeze or unfreeze a reserve. A frozen reserve doesn’t allow new supply or borrow but allows repayments, liquidations and withdrawals. Freezing also sets the reserve LTV to zero, including in every E-Mode where it is collateral.

Input Parameters:

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

setEModeCategoryIsolated

Solidity
function setEModeCategoryIsolated(uint8 categoryId, bool isolated) external onlyRiskOrPoolOrEmergencyAdmins

Sets the isolated flag of an E-Mode category. When true, users with collateral enabled outside the category cannot enter it, and assets outside the category get LTV 0. The liquidation threshold is unaffected, so the Health Factor of existing positions is preserved. Added in Aave V3.7.

Input Parameters:

NameTypeDescription
categoryIduint8The E-Mode category id
isolatedbooltrue if the E-Mode category is isolated