😀
Nexus Market
  • Introduction
    • 👋Hi !
    • Overview
      • Start BUIDLing
  • Links
    • Money Market App
    • Github
    • Telegram
  • Concepts
    • At a Glance
      • Supply
      • Borrow
      • Repay
      • Withdraw
      • Liquidation
      • Flash Loan
      • Risks
    • Protocol
      • Liquidity Pool
      • Reserve
      • Oracle
      • Governance
      • Incentives
      • Safety Module
  • LST as Collateral
  • Coming Soon
  • Guides
    • User Flows
    • Follow-on Steps
  • Developers
    • Smart Contract
      • Pool
      • L2 Pool
      • Wrapped Token Gateway
      • View Contracts
      • Incentives
      • Tokenisation
      • Interest Rate Strategy
      • Access Control Manager
      • Oracles
      • PoolAddressesProvider
      • Pool Configurator
      • Switch Adapters
    • Safety Module
    • Governance
    • Flash Loan
      • Premium Distribution
      • Example Calculation
  • Credit Delegation
  • Resources
    • Web3
    • Glossary
    • Contracts Dashboard
      • Ethereum Sepolia
      • Base Sepolia
      • BSC Chapel
    • Parameters Dashboard
    • Access Control Dashboard
    • FAQ
      • General
      • Risk
      • Supplying and Earning
      • Borrowing
      • Liquidations
      • Governance
      • Safety Module
      • Developers
      • Other Features
      • Brand-related
Powered by GitBook
On this page
  • Write Methods
  • Only Asset Listing Or Pool Admins Methods
  • Only Emergency Admin Methods
  • Only Emergency Or Pool Admin Methods
  • Only Pool Admin Methods
  • Only Risk Or Pool Admins Methods
  • Pure Methods

Was this helpful?

  1. Developers
  2. Smart Contract

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

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

Initializes multiple reserves using the array of initialization parameters as input.

Input Parameters:

Name
Type
Description

input

ConfiguratorInputTypes.InitReserveInput[]

The array of initialization parameters

The ConfiguratorInputTypes.InitReserveInput[] struct is composed of the following fields:

Name
Type
Description

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

function setPoolPause(bool paused) external override onlyEmergencyOrPoolAdmin

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

Input Parameters:

Name
Type
Description

paused

bool

true if the protocol needs to be paused, otherwise false

Only Emergency Or Pool Admin Methods

setReservePause

function setReservePause(address asset, bool paused) public override onlyEmergencyOrPoolAdmin

Pauses a reserve. A paused reserve does not allow any interaction (supply, borrow, repay, liquidate, ztoken transfers).

Input Parameters:

Name
Type
Description

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

function updateZToken(ConfiguratorInputTypes.UpdateZTokenInput calldata input) external override onlyPoolAdmin

Updates the zToken implementation for the reserve. Takes the zToken update parameters as input.

Input Parameters:

Name
Type
Description

input

ConfiguratorInputTypes.UpdateZTokenInput

The zToken update parameters

The ConfiguratorInputTypes.UpdateZTokenInput struct is composed of the following fields:

Name
Type
Description

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

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

Input Parameters:

Name
Type
Description

input

ConfiguratorInputTypes.UpdateDebtTokenInput

The variableDebtToken update parameters

The ConfiguratorInputTypes.UpdateDebtTokenInput struct is composed of the following fields:

Name
Type
Description

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

function setReserveActive(address asset, bool active) external override onlyPoolAdmin

Activate or deactivate a reserve.

Input Parameters:

Name
Type
Description

asset

address

The address of the underlying asset of the reserve

active

bool

true if the reserve needs to be active, false otherwise

updateBridgeProtocolFee

function updateBridgeProtocolFee(uint256 newBridgeProtocolFee) external override onlyPoolAdmin

Updates the bridge fee collected by the protocol reserves.

Input Parameters:

Name
Type
Description

newBridgeProtocolFee

uint256

The part of the fee sent to the protocol treasury, expressed in bps

setReserveFlashLoaning

function setReserveFlashLoaning(address asset, bool enabled) external override onlyRiskOrPoolAdmins

Enables or disables flash loans for a reserve.

Input Parameters:

Name
Type
Description

asset

address

Address of the reserve asset

enabled

bool

true to enable, false to disable

Only Risk Or Pool Admins Methods

setReserveBorrowing

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

Input Parameters:

Name
Type
Description

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 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:

Name
Type
Description

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

function setReserveFreeze(address asset, bool freeze) external override onlyRiskOrPoolAdmins

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:

Name
Type
Description

asset

address

The address of the underlying asset of the reserve

freeze

bool

true if the reserve needs to be frozen, false otherwise

setBorrowableInIsolation

function setBorrowableInIsolation(address asset, bool borrowable) external override onlyRiskOrPoolAdmins

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:

Name
Type
Description

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

function setReserveFactor(address asset, uint256 newReserveFactor) external override onlyRiskOrPoolAdmins

Updates the reserve factor of a reserve.

Input Parameters:

Name
Type
Description

asset

address

The address of the underlying asset of the reserve

newReserveFactor

uint256

The new reserve factor of the reserve

setDebtCeiling

function setDebtCeiling(address asset, uint256 newDebtCeiling) external override onlyRiskOrPoolAdmins

Sets the debt ceiling for an asset.

Input Parameters:

Name
Type
Description

asset

address

The address of the underlying asset of the reserve

newDebtCeiling

uint256

The new debt ceiling

disableLiquidationGracePeriod

function disableLiquidationGracePeriod(address asset) external override onlyEmergencyOrPoolAdmin

Disables the liquidation grace period for a reserve.

Input Parameters

Name
Type
Description

asset

address

Address of the reserve asset

setLiquidationProtocolFee

function setLiquidationProtocolFee(address asset, uint256 newFee) external override onlyRiskOrPoolAdmins

Updates the liquidation protocol fee of reserve.

Input Parameters:

Name
Type
Description

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

function setReserveInterestRateData(address asset, bytes calldata rateData) external onlyRiskOrPoolAdmins

Sets custom interest rate parameters for a reserve.

Input Parameters:

Name
Type
Description

asset

address

Address of the reserve asset

rateData

bytes

Encodes rate strategy parameters

setReserveInterestRateStrategyAddress

function setReserveInterestRateStrategyAddress(address asset, address rateStrategyAddress, bytes calldata rateData) external override onlyRiskOrPoolAdmins

Sets the interest rate strategy of a reserve.

Input Parameters:

Name
Type
Description

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

function getRevision() internal pure virtual override returns (uint256)

Returns the revision number of the contract. Needs to be defined in the inherited class as a constant.

Returns 0x1.

Return Values:

Type
Description

uint256

The revision number

PreviousPoolAddressesProviderNextSwitch Adapters

Last updated 9 days ago

Was this helpful?