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
POOL_REVISION
MAX_AUCTION_HEALTH_FACTOR
MIN_AUCTION_HEALTH_FACTOR
onlyPoolConfigurator
Only pool configurator can call functions marked by this modifier.
onlyPoolAdmin
Only pool admin can call functions marked by this modifier.
_onlyPoolConfigurator
_onlyPoolAdmin
constructor
Constructor.
Parameters
Name | Type | Description |
---|---|---|
provider | contract IPoolAddressesProvider | The address of the PoolAddressesProvider contract |
getRevision
Returns the revision number of the contract
Needs to be defined in the inherited class as a constant.
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The revision number |
mintToTreasury
Mints the assets accrued through the reserve factor to the treasury in the form of xTokens
Parameters
Name | Type | Description |
---|---|---|
assets | address[] | The list of reserves for which the minting needs to be executed |
initReserve
Initializes a reserve, activating it, assigning an xToken and debt tokens and an interest rate strategy
Only callable by the PoolConfigurator contract
Parameters
Name | Type | Description |
---|---|---|
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
Drop a reserve
Only callable by the PoolConfigurator contract
Parameters
Name | Type | Description |
---|---|---|
asset | address | The address of the underlying asset of the reserve |
setReserveInterestRateStrategyAddress
Updates the address of the interest rate strategy contract
Only callable by the PoolConfigurator contract
Parameters
Name | Type | Description |
---|---|---|
asset | address | The address of the underlying asset of the reserve |
rateStrategyAddress | address | The address of the interest rate strategy contract |
setReserveAuctionStrategyAddress
Updates the address of the auction strategy contract
Only callable by the PoolConfigurator contract
Parameters
Name | Type | Description |
---|---|---|
asset | address | The address of the underlying asset of the reserve |
auctionStrategyAddress | address | The address of the auction strategy contract |
setConfiguration
Sets the configuration bitmap of the reserve as a whole
Only callable by the PoolConfigurator contract
Parameters
Name | Type | Description |
---|---|---|
asset | address | The address of the underlying asset of the reserve |
configuration | struct DataTypes.ReserveConfigurationMap | The new configuration bitmap |
rescueTokens
Rescue and transfer tokens locked in this contract
Parameters
Name | Type | Description |
---|---|---|
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
Set the auction recovery health factor
Parameters
Name | Type | Description |
---|---|---|
value | uint64 | The new auction health factor |
getUserAccountData
Returns the user account data across all the reserves
Parameters
Name | Type | Description |
---|---|---|
user | address | The address of the user |
Return Values
Name | Type | Description |
---|---|---|
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
Returns Ltv and Liquidation Threshold for the asset
Parameters
Name | Type | Description |
---|---|---|
asset | address | The address of the asset |
tokenId | uint256 | The tokenId of the asset |
Return Values
Name | Type | Description |
---|---|---|
ltv | uint256 | The loan to value of the asset |
lt | uint256 | The liquidation threshold value of the asset |
setAuctionValidityTime
Set auction validity time, all auctions triggered before the validity time will be considered as invalid
Parameters
Name | Type | Description |
---|---|---|
user | address | The user address |