@defisaver/positions-sdk 2.1.21 → 2.1.22-dev-savings-2

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 (149) hide show
  1. package/.mocharc.json +4 -4
  2. package/.nvmrc +1 -1
  3. package/README.md +64 -64
  4. package/cjs/config/contracts.d.ts +153 -0
  5. package/cjs/config/contracts.js +19 -1
  6. package/cjs/contracts.d.ts +1344 -0
  7. package/cjs/contracts.js +20 -1
  8. package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
  9. package/cjs/index.d.ts +2 -1
  10. package/cjs/index.js +3 -1
  11. package/cjs/markets/morphoBlue/index.d.ts +12 -0
  12. package/cjs/markets/morphoBlue/index.js +106 -2
  13. package/cjs/savings/index.d.ts +6 -0
  14. package/cjs/savings/index.js +71 -0
  15. package/cjs/savings/morphoVaults/index.d.ts +7 -0
  16. package/cjs/savings/morphoVaults/index.js +116 -0
  17. package/cjs/savings/morphoVaults/options.d.ts +16 -0
  18. package/cjs/savings/morphoVaults/options.js +99 -0
  19. package/cjs/savings/yearnVaults/index.d.ts +7 -0
  20. package/cjs/savings/yearnVaults/index.js +95 -0
  21. package/cjs/savings/yearnVaults/options.d.ts +6 -0
  22. package/cjs/savings/yearnVaults/options.js +26 -0
  23. package/cjs/types/index.d.ts +1 -0
  24. package/cjs/types/index.js +1 -0
  25. package/cjs/types/morphoBlue.d.ts +7 -1
  26. package/cjs/types/morphoBlue.js +7 -0
  27. package/cjs/types/savings/index.d.ts +18 -0
  28. package/cjs/types/savings/index.js +18 -0
  29. package/cjs/types/savings/morphoVaults.d.ts +22 -0
  30. package/cjs/types/savings/morphoVaults.js +19 -0
  31. package/cjs/types/savings/yearnVaults.d.ts +11 -0
  32. package/cjs/types/savings/yearnVaults.js +9 -0
  33. package/esm/config/contracts.d.ts +153 -0
  34. package/esm/config/contracts.js +18 -0
  35. package/esm/contracts.d.ts +1344 -0
  36. package/esm/contracts.js +17 -0
  37. package/esm/helpers/morphoBlueHelpers/index.js +66 -66
  38. package/esm/index.d.ts +2 -1
  39. package/esm/index.js +2 -1
  40. package/esm/markets/morphoBlue/index.d.ts +12 -0
  41. package/esm/markets/morphoBlue/index.js +98 -0
  42. package/esm/savings/index.d.ts +6 -0
  43. package/esm/savings/index.js +33 -0
  44. package/esm/savings/morphoVaults/index.d.ts +7 -0
  45. package/esm/savings/morphoVaults/index.js +75 -0
  46. package/esm/savings/morphoVaults/options.d.ts +16 -0
  47. package/esm/savings/morphoVaults/options.js +95 -0
  48. package/esm/savings/yearnVaults/index.d.ts +7 -0
  49. package/esm/savings/yearnVaults/index.js +54 -0
  50. package/esm/savings/yearnVaults/options.d.ts +6 -0
  51. package/esm/savings/yearnVaults/options.js +22 -0
  52. package/esm/types/index.d.ts +1 -0
  53. package/esm/types/index.js +1 -0
  54. package/esm/types/morphoBlue.d.ts +7 -1
  55. package/esm/types/morphoBlue.js +7 -0
  56. package/esm/types/savings/index.d.ts +18 -0
  57. package/esm/types/savings/index.js +2 -0
  58. package/esm/types/savings/morphoVaults.d.ts +22 -0
  59. package/esm/types/savings/morphoVaults.js +16 -0
  60. package/esm/types/savings/yearnVaults.d.ts +11 -0
  61. package/esm/types/savings/yearnVaults.js +6 -0
  62. package/package.json +48 -47
  63. package/src/aaveV2/index.ts +240 -240
  64. package/src/aaveV3/index.ts +614 -614
  65. package/src/aaveV3/merit.ts +97 -97
  66. package/src/aaveV3/merkl.ts +74 -74
  67. package/src/claiming/aaveV3.ts +154 -154
  68. package/src/claiming/compV3.ts +22 -22
  69. package/src/claiming/index.ts +12 -12
  70. package/src/claiming/king.ts +66 -66
  71. package/src/claiming/morphoBlue.ts +118 -118
  72. package/src/claiming/spark.ts +225 -225
  73. package/src/compoundV2/index.ts +244 -244
  74. package/src/compoundV3/index.ts +274 -274
  75. package/src/config/contracts.ts +1273 -1255
  76. package/src/constants/index.ts +10 -10
  77. package/src/contracts.ts +141 -121
  78. package/src/curveUsd/index.ts +254 -254
  79. package/src/eulerV2/index.ts +324 -324
  80. package/src/exchange/index.ts +25 -25
  81. package/src/fluid/index.ts +1774 -1774
  82. package/src/helpers/aaveHelpers/index.ts +187 -187
  83. package/src/helpers/compoundHelpers/index.ts +283 -283
  84. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  85. package/src/helpers/eulerHelpers/index.ts +222 -222
  86. package/src/helpers/fluidHelpers/index.ts +326 -326
  87. package/src/helpers/index.ts +10 -10
  88. package/src/helpers/liquityV2Helpers/index.ts +82 -82
  89. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  90. package/src/helpers/makerHelpers/index.ts +52 -52
  91. package/src/helpers/morphoBlueHelpers/index.ts +396 -396
  92. package/src/helpers/sparkHelpers/index.ts +158 -158
  93. package/src/index.ts +49 -47
  94. package/src/liquity/index.ts +159 -159
  95. package/src/liquityV2/index.ts +703 -703
  96. package/src/llamaLend/index.ts +305 -305
  97. package/src/maker/index.ts +223 -223
  98. package/src/markets/aave/index.ts +116 -116
  99. package/src/markets/aave/marketAssets.ts +54 -54
  100. package/src/markets/compound/index.ts +238 -238
  101. package/src/markets/compound/marketsAssets.ts +97 -97
  102. package/src/markets/curveUsd/index.ts +69 -69
  103. package/src/markets/euler/index.ts +26 -26
  104. package/src/markets/fluid/index.ts +2900 -2900
  105. package/src/markets/index.ts +25 -25
  106. package/src/markets/liquityV2/index.ts +102 -102
  107. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  108. package/src/markets/llamaLend/index.ts +235 -235
  109. package/src/markets/morphoBlue/index.ts +971 -866
  110. package/src/markets/spark/index.ts +29 -29
  111. package/src/markets/spark/marketAssets.ts +12 -12
  112. package/src/moneymarket/moneymarketCommonService.ts +84 -84
  113. package/src/morphoBlue/index.ts +274 -274
  114. package/src/portfolio/index.ts +572 -572
  115. package/src/savings/index.ts +38 -0
  116. package/src/savings/morphoVaults/index.ts +79 -0
  117. package/src/savings/morphoVaults/options.ts +110 -0
  118. package/src/savings/yearnVaults/index.ts +56 -0
  119. package/src/savings/yearnVaults/options.ts +27 -0
  120. package/src/services/priceService.ts +278 -278
  121. package/src/services/utils.ts +115 -115
  122. package/src/services/viem.ts +34 -34
  123. package/src/setup.ts +8 -8
  124. package/src/spark/index.ts +456 -456
  125. package/src/staking/eligibility.ts +53 -53
  126. package/src/staking/index.ts +1 -1
  127. package/src/staking/staking.ts +183 -183
  128. package/src/types/aave.ts +189 -189
  129. package/src/types/claiming.ts +109 -109
  130. package/src/types/common.ts +107 -107
  131. package/src/types/compound.ts +136 -136
  132. package/src/types/curveUsd.ts +123 -123
  133. package/src/types/euler.ts +175 -175
  134. package/src/types/fluid.ts +483 -483
  135. package/src/types/index.ts +15 -14
  136. package/src/types/liquity.ts +30 -30
  137. package/src/types/liquityV2.ts +126 -126
  138. package/src/types/llamaLend.ts +159 -159
  139. package/src/types/maker.ts +63 -63
  140. package/src/types/merit.ts +1 -1
  141. package/src/types/merkl.ts +70 -70
  142. package/src/types/morphoBlue.ts +200 -192
  143. package/src/types/portfolio.ts +60 -60
  144. package/src/types/savings/index.ts +21 -0
  145. package/src/types/savings/morphoVaults.ts +24 -0
  146. package/src/types/savings/yearnVaults.ts +13 -0
  147. package/src/types/spark.ts +133 -133
  148. package/src/umbrella/index.ts +69 -69
  149. package/src/umbrella/umbrellaUtils.ts +29 -29
@@ -1,107 +1,107 @@
1
- export enum IncentiveKind {
2
- Staking = 'staking',
3
- Reward = 'reward',
4
- }
5
-
6
- export enum IncentiveEligibilityId {
7
- AaveV3EthenaLiquidLeverage = '0x7361e6f04060154e0268a8402b073cbf97e11ae3BORROW_BL',
8
- AaveV3ArbitrumEthSupply = '0x5d16261c6715a653248269861bbacf68a9774cde',
9
- AaveV3ArbitrumETHLSBorrow = '0x0c84331e39d6658Cd6e6b9ba04736cC4c4734351',
10
- AaveV3EthenaLiquidLeveragePlasma = '0x67264783f1e9a2af8627a235853057a6fc975bd2BORROW_BL',
11
- }
12
-
13
- export interface IncentiveData {
14
- token: string,
15
- apy: string,
16
- incentiveKind?: IncentiveKind;
17
- description?: string;
18
- eligibilityId?: IncentiveEligibilityId;
19
- }
20
-
21
- // General
22
- export type EthAddress = HexString;
23
- export type Blockish = number | 'latest';
24
- export type AssetSymbol = string;
25
- export type Amount = string | number;
26
-
27
- export enum NetworkNumber {
28
- Eth = 1,
29
- Opt = 10,
30
- Arb = 42161,
31
- Base = 8453,
32
- Linea = 59144,
33
- Plasma = 9745,
34
- }
35
- export type Networkish = string | NetworkNumber;
36
-
37
- // Common
38
- export interface MMAssetData {
39
- symbol: string,
40
- supplyRate: string,
41
- borrowRate: string,
42
- price: string,
43
- collateralFactor: string,
44
- underlyingTokenAddress: string,
45
- marketLiquidity: string,
46
- utilization: string,
47
- borrowCap: string,
48
- totalSupply: string,
49
- canBeBorrowed: boolean,
50
- canBeSupplied: boolean,
51
- totalBorrow: string,
52
- borrowRateP2P?: string,
53
- supplyRateP2P?: string,
54
- supplyIncentives: IncentiveData[];
55
- borrowIncentives: IncentiveData[];
56
- }
57
-
58
- export interface MMAssetsData {
59
- [token: string]: MMAssetData,
60
- }
61
- export interface MMMarketData {
62
- assetsData: MMAssetData[],
63
- }
64
- export interface MMUsedAsset {
65
- symbol: string,
66
- supplied: string,
67
- suppliedUsd: string,
68
- isSupplied: boolean,
69
- borrowed: string,
70
- borrowedUsd: string,
71
- isBorrowed: boolean,
72
- stableBorrowRate?: string,
73
- debt?: string,
74
- supplyRate?: string,
75
- borrowRate?: string,
76
- interestMode?: string,
77
- collateral?: boolean,
78
- }
79
- export interface MMUsedAssets {
80
- [token: string]: MMUsedAsset,
81
- }
82
- export interface MMUsedAssetWStableB extends MMUsedAsset {
83
- stableBorrowRate: string,
84
- borrowedStable: string,
85
- borrowedVariable: string,
86
- borrowedUsdStable: string,
87
- borrowedUsdVariable: string,
88
- interestMode: string,
89
- }
90
- export interface MMPositionData {
91
- usedAssets: any,
92
- netApy: string,
93
- lastUpdated: number,
94
- // ...
95
- }
96
-
97
- export type Balances = Record<AssetSymbol, Amount>;
98
- export interface PositionBalances {
99
- collateral?: Balances,
100
- debt?: Balances,
101
- selling?: Balances,
102
- deposited?: Balances,
103
- }
104
-
105
- export type EthereumProvider = { request(...args: any): Promise<any> }; // TODO
106
-
107
- export type HexString = `0x${string}`;
1
+ export enum IncentiveKind {
2
+ Staking = 'staking',
3
+ Reward = 'reward',
4
+ }
5
+
6
+ export enum IncentiveEligibilityId {
7
+ AaveV3EthenaLiquidLeverage = '0x7361e6f04060154e0268a8402b073cbf97e11ae3BORROW_BL',
8
+ AaveV3ArbitrumEthSupply = '0x5d16261c6715a653248269861bbacf68a9774cde',
9
+ AaveV3ArbitrumETHLSBorrow = '0x0c84331e39d6658Cd6e6b9ba04736cC4c4734351',
10
+ AaveV3EthenaLiquidLeveragePlasma = '0x67264783f1e9a2af8627a235853057a6fc975bd2BORROW_BL',
11
+ }
12
+
13
+ export interface IncentiveData {
14
+ token: string,
15
+ apy: string,
16
+ incentiveKind?: IncentiveKind;
17
+ description?: string;
18
+ eligibilityId?: IncentiveEligibilityId;
19
+ }
20
+
21
+ // General
22
+ export type EthAddress = HexString;
23
+ export type Blockish = number | 'latest';
24
+ export type AssetSymbol = string;
25
+ export type Amount = string | number;
26
+
27
+ export enum NetworkNumber {
28
+ Eth = 1,
29
+ Opt = 10,
30
+ Arb = 42161,
31
+ Base = 8453,
32
+ Linea = 59144,
33
+ Plasma = 9745,
34
+ }
35
+ export type Networkish = string | NetworkNumber;
36
+
37
+ // Common
38
+ export interface MMAssetData {
39
+ symbol: string,
40
+ supplyRate: string,
41
+ borrowRate: string,
42
+ price: string,
43
+ collateralFactor: string,
44
+ underlyingTokenAddress: string,
45
+ marketLiquidity: string,
46
+ utilization: string,
47
+ borrowCap: string,
48
+ totalSupply: string,
49
+ canBeBorrowed: boolean,
50
+ canBeSupplied: boolean,
51
+ totalBorrow: string,
52
+ borrowRateP2P?: string,
53
+ supplyRateP2P?: string,
54
+ supplyIncentives: IncentiveData[];
55
+ borrowIncentives: IncentiveData[];
56
+ }
57
+
58
+ export interface MMAssetsData {
59
+ [token: string]: MMAssetData,
60
+ }
61
+ export interface MMMarketData {
62
+ assetsData: MMAssetData[],
63
+ }
64
+ export interface MMUsedAsset {
65
+ symbol: string,
66
+ supplied: string,
67
+ suppliedUsd: string,
68
+ isSupplied: boolean,
69
+ borrowed: string,
70
+ borrowedUsd: string,
71
+ isBorrowed: boolean,
72
+ stableBorrowRate?: string,
73
+ debt?: string,
74
+ supplyRate?: string,
75
+ borrowRate?: string,
76
+ interestMode?: string,
77
+ collateral?: boolean,
78
+ }
79
+ export interface MMUsedAssets {
80
+ [token: string]: MMUsedAsset,
81
+ }
82
+ export interface MMUsedAssetWStableB extends MMUsedAsset {
83
+ stableBorrowRate: string,
84
+ borrowedStable: string,
85
+ borrowedVariable: string,
86
+ borrowedUsdStable: string,
87
+ borrowedUsdVariable: string,
88
+ interestMode: string,
89
+ }
90
+ export interface MMPositionData {
91
+ usedAssets: any,
92
+ netApy: string,
93
+ lastUpdated: number,
94
+ // ...
95
+ }
96
+
97
+ export type Balances = Record<AssetSymbol, Amount>;
98
+ export interface PositionBalances {
99
+ collateral?: Balances,
100
+ debt?: Balances,
101
+ selling?: Balances,
102
+ deposited?: Balances,
103
+ }
104
+
105
+ export type EthereumProvider = { request(...args: any): Promise<any> }; // TODO
106
+
107
+ export type HexString = `0x${string}`;
@@ -1,137 +1,137 @@
1
- import {
2
- EthAddress,
3
- MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber,
4
- } from './common';
5
-
6
- export enum CompoundVersions {
7
- 'CompoundV2' = 'v2',
8
- 'CompoundV3USDC' = 'v3-USDC',
9
- 'CompoundV3USDCe' = 'v3-USDC.e',
10
- 'CompoundV3ETH' = 'v3-ETH',
11
- 'CompoundV3USDbC' = 'v3-USDbC',
12
- 'CompoundV3USDT' = 'v3-USDT',
13
- 'CompoundV3USDS' = 'v3-USDS',
14
- 'CompoundV3wstETH' = 'v3-wstETH',
15
- }
16
-
17
- export interface CompoundBulkerOptions {
18
- supply: number | string,
19
- withdraw: number | string,
20
- }
21
-
22
- export interface CompoundMarketData {
23
- chainIds: NetworkNumber[],
24
- label: string,
25
- shortLabel: string,
26
- value: CompoundVersions,
27
- baseAsset: string,
28
- collAssets: readonly string[],
29
- baseMarket: string,
30
- baseMarketAddress: EthAddress,
31
- secondLabel: string,
32
- bulkerName: string,
33
- bulkerAddress: EthAddress,
34
- bulkerOptions: CompoundBulkerOptions,
35
- // icon: Function,
36
- }
37
-
38
- export interface CompoundUsedAsset extends MMUsedAsset {
39
- collateral: boolean,
40
- limit?: string,
41
- }
42
-
43
- export interface CompoundV2UsedAsset extends CompoundUsedAsset {
44
- }
45
- export interface CompoundV3UsedAsset extends CompoundUsedAsset {
46
- }
47
-
48
- export interface CompoundUsedAssets<T> {
49
- [token: string]: T,
50
- }
51
-
52
- export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
53
- export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
54
-
55
- export interface CompoundAssetData extends MMAssetData {
56
- supplyCapAlternative?: string,
57
- totalSupplyAlternative?: string,
58
- sortIndex?: number,
59
- }
60
-
61
- export interface CompoundV2AssetData extends CompoundAssetData {
62
- }
63
- export interface CompoundV3AssetData extends CompoundAssetData {
64
- borrowCollateralFactor: string,
65
- liquidateCollateralFactor: string,
66
- liquidationFactor: string,
67
- minDebt: string,
68
- supplyReserved: string,
69
- liquidationRatio: string,
70
- supplyCap: string,
71
- priceInBaseAsset: string,
72
- }
73
-
74
- export interface CompoundAssetsData<T> {
75
- [token: string]: T
76
- }
77
- export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
78
- export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
79
-
80
- export type CompoundMarketsData<T> = { assetsData: T };
81
- export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
82
- export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
83
-
84
- export interface BaseAdditionalAssetData {
85
- totalBorrow: string,
86
- utilization: string,
87
- marketLiquidity: string,
88
- rewardSupplySpeed: string,
89
- rewardBorrowSpeed: string,
90
- minDebt: string,
91
- isBase: boolean,
92
- }
93
-
94
- export interface CompoundAggregatedPositionData {
95
- suppliedUsd: string,
96
- suppliedCollateralUsd: string,
97
- borrowedUsd: string,
98
- borrowLimitUsd: string,
99
- liquidationLimitUsd: string,
100
- leftToBorrowUsd: string,
101
- ratio: string,
102
- collRatio: string,
103
- netApy: string,
104
- incentiveUsd: string,
105
- totalInterestUsd: string,
106
- liqRatio: string,
107
- liqPercent: string,
108
- leveragedType: string,
109
- leveragedAsset?: string,
110
- leveragedLsdAssetRatio?: string,
111
- liquidationPrice?: string,
112
- minRatio: string,
113
- debtTooLow: boolean,
114
- minDebt: string,
115
- minCollRatio: string,
116
- collLiquidationRatio: string,
117
- }
118
-
119
- export interface CompoundPositionData extends MMPositionData {
120
- ratio: string,
121
- minRatio: string,
122
- suppliedUsd: string,
123
- borrowedUsd: string,
124
- borrowLimitUsd: string,
125
- incentiveUsd: string,
126
- totalInterestUsd: string,
127
- isSubscribedToAutomation?: boolean,
128
- automationResubscribeRequired?: boolean,
129
- }
130
-
131
- export interface CompoundV2PositionData extends CompoundPositionData {
132
- usedAssets: CompoundV2UsedAssets,
133
- }
134
-
135
- export interface CompoundV3PositionData extends CompoundPositionData {
136
- usedAssets: CompoundV3UsedAssets,
1
+ import {
2
+ EthAddress,
3
+ MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber,
4
+ } from './common';
5
+
6
+ export enum CompoundVersions {
7
+ 'CompoundV2' = 'v2',
8
+ 'CompoundV3USDC' = 'v3-USDC',
9
+ 'CompoundV3USDCe' = 'v3-USDC.e',
10
+ 'CompoundV3ETH' = 'v3-ETH',
11
+ 'CompoundV3USDbC' = 'v3-USDbC',
12
+ 'CompoundV3USDT' = 'v3-USDT',
13
+ 'CompoundV3USDS' = 'v3-USDS',
14
+ 'CompoundV3wstETH' = 'v3-wstETH',
15
+ }
16
+
17
+ export interface CompoundBulkerOptions {
18
+ supply: number | string,
19
+ withdraw: number | string,
20
+ }
21
+
22
+ export interface CompoundMarketData {
23
+ chainIds: NetworkNumber[],
24
+ label: string,
25
+ shortLabel: string,
26
+ value: CompoundVersions,
27
+ baseAsset: string,
28
+ collAssets: readonly string[],
29
+ baseMarket: string,
30
+ baseMarketAddress: EthAddress,
31
+ secondLabel: string,
32
+ bulkerName: string,
33
+ bulkerAddress: EthAddress,
34
+ bulkerOptions: CompoundBulkerOptions,
35
+ // icon: Function,
36
+ }
37
+
38
+ export interface CompoundUsedAsset extends MMUsedAsset {
39
+ collateral: boolean,
40
+ limit?: string,
41
+ }
42
+
43
+ export interface CompoundV2UsedAsset extends CompoundUsedAsset {
44
+ }
45
+ export interface CompoundV3UsedAsset extends CompoundUsedAsset {
46
+ }
47
+
48
+ export interface CompoundUsedAssets<T> {
49
+ [token: string]: T,
50
+ }
51
+
52
+ export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
53
+ export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
54
+
55
+ export interface CompoundAssetData extends MMAssetData {
56
+ supplyCapAlternative?: string,
57
+ totalSupplyAlternative?: string,
58
+ sortIndex?: number,
59
+ }
60
+
61
+ export interface CompoundV2AssetData extends CompoundAssetData {
62
+ }
63
+ export interface CompoundV3AssetData extends CompoundAssetData {
64
+ borrowCollateralFactor: string,
65
+ liquidateCollateralFactor: string,
66
+ liquidationFactor: string,
67
+ minDebt: string,
68
+ supplyReserved: string,
69
+ liquidationRatio: string,
70
+ supplyCap: string,
71
+ priceInBaseAsset: string,
72
+ }
73
+
74
+ export interface CompoundAssetsData<T> {
75
+ [token: string]: T
76
+ }
77
+ export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
78
+ export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
79
+
80
+ export type CompoundMarketsData<T> = { assetsData: T };
81
+ export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
82
+ export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
83
+
84
+ export interface BaseAdditionalAssetData {
85
+ totalBorrow: string,
86
+ utilization: string,
87
+ marketLiquidity: string,
88
+ rewardSupplySpeed: string,
89
+ rewardBorrowSpeed: string,
90
+ minDebt: string,
91
+ isBase: boolean,
92
+ }
93
+
94
+ export interface CompoundAggregatedPositionData {
95
+ suppliedUsd: string,
96
+ suppliedCollateralUsd: string,
97
+ borrowedUsd: string,
98
+ borrowLimitUsd: string,
99
+ liquidationLimitUsd: string,
100
+ leftToBorrowUsd: string,
101
+ ratio: string,
102
+ collRatio: string,
103
+ netApy: string,
104
+ incentiveUsd: string,
105
+ totalInterestUsd: string,
106
+ liqRatio: string,
107
+ liqPercent: string,
108
+ leveragedType: string,
109
+ leveragedAsset?: string,
110
+ leveragedLsdAssetRatio?: string,
111
+ liquidationPrice?: string,
112
+ minRatio: string,
113
+ debtTooLow: boolean,
114
+ minDebt: string,
115
+ minCollRatio: string,
116
+ collLiquidationRatio: string,
117
+ }
118
+
119
+ export interface CompoundPositionData extends MMPositionData {
120
+ ratio: string,
121
+ minRatio: string,
122
+ suppliedUsd: string,
123
+ borrowedUsd: string,
124
+ borrowLimitUsd: string,
125
+ incentiveUsd: string,
126
+ totalInterestUsd: string,
127
+ isSubscribedToAutomation?: boolean,
128
+ automationResubscribeRequired?: boolean,
129
+ }
130
+
131
+ export interface CompoundV2PositionData extends CompoundPositionData {
132
+ usedAssets: CompoundV2UsedAssets,
133
+ }
134
+
135
+ export interface CompoundV3PositionData extends CompoundPositionData {
136
+ usedAssets: CompoundV3UsedAssets,
137
137
  }