@defisaver/positions-sdk 2.1.34 → 2.1.36

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 (133) 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 +91 -0
  5. package/cjs/config/contracts.js +9 -1
  6. package/cjs/contracts.d.ts +629 -0
  7. package/cjs/contracts.js +2 -1
  8. package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
  9. package/cjs/savings/index.d.ts +4 -3
  10. package/cjs/savings/index.js +43 -12
  11. package/cjs/savings/morphoVaults/index.js +17 -17
  12. package/cjs/savings/skyOptions/index.d.ts +7 -0
  13. package/cjs/savings/skyOptions/index.js +122 -0
  14. package/cjs/savings/skyOptions/options.d.ts +2 -0
  15. package/cjs/savings/skyOptions/options.js +12 -0
  16. package/cjs/types/savings/index.d.ts +3 -1
  17. package/cjs/types/savings/index.js +1 -0
  18. package/cjs/types/savings/sky.d.ts +12 -0
  19. package/cjs/types/savings/sky.js +7 -0
  20. package/esm/config/contracts.d.ts +91 -0
  21. package/esm/config/contracts.js +8 -0
  22. package/esm/contracts.d.ts +629 -0
  23. package/esm/contracts.js +1 -0
  24. package/esm/helpers/morphoBlueHelpers/index.js +66 -66
  25. package/esm/savings/index.d.ts +4 -3
  26. package/esm/savings/index.js +43 -13
  27. package/esm/savings/morphoVaults/index.js +17 -17
  28. package/esm/savings/skyOptions/index.d.ts +7 -0
  29. package/esm/savings/skyOptions/index.js +81 -0
  30. package/esm/savings/skyOptions/options.d.ts +2 -0
  31. package/esm/savings/skyOptions/options.js +9 -0
  32. package/esm/types/savings/index.d.ts +3 -1
  33. package/esm/types/savings/index.js +1 -0
  34. package/esm/types/savings/sky.d.ts +12 -0
  35. package/esm/types/savings/sky.js +4 -0
  36. package/package.json +48 -48
  37. package/src/aaveV2/index.ts +240 -240
  38. package/src/aaveV3/index.ts +625 -614
  39. package/src/aaveV3/merit.ts +97 -97
  40. package/src/aaveV3/merkl.ts +74 -74
  41. package/src/claiming/aaveV3.ts +154 -154
  42. package/src/claiming/compV3.ts +22 -22
  43. package/src/claiming/ethena.ts +61 -61
  44. package/src/claiming/index.ts +12 -12
  45. package/src/claiming/king.ts +66 -66
  46. package/src/claiming/morphoBlue.ts +118 -118
  47. package/src/claiming/spark.ts +225 -225
  48. package/src/compoundV2/index.ts +244 -244
  49. package/src/compoundV3/index.ts +274 -274
  50. package/src/config/contracts.ts +1292 -1284
  51. package/src/constants/index.ts +10 -10
  52. package/src/contracts.ts +163 -161
  53. package/src/curveUsd/index.ts +254 -254
  54. package/src/eulerV2/index.ts +324 -324
  55. package/src/exchange/index.ts +25 -25
  56. package/src/fluid/index.ts +1800 -1800
  57. package/src/helpers/aaveHelpers/index.ts +187 -187
  58. package/src/helpers/compoundHelpers/index.ts +283 -283
  59. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  60. package/src/helpers/eulerHelpers/index.ts +222 -222
  61. package/src/helpers/fluidHelpers/index.ts +326 -326
  62. package/src/helpers/index.ts +10 -10
  63. package/src/helpers/liquityV2Helpers/index.ts +82 -82
  64. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  65. package/src/helpers/makerHelpers/index.ts +52 -52
  66. package/src/helpers/morphoBlueHelpers/index.ts +396 -396
  67. package/src/helpers/sparkHelpers/index.ts +158 -158
  68. package/src/index.ts +49 -49
  69. package/src/liquity/index.ts +159 -159
  70. package/src/liquityV2/index.ts +703 -703
  71. package/src/llamaLend/index.ts +305 -305
  72. package/src/maker/index.ts +223 -223
  73. package/src/markets/aave/index.ts +118 -118
  74. package/src/markets/aave/marketAssets.ts +54 -54
  75. package/src/markets/compound/index.ts +243 -243
  76. package/src/markets/compound/marketsAssets.ts +97 -97
  77. package/src/markets/curveUsd/index.ts +69 -69
  78. package/src/markets/euler/index.ts +26 -26
  79. package/src/markets/fluid/index.ts +2900 -2900
  80. package/src/markets/index.ts +25 -25
  81. package/src/markets/liquityV2/index.ts +102 -102
  82. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  83. package/src/markets/llamaLend/index.ts +235 -235
  84. package/src/markets/morphoBlue/index.ts +971 -971
  85. package/src/markets/spark/index.ts +29 -29
  86. package/src/markets/spark/marketAssets.ts +12 -12
  87. package/src/moneymarket/moneymarketCommonService.ts +85 -85
  88. package/src/morphoBlue/index.ts +274 -274
  89. package/src/portfolio/index.ts +598 -598
  90. package/src/savings/index.ts +82 -55
  91. package/src/savings/makerDsr/index.ts +53 -53
  92. package/src/savings/makerDsr/options.ts +9 -9
  93. package/src/savings/morphoVaults/index.ts +80 -80
  94. package/src/savings/morphoVaults/options.ts +203 -203
  95. package/src/savings/skyOptions/index.ts +95 -0
  96. package/src/savings/skyOptions/options.ts +10 -0
  97. package/src/savings/sparkSavingsVaults/index.ts +60 -60
  98. package/src/savings/sparkSavingsVaults/options.ts +35 -35
  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 +115 -115
  103. package/src/services/viem.ts +34 -34
  104. package/src/setup.ts +8 -8
  105. package/src/spark/index.ts +456 -456
  106. package/src/staking/eligibility.ts +53 -53
  107. package/src/staking/index.ts +1 -1
  108. package/src/staking/staking.ts +186 -186
  109. package/src/types/aave.ts +196 -196
  110. package/src/types/claiming.ts +114 -114
  111. package/src/types/common.ts +107 -107
  112. package/src/types/compound.ts +144 -144
  113. package/src/types/curveUsd.ts +123 -123
  114. package/src/types/euler.ts +175 -175
  115. package/src/types/fluid.ts +483 -483
  116. package/src/types/index.ts +14 -14
  117. package/src/types/liquity.ts +30 -30
  118. package/src/types/liquityV2.ts +126 -126
  119. package/src/types/llamaLend.ts +159 -159
  120. package/src/types/maker.ts +63 -63
  121. package/src/types/merit.ts +1 -1
  122. package/src/types/merkl.ts +70 -70
  123. package/src/types/morphoBlue.ts +200 -200
  124. package/src/types/portfolio.ts +60 -60
  125. package/src/types/savings/index.ts +22 -20
  126. package/src/types/savings/makerDsr.ts +13 -13
  127. package/src/types/savings/morphoVaults.ts +33 -33
  128. package/src/types/savings/sky.ts +14 -0
  129. package/src/types/savings/sparkSavingsVaults.ts +15 -15
  130. package/src/types/savings/yearnVaults.ts +14 -14
  131. package/src/types/spark.ts +133 -133
  132. package/src/umbrella/index.ts +69 -69
  133. 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,145 +1,145 @@
1
- import {
2
- EthAddress,
3
- MMAssetData,
4
- MMPositionData,
5
- MMUsedAsset,
6
- NetworkNumber,
7
- } from './common';
8
-
9
- export enum CompoundVersions {
10
- 'CompoundV2' = 'v2',
11
- 'CompoundV3USDC' = 'v3-USDC',
12
- 'CompoundV3USDCe' = 'v3-USDC.e',
13
- 'CompoundV3ETH' = 'v3-ETH',
14
- 'CompoundV3USDbC' = 'v3-USDbC',
15
- 'CompoundV3USDT' = 'v3-USDT',
16
- 'CompoundV3USDS' = 'v3-USDS',
17
- 'CompoundV3wstETH' = 'v3-wstETH',
18
- }
19
-
20
- export enum CompoundVersionType {
21
- V2 = 'v2',
22
- V3 = 'v3',
23
- }
24
-
25
- export interface CompoundBulkerOptions {
26
- supply: number | string,
27
- withdraw: number | string,
28
- }
29
-
30
- export interface CompoundMarketData {
31
- chainIds: NetworkNumber[],
32
- label: string,
33
- shortLabel: string,
34
- value: CompoundVersions,
35
- baseAsset: string,
36
- collAssets: readonly string[],
37
- baseMarket: string,
38
- baseMarketAddress: EthAddress,
39
- secondLabel: string,
40
- bulkerName: string,
41
- bulkerAddress: EthAddress,
42
- bulkerOptions: CompoundBulkerOptions,
43
- // icon: Function,
44
- }
45
-
46
- export interface CompoundUsedAsset extends MMUsedAsset {
47
- collateral: boolean,
48
- limit?: string,
49
- }
50
-
51
- export interface CompoundV2UsedAsset extends CompoundUsedAsset {
52
- }
53
- export interface CompoundV3UsedAsset extends CompoundUsedAsset {
54
- }
55
-
56
- export interface CompoundUsedAssets<T> {
57
- [token: string]: T,
58
- }
59
-
60
- export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
61
- export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
62
-
63
- export interface CompoundAssetData extends MMAssetData {
64
- supplyCapAlternative?: string,
65
- totalSupplyAlternative?: string,
66
- sortIndex?: number,
67
- }
68
-
69
- export interface CompoundV2AssetData extends CompoundAssetData {
70
- }
71
- export interface CompoundV3AssetData extends CompoundAssetData {
72
- borrowCollateralFactor: string,
73
- liquidateCollateralFactor: string,
74
- liquidationFactor: string,
75
- minDebt: string,
76
- supplyReserved: string,
77
- liquidationRatio: string,
78
- supplyCap: string,
79
- priceInBaseAsset: string,
80
- }
81
-
82
- export interface CompoundAssetsData<T> {
83
- [token: string]: T
84
- }
85
- export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
86
- export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
87
-
88
- export type CompoundMarketsData<T> = { assetsData: T };
89
- export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
90
- export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
91
-
92
- export interface BaseAdditionalAssetData {
93
- totalBorrow: string,
94
- utilization: string,
95
- marketLiquidity: string,
96
- rewardSupplySpeed: string,
97
- rewardBorrowSpeed: string,
98
- minDebt: string,
99
- isBase: boolean,
100
- }
101
-
102
- export interface CompoundAggregatedPositionData {
103
- suppliedUsd: string,
104
- suppliedCollateralUsd: string,
105
- borrowedUsd: string,
106
- borrowLimitUsd: string,
107
- liquidationLimitUsd: string,
108
- leftToBorrowUsd: string,
109
- ratio: string,
110
- collRatio: string,
111
- netApy: string,
112
- incentiveUsd: string,
113
- totalInterestUsd: string,
114
- liqRatio: string,
115
- liqPercent: string,
116
- leveragedType: string,
117
- leveragedAsset?: string,
118
- leveragedLsdAssetRatio?: string,
119
- liquidationPrice?: string,
120
- minRatio: string,
121
- debtTooLow: boolean,
122
- minDebt: string,
123
- minCollRatio: string,
124
- collLiquidationRatio: string,
125
- }
126
-
127
- export interface CompoundPositionData extends MMPositionData {
128
- ratio: string,
129
- minRatio: string,
130
- suppliedUsd: string,
131
- borrowedUsd: string,
132
- borrowLimitUsd: string,
133
- incentiveUsd: string,
134
- totalInterestUsd: string,
135
- isSubscribedToAutomation?: boolean,
136
- automationResubscribeRequired?: boolean,
137
- }
138
-
139
- export interface CompoundV2PositionData extends CompoundPositionData {
140
- usedAssets: CompoundV2UsedAssets,
141
- }
142
-
143
- export interface CompoundV3PositionData extends CompoundPositionData {
144
- usedAssets: CompoundV3UsedAssets,
1
+ import {
2
+ EthAddress,
3
+ MMAssetData,
4
+ MMPositionData,
5
+ MMUsedAsset,
6
+ NetworkNumber,
7
+ } from './common';
8
+
9
+ export enum CompoundVersions {
10
+ 'CompoundV2' = 'v2',
11
+ 'CompoundV3USDC' = 'v3-USDC',
12
+ 'CompoundV3USDCe' = 'v3-USDC.e',
13
+ 'CompoundV3ETH' = 'v3-ETH',
14
+ 'CompoundV3USDbC' = 'v3-USDbC',
15
+ 'CompoundV3USDT' = 'v3-USDT',
16
+ 'CompoundV3USDS' = 'v3-USDS',
17
+ 'CompoundV3wstETH' = 'v3-wstETH',
18
+ }
19
+
20
+ export enum CompoundVersionType {
21
+ V2 = 'v2',
22
+ V3 = 'v3',
23
+ }
24
+
25
+ export interface CompoundBulkerOptions {
26
+ supply: number | string,
27
+ withdraw: number | string,
28
+ }
29
+
30
+ export interface CompoundMarketData {
31
+ chainIds: NetworkNumber[],
32
+ label: string,
33
+ shortLabel: string,
34
+ value: CompoundVersions,
35
+ baseAsset: string,
36
+ collAssets: readonly string[],
37
+ baseMarket: string,
38
+ baseMarketAddress: EthAddress,
39
+ secondLabel: string,
40
+ bulkerName: string,
41
+ bulkerAddress: EthAddress,
42
+ bulkerOptions: CompoundBulkerOptions,
43
+ // icon: Function,
44
+ }
45
+
46
+ export interface CompoundUsedAsset extends MMUsedAsset {
47
+ collateral: boolean,
48
+ limit?: string,
49
+ }
50
+
51
+ export interface CompoundV2UsedAsset extends CompoundUsedAsset {
52
+ }
53
+ export interface CompoundV3UsedAsset extends CompoundUsedAsset {
54
+ }
55
+
56
+ export interface CompoundUsedAssets<T> {
57
+ [token: string]: T,
58
+ }
59
+
60
+ export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
61
+ export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
62
+
63
+ export interface CompoundAssetData extends MMAssetData {
64
+ supplyCapAlternative?: string,
65
+ totalSupplyAlternative?: string,
66
+ sortIndex?: number,
67
+ }
68
+
69
+ export interface CompoundV2AssetData extends CompoundAssetData {
70
+ }
71
+ export interface CompoundV3AssetData extends CompoundAssetData {
72
+ borrowCollateralFactor: string,
73
+ liquidateCollateralFactor: string,
74
+ liquidationFactor: string,
75
+ minDebt: string,
76
+ supplyReserved: string,
77
+ liquidationRatio: string,
78
+ supplyCap: string,
79
+ priceInBaseAsset: string,
80
+ }
81
+
82
+ export interface CompoundAssetsData<T> {
83
+ [token: string]: T
84
+ }
85
+ export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
86
+ export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
87
+
88
+ export type CompoundMarketsData<T> = { assetsData: T };
89
+ export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
90
+ export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
91
+
92
+ export interface BaseAdditionalAssetData {
93
+ totalBorrow: string,
94
+ utilization: string,
95
+ marketLiquidity: string,
96
+ rewardSupplySpeed: string,
97
+ rewardBorrowSpeed: string,
98
+ minDebt: string,
99
+ isBase: boolean,
100
+ }
101
+
102
+ export interface CompoundAggregatedPositionData {
103
+ suppliedUsd: string,
104
+ suppliedCollateralUsd: string,
105
+ borrowedUsd: string,
106
+ borrowLimitUsd: string,
107
+ liquidationLimitUsd: string,
108
+ leftToBorrowUsd: string,
109
+ ratio: string,
110
+ collRatio: string,
111
+ netApy: string,
112
+ incentiveUsd: string,
113
+ totalInterestUsd: string,
114
+ liqRatio: string,
115
+ liqPercent: string,
116
+ leveragedType: string,
117
+ leveragedAsset?: string,
118
+ leveragedLsdAssetRatio?: string,
119
+ liquidationPrice?: string,
120
+ minRatio: string,
121
+ debtTooLow: boolean,
122
+ minDebt: string,
123
+ minCollRatio: string,
124
+ collLiquidationRatio: string,
125
+ }
126
+
127
+ export interface CompoundPositionData extends MMPositionData {
128
+ ratio: string,
129
+ minRatio: string,
130
+ suppliedUsd: string,
131
+ borrowedUsd: string,
132
+ borrowLimitUsd: string,
133
+ incentiveUsd: string,
134
+ totalInterestUsd: string,
135
+ isSubscribedToAutomation?: boolean,
136
+ automationResubscribeRequired?: boolean,
137
+ }
138
+
139
+ export interface CompoundV2PositionData extends CompoundPositionData {
140
+ usedAssets: CompoundV2UsedAssets,
141
+ }
142
+
143
+ export interface CompoundV3PositionData extends CompoundPositionData {
144
+ usedAssets: CompoundV3UsedAssets,
145
145
  }