PoolParameters

Main point of interaction with an ParaSpace protocol's market

  • Users can:

    • mintToTreasury

    • ...

To be covered by a proxy contract, owned by the PoolAddressesProvider of the specific market All admin functions are callable by the PoolConfigurator contract defined also in the PoolAddressesProvider

ADDRESSES_PROVIDER

contract IPoolAddressesProvider ADDRESSES_PROVIDER

POOL_REVISION

uint256 POOL_REVISION

MAX_AUCTION_HEALTH_FACTOR

uint256 MAX_AUCTION_HEALTH_FACTOR

MIN_AUCTION_HEALTH_FACTOR

uint256 MIN_AUCTION_HEALTH_FACTOR

onlyPoolConfigurator

modifier onlyPoolConfigurator()

Only pool configurator can call functions marked by this modifier.

onlyPoolAdmin

modifier onlyPoolAdmin()

Only pool admin can call functions marked by this modifier.

_onlyPoolConfigurator

function _onlyPoolConfigurator() internal view virtual

_onlyPoolAdmin

function _onlyPoolAdmin() internal view virtual

constructor

constructor(contract IPoolAddressesProvider provider) public

Constructor.

Parameters

NameTypeDescription

provider

contract IPoolAddressesProvider

The address of the PoolAddressesProvider contract

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

mintToTreasury

function mintToTreasury(address[] assets) external virtual

Mints the assets accrued through the reserve factor to the treasury in the form of xTokens

Parameters

NameTypeDescription

assets

address[]

The list of reserves for which the minting needs to be executed

initReserve

function initReserve(address asset, address xTokenAddress, address variableDebtAddress, address interestRateStrategyAddress, address auctionStrategyAddress) external virtual

Initializes a reserve, activating it, assigning an xToken and debt tokens and an interest rate strategy

Only callable by the PoolConfigurator contract

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

xTokenAddress

address

The address of the xToken that will be assigned to the reserve

variableDebtAddress

address

The address of the VariableDebtToken that will be assigned to the reserve

interestRateStrategyAddress

address

The address of the interest rate strategy contract

auctionStrategyAddress

address

dropReserve

function dropReserve(address asset) external virtual

Drop a reserve

Only callable by the PoolConfigurator contract

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

setReserveInterestRateStrategyAddress

function setReserveInterestRateStrategyAddress(address asset, address rateStrategyAddress) external virtual

Updates the address of the interest rate strategy contract

Only callable by the PoolConfigurator contract

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

rateStrategyAddress

address

The address of the interest rate strategy contract

setReserveAuctionStrategyAddress

function setReserveAuctionStrategyAddress(address asset, address auctionStrategyAddress) external virtual

Updates the address of the auction strategy contract

Only callable by the PoolConfigurator contract

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

auctionStrategyAddress

address

The address of the auction strategy contract

setConfiguration

function setConfiguration(address asset, struct DataTypes.ReserveConfigurationMap configuration) external virtual

Sets the configuration bitmap of the reserve as a whole

Only callable by the PoolConfigurator contract

Parameters

NameTypeDescription

asset

address

The address of the underlying asset of the reserve

configuration

struct DataTypes.ReserveConfigurationMap

The new configuration bitmap

rescueTokens

function rescueTokens(enum DataTypes.AssetType assetType, address token, address to, uint256 amountOrTokenId) external virtual

Rescue and transfer tokens locked in this contract

Parameters

NameTypeDescription

assetType

enum DataTypes.AssetType

The asset type of the token

token

address

The address of the token

to

address

The address of the recipient

amountOrTokenId

uint256

The amount or id of token to transfer

setAuctionRecoveryHealthFactor

function setAuctionRecoveryHealthFactor(uint64 value) external virtual

Set the auction recovery health factor

Parameters

NameTypeDescription

value

uint64

The new auction health factor

getUserAccountData

function getUserAccountData(address user) external view virtual returns (uint256 totalCollateralBase, uint256 totalDebtBase, uint256 availableBorrowsBase, uint256 currentLiquidationThreshold, uint256 ltv, uint256 healthFactor, uint256 erc721HealthFactor)

Returns the user account data across all the reserves

Parameters

NameTypeDescription

user

address

The address of the user

Return Values

NameTypeDescription

totalCollateralBase

uint256

The total collateral of the user in the base currency used by the price feed

totalDebtBase

uint256

The total debt of the user in the base currency used by the price feed

availableBorrowsBase

uint256

The borrowing power left of the user in the base currency used by the price feed

currentLiquidationThreshold

uint256

The liquidation threshold of the user

ltv

uint256

The loan to value of The user

healthFactor

uint256

The current health factor of the user

erc721HealthFactor

uint256

getAssetLtvAndLT

function getAssetLtvAndLT(address asset, uint256 tokenId) external view virtual returns (uint256 ltv, uint256 lt)

Returns Ltv and Liquidation Threshold for the asset

Parameters

NameTypeDescription

asset

address

The address of the asset

tokenId

uint256

The tokenId of the asset

Return Values

NameTypeDescription

ltv

uint256

The loan to value of the asset

lt

uint256

The liquidation threshold value of the asset

setAuctionValidityTime

function setAuctionValidityTime(address user) external virtual

Set auction validity time, all auctions triggered before the validity time will be considered as invalid

Parameters

NameTypeDescription

user

address

The user address