@defisaver/positions-sdk 2.1.52 → 2.1.53-aave-v4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/.mocharc.json +4 -4
  2. package/.nvmrc +1 -1
  3. package/README.md +64 -64
  4. package/cjs/aaveV4/index.d.ts +7 -0
  5. package/cjs/aaveV4/index.js +174 -0
  6. package/cjs/config/contracts.d.ts +1277 -0
  7. package/cjs/config/contracts.js +9 -0
  8. package/cjs/contracts.d.ts +23120 -0
  9. package/cjs/contracts.js +2 -1
  10. package/cjs/fluid/index.d.ts +6 -6
  11. package/cjs/helpers/aaveHelpers/index.d.ts +2 -2
  12. package/cjs/helpers/aaveHelpers/index.js +16 -5
  13. package/cjs/helpers/aaveV4Helpers/index.d.ts +13 -0
  14. package/cjs/helpers/aaveV4Helpers/index.js +117 -0
  15. package/cjs/helpers/compoundHelpers/index.js +15 -18
  16. package/cjs/helpers/eulerHelpers/index.d.ts +2 -2
  17. package/cjs/helpers/eulerHelpers/index.js +21 -13
  18. package/cjs/helpers/fluidHelpers/index.js +16 -5
  19. package/cjs/helpers/index.d.ts +1 -0
  20. package/cjs/helpers/index.js +2 -1
  21. package/cjs/helpers/morphoBlueHelpers/index.js +81 -71
  22. package/cjs/helpers/sparkHelpers/index.d.ts +2 -2
  23. package/cjs/helpers/sparkHelpers/index.js +15 -5
  24. package/cjs/index.d.ts +2 -1
  25. package/cjs/index.js +3 -1
  26. package/cjs/markets/aaveV4/index.d.ts +13 -0
  27. package/cjs/markets/aaveV4/index.js +39 -0
  28. package/cjs/markets/index.d.ts +1 -0
  29. package/cjs/markets/index.js +3 -1
  30. package/cjs/moneymarket/moneymarketCommonService.d.ts +3 -3
  31. package/cjs/moneymarket/moneymarketCommonService.js +9 -9
  32. package/cjs/portfolio/index.js +20 -0
  33. package/cjs/savings/morphoVaults/index.js +17 -17
  34. package/cjs/types/aave.d.ts +3 -3
  35. package/cjs/types/aaveV4.d.ts +137 -0
  36. package/cjs/types/aaveV4.js +11 -0
  37. package/cjs/types/common.d.ts +7 -0
  38. package/cjs/types/common.js +9 -1
  39. package/cjs/types/compound.d.ts +3 -3
  40. package/cjs/types/curveUsd.d.ts +2 -2
  41. package/cjs/types/euler.d.ts +3 -3
  42. package/cjs/types/fluid.d.ts +3 -3
  43. package/cjs/types/index.d.ts +2 -0
  44. package/cjs/types/index.js +2 -0
  45. package/cjs/types/liquityV2.d.ts +3 -3
  46. package/cjs/types/llamaLend.d.ts +2 -2
  47. package/cjs/types/morphoBlue.d.ts +5 -5
  48. package/cjs/types/portfolio.d.ts +4 -0
  49. package/cjs/types/spark.d.ts +3 -3
  50. package/esm/aaveV4/index.d.ts +7 -0
  51. package/esm/aaveV4/index.js +165 -0
  52. package/esm/config/contracts.d.ts +1277 -0
  53. package/esm/config/contracts.js +8 -0
  54. package/esm/contracts.d.ts +23120 -0
  55. package/esm/contracts.js +1 -0
  56. package/esm/fluid/index.d.ts +6 -6
  57. package/esm/helpers/aaveHelpers/index.d.ts +2 -2
  58. package/esm/helpers/aaveHelpers/index.js +16 -5
  59. package/esm/helpers/aaveV4Helpers/index.d.ts +13 -0
  60. package/esm/helpers/aaveV4Helpers/index.js +108 -0
  61. package/esm/helpers/compoundHelpers/index.js +16 -19
  62. package/esm/helpers/eulerHelpers/index.d.ts +2 -2
  63. package/esm/helpers/eulerHelpers/index.js +21 -13
  64. package/esm/helpers/fluidHelpers/index.js +16 -5
  65. package/esm/helpers/index.d.ts +1 -0
  66. package/esm/helpers/index.js +1 -0
  67. package/esm/helpers/morphoBlueHelpers/index.js +82 -72
  68. package/esm/helpers/sparkHelpers/index.d.ts +2 -2
  69. package/esm/helpers/sparkHelpers/index.js +16 -6
  70. package/esm/index.d.ts +2 -1
  71. package/esm/index.js +2 -1
  72. package/esm/markets/aaveV4/index.d.ts +13 -0
  73. package/esm/markets/aaveV4/index.js +29 -0
  74. package/esm/markets/index.d.ts +1 -0
  75. package/esm/markets/index.js +1 -0
  76. package/esm/moneymarket/moneymarketCommonService.d.ts +3 -3
  77. package/esm/moneymarket/moneymarketCommonService.js +9 -9
  78. package/esm/portfolio/index.js +21 -1
  79. package/esm/savings/morphoVaults/index.js +17 -17
  80. package/esm/types/aave.d.ts +3 -3
  81. package/esm/types/aaveV4.d.ts +137 -0
  82. package/esm/types/aaveV4.js +8 -0
  83. package/esm/types/common.d.ts +7 -0
  84. package/esm/types/common.js +8 -0
  85. package/esm/types/compound.d.ts +3 -3
  86. package/esm/types/curveUsd.d.ts +2 -2
  87. package/esm/types/euler.d.ts +3 -3
  88. package/esm/types/fluid.d.ts +3 -3
  89. package/esm/types/fluid.js +1 -1
  90. package/esm/types/index.d.ts +2 -0
  91. package/esm/types/index.js +2 -0
  92. package/esm/types/liquityV2.d.ts +3 -3
  93. package/esm/types/llamaLend.d.ts +2 -2
  94. package/esm/types/morphoBlue.d.ts +5 -5
  95. package/esm/types/portfolio.d.ts +4 -0
  96. package/esm/types/spark.d.ts +3 -3
  97. package/package.json +48 -48
  98. package/src/aaveV2/index.ts +240 -240
  99. package/src/aaveV3/index.ts +635 -635
  100. package/src/aaveV3/merit.ts +97 -97
  101. package/src/aaveV3/merkl.ts +74 -74
  102. package/src/aaveV4/index.ts +176 -0
  103. package/src/claiming/aaveV3.ts +154 -154
  104. package/src/claiming/compV3.ts +22 -22
  105. package/src/claiming/ethena.ts +61 -61
  106. package/src/claiming/index.ts +12 -12
  107. package/src/claiming/king.ts +66 -66
  108. package/src/claiming/morphoBlue.ts +118 -118
  109. package/src/claiming/spark.ts +225 -225
  110. package/src/compoundV2/index.ts +244 -244
  111. package/src/compoundV3/index.ts +274 -274
  112. package/src/config/contracts.ts +1328 -1320
  113. package/src/constants/index.ts +10 -10
  114. package/src/contracts.ts +174 -172
  115. package/src/curveUsd/index.ts +254 -254
  116. package/src/eulerV2/index.ts +324 -324
  117. package/src/exchange/index.ts +25 -25
  118. package/src/fluid/index.ts +1800 -1800
  119. package/src/helpers/aaveHelpers/index.ts +202 -191
  120. package/src/helpers/aaveV4Helpers/index.ts +128 -0
  121. package/src/helpers/compoundHelpers/index.ts +276 -283
  122. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  123. package/src/helpers/eulerHelpers/index.ts +229 -222
  124. package/src/helpers/fluidHelpers/index.ts +335 -326
  125. package/src/helpers/index.ts +11 -10
  126. package/src/helpers/liquityV2Helpers/index.ts +82 -82
  127. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  128. package/src/helpers/makerHelpers/index.ts +52 -52
  129. package/src/helpers/morphoBlueHelpers/index.ts +405 -396
  130. package/src/helpers/sparkHelpers/index.ts +169 -158
  131. package/src/index.ts +51 -49
  132. package/src/liquity/index.ts +159 -159
  133. package/src/liquityV2/index.ts +703 -703
  134. package/src/llamaLend/index.ts +305 -305
  135. package/src/maker/index.ts +223 -223
  136. package/src/markets/aave/index.ts +118 -118
  137. package/src/markets/aave/marketAssets.ts +54 -54
  138. package/src/markets/aaveV4/index.ts +42 -0
  139. package/src/markets/compound/index.ts +243 -243
  140. package/src/markets/compound/marketsAssets.ts +97 -97
  141. package/src/markets/curveUsd/index.ts +69 -69
  142. package/src/markets/euler/index.ts +26 -26
  143. package/src/markets/fluid/index.ts +2900 -2900
  144. package/src/markets/index.ts +26 -25
  145. package/src/markets/liquityV2/index.ts +102 -102
  146. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  147. package/src/markets/llamaLend/index.ts +235 -235
  148. package/src/markets/morphoBlue/index.ts +988 -988
  149. package/src/markets/spark/index.ts +29 -29
  150. package/src/markets/spark/marketAssets.ts +12 -12
  151. package/src/moneymarket/moneymarketCommonService.ts +84 -85
  152. package/src/morphoBlue/index.ts +274 -274
  153. package/src/portfolio/index.ts +606 -586
  154. package/src/savings/index.ts +95 -95
  155. package/src/savings/makerDsr/index.ts +53 -53
  156. package/src/savings/makerDsr/options.ts +9 -9
  157. package/src/savings/morphoVaults/index.ts +80 -80
  158. package/src/savings/morphoVaults/options.ts +193 -193
  159. package/src/savings/skyOptions/index.ts +95 -95
  160. package/src/savings/skyOptions/options.ts +10 -10
  161. package/src/savings/sparkSavingsVaults/index.ts +60 -60
  162. package/src/savings/sparkSavingsVaults/options.ts +35 -35
  163. package/src/savings/yearnV3Vaults/index.ts +61 -61
  164. package/src/savings/yearnV3Vaults/options.ts +55 -55
  165. package/src/savings/yearnVaults/index.ts +73 -73
  166. package/src/savings/yearnVaults/options.ts +32 -32
  167. package/src/services/priceService.ts +278 -278
  168. package/src/services/utils.ts +115 -115
  169. package/src/services/viem.ts +57 -57
  170. package/src/setup.ts +8 -8
  171. package/src/spark/index.ts +459 -459
  172. package/src/staking/eligibility.ts +53 -53
  173. package/src/staking/index.ts +1 -1
  174. package/src/staking/staking.ts +192 -192
  175. package/src/types/aave.ts +199 -198
  176. package/src/types/aaveV4.ts +153 -0
  177. package/src/types/claiming.ts +114 -114
  178. package/src/types/common.ts +115 -107
  179. package/src/types/compound.ts +145 -144
  180. package/src/types/curveUsd.ts +123 -123
  181. package/src/types/euler.ts +176 -175
  182. package/src/types/fluid.ts +485 -483
  183. package/src/types/index.ts +17 -15
  184. package/src/types/liquity.ts +30 -30
  185. package/src/types/liquityV2.ts +128 -126
  186. package/src/types/llamaLend.ts +161 -159
  187. package/src/types/maker.ts +63 -63
  188. package/src/types/merit.ts +1 -1
  189. package/src/types/merkl.ts +70 -70
  190. package/src/types/morphoBlue.ts +202 -202
  191. package/src/types/portfolio.ts +64 -60
  192. package/src/types/savings/index.ts +23 -23
  193. package/src/types/savings/makerDsr.ts +13 -13
  194. package/src/types/savings/morphoVaults.ts +32 -32
  195. package/src/types/savings/sky.ts +14 -14
  196. package/src/types/savings/sparkSavingsVaults.ts +15 -15
  197. package/src/types/savings/yearnV3Vaults.ts +17 -17
  198. package/src/types/savings/yearnVaults.ts +14 -14
  199. package/src/types/spark.ts +135 -134
  200. package/src/umbrella/index.ts +69 -69
  201. package/src/umbrella/umbrellaUtils.ts +29 -29
@@ -92,12 +92,22 @@ const sparkGetAggregatedPositionData = (_a) => {
92
92
  if (leveragedType !== '') {
93
93
  payload.leveragedAsset = leveragedAsset;
94
94
  let assetPrice = data.assetsData[leveragedAsset].price; // TODO sparkPrice or price??
95
- if (leveragedType === 'lsd-leverage') {
96
- // Treat ETH like a stablecoin in a long stETH position
97
- payload.leveragedLsdAssetRatio = new decimal_js_1.default(assetsData[leveragedAsset].price).div(assetsData.ETH.price).toDP(18).toString();
98
- assetPrice = new decimal_js_1.default(assetPrice).div(assetsData.ETH.price).toString();
95
+ if (leveragedType === common_1.LeverageType.VolatilePair) {
96
+ const borrowedAsset = Object.values(usedAssets).find(({ borrowedUsd }) => +borrowedUsd > 0);
97
+ const borrowedAssetPrice = data.assetsData[borrowedAsset.symbol].price;
98
+ const leveragedAssetPrice = data.assetsData[leveragedAsset].price;
99
+ const isReverse = new decimal_js_1.default(leveragedAssetPrice).lt(borrowedAssetPrice);
100
+ if (isReverse) {
101
+ payload.leveragedType = common_1.LeverageType.VolatilePairReverse;
102
+ payload.currentVolatilePairRatio = new decimal_js_1.default(borrowedAssetPrice).div(leveragedAssetPrice).toDP(18).toString();
103
+ assetPrice = new decimal_js_1.default(borrowedAssetPrice).div(assetPrice).toString();
104
+ }
105
+ else {
106
+ assetPrice = new decimal_js_1.default(assetPrice).div(borrowedAssetPrice).toString();
107
+ payload.currentVolatilePairRatio = new decimal_js_1.default(leveragedAssetPrice).div(borrowedAssetPrice).toDP(18).toString();
108
+ }
99
109
  }
100
- payload.liquidationPrice = (0, moneymarket_1.calcLeverageLiqPrice)(leveragedType, assetPrice, payload.borrowedUsd, payload.liquidationLimitUsd);
110
+ payload.liquidationPrice = (0, moneymarket_1.calcLeverageLiqPrice)(payload.leveragedType, assetPrice, payload.borrowedUsd, payload.liquidationLimitUsd);
101
111
  }
102
112
  payload.minCollRatio = new decimal_js_1.default(payload.suppliedCollateralUsd).div(payload.borrowLimitUsd).mul(100).toString();
103
113
  payload.collLiquidationRatio = new decimal_js_1.default(payload.suppliedCollateralUsd).div(payload.liquidationLimitUsd).mul(100).toString();
package/cjs/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import './setup';
2
2
  import * as fluid from './fluid';
3
+ import * as aaveV4 from './aaveV4';
3
4
  import * as aaveV3 from './aaveV3';
4
5
  import * as aaveV2 from './aaveV2';
5
6
  import * as compoundV3 from './compoundV3';
@@ -21,4 +22,4 @@ import * as portfolio from './portfolio';
21
22
  import * as claiming from './claiming';
22
23
  import * as savings from './savings';
23
24
  export * from './types';
24
- export { aaveV2, aaveV3, compoundV2, compoundV3, spark, curveUsd, liquity, liquityV2, maker, exchange, staking, moneymarket, markets, helpers, morphoBlue, llamaLend, eulerV2, fluid, portfolio, claiming, savings, };
25
+ export { aaveV2, aaveV3, aaveV4, compoundV2, compoundV3, spark, curveUsd, liquity, liquityV2, maker, exchange, staking, moneymarket, markets, helpers, morphoBlue, llamaLend, eulerV2, fluid, portfolio, claiming, savings, };
package/cjs/index.js CHANGED
@@ -36,10 +36,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.savings = exports.claiming = exports.portfolio = exports.fluid = exports.eulerV2 = exports.llamaLend = exports.morphoBlue = exports.helpers = exports.markets = exports.moneymarket = exports.staking = exports.exchange = exports.maker = exports.liquityV2 = exports.liquity = exports.curveUsd = exports.spark = exports.compoundV3 = exports.compoundV2 = exports.aaveV3 = exports.aaveV2 = void 0;
39
+ exports.savings = exports.claiming = exports.portfolio = exports.fluid = exports.eulerV2 = exports.llamaLend = exports.morphoBlue = exports.helpers = exports.markets = exports.moneymarket = exports.staking = exports.exchange = exports.maker = exports.liquityV2 = exports.liquity = exports.curveUsd = exports.spark = exports.compoundV3 = exports.compoundV2 = exports.aaveV4 = exports.aaveV3 = exports.aaveV2 = void 0;
40
40
  require("./setup");
41
41
  const fluid = __importStar(require("./fluid"));
42
42
  exports.fluid = fluid;
43
+ const aaveV4 = __importStar(require("./aaveV4"));
44
+ exports.aaveV4 = aaveV4;
43
45
  const aaveV3 = __importStar(require("./aaveV3"));
44
46
  exports.aaveV3 = aaveV3;
45
47
  const aaveV2 = __importStar(require("./aaveV2"));
@@ -0,0 +1,13 @@
1
+ import { AaveV4HubInfo, AaveV4HubsType, AaveV4SpokeInfo, AaveV4SpokesType } from '../../types';
2
+ import { NetworkNumber } from '../../types/common';
3
+ export declare const AAVE_V4_CORE_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
4
+ export declare const AaveV4Spokes: (networkId: NetworkNumber) => {
5
+ readonly aave_v4_core_spoke: AaveV4SpokeInfo;
6
+ };
7
+ export declare const getAaveV4SpokeTypeInfo: (type: AaveV4SpokesType, network?: NetworkNumber) => AaveV4SpokeInfo;
8
+ export declare const AAVE_V4_CORE_HUB: (networkId: NetworkNumber) => AaveV4HubInfo;
9
+ export declare const AaveV4Hubs: (networkId: NetworkNumber) => {
10
+ readonly aave_v4_core_hub: AaveV4HubInfo;
11
+ };
12
+ export declare const getAaveV4HubTypeInfo: (type: AaveV4HubsType, network?: NetworkNumber) => AaveV4HubInfo;
13
+ export declare const getAaveV4HubByAddress: (networkId: NetworkNumber, address: string) => AaveV4HubInfo | undefined;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAaveV4HubByAddress = exports.getAaveV4HubTypeInfo = exports.AaveV4Hubs = exports.AAVE_V4_CORE_HUB = exports.getAaveV4SpokeTypeInfo = exports.AaveV4Spokes = exports.AAVE_V4_CORE_SPOKE = void 0;
4
+ const types_1 = require("../../types");
5
+ const common_1 = require("../../types/common");
6
+ // SPOKES
7
+ const AAVE_V4_CORE_SPOKE = (networkId) => ({
8
+ chainIds: [common_1.NetworkNumber.Eth],
9
+ label: 'Core Spoke',
10
+ value: types_1.AaveV4SpokesType.AaveV4CoreSpoke,
11
+ url: 'core',
12
+ address: '0xBa97c5E52cd5BC3D7950Ae70779F8FfE92d40CdC',
13
+ hubs: [
14
+ '0xaD905aD5EA5B98cD50AE40Cfe368344686a21366',
15
+ ],
16
+ });
17
+ exports.AAVE_V4_CORE_SPOKE = AAVE_V4_CORE_SPOKE;
18
+ const AaveV4Spokes = (networkId) => ({
19
+ [types_1.AaveV4SpokesType.AaveV4CoreSpoke]: (0, exports.AAVE_V4_CORE_SPOKE)(networkId),
20
+ });
21
+ exports.AaveV4Spokes = AaveV4Spokes;
22
+ const getAaveV4SpokeTypeInfo = (type, network) => (Object.assign({}, (0, exports.AaveV4Spokes)(network !== null && network !== void 0 ? network : common_1.NetworkNumber.Eth))[type]);
23
+ exports.getAaveV4SpokeTypeInfo = getAaveV4SpokeTypeInfo;
24
+ // HUBS
25
+ const AAVE_V4_CORE_HUB = (networkId) => ({
26
+ chainIds: [common_1.NetworkNumber.Eth],
27
+ label: 'Core Hub',
28
+ value: types_1.AaveV4HubsType.AaveV4CoreHub,
29
+ address: '0xaD905aD5EA5B98cD50AE40Cfe368344686a21366',
30
+ });
31
+ exports.AAVE_V4_CORE_HUB = AAVE_V4_CORE_HUB;
32
+ const AaveV4Hubs = (networkId) => ({
33
+ [types_1.AaveV4HubsType.AaveV4CoreHub]: (0, exports.AAVE_V4_CORE_HUB)(networkId),
34
+ });
35
+ exports.AaveV4Hubs = AaveV4Hubs;
36
+ const getAaveV4HubTypeInfo = (type, network) => (Object.assign({}, (0, exports.AaveV4Hubs)(network !== null && network !== void 0 ? network : common_1.NetworkNumber.Eth))[type]);
37
+ exports.getAaveV4HubTypeInfo = getAaveV4HubTypeInfo;
38
+ const getAaveV4HubByAddress = (networkId, address) => Object.values((0, exports.AaveV4Hubs)(networkId)).find(hub => hub.address.toLowerCase() === address.toLowerCase());
39
+ exports.getAaveV4HubByAddress = getAaveV4HubByAddress;
@@ -7,3 +7,4 @@ export { LlamaLendMarkets } from './llamaLend';
7
7
  export { LiquityV2Markets, findLiquityV2MarketByAddress } from './liquityV2';
8
8
  export { EulerV2Markets } from './euler';
9
9
  export { FluidMarkets, getFluidVersionsDataForNetwork, getFluidMarketInfoById, getFTokenAddress, getFluidMarketInfoByAddress, } from './fluid';
10
+ export { AaveV4Spokes } from './aaveV4';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFluidMarketInfoByAddress = exports.getFTokenAddress = exports.getFluidMarketInfoById = exports.getFluidVersionsDataForNetwork = exports.FluidMarkets = exports.EulerV2Markets = exports.findLiquityV2MarketByAddress = exports.LiquityV2Markets = exports.LlamaLendMarkets = exports.findMorphoBlueMarket = exports.MorphoBlueMarkets = exports.CrvUsdMarkets = exports.SparkMarkets = exports.v3USDTCollAssets = exports.v3USDCeCollAssets = exports.v3USDCCollAssets = exports.v3USDbCCollAssets = exports.v3ETHCollAssets = exports.compoundV2CollateralAssets = exports.CompoundMarkets = exports.getAaveV3MarketByMarketAddress = exports.aaveV3AssetsDefaultMarket = exports.aaveV2AssetsDefaultMarket = exports.aaveV1AssetsDefaultMarket = exports.AaveMarkets = void 0;
3
+ exports.AaveV4Spokes = exports.getFluidMarketInfoByAddress = exports.getFTokenAddress = exports.getFluidMarketInfoById = exports.getFluidVersionsDataForNetwork = exports.FluidMarkets = exports.EulerV2Markets = exports.findLiquityV2MarketByAddress = exports.LiquityV2Markets = exports.LlamaLendMarkets = exports.findMorphoBlueMarket = exports.MorphoBlueMarkets = exports.CrvUsdMarkets = exports.SparkMarkets = exports.v3USDTCollAssets = exports.v3USDCeCollAssets = exports.v3USDCCollAssets = exports.v3USDbCCollAssets = exports.v3ETHCollAssets = exports.compoundV2CollateralAssets = exports.CompoundMarkets = exports.getAaveV3MarketByMarketAddress = exports.aaveV3AssetsDefaultMarket = exports.aaveV2AssetsDefaultMarket = exports.aaveV1AssetsDefaultMarket = exports.AaveMarkets = void 0;
4
4
  var aave_1 = require("./aave");
5
5
  Object.defineProperty(exports, "AaveMarkets", { enumerable: true, get: function () { return aave_1.AaveMarkets; } });
6
6
  Object.defineProperty(exports, "aaveV1AssetsDefaultMarket", { enumerable: true, get: function () { return aave_1.aaveV1AssetsDefaultMarket; } });
@@ -35,3 +35,5 @@ Object.defineProperty(exports, "getFluidVersionsDataForNetwork", { enumerable: t
35
35
  Object.defineProperty(exports, "getFluidMarketInfoById", { enumerable: true, get: function () { return fluid_1.getFluidMarketInfoById; } });
36
36
  Object.defineProperty(exports, "getFTokenAddress", { enumerable: true, get: function () { return fluid_1.getFTokenAddress; } });
37
37
  Object.defineProperty(exports, "getFluidMarketInfoByAddress", { enumerable: true, get: function () { return fluid_1.getFluidMarketInfoByAddress; } });
38
+ var aaveV4_1 = require("./aaveV4");
39
+ Object.defineProperty(exports, "AaveV4Spokes", { enumerable: true, get: function () { return aaveV4_1.AaveV4Spokes; } });
@@ -1,12 +1,12 @@
1
- import { MMUsedAssets } from '../types/common';
1
+ import { LeverageType, MMUsedAssets } from '../types/common';
2
2
  export declare const getAssetsTotal: (assets: object, filter: any, transform: any) => any;
3
3
  export declare const calcLongLiqPrice: (assetPrice: string, borrowedUsd: string, borrowLimitUsd: string) => string;
4
4
  export declare const calcShortLiqPrice: (assetPrice: string, borrowedUsd: string, borrowLimitUsd: string) => string;
5
- export declare const calcLeverageLiqPrice: (leverageType: string, assetPrice: string, borrowedUsd: string, borrowLimitUsd: string) => string;
5
+ export declare const calcLeverageLiqPrice: (leverageType: LeverageType, assetPrice: string, borrowedUsd: string, borrowLimitUsd: string) => string;
6
6
  export declare const calculateBorrowingAssetLimit: (assetBorrowedUsd: string, borrowLimitUsd: string) => string;
7
7
  export declare const STABLE_ASSETS: string[];
8
8
  export declare const isLeveragedPos: (usedAssets: MMUsedAssets, dustLimit?: number) => {
9
- leveragedType: string;
9
+ leveragedType: LeverageType;
10
10
  leveragedAsset: string;
11
11
  };
12
12
  export declare const aprToApy: (interest: string | number, frequency?: number) => string;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.aprToApy = exports.isLeveragedPos = exports.STABLE_ASSETS = exports.calculateBorrowingAssetLimit = exports.calcLeverageLiqPrice = exports.calcShortLiqPrice = exports.calcLongLiqPrice = exports.getAssetsTotal = void 0;
7
7
  const decimal_js_1 = __importDefault(require("decimal.js"));
8
8
  const constants_1 = require("../constants");
9
+ const common_1 = require("../types/common");
9
10
  const getAssetsTotal = (assets, filter, transform) => Object.values(assets)
10
11
  .filter(filter)
11
12
  .map(transform)
@@ -17,9 +18,9 @@ exports.calcLongLiqPrice = calcLongLiqPrice;
17
18
  const calcShortLiqPrice = (assetPrice, borrowedUsd, borrowLimitUsd) => new decimal_js_1.default(assetPrice).div(borrowedUsd).mul(borrowLimitUsd).toString();
18
19
  exports.calcShortLiqPrice = calcShortLiqPrice;
19
20
  const calcLeverageLiqPrice = (leverageType, assetPrice, borrowedUsd, borrowLimitUsd) => {
20
- if (leverageType === 'short')
21
+ if (leverageType === common_1.LeverageType.Short || leverageType === common_1.LeverageType.VolatilePairReverse)
21
22
  return (0, exports.calcShortLiqPrice)(assetPrice, borrowedUsd, borrowLimitUsd);
22
- if (leverageType === 'long' || leverageType === 'lsd-leverage')
23
+ if (leverageType === common_1.LeverageType.Long || leverageType === common_1.LeverageType.VolatilePair)
23
24
  return (0, exports.calcLongLiqPrice)(assetPrice, borrowedUsd, borrowLimitUsd);
24
25
  console.error('invalid leverageType', leverageType);
25
26
  return '0';
@@ -58,28 +59,27 @@ const isLeveragedPos = (usedAssets, dustLimit = 5) => {
58
59
  });
59
60
  const isLong = borrowStable > 0 && borrowUnstable === 0 && supplyUnstable === 1 && supplyStable === 0;
60
61
  const isShort = supplyStable > 0 && supplyUnstable === 0 && borrowUnstable === 1 && borrowStable === 0;
61
- // lsd -> liquid staking derivative
62
- const isLsdLeveraged = supplyUnstable === 1 && borrowUnstable === 1 && shortAsset === 'ETH' && ['stETH', 'wstETH', 'cbETH', 'rETH', 'ezETH', 'weETH'].includes(longAsset);
62
+ const isVolatilePair = supplyUnstable === 1 && borrowUnstable === 1 && supplyStable === 0 && borrowStable === 0;
63
63
  if (isLong) {
64
64
  return {
65
- leveragedType: 'long',
65
+ leveragedType: common_1.LeverageType.Long,
66
66
  leveragedAsset: longAsset,
67
67
  };
68
68
  }
69
69
  if (isShort) {
70
70
  return {
71
- leveragedType: 'short',
71
+ leveragedType: common_1.LeverageType.Short,
72
72
  leveragedAsset: shortAsset,
73
73
  };
74
74
  }
75
- if (isLsdLeveraged) {
75
+ if (isVolatilePair) {
76
76
  return {
77
- leveragedType: 'lsd-leverage',
77
+ leveragedType: common_1.LeverageType.VolatilePair,
78
78
  leveragedAsset: longAsset,
79
79
  };
80
80
  }
81
81
  return {
82
- leveragedType: '',
82
+ leveragedType: common_1.LeverageType.None,
83
83
  leveragedAsset: '',
84
84
  };
85
85
  };
@@ -40,6 +40,7 @@ const spark_2 = require("../claiming/spark");
40
40
  const morphoBlue_2 = require("../claiming/morphoBlue");
41
41
  const king_1 = require("../claiming/king");
42
42
  const ethena_1 = require("../claiming/ethena");
43
+ const aaveV4_1 = require("../aaveV4");
43
44
  function getPortfolioData(provider_1, network_1, defaultProvider_1, addresses_1) {
44
45
  return __awaiter(this, arguments, void 0, function* (provider, network, defaultProvider, addresses, isSim = false) {
45
46
  const isMainnet = network === common_1.NetworkNumber.Eth;
@@ -56,6 +57,7 @@ function getPortfolioData(provider_1, network_1, defaultProvider_1, addresses_1)
56
57
  const llamaLendMarkets = [common_1.NetworkNumber.Eth, common_1.NetworkNumber.Arb].includes(network) ? Object.values((0, markets_1.LlamaLendMarkets)(network)).filter((market) => market.chainIds.includes(network)) : [];
57
58
  const liquityV2Markets = [common_1.NetworkNumber.Eth].includes(network) ? Object.values((0, markets_1.LiquityV2Markets)(network)) : [];
58
59
  const liquityV2MarketsStaking = [common_1.NetworkNumber.Eth].includes(network) ? Object.values((0, markets_1.LiquityV2Markets)(network)).filter(market => !market.isLegacy) : [];
60
+ const aaveV4Spokes = Object.values((0, markets_1.AaveV4Spokes)(network)).filter((market) => market.chainIds.includes(network));
59
61
  const args = [network, { batch: { multicall: { batchSize: isSim ? 500000 : 2500000 } } }];
60
62
  const client = (0, viem_1.getViemProvider)(provider, ...args);
61
63
  const defaultClient = (0, viem_1.getViemProvider)(defaultProvider, ...args);
@@ -70,6 +72,7 @@ function getPortfolioData(provider_1, network_1, defaultProvider_1, addresses_1)
70
72
  const crvUsdMarketsData = {};
71
73
  const llamaLendMarketsData = {};
72
74
  const liquityV2MarketsData = {};
75
+ const aaveV4SpokesData = {};
73
76
  const markets = {
74
77
  morphoMarketsData,
75
78
  compoundV3MarketsData,
@@ -81,6 +84,7 @@ function getPortfolioData(provider_1, network_1, defaultProvider_1, addresses_1)
81
84
  crvUsdMarketsData,
82
85
  llamaLendMarketsData,
83
86
  liquityV2MarketsData,
87
+ aaveV4SpokesData,
84
88
  };
85
89
  const positions = {};
86
90
  const stakingPositions = {};
@@ -89,6 +93,7 @@ function getPortfolioData(provider_1, network_1, defaultProvider_1, addresses_1)
89
93
  for (const address of allAddresses) {
90
94
  positions[address.toLowerCase()] = {
91
95
  aaveV3: {},
96
+ aaveV4: {},
92
97
  morphoBlue: {},
93
98
  compoundV3: {},
94
99
  spark: {},
@@ -154,6 +159,10 @@ function getPortfolioData(provider_1, network_1, defaultProvider_1, addresses_1)
154
159
  const marketData = yield (0, aaveV3_1._getAaveV3MarketData)(client, network, market);
155
160
  aaveV3MarketsData[market.value] = marketData;
156
161
  })),
162
+ ...aaveV4Spokes.map((spoke) => __awaiter(this, void 0, void 0, function* () {
163
+ const spokeData = yield (0, aaveV4_1._getAaveV4SpokeData)(client, network, spoke);
164
+ aaveV4SpokesData[spoke.value] = spokeData;
165
+ })),
157
166
  ...aaveV2Markets.map((market) => __awaiter(this, void 0, void 0, function* () {
158
167
  const marketData = yield (0, aaveV2_1._getAaveV2MarketsData)(client, network, market);
159
168
  aaveV2MarketsData[market.value] = marketData;
@@ -423,6 +432,17 @@ function getPortfolioData(provider_1, network_1, defaultProvider_1, addresses_1)
423
432
  positions[address.toLowerCase()].aaveV3[market.value] = { error: `Error fetching AaveV3 account data for address ${address} on market ${market.value}`, data: null };
424
433
  }
425
434
  }))).flat(),
435
+ ...aaveV4Spokes.map((spoke) => allAddresses.map((address) => __awaiter(this, void 0, void 0, function* () {
436
+ try {
437
+ const accData = yield (0, aaveV4_1._getAaveV4AccountData)(client, network, aaveV4SpokesData[spoke.value], address);
438
+ if (new decimal_js_1.default(accData.suppliedUsd).gt(0))
439
+ positions[address.toLowerCase()].aaveV4[spoke.value] = { error: '', data: accData };
440
+ }
441
+ catch (error) {
442
+ console.error(`Error fetching AaveV4 account data for address ${address} on spoke ${spoke.value}:`, error);
443
+ positions[address.toLowerCase()].aaveV4[spoke.value] = { error: `Error fetching AaveV4 account data for address ${address} on spoke ${spoke.value}`, data: null };
444
+ }
445
+ }))).flat(),
426
446
  ...morphoMarkets.map((market) => addresses.map((address) => __awaiter(this, void 0, void 0, function* () {
427
447
  try {
428
448
  const [accDataPromise, earnDataPromise] = yield Promise.allSettled([
@@ -54,23 +54,23 @@ const morphoVaultsOptions = __importStar(require("./options"));
54
54
  exports.morphoVaultsOptions = morphoVaultsOptions;
55
55
  const viem_1 = require("../../services/viem");
56
56
  const contracts_1 = require("../../contracts");
57
- const vaultDataQuery = (vaultAddress) => `query vaultByAddress {
58
- vaultByAddress(chainId: 1, address: "${vaultAddress}") {
59
- id,
60
- dailyApy,
61
- dailyApys {
62
- apy, netApy
63
- },
64
- monthlyApys {
65
- apy, netApy
66
- },
67
- liquidity {
68
- underlying, usd,
69
- },
70
- asset {
71
- priceUsd
72
- }
73
- }
57
+ const vaultDataQuery = (vaultAddress) => `query vaultByAddress {
58
+ vaultByAddress(chainId: 1, address: "${vaultAddress}") {
59
+ id,
60
+ dailyApy,
61
+ dailyApys {
62
+ apy, netApy
63
+ },
64
+ monthlyApys {
65
+ apy, netApy
66
+ },
67
+ liquidity {
68
+ underlying, usd,
69
+ },
70
+ asset {
71
+ priceUsd
72
+ }
73
+ }
74
74
  }`;
75
75
  const MORPHO_BLUE_API = 'https://blue-api.morpho.org/graphql';
76
76
  const _getMorphoVaultData = (provider, network, morphoVault, accounts) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1,4 +1,4 @@
1
- import { IncentiveData, MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber } from './common';
1
+ import { IncentiveData, LeverageType, MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber } from './common';
2
2
  export declare enum AaveVersions {
3
3
  AaveV1 = "v1",
4
4
  AaveV2 = "v2default",
@@ -161,14 +161,14 @@ export interface AaveV3AggregatedPositionData {
161
161
  totalInterestUsd: string;
162
162
  liqRatio: string;
163
163
  liqPercent: string;
164
- leveragedType: string;
164
+ leveragedType: LeverageType;
165
165
  leveragedAsset?: string;
166
- leveragedLsdAssetRatio?: string;
167
166
  liquidationPrice?: string;
168
167
  minCollRatio?: string;
169
168
  collLiquidationRatio?: string;
170
169
  healthRatio?: string;
171
170
  minHealthRatio?: string;
171
+ currentVolatilePairRatio?: string;
172
172
  }
173
173
  export interface AaveHelperCommon {
174
174
  usedAssets: any;
@@ -0,0 +1,137 @@
1
+ import { EthAddress, IncentiveData, LeverageType, NetworkNumber } from './common';
2
+ export declare enum AaveV4SpokesType {
3
+ AaveV4CoreSpoke = "aave_v4_core_spoke"
4
+ }
5
+ export declare enum AaveV4HubsType {
6
+ AaveV4CoreHub = "aave_v4_core_hub"
7
+ }
8
+ export interface AaveV4SpokeInfo {
9
+ chainIds: NetworkNumber[];
10
+ label: string;
11
+ value: AaveV4SpokesType;
12
+ url: string;
13
+ address: EthAddress;
14
+ hubs: EthAddress[];
15
+ }
16
+ export interface AaveV4HubInfo {
17
+ chainIds: NetworkNumber[];
18
+ label: string;
19
+ value: AaveV4HubsType;
20
+ address: EthAddress;
21
+ }
22
+ export interface AaveV4HubAssetOnChainData {
23
+ assetId: number;
24
+ drawnRate: bigint;
25
+ }
26
+ export interface AaveV4HubOnChainData {
27
+ assets: Record<number, AaveV4HubAssetOnChainData>;
28
+ }
29
+ export interface AaveV4ReserveAssetOnChain {
30
+ underlying: EthAddress;
31
+ hub: EthAddress;
32
+ assetId: number;
33
+ decimals: number;
34
+ paused: boolean;
35
+ frozen: boolean;
36
+ borrowable: boolean;
37
+ collateralRisk: number;
38
+ collateralFactor: number;
39
+ maxLiquidationBonus: number;
40
+ liquidationFee: number;
41
+ price: bigint;
42
+ totalSupplied: bigint;
43
+ totalDrawn: bigint;
44
+ totalPremium: bigint;
45
+ totalDebt: bigint;
46
+ supplyCap: bigint;
47
+ borrowCap: bigint;
48
+ deficitRay: bigint;
49
+ spokeActive: boolean;
50
+ spokePaused: boolean;
51
+ }
52
+ export interface AaveV4ReserveAssetData {
53
+ symbol: string;
54
+ underlying: EthAddress;
55
+ hub: EthAddress;
56
+ hubName: string;
57
+ assetId: number;
58
+ reserveId: number;
59
+ paused: boolean;
60
+ frozen: boolean;
61
+ borrowable: boolean;
62
+ collateralRisk: number;
63
+ collateralFactor: number;
64
+ liquidationFee: number;
65
+ price: string;
66
+ totalSupplied: string;
67
+ totalDrawn: string;
68
+ totalPremium: string;
69
+ totalDebt: string;
70
+ supplyCap: string;
71
+ borrowCap: string;
72
+ spokeActive: boolean;
73
+ spokePaused: boolean;
74
+ drawnRate: string;
75
+ supplyRate: string;
76
+ supplyIncentives: IncentiveData[];
77
+ borrowIncentives: IncentiveData[];
78
+ canBeBorrowed: boolean;
79
+ canBeSupplied: boolean;
80
+ canBeWithdrawn: boolean;
81
+ canBePayBacked: boolean;
82
+ utilization: string;
83
+ }
84
+ export type AaveV4AssetsData = Record<string, AaveV4ReserveAssetData>;
85
+ export interface AaveV4SpokeData {
86
+ assetsData: AaveV4AssetsData;
87
+ oracle: EthAddress;
88
+ oracleDecimals: number;
89
+ address: EthAddress;
90
+ }
91
+ export interface AaveV4UsedReserveAsset {
92
+ symbol: string;
93
+ hubName: string;
94
+ assetId: number;
95
+ reserveId: number;
96
+ supplied: string;
97
+ suppliedUsd: string;
98
+ drawn: string;
99
+ drawnUsd: string;
100
+ premium: string;
101
+ premiumUsd: string;
102
+ borrowed: string;
103
+ borrowedUsd: string;
104
+ isSupplied: boolean;
105
+ isBorrowed: boolean;
106
+ collateral: boolean;
107
+ collateralFactor: number;
108
+ }
109
+ export interface AaveV4AggregatedPositionData {
110
+ suppliedUsd: string;
111
+ suppliedCollateralUsd: string;
112
+ borrowLimitUsd: string;
113
+ liquidationLimitUsd: string;
114
+ borrowedUsd: string;
115
+ drawnUsd: string;
116
+ premiumUsd: string;
117
+ leftToBorrowUsd: string;
118
+ ratio: string;
119
+ collRatio: string;
120
+ liqRatio: string;
121
+ liqPercent: string;
122
+ leveragedType: LeverageType;
123
+ leveragedAsset: string;
124
+ liquidationPrice: string;
125
+ minCollRatio: string;
126
+ collLiquidationRatio: string;
127
+ minHealthRatio: string;
128
+ netApy: string;
129
+ incentiveUsd: string;
130
+ totalInterestUsd: string;
131
+ currentVolatilePairRatio?: string;
132
+ }
133
+ export type AaveV4UsedReserveAssets = Record<string, AaveV4UsedReserveAsset>;
134
+ export interface AaveV4AccountData extends AaveV4AggregatedPositionData {
135
+ usedAssets: AaveV4UsedReserveAssets;
136
+ healthFactor: string;
137
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AaveV4HubsType = exports.AaveV4SpokesType = void 0;
4
+ var AaveV4SpokesType;
5
+ (function (AaveV4SpokesType) {
6
+ AaveV4SpokesType["AaveV4CoreSpoke"] = "aave_v4_core_spoke";
7
+ })(AaveV4SpokesType || (exports.AaveV4SpokesType = AaveV4SpokesType = {}));
8
+ var AaveV4HubsType;
9
+ (function (AaveV4HubsType) {
10
+ AaveV4HubsType["AaveV4CoreHub"] = "aave_v4_core_hub";
11
+ })(AaveV4HubsType || (exports.AaveV4HubsType = AaveV4HubsType = {}));
@@ -8,6 +8,13 @@ export declare enum IncentiveEligibilityId {
8
8
  AaveV3ArbitrumETHLSBorrow = "0x0c84331e39d6658Cd6e6b9ba04736cC4c4734351",
9
9
  AaveV3EthenaLiquidLeveragePlasma = "0x67264783f1e9a2af8627a235853057a6fc975bd2BORROW_BL"
10
10
  }
11
+ export declare enum LeverageType {
12
+ Long = "long",
13
+ Short = "short",
14
+ VolatilePair = "volatile-pair",
15
+ VolatilePairReverse = "volatile-pair-reverse",
16
+ None = ""
17
+ }
11
18
  export interface IncentiveData {
12
19
  token: string;
13
20
  apy: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NetworkNumber = exports.IncentiveEligibilityId = exports.IncentiveKind = void 0;
3
+ exports.NetworkNumber = exports.LeverageType = exports.IncentiveEligibilityId = exports.IncentiveKind = void 0;
4
4
  var IncentiveKind;
5
5
  (function (IncentiveKind) {
6
6
  IncentiveKind["Staking"] = "staking";
@@ -13,6 +13,14 @@ var IncentiveEligibilityId;
13
13
  IncentiveEligibilityId["AaveV3ArbitrumETHLSBorrow"] = "0x0c84331e39d6658Cd6e6b9ba04736cC4c4734351";
14
14
  IncentiveEligibilityId["AaveV3EthenaLiquidLeveragePlasma"] = "0x67264783f1e9a2af8627a235853057a6fc975bd2BORROW_BL";
15
15
  })(IncentiveEligibilityId || (exports.IncentiveEligibilityId = IncentiveEligibilityId = {}));
16
+ var LeverageType;
17
+ (function (LeverageType) {
18
+ LeverageType["Long"] = "long";
19
+ LeverageType["Short"] = "short";
20
+ LeverageType["VolatilePair"] = "volatile-pair";
21
+ LeverageType["VolatilePairReverse"] = "volatile-pair-reverse";
22
+ LeverageType["None"] = "";
23
+ })(LeverageType || (exports.LeverageType = LeverageType = {}));
16
24
  var NetworkNumber;
17
25
  (function (NetworkNumber) {
18
26
  NetworkNumber[NetworkNumber["Eth"] = 1] = "Eth";
@@ -1,4 +1,4 @@
1
- import { EthAddress, MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber } from './common';
1
+ import { EthAddress, LeverageType, MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber } from './common';
2
2
  export declare enum CompoundVersions {
3
3
  'CompoundV2' = "v2",
4
4
  'CompoundV3USDC' = "v3-USDC",
@@ -94,9 +94,9 @@ export interface CompoundAggregatedPositionData {
94
94
  totalInterestUsd: string;
95
95
  liqRatio: string;
96
96
  liqPercent: string;
97
- leveragedType: string;
97
+ leveragedType: LeverageType;
98
98
  leveragedAsset?: string;
99
- leveragedLsdAssetRatio?: string;
99
+ currentVolatilePairRatio?: string;
100
100
  liquidationPrice?: string;
101
101
  minRatio: string;
102
102
  debtTooLow: boolean;
@@ -1,4 +1,4 @@
1
- import { EthAddress, NetworkNumber } from './common';
1
+ import { EthAddress, LeverageType, NetworkNumber } from './common';
2
2
  export declare enum CrvUSDVersions {
3
3
  'crvUSDwstETH' = "wstETH",
4
4
  'crvUSDWBTC' = "WBTC",
@@ -71,7 +71,7 @@ export interface CrvUSDAggregatedPositionData {
71
71
  borrowLimitUsd: string;
72
72
  minAllowedRatio: number;
73
73
  collFactor: string;
74
- leveragedType: string;
74
+ leveragedType: LeverageType;
75
75
  leveragedAsset?: string;
76
76
  liquidationPrice?: string;
77
77
  }
@@ -1,4 +1,4 @@
1
- import { EthAddress, IncentiveData, MMPositionData, NetworkNumber } from './common';
1
+ import { EthAddress, IncentiveData, LeverageType, MMPositionData, NetworkNumber } from './common';
2
2
  export declare enum EulerV2Versions {
3
3
  eUSDC2 = "eUSDC-2",
4
4
  eWETH2 = "eWETH-2"
@@ -141,9 +141,9 @@ export interface EulerV2AggregatedPositionData {
141
141
  totalInterestUsd: string;
142
142
  liqRatio: string;
143
143
  liqPercent: string;
144
- leveragedType: string;
144
+ leveragedType: LeverageType;
145
145
  leveragedAsset?: string;
146
- leveragedLsdAssetRatio?: string;
146
+ currentVolatilePairRatio?: string;
147
147
  liquidationPrice?: string;
148
148
  minRatio: string;
149
149
  minDebt: string;
@@ -1,4 +1,4 @@
1
- import { EthAddress, IncentiveData, NetworkNumber } from './common';
1
+ import { EthAddress, IncentiveData, LeverageType, NetworkNumber } from './common';
2
2
  export interface FluidMarketInfo {
3
3
  chainIds: number[];
4
4
  label: string;
@@ -323,10 +323,10 @@ export interface FluidAggregatedVaultData {
323
323
  collRatio: string;
324
324
  minRatio: string;
325
325
  totalInterestUsd: string;
326
- leveragedType?: string;
326
+ leveragedType?: LeverageType;
327
327
  leveragedAsset?: string;
328
328
  liquidationPrice?: string;
329
- leveragedLsdAssetRatio?: string;
329
+ currentVolatilePairRatio?: string;
330
330
  minCollRatio?: string;
331
331
  collLiquidationRatio?: string;
332
332
  }
@@ -13,3 +13,5 @@ export * from './portfolio';
13
13
  export * from './merit';
14
14
  export * from './merkl';
15
15
  export * from './savings';
16
+ export * from './common';
17
+ export * from './aaveV4';
@@ -29,3 +29,5 @@ __exportStar(require("./portfolio"), exports);
29
29
  __exportStar(require("./merit"), exports);
30
30
  __exportStar(require("./merkl"), exports);
31
31
  __exportStar(require("./savings"), exports);
32
+ __exportStar(require("./common"), exports);
33
+ __exportStar(require("./aaveV4"), exports);
@@ -1,4 +1,4 @@
1
- import { EthAddress, IncentiveData, NetworkNumber } from './common';
1
+ import { EthAddress, IncentiveData, LeverageType, NetworkNumber } from './common';
2
2
  export declare enum LiquityV2Versions {
3
3
  LiquityV2Eth = "liquityv2eth",
4
4
  LiquityV2WstEth = "liquityv2wsteth",
@@ -88,7 +88,7 @@ export interface LiquityV2AggregatedTroveData {
88
88
  netApy: string;
89
89
  incentiveUsd: string;
90
90
  totalInterestUsd: string;
91
- leveragedType: string;
91
+ leveragedType: LeverageType;
92
92
  leveragedAsset: string;
93
93
  liquidationPrice: string;
94
94
  ratio: string;
@@ -110,7 +110,7 @@ export interface LiquityV2TroveData {
110
110
  totalInterestUsd: string;
111
111
  interestBatchManager: EthAddress;
112
112
  troveStatus: string;
113
- leveragedType: string;
113
+ leveragedType: LeverageType;
114
114
  leveragedAsset: string;
115
115
  liquidationPrice: string;
116
116
  debtInFront: string;