PoolConfigurator
Inherits: VersionedInitializable, IPoolConfigurator, PoolConfiguratorStorage
See the documentation in {IPoolConfigurator}.
State Variables
HUNDRED_PERCENT
POOL_CONFIGURATOR_REVISION
ADDRESSES_PROVIDER
Functions
whenNotPaused
onlyAdminOrGovernor
onlyGovernor
onlyAdmin
onlyPool
constructor
getRevision
Returns the revision number of the contract
Needs to be defined in the inherited class as a constant.
Returns
revision_
uint256
The revision number
initialize
The initializer function for the pool configurator (must be called directly after deployment).
Parameters
provider_
IPoolAddressesProvider
The address of the pool addresses provider.
poolAdmin_
address
The address of the pool admin.
asset_
address
The ERC20 asset used in the lending pool.
name_
string
The name of the pool token.
symbol_
string
The symbol of the pool token.
transferAdmin
Transfers to a new admin.
Parameters
newAdmin_
address
The address of the new admin.
setBuyer
Assigns a buyer to the pool.
Parameters
buyer_
address
The address of the buyer for this pool.
setValidSeller
Sets the status of a seller.
Parameters
seller_
address
The address of the seller.
isValid_
bool
Whether the seller is valid.
setValidLender
Sets the status of a lender (liquidity providers).
Parameters
lender_
address
The address of the lender.
isValid_
bool
Whether the lender is valid.
setAdminFee
Sets the admin fee rate that would be applied to the pool.
Parameters
adminFee_
uint24
The new admin fee.
setOpenToPublic
Sets whether the pool is open to the public (permissioned or permissionless).
Parameters
isOpenToPublic_
bool
Whether the pool is open to the public.
setMaxCoverLiquidation
Sets the max cover liquidation for the pool configurator.
Parameters
maxCoverLiquidation_
uint24
The max cover liquidation as a percentage for the pool admin.
setMinCover
Sets the min cover required for the pool configurator.
Parameters
minCover_
uint104
The min cover required for the pool admin.
setPoolLimit
Sets the pool limit for the pool configurator.
Parameters
poolLimit_
uint104
The size limit of the pool.
requestFunds
Request funds from the pool and fund the loan manager.
Parameters
principal_
uint256
The amount of principal to request.
triggerDefault
Triggers the defaults of a specific loan in the loan manager.
Parameters
loanId_
uint16
The ID of the defaulted loan.
requestRedeem
Requests to redeem shares.
Parameters
shares_
uint256
The amount of shares to redeem.
owner_
address
The owner of the shares.
processRedeem
Processes the redemption of shares for a specific owner.
Parameters
shares_
uint256
The amount of shares to redeem.
owner_
address
The owner of the shares.
sender_
address
The sender of the process request.
Returns
redeemableShares_
uint256
The amount of redeemable shares.
resultingAssets_
uint256
The corresponding amount of assets with the redeemable shares.
removeShares
Removes shares from its withdrawal request.
Parameters
shares_
uint256
The amount of shares to remove from withdrawal.
owner_
address
The owner of the shares.
Returns
sharesReturned_
uint256
The amount of shares returned.
depositCover
Pool admin deposits pool cover.
Parameters
amount_
uint256
The amount of assets to deposit as first-loss cover.
withdrawCover
Pool admin withdraws from pool cover.
Parameters
amount_
uint256
The amount of assets to withdraw from first-loss cover.
recipient_
address
The address of the recipient.
openToPublic
Returns whether the pool is open to public.
Returns
openToPublic_
bool
Whether the pool is open to public.
adminFee
Returns the admin fee of the pool.
Returns
adminFee_
uint24
The admin fee of the pool.
maxCoverLiquidation
Returns the max cover liquidation of the pool.
Returns
maxCoverLiquidation_
uint24
The max cover liquidation of the pool.
minCover
Returns the min cover required for the pool configurator.
Returns
minCover_
uint104
The min cover required for the pool admin.
poolLimit
Returns the pool limit of the pool configurator.
Returns
poolLimit_
uint104
The size limit of the pool.
maxDeposit
Returns the max deposit amount of a receiver.
Parameters
receiver_
address
The address of the receiver.
Returns
maxAssets_
uint256
The max amount of assets that can be deposited.
maxMint
Returns the max mint amount of a receiver.
Parameters
receiver_
address
The address of the receiver.
Returns
maxShares_
uint256
The max amount of shares that can be minted.
maxRedeem
Returns the max redeem amount of an owner.
Parameters
owner_
address
The address of the owner.
Returns
maxShares_
uint256
The max amount of shares that can be redeemed.
previewRedeem
Previews the amount of assets that can be redeemed for the amount of shares specified.
Parameters
owner_
address
The address of the owner.
shares_
uint256
The amount of shares to redeem.
Returns
assets_
uint256
The amount of assets that would be received.
totalAssets
Returns the total amount of assets in the pool.
Returns
totalAssets_
uint256
The total amount of assets in the pool.
hasSufficientCover
Returns whether the pool currently has sufficient cover.
Returns
hasSufficientCover_
bool
Whether the pool currently has sufficient cover.
unrealizedLosses
Returns the current amount of unrealized losses of the pool.
Returns
unrealizedLosses_
uint256
The current amount of unrealized losses of the pool.
_totalAssets
_revertIfPaused
_revertIfNotAdmin
_revertIfNotAdminOrGovernor
_revertIfNotGovernor
_revertIfNotPool
_hasSufficientCover
_handleCover
_min
_getMaxAssets
_globals
_loanManager
_withdrawalManager
Last updated