Pool Configurator
The PoolConfigurator contract implements the configuration methods for the Nexus 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
Initializes multiple reserves using the array of initialization parameters as input.
Input Parameters:
input
ConfiguratorInputTypes.InitReserveInput[]
The array of initialization parameters
The ConfiguratorInputTypes.InitReserveInput[]
struct is composed of the following fields:
zTokenImpl
address
The address of the zToken contract implementation
variableDebtTokenImpl
address
The address of the variable debt token contract
useVirtualBalance
bool
true if reserve is utilising virtual balance accounting
interestRateStrategyAddress
address
The address of the interest rate strategy contract for this reserve
underlyingAsset
address
The address of the underlying asset
treasury
address
The address of the treasury
incentivesController
address
The address of the incentives controller for this zToken
zTokenName
string
The name of the zToken
zTokenSymbol
string
The symbol of the zToken
variableDebtTokenName
string
The name of the variable debt token
variableDebtTokenSymbol
string
The symbol of the variable debt token
params
bytes
A set of encoded parameters for additional initialization
interestRateData
bytes
Encoded interest rate strategy data
Only Emergency Admin Methods
setPoolPause
Pauses or unpauses all the protocol reserves. In the paused state all the protocol interactions are suspended.
Input Parameters:
paused
bool
true if the protocol needs to be paused, otherwise false
Only Emergency Or Pool Admin Methods
setReservePause
Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay, liquidate, ztoken transfers).
Input Parameters:
asset
address
The address of the underlying asset of the reserve
paused
bool
true
if pausing the reserve, false
if unpausing the reserve
Only Pool Admin Methods
updateZToken
Updates the zToken implementation for the reserve. Takes the zToken update parameters as input.
Input Parameters:
input
ConfiguratorInputTypes.UpdateZTokenInput
The zToken update parameters
The ConfiguratorInputTypes.UpdateZTokenInput struct is composed of the following fields:
asset
address
The address of the underlying asset of the reserve
treasury
address
The address of the treasury
incentivesController
address
The address of the incentives controller for this zToken
name
string
The name of the zToken
symbol
string
The symbol of the zToken
implementation
address
The new zToken implementation
params
bytes
A set of encoded parameters for additional initialization
updateVariableDebtToken
Input Parameters:
input
ConfiguratorInputTypes.UpdateDebtTokenInput
The variableDebtToken update parameters
The ConfiguratorInputTypes.UpdateDebtTokenInput
struct is composed of the following fields:
asset
address
The address of the underlying asset of the reserve
incentivesController
address
The address of the incentives controller for this variableDebtToken
name
string
The name of the variableDebtToken
symbol
string
The symbol of the variableDebtToken
implementation
address
The new variableDebtToken implementation
params
bytes
A set of encoded parameters for additional initialization
setReserveActive
Activate or deactivate a reserve.
Input Parameters:
asset
address
The address of the underlying asset of the reserve
active
bool
true if the reserve needs to be active, false otherwise
updateBridgeProtocolFee
Updates the bridge fee collected by the protocol reserves.
Input Parameters:
newBridgeProtocolFee
uint256
The part of the fee sent to the protocol treasury, expressed in bps
setReserveFlashLoaning
Enables or disables flash loans for a reserve.
Input Parameters:
asset
address
Address of the reserve asset
enabled
bool
true to enable, false to disable
Only Risk Or Pool Admins Methods
setReserveBorrowing
Input 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.
Input 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
setReserveFreeze
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:
asset
address
The address of the underlying asset of the reserve
freeze
bool
true if the reserve needs to be frozen, false otherwise
setBorrowableInIsolation
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:
asset
address
The address of the underlying asset of the reserve
borrowable
bool
true if the asset should be borrowable in isolation, false otherwise
setReserveFactor
Updates the reserve factor of a reserve.
Input Parameters:
asset
address
The address of the underlying asset of the reserve
newReserveFactor
uint256
The new reserve factor of the reserve
setDebtCeiling
Sets the debt ceiling for an asset.
Input Parameters:
asset
address
The address of the underlying asset of the reserve
newDebtCeiling
uint256
The new debt ceiling
disableLiquidationGracePeriod
Disables the liquidation grace period for a reserve.
Input Parameters
asset
address
Address of the reserve asset
setLiquidationProtocolFee
Updates the liquidation protocol fee of reserve.
Input 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
setReserveInterestRateData
Sets custom interest rate parameters for a reserve.
Input Parameters:
asset
address
Address of the reserve asset
rateData
bytes
Encodes rate strategy parameters
setReserveInterestRateStrategyAddress
Sets the interest rate strategy of a reserve.
Input Parameters:
asset
address
The address of the underlying asset of the reserve
rateStrategyAddress
address
The address of the interest strategy contract
rateData
bytes
Encoded interst rate strategy data
Pure Methods
getRevision
Returns the revision number of the contract. Needs to be defined in the inherited class as a constant.
Returns 0x1
.
Return Values:
uint256
The revision number
Last updated
Was this helpful?