Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

PoolConfigurator

Overview

PoolConfigurator is the privileged admin surface for Pool. It is the only contract authorised to call configuration-mutating functions on Pool (via the onlyPoolConfigurator modifier). End users never call it directly; governance and risk managers do.

Like Pool, PoolConfigurator is upgradeable through the PoolAddressesProvider.

Access control

Method-level role checks are enforced by the following modifiers (PoolConfigurator.sol):

ModifierRoles permitted
onlyPoolAdminPOOL_ADMIN_ROLE
onlyEmergencyAdminEMERGENCY_ADMIN_ROLE
onlyEmergencyOrPoolAdminEMERGENCY_ADMIN_ROLE or POOL_ADMIN_ROLE
onlyAssetListingOrPoolAdminsASSET_LISTING_ADMIN_ROLE or POOL_ADMIN_ROLE
onlyRiskOrPoolAdminsRISK_ADMIN_ROLE or POOL_ADMIN_ROLE

Role constants are defined on ACLManager as keccak256 hashes of their seed strings (e.g. POOL_ADMIN_ROLE = keccak256('POOL_ADMIN')).

Reserve listing and lifecycle

initReserves — onlyAssetListingOrPoolAdmins

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

Creates new reserves. For each input the configurator:

  1. Deploys proxies for the AToken, StableDebtToken, and VariableDebtToken backed by the provided implementations.
  2. Calls IInitializableAToken.initialize and IInitializableDebtToken.initialize on each proxy.
  3. Calls Pool.initReserve with the three new token addresses and the interest-rate strategy.
  4. Sets the reserve to active = true, paused = false, frozen = false, with the supplied underlyingAssetDecimals.

Emits ReserveInitialized.

dropReserve — onlyPoolAdmin

function dropReserve(address asset) external

Removes a reserve from the active list. Requires zero AToken supply, zero stable debt, zero variable debt, and zero accruedToTreasury on the reserve.

updateAToken / updateStableDebtToken / updateVariableDebtToken — onlyPoolAdmin

function updateAToken(ConfiguratorInputTypes.UpdateATokenInput calldata input) external
function updateStableDebtToken(ConfiguratorInputTypes.UpdateDebtTokenInput calldata input) external
function updateVariableDebtToken(ConfiguratorInputTypes.UpdateDebtTokenInput calldata input) external

Upgrade the implementation behind each token proxy and re-initialise it with the supplied metadata (name, symbol, incentives controller, params).

Reserve risk parameters — onlyRiskOrPoolAdmins

FunctionEffect
setReserveBorrowing(asset, enabled)Toggle bit 58 (borrowing enabled). Disabling requires stable-rate borrowing to already be off for the reserve.
setReserveStableRateBorrowing(asset, enabled)Toggle bit 59. Enabling requires variable borrowing to already be enabled.
setReserveFlashLoaning(asset, enabled)Toggle bit 63 (flash-loan enabled).
configureReserveAsCollateral(asset, ltv, liquidationThreshold, liquidationBonus)Set LTV/LT/LB together. Enforces ltv ≤ liquidationThreshold, liquidationBonus > 1e4, and liquidationThreshold * liquidationBonus ≤ 1e4. Setting liquidationThreshold = 0 (disable as collateral) requires liquidationBonus == 0 and zero AToken supply.
setReserveFactor(asset, newReserveFactor)Set the share of borrower interest accruing to treasury. Capped at 1e4 (100%).
setReserveFreeze(asset, freeze)Bit 57. Frozen reserves block supply and borrow but still allow repay, withdraw, and liquidation.
setBorrowCap(asset, newBorrowCap)Cap on total borrow in whole tokens (0 = no cap).
setSupplyCap(asset, newSupplyCap)Cap on total supply in whole tokens (0 = no cap).
setLiquidationProtocolFee(asset, newFee)Share of the liquidation bonus routed to treasury. Capped at 1e4.
setBorrowableInIsolation(asset, borrowable)Bit 61. Determines whether the asset can be borrowed by isolation-mode users.
setDebtCeiling(asset, newDebtCeiling)Isolation-mode debt cap in 2-decimal USD. Setting from 0 to non-zero requires zero AToken supply. Setting to 0 calls Pool.resetIsolationModeTotalDebt(asset).
setSiloedBorrowing(asset, newSiloed)Bit 62. Setting to true requires zero total debt on the reserve.
setUnbackedMintCap(asset, newUnbackedMintCap)Cap on bridge-minted unbacked AToken supply (whole tokens; 0 disables minting).
setReserveInterestRateStrategyAddress(asset, newRateStrategyAddress)Swap the asset's interest-rate strategy.
setEModeCategory(categoryId, ltv, liquidationThreshold, liquidationBonus, oracle, label)Create or update an e-mode category (categoryId != 0). Enforces the same math constraints as configureReserveAsCollateral and additionally requires any reserves already in the category to keep ltv and liquidationThreshold no higher than the new category values.
setAssetEModeCategory(asset, newCategoryId)Bind a reserve to an e-mode category. Requires the category's liquidationThreshold to exceed the reserve's individual liquidationThreshold.

Emergency controls

setReservePause — onlyEmergencyOrPoolAdmin

function setReservePause(address asset, bool paused) public

Toggle bit 60. Pausing blocks supply, withdraw, borrow, repay, liquidation, transfer, and rate-mode swap on that reserve.

setPoolPause — onlyEmergencyAdmin

function setPoolPause(bool paused) external

Convenience that iterates Pool.getReservesList() and calls setReservePause on each.

setReserveActive — onlyPoolAdmin

function setReserveActive(address asset, bool active) external

Toggle bit 56. Deactivating requires zero AToken supply and zero accruedToTreasury.

Premiums and bridge fee — onlyPoolAdmin

  • updateFlashloanPremiumTotal(newFlashloanPremiumTotal) — total fee in bps, capped at 1e4.
  • updateFlashloanPremiumToProtocol(newFlashloanPremiumToProtocol) — protocol's share of the total premium, in bps.
  • updateBridgeProtocolFee(newBridgeProtocolFee) — bps fee on backUnbacked, capped at 1e4.

Events

ReserveInitialized, ReserveDropped, ReserveBorrowing, ReserveStableRateBorrowing, ReserveFlashLoaning, ReserveActive, ReserveFrozen, ReservePaused, BorrowableInIsolationChanged, CollateralConfigurationChanged, ReserveFactorChanged, DebtCeilingChanged, SiloedBorrowingChanged, BorrowCapChanged, SupplyCapChanged, LiquidationProtocolFeeChanged, UnbackedMintCapChanged, EModeCategoryAdded, EModeAssetCategoryChanged, ReserveInterestRateStrategyChanged, BridgeProtocolFeeUpdated, FlashloanPremiumTotalUpdated, FlashloanPremiumToProtocolUpdated, ATokenUpgraded, StableDebtTokenUpgraded, VariableDebtTokenUpgraded.