mirror of
https://github.com/Instadapp/dsa-resolvers-deprecated.git
synced 2024-07-29 22:38:16 +00:00
Update Aave v2 resolver to include liquidity params
This commit is contained in:
parent
e0ba523772
commit
7a6a0bfd9c
|
@ -176,6 +176,9 @@ contract AaveHelpers is DSMath {
|
||||||
bool stableBorrowEnabled;
|
bool stableBorrowEnabled;
|
||||||
bool isActive;
|
bool isActive;
|
||||||
bool isFrozen;
|
bool isFrozen;
|
||||||
|
uint availableLiquidity;
|
||||||
|
uint totalStableDebt;
|
||||||
|
uint totalVariableDebt;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct TokenPrice {
|
struct TokenPrice {
|
||||||
|
@ -221,6 +224,8 @@ contract AaveHelpers is DSMath {
|
||||||
uint tokenPriceInEth,
|
uint tokenPriceInEth,
|
||||||
uint tokenPriceInUsd
|
uint tokenPriceInUsd
|
||||||
) internal view returns(AaveUserTokenData memory tokenData) {
|
) internal view returns(AaveUserTokenData memory tokenData) {
|
||||||
|
AaveTokenData memory aaveTokenData = collateralData(aaveData, token);
|
||||||
|
|
||||||
(
|
(
|
||||||
tokenData.supplyBalance,
|
tokenData.supplyBalance,
|
||||||
tokenData.stableBorrowBalance,
|
tokenData.stableBorrowBalance,
|
||||||
|
@ -230,15 +235,15 @@ contract AaveHelpers is DSMath {
|
||||||
) = aaveData.getUserReserveData(token, user);
|
) = aaveData.getUserReserveData(token, user);
|
||||||
|
|
||||||
(
|
(
|
||||||
,,,
|
aaveTokenData.availableLiquidity,
|
||||||
|
aaveTokenData.totalStableDebt,
|
||||||
|
aaveTokenData.totalVariableDebt,
|
||||||
tokenData.supplyRate,
|
tokenData.supplyRate,
|
||||||
tokenData.variableBorrowRate,
|
tokenData.variableBorrowRate,
|
||||||
tokenData.stableBorrowRate,
|
tokenData.stableBorrowRate,
|
||||||
,,,
|
,,,
|
||||||
) = aaveData.getReserveData(token);
|
) = aaveData.getReserveData(token);
|
||||||
|
|
||||||
AaveTokenData memory aaveTokenData = collateralData(aaveData, token);
|
|
||||||
|
|
||||||
tokenData.tokenPriceInEth = tokenPriceInEth;
|
tokenData.tokenPriceInEth = tokenPriceInEth;
|
||||||
tokenData.tokenPriceInUsd = tokenPriceInUsd;
|
tokenData.tokenPriceInUsd = tokenPriceInUsd;
|
||||||
tokenData.aaveTokenData = aaveTokenData;
|
tokenData.aaveTokenData = aaveTokenData;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user