PoolConfigurator

Implements the configuration methods for the ParaSpace protocol

_addressesProvider

contract IPoolAddressesProvider _addressesProvider

_pool

contract IPool _pool

onlyPoolAdmin

modifier onlyPoolAdmin()

Only pool admin can call functions marked by this modifier.

onlyEmergencyAdmin

modifier onlyEmergencyAdmin()

Only emergency admin can call functions marked by this modifier.

onlyEmergencyOrPoolAdmin

modifier onlyEmergencyOrPoolAdmin()

Only emergency or pool admin can call functions marked by this modifier.

onlyAssetListingOrPoolAdmins

modifier onlyAssetListingOrPoolAdmins()

Only asset listing or pool admin can call functions marked by this modifier.

onlyRiskOrPoolAdmins

modifier onlyRiskOrPoolAdmins()

Only risk or pool admin can call functions marked by this modifier.

CONFIGURATOR_REVISION

uint256 CONFIGURATOR_REVISION

getRevision

function getRevision() internal pure virtual returns (uint256)

Returns the revision number of the contract

Needs to be defined in the inherited class as a constant.

Return Values

NameTypeDescription

[0]

uint256

The revision number

initialize

function initialize(contract IPoolAddressesProvider provider) external

initReserves

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

Initializes multiple reserves.

Parameters

NameTypeDescription

input

struct ConfiguratorInputTypes.InitReserveInput[]

The array of initialization parameters

dropReserve

function dropReserve(address asset) external

Drops a reserve entirely.

Parameters

NameTypeDescription

asset

address

The address of the reserve to drop

updatePToken

function updatePToken(struct ConfiguratorInputTypes.UpdatePTokenInput input) external

Updates the pToken implementation for the reserve.

Parameters

NameTypeDescription

input

struct ConfiguratorInputTypes.UpdatePTokenInput

The pToken update parameters

updateNToken

function updateNToken(struct ConfiguratorInputTypes.UpdateNTokenInput input) external

Updates the nToken implementation for the reserve.

Parameters

NameTypeDescription

input

struct ConfiguratorInputTypes.UpdateNTokenInput

The nToken update parameters

updateVariableDebtToken

function updateVariableDebtToken(struct ConfiguratorInputTypes.UpdateDebtTokenInput input) external

Updates the variable debt token implementation for the asset.

Parameters

NameTypeDescription

input

struct ConfiguratorInputTypes.UpdateDebtTokenInput

The variableDebtToken update parameters

setReserveBorrowing

function setReserveBorrowing(address asset, bool enabled) external

Configures borrowing on a reserve.

Can only be disabled (set to false) if stable borrowing is disabled

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

enabled

bool

True if borrowing needs to be enabled, false otherwise

configureReserveAsCollateral

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

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

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

ltv

uint256

The loan to value of the asset when used as collateral

liquidationThreshold

uint256

The threshold at which loans using this asset as collateral will be considered undercollateralized

liquidationBonus

uint256

The bonus liquidators receive to liquidate this asset

setReserveActive

function setReserveActive(address asset, bool active) external

Activate or deactivate a reserve

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

active

bool

True if the reserve needs to be active, false otherwise

setReserveFreeze

function setReserveFreeze(address asset, bool freeze) external

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

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

freeze

bool

True if the reserve needs to be frozen, false otherwise

setReservePause

function setReservePause(address asset, bool paused) public

Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay, swap interest rate, liquidate, xtoken transfers).

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

paused

bool

True if pausing the reserve, false if unpausing

setReserveFactor

function setReserveFactor(address asset, uint256 newReserveFactor) external

Updates the reserve factor of a reserve.

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

newReserveFactor

uint256

The new reserve factor of the reserve

setSiloedBorrowing

function setSiloedBorrowing(address asset, bool newSiloed) external

Sets siloed borrowing for an asset

Parameters

NameTypeDescription

asset

address

newSiloed

bool

setBorrowCap

function setBorrowCap(address asset, uint256 newBorrowCap) external

Updates the borrow cap of a reserve.

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

newBorrowCap

uint256

The new borrow cap of the reserve

setSupplyCap

function setSupplyCap(address asset, uint256 newSupplyCap) external

Updates the supply cap of a reserve.

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

newSupplyCap

uint256

The new supply cap of the reserve

setLiquidationProtocolFee

function setLiquidationProtocolFee(address asset, uint256 newFee) external

Updates the liquidation protocol fee of reserve.

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

newFee

uint256

The new liquidation protocol fee of the reserve, expressed in bps

setReserveInterestRateStrategyAddress

function setReserveInterestRateStrategyAddress(address asset, address newRateStrategyAddress) external

Sets the interest rate strategy of a reserve.

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

newRateStrategyAddress

address

The address of the new interest strategy contract

setReserveAuctionStrategyAddress

function setReserveAuctionStrategyAddress(address asset, address newAuctionStrategyAddress) external

Sets the auction strategy of a reserve

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

newAuctionStrategyAddress

address

The address of the new auction strategy contract

setPoolPause

function setPoolPause(bool paused) external

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

Parameters

NameTypeDescription

paused

bool

True if protocol needs to be paused, false otherwise

setAuctionRecoveryHealthFactor

function setAuctionRecoveryHealthFactor(uint64 value) external

set the auction recovery health factor

Parameters

NameTypeDescription

value

uint64

The auction recovery health factor

_checkNoSuppliers

function _checkNoSuppliers(address asset) internal view

_checkNoBorrowers

function _checkNoBorrowers(address asset) internal view

_onlyPoolAdmin

function _onlyPoolAdmin() internal view

_onlyEmergencyAdmin

function _onlyEmergencyAdmin() internal view

_onlyPoolOrEmergencyAdmin

function _onlyPoolOrEmergencyAdmin() internal view

_onlyAssetListingOrPoolAdmins

function _onlyAssetListingOrPoolAdmins() internal view

_onlyRiskOrPoolAdmins

function _onlyRiskOrPoolAdmins() internal view