2020-10-14 13:54:22 +00:00
|
|
|
// SPDX-License-Identifier: agpl-3.0
|
2020-11-20 10:45:20 +00:00
|
|
|
pragma solidity 0.6.12;
|
2020-10-14 13:54:22 +00:00
|
|
|
pragma experimental ABIEncoderV2;
|
|
|
|
|
2020-11-06 14:06:52 +00:00
|
|
|
import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';
|
2020-10-14 13:54:22 +00:00
|
|
|
|
|
|
|
interface IUiPoolDataProvider {
|
|
|
|
struct AggregatedReserveData {
|
|
|
|
address underlyingAsset;
|
|
|
|
string name;
|
|
|
|
string symbol;
|
|
|
|
uint256 decimals;
|
2020-10-30 10:14:42 +00:00
|
|
|
uint256 baseLTVasCollateral;
|
|
|
|
uint256 reserveLiquidationThreshold;
|
|
|
|
uint256 reserveLiquidationBonus;
|
2020-10-14 13:54:22 +00:00
|
|
|
uint256 reserveFactor;
|
|
|
|
bool usageAsCollateralEnabled;
|
|
|
|
bool borrowingEnabled;
|
|
|
|
bool stableBorrowRateEnabled;
|
|
|
|
bool isActive;
|
2020-11-02 10:54:21 +00:00
|
|
|
bool isFrozen;
|
2020-10-30 10:14:42 +00:00
|
|
|
// base data
|
|
|
|
uint128 liquidityIndex;
|
|
|
|
uint128 variableBorrowIndex;
|
|
|
|
uint128 liquidityRate;
|
|
|
|
uint128 variableBorrowRate;
|
|
|
|
uint128 stableBorrowRate;
|
|
|
|
uint40 lastUpdateTimestamp;
|
|
|
|
address aTokenAddress;
|
|
|
|
address stableDebtTokenAddress;
|
|
|
|
address variableDebtTokenAddress;
|
|
|
|
address interestRateStrategyAddress;
|
|
|
|
//
|
2020-10-14 13:54:22 +00:00
|
|
|
uint256 availableLiquidity;
|
2020-11-02 11:41:53 +00:00
|
|
|
uint256 totalPrincipalStableDebt;
|
|
|
|
uint256 averageStableRate;
|
|
|
|
uint256 stableDebtLastUpdateTimestamp;
|
|
|
|
uint256 totalScaledVariableDebt;
|
2021-10-08 15:43:29 +00:00
|
|
|
uint256 priceInMarketReferenceCurrency;
|
2020-10-14 13:54:22 +00:00
|
|
|
uint256 variableRateSlope1;
|
|
|
|
uint256 variableRateSlope2;
|
|
|
|
uint256 stableRateSlope1;
|
|
|
|
uint256 stableRateSlope2;
|
|
|
|
}
|
2021-03-23 17:52:51 +00:00
|
|
|
|
2020-10-14 13:54:22 +00:00
|
|
|
struct UserReserveData {
|
|
|
|
address underlyingAsset;
|
2020-11-02 09:37:24 +00:00
|
|
|
uint256 scaledATokenBalance;
|
2020-10-14 13:54:22 +00:00
|
|
|
bool usageAsCollateralEnabledOnUser;
|
|
|
|
uint256 stableBorrowRate;
|
2020-11-02 09:37:24 +00:00
|
|
|
uint256 scaledVariableDebt;
|
|
|
|
uint256 principalStableDebt;
|
2020-10-14 13:54:22 +00:00
|
|
|
uint256 stableBorrowLastUpdateTimestamp;
|
2021-04-16 15:48:19 +00:00
|
|
|
}
|
|
|
|
|
2021-10-08 15:38:17 +00:00
|
|
|
struct BaseCurrencyInfo {
|
|
|
|
uint256 baseCurrencyDecimals;
|
|
|
|
uint256 baseCurrencyPriceInUsd;
|
|
|
|
}
|
|
|
|
|
2021-06-17 13:53:59 +00:00
|
|
|
function getReservesList(ILendingPoolAddressesProvider provider)
|
|
|
|
external
|
|
|
|
view
|
|
|
|
returns (address[] memory);
|
|
|
|
|
2021-10-08 16:03:39 +00:00
|
|
|
function getReservesData(ILendingPoolAddressesProvider provider)
|
2021-06-17 13:53:59 +00:00
|
|
|
external
|
|
|
|
view
|
|
|
|
returns (
|
|
|
|
AggregatedReserveData[] memory,
|
2021-10-08 15:38:17 +00:00
|
|
|
BaseCurrencyInfo memory
|
2021-06-17 13:53:59 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
function getUserReservesData(ILendingPoolAddressesProvider provider, address user)
|
|
|
|
external
|
|
|
|
view
|
|
|
|
returns (
|
2021-10-08 10:58:49 +00:00
|
|
|
UserReserveData[] memory
|
2021-06-17 13:53:59 +00:00
|
|
|
);
|
2020-10-14 13:54:22 +00:00
|
|
|
}
|