mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
feat: added new fields needed for client calculations
This commit is contained in:
parent
d998c2f4c7
commit
049c84e436
|
@ -43,6 +43,7 @@ contract UiPoolDataProviderV2V3 is IUiPoolDataProviderV3 {
|
|||
uint256,
|
||||
uint256,
|
||||
uint256,
|
||||
uint256,
|
||||
uint256
|
||||
)
|
||||
{
|
||||
|
@ -50,7 +51,8 @@ contract UiPoolDataProviderV2V3 is IUiPoolDataProviderV3 {
|
|||
interestRateStrategy.variableRateSlope1(),
|
||||
interestRateStrategy.variableRateSlope2(),
|
||||
interestRateStrategy.stableRateSlope1(),
|
||||
interestRateStrategy.stableRateSlope2()
|
||||
interestRateStrategy.stableRateSlope2(),
|
||||
interestRateStrategy.OPTIMAL_UTILIZATION_RATE()
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -96,6 +98,7 @@ contract UiPoolDataProviderV2V3 is IUiPoolDataProviderV3 {
|
|||
reserveData.priceInMarketReferenceCurrency = oracle.getAssetPrice(
|
||||
reserveData.underlyingAsset
|
||||
);
|
||||
reserveData.priceOracle = oracle.getSourceOfAsset(reserveData.underlyingAsset);
|
||||
|
||||
reserveData.availableLiquidity = IERC20Detailed(reserveData.underlyingAsset).balanceOf(
|
||||
reserveData.aTokenAddress
|
||||
|
@ -134,7 +137,8 @@ contract UiPoolDataProviderV2V3 is IUiPoolDataProviderV3 {
|
|||
reserveData.variableRateSlope1,
|
||||
reserveData.variableRateSlope2,
|
||||
reserveData.stableRateSlope1,
|
||||
reserveData.stableRateSlope2
|
||||
reserveData.stableRateSlope2,
|
||||
reserveData.optimalUsageRatio
|
||||
) = getInterestRateStrategySlopes(
|
||||
DefaultReserveInterestRateStrategy(reserveData.interestRateStrategyAddress)
|
||||
);
|
||||
|
|
|
@ -14,4 +14,11 @@ interface IAaveOracle {
|
|||
@dev returns the asset price in ETH
|
||||
*/
|
||||
function getAssetPrice(address asset) external view returns (uint256);
|
||||
|
||||
/**
|
||||
* @notice Returns the address of the source for an asset address
|
||||
* @param asset The address of the asset
|
||||
* @return The address of the source
|
||||
*/
|
||||
function getSourceOfAsset(address asset) external view returns (address);
|
||||
}
|
|
@ -37,10 +37,12 @@ interface IUiPoolDataProviderV3 {
|
|||
uint256 stableDebtLastUpdateTimestamp;
|
||||
uint256 totalScaledVariableDebt;
|
||||
uint256 priceInMarketReferenceCurrency;
|
||||
address priceOracle;
|
||||
uint256 variableRateSlope1;
|
||||
uint256 variableRateSlope2;
|
||||
uint256 stableRateSlope1;
|
||||
uint256 stableRateSlope2;
|
||||
uint256 optimalUsageRatio;
|
||||
// v3
|
||||
bool isPaused;
|
||||
uint128 accruedToTreasury;
|
||||
|
|
Loading…
Reference in New Issue
Block a user