PoolConfigurator
Implements the configuration methods for the ParaSpace protocol
_addressesProvider
_pool
onlyPoolAdmin
Only pool admin can call functions marked by this modifier.
onlyEmergencyAdmin
Only emergency admin can call functions marked by this modifier.
onlyEmergencyOrPoolAdmin
Only emergency or pool admin can call functions marked by this modifier.
onlyAssetListingOrPoolAdmins
Only asset listing or pool admin can call functions marked by this modifier.
onlyRiskOrPoolAdmins
Only risk or pool admin can call functions marked by this modifier.
CONFIGURATOR_REVISION
getRevision
Returns the revision number of the contract
Needs to be defined in the inherited class as a constant.
Return Values
[0]
uint256
The revision number
initialize
initReserves
Initializes multiple reserves.
Parameters
input
struct ConfiguratorInputTypes.InitReserveInput[]
The array of initialization parameters
dropReserve
Drops a reserve entirely.
Parameters
asset
address
The address of the reserve to drop
updatePToken
Updates the pToken implementation for the reserve.
Parameters
input
struct ConfiguratorInputTypes.UpdatePTokenInput
The pToken update parameters
updateNToken
Updates the nToken implementation for the reserve.
Parameters
input
struct ConfiguratorInputTypes.UpdateNTokenInput
The nToken update parameters
updateVariableDebtToken
Updates the variable debt token implementation for the asset.
Parameters
input
struct ConfiguratorInputTypes.UpdateDebtTokenInput
The variableDebtToken update parameters
setReserveBorrowing
Configures borrowing on a reserve.
Can only be disabled (set to false) if stable borrowing is disabled
Parameters
asset
address
The address of the underlying asset of the reserve
enabled
bool
True if borrowing needs to be enabled, false otherwise
configureReserveAsCollateral
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
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
Activate or deactivate a reserve
Parameters
asset
address
The address of the underlying asset of the reserve
active
bool
True if the reserve needs to be active, false otherwise
setReserveFreeze
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
asset
address
The address of the underlying asset of the reserve
freeze
bool
True if the reserve needs to be frozen, false otherwise
setReservePause
Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay, swap interest rate, liquidate, xtoken transfers).
Parameters
asset
address
The address of the underlying asset of the reserve
paused
bool
True if pausing the reserve, false if unpausing
setReserveFactor
Updates the reserve factor of a reserve.
Parameters
asset
address
The address of the underlying asset of the reserve
newReserveFactor
uint256
The new reserve factor of the reserve
setSiloedBorrowing
Sets siloed borrowing for an asset
Parameters
asset
address
newSiloed
bool
setBorrowCap
Updates the borrow cap of a reserve.
Parameters
asset
address
The address of the underlying asset of the reserve
newBorrowCap
uint256
The new borrow cap of the reserve
setSupplyCap
Updates the supply cap of a reserve.
Parameters
asset
address
The address of the underlying asset of the reserve
newSupplyCap
uint256
The new supply cap of the reserve
setLiquidationProtocolFee
Updates the liquidation protocol fee of reserve.
Parameters
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
Sets the interest rate strategy of a reserve.
Parameters
asset
address
The address of the underlying asset of the reserve
newRateStrategyAddress
address
The address of the new interest strategy contract
setReserveAuctionStrategyAddress
Sets the auction strategy of a reserve
Parameters
asset
address
The address of the underlying asset of the reserve
newAuctionStrategyAddress
address
The address of the new auction strategy contract
setPoolPause
Pauses or unpauses all the protocol reserves. In the paused state all the protocol interactions are suspended.
Parameters
paused
bool
True if protocol needs to be paused, false otherwise
setAuctionRecoveryHealthFactor
set the auction recovery health factor
Parameters
value
uint64
The auction recovery health factor