/
IUiPoolDataProviderV3.sol
108 lines (100 loc) · 3 KB
/
IUiPoolDataProviderV3.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.10;
import {IPoolAddressesProvider} from '@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';
interface IUiPoolDataProviderV3 {
struct InterestRates {
uint256 variableRateSlope1;
uint256 variableRateSlope2;
uint256 stableRateSlope1;
uint256 stableRateSlope2;
uint256 baseStableBorrowRate;
uint256 baseVariableBorrowRate;
uint256 optimalUsageRatio;
}
struct AggregatedReserveData {
address underlyingAsset;
string name;
string symbol;
uint256 decimals;
uint256 baseLTVasCollateral;
uint256 reserveLiquidationThreshold;
uint256 reserveLiquidationBonus;
uint256 reserveFactor;
bool usageAsCollateralEnabled;
bool borrowingEnabled;
bool stableBorrowRateEnabled;
bool isActive;
bool isFrozen;
// base data
uint128 liquidityIndex;
uint128 variableBorrowIndex;
uint128 liquidityRate;
uint128 variableBorrowRate;
uint128 stableBorrowRate;
uint40 lastUpdateTimestamp;
address aTokenAddress;
address stableDebtTokenAddress;
address variableDebtTokenAddress;
address interestRateStrategyAddress;
//
uint256 availableLiquidity;
uint256 totalPrincipalStableDebt;
uint256 averageStableRate;
uint256 stableDebtLastUpdateTimestamp;
uint256 totalScaledVariableDebt;
uint256 priceInMarketReferenceCurrency;
address priceOracle;
uint256 variableRateSlope1;
uint256 variableRateSlope2;
uint256 stableRateSlope1;
uint256 stableRateSlope2;
uint256 baseStableBorrowRate;
uint256 baseVariableBorrowRate;
uint256 optimalUsageRatio;
// v3 only
bool isPaused;
bool isSiloedBorrowing;
uint128 accruedToTreasury;
uint128 unbacked;
uint128 isolationModeTotalDebt;
bool flashLoanEnabled;
//
uint256 debtCeiling;
uint256 debtCeilingDecimals;
uint8 eModeCategoryId;
uint256 borrowCap;
uint256 supplyCap;
// eMode
uint16 eModeLtv;
uint16 eModeLiquidationThreshold;
uint16 eModeLiquidationBonus;
address eModePriceSource;
string eModeLabel;
bool borrowableInIsolation;
}
struct UserReserveData {
address underlyingAsset;
uint256 scaledATokenBalance;
bool usageAsCollateralEnabledOnUser;
uint256 stableBorrowRate;
uint256 scaledVariableDebt;
uint256 principalStableDebt;
uint256 stableBorrowLastUpdateTimestamp;
}
struct BaseCurrencyInfo {
uint256 marketReferenceCurrencyUnit;
int256 marketReferenceCurrencyPriceInUsd;
int256 networkBaseTokenPriceInUsd;
uint8 networkBaseTokenPriceDecimals;
}
function getReservesList(
IPoolAddressesProvider provider
) external view returns (address[] memory);
function getReservesData(
IPoolAddressesProvider provider
) external view returns (AggregatedReserveData[] memory, BaseCurrencyInfo memory);
function getUserReservesData(
IPoolAddressesProvider provider,
address user
) external view returns (UserReserveData[] memory, uint8);
}