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