PoolLogic
Implements the logic for Pool specific functions
MintedToTreasury
executeInitReserve
Initialize an asset reserve and add the reserve to the list of reserves
Parameters
Name | Type | Description |
---|---|---|
reservesData | mapping(address => struct DataTypes.ReserveData) | The state of all the reserves |
reservesList | mapping(uint256 => address) | The addresses of all the active reserves |
params | struct DataTypes.InitReserveParams | Additional parameters needed for initiation |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | true if appended, false if inserted at existing empty spot |
executeRescueTokens
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 |
executeMintToTreasury
Mints the assets accrued through the reserve factor to the treasury in the form of xTokens
Parameters
Name | Type | Description |
---|---|---|
reservesData | mapping(address => struct DataTypes.ReserveData) | The state of all the reserves |
assets | address[] | The list of reserves for which the minting needs to be executed |
executeDropReserve
Drop a reserve
Parameters
Name | Type | Description |
---|---|---|
reservesData | mapping(address => struct DataTypes.ReserveData) | The state of all the reserves |
reservesList | mapping(uint256 => address) | The addresses of all the active reserves |
asset | address | The address of the underlying asset of the reserve |
executeGetUserAccountData
Returns the user account data across all the reserves
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 | The current erc721 health factor of the user |