@defisaver/positions-sdk 2.1.41 → 2.1.43-aave-v4-dev-1

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 (145) 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 +99 -0
  6. package/cjs/config/contracts.d.ts +1069 -0
  7. package/cjs/config/contracts.js +9 -0
  8. package/cjs/contracts.d.ts +18265 -0
  9. package/cjs/contracts.js +2 -1
  10. package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
  11. package/cjs/index.d.ts +2 -1
  12. package/cjs/index.js +3 -1
  13. package/cjs/markets/aaveV4/index.d.ts +6 -0
  14. package/cjs/markets/aaveV4/index.js +20 -0
  15. package/cjs/markets/index.d.ts +1 -0
  16. package/cjs/markets/index.js +3 -1
  17. package/cjs/savings/morphoVaults/index.js +17 -17
  18. package/cjs/savings/morphoVaults/options.js +2 -2
  19. package/cjs/types/aaveV4.d.ts +73 -0
  20. package/cjs/types/aaveV4.js +11 -0
  21. package/cjs/types/index.d.ts +1 -0
  22. package/cjs/types/index.js +1 -0
  23. package/esm/aaveV4/index.d.ts +7 -0
  24. package/esm/aaveV4/index.js +90 -0
  25. package/esm/config/contracts.d.ts +1069 -0
  26. package/esm/config/contracts.js +8 -0
  27. package/esm/contracts.d.ts +18265 -0
  28. package/esm/contracts.js +1 -0
  29. package/esm/helpers/morphoBlueHelpers/index.js +66 -66
  30. package/esm/index.d.ts +2 -1
  31. package/esm/index.js +2 -1
  32. package/esm/markets/aaveV4/index.d.ts +6 -0
  33. package/esm/markets/aaveV4/index.js +15 -0
  34. package/esm/markets/index.d.ts +1 -0
  35. package/esm/markets/index.js +1 -0
  36. package/esm/savings/morphoVaults/index.js +17 -17
  37. package/esm/savings/morphoVaults/options.js +2 -2
  38. package/esm/types/aaveV4.d.ts +73 -0
  39. package/esm/types/aaveV4.js +8 -0
  40. package/esm/types/index.d.ts +1 -0
  41. package/esm/types/index.js +1 -0
  42. package/package.json +48 -48
  43. package/src/aaveV2/index.ts +240 -240
  44. package/src/aaveV3/index.ts +625 -625
  45. package/src/aaveV3/merit.ts +97 -97
  46. package/src/aaveV3/merkl.ts +74 -74
  47. package/src/aaveV4/index.ts +90 -0
  48. package/src/claiming/aaveV3.ts +154 -154
  49. package/src/claiming/compV3.ts +22 -22
  50. package/src/claiming/ethena.ts +61 -61
  51. package/src/claiming/index.ts +12 -12
  52. package/src/claiming/king.ts +66 -66
  53. package/src/claiming/morphoBlue.ts +118 -118
  54. package/src/claiming/spark.ts +225 -225
  55. package/src/compoundV2/index.ts +244 -244
  56. package/src/compoundV3/index.ts +274 -274
  57. package/src/config/contracts.ts +1303 -1295
  58. package/src/constants/index.ts +10 -10
  59. package/src/contracts.ts +174 -172
  60. package/src/curveUsd/index.ts +254 -254
  61. package/src/eulerV2/index.ts +324 -324
  62. package/src/exchange/index.ts +25 -25
  63. package/src/fluid/index.ts +1800 -1800
  64. package/src/helpers/aaveHelpers/index.ts +187 -187
  65. package/src/helpers/compoundHelpers/index.ts +283 -283
  66. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  67. package/src/helpers/eulerHelpers/index.ts +222 -222
  68. package/src/helpers/fluidHelpers/index.ts +326 -326
  69. package/src/helpers/index.ts +10 -10
  70. package/src/helpers/liquityV2Helpers/index.ts +82 -82
  71. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  72. package/src/helpers/makerHelpers/index.ts +52 -52
  73. package/src/helpers/morphoBlueHelpers/index.ts +396 -396
  74. package/src/helpers/sparkHelpers/index.ts +158 -158
  75. package/src/index.ts +51 -49
  76. package/src/liquity/index.ts +159 -159
  77. package/src/liquityV2/index.ts +703 -703
  78. package/src/llamaLend/index.ts +305 -305
  79. package/src/maker/index.ts +223 -223
  80. package/src/markets/aave/index.ts +118 -118
  81. package/src/markets/aave/marketAssets.ts +54 -54
  82. package/src/markets/aaveV4/index.ts +17 -0
  83. package/src/markets/compound/index.ts +243 -243
  84. package/src/markets/compound/marketsAssets.ts +97 -97
  85. package/src/markets/curveUsd/index.ts +69 -69
  86. package/src/markets/euler/index.ts +26 -26
  87. package/src/markets/fluid/index.ts +2900 -2900
  88. package/src/markets/index.ts +26 -25
  89. package/src/markets/liquityV2/index.ts +102 -102
  90. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  91. package/src/markets/llamaLend/index.ts +235 -235
  92. package/src/markets/morphoBlue/index.ts +971 -971
  93. package/src/markets/spark/index.ts +29 -29
  94. package/src/markets/spark/marketAssets.ts +12 -12
  95. package/src/moneymarket/moneymarketCommonService.ts +85 -85
  96. package/src/morphoBlue/index.ts +274 -274
  97. package/src/portfolio/index.ts +598 -598
  98. package/src/savings/index.ts +95 -95
  99. package/src/savings/makerDsr/index.ts +53 -53
  100. package/src/savings/makerDsr/options.ts +9 -9
  101. package/src/savings/morphoVaults/index.ts +80 -80
  102. package/src/savings/morphoVaults/options.ts +193 -193
  103. package/src/savings/skyOptions/index.ts +95 -95
  104. package/src/savings/skyOptions/options.ts +10 -10
  105. package/src/savings/sparkSavingsVaults/index.ts +60 -60
  106. package/src/savings/sparkSavingsVaults/options.ts +35 -35
  107. package/src/savings/yearnV3Vaults/index.ts +61 -61
  108. package/src/savings/yearnV3Vaults/options.ts +55 -55
  109. package/src/savings/yearnVaults/index.ts +73 -73
  110. package/src/savings/yearnVaults/options.ts +32 -32
  111. package/src/services/priceService.ts +278 -278
  112. package/src/services/utils.ts +115 -115
  113. package/src/services/viem.ts +34 -34
  114. package/src/setup.ts +8 -8
  115. package/src/spark/index.ts +458 -458
  116. package/src/staking/eligibility.ts +53 -53
  117. package/src/staking/index.ts +1 -1
  118. package/src/staking/staking.ts +186 -186
  119. package/src/types/aave.ts +196 -196
  120. package/src/types/aaveV4.ts +81 -0
  121. package/src/types/claiming.ts +114 -114
  122. package/src/types/common.ts +107 -107
  123. package/src/types/compound.ts +144 -144
  124. package/src/types/curveUsd.ts +123 -123
  125. package/src/types/euler.ts +175 -175
  126. package/src/types/fluid.ts +483 -483
  127. package/src/types/index.ts +16 -15
  128. package/src/types/liquity.ts +30 -30
  129. package/src/types/liquityV2.ts +126 -126
  130. package/src/types/llamaLend.ts +159 -159
  131. package/src/types/maker.ts +63 -63
  132. package/src/types/merit.ts +1 -1
  133. package/src/types/merkl.ts +70 -70
  134. package/src/types/morphoBlue.ts +200 -200
  135. package/src/types/portfolio.ts +60 -60
  136. package/src/types/savings/index.ts +23 -23
  137. package/src/types/savings/makerDsr.ts +13 -13
  138. package/src/types/savings/morphoVaults.ts +32 -32
  139. package/src/types/savings/sky.ts +14 -14
  140. package/src/types/savings/sparkSavingsVaults.ts +15 -15
  141. package/src/types/savings/yearnV3Vaults.ts +17 -17
  142. package/src/types/savings/yearnVaults.ts +14 -14
  143. package/src/types/spark.ts +134 -134
  144. package/src/umbrella/index.ts +69 -69
  145. package/src/umbrella/umbrellaUtils.ts +29 -29
@@ -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
  }
@@ -1,124 +1,124 @@
1
- import { EthAddress, NetworkNumber } from './common';
2
-
3
- export enum CrvUSDVersions {
4
- 'crvUSDwstETH' = 'wstETH',
5
- 'crvUSDWBTC' = 'WBTC',
6
- 'crvUSDETH' = 'ETH',
7
- 'crvUSDtBTC' = 'tBTC',
8
- 'crvUSDsfrxETH' = 'sfrxETH',
9
- }
10
-
11
- export enum CrvUSDStatus {
12
- Nonexistant = 'Nonexistant',
13
- Safe = 'Safe',
14
- Risk = 'Risk',
15
- SoftLiquidating = 'SoftLiquidating',
16
- SoftLiquidated = 'SoftLiquidated',
17
- }
18
-
19
- export interface CrvUSDMarketData {
20
- chainIds: NetworkNumber[],
21
- label: string,
22
- shortLabel: string,
23
- value: CrvUSDVersions,
24
- collAsset: string,
25
- baseAsset: string,
26
- controllerAddress: EthAddress,
27
- ammAddress: EthAddress,
28
- createCollAssets: string[],
29
- }
30
-
31
- export interface BandData {
32
- id: string,
33
- collAmount: string,
34
- debtAmount: string,
35
- lowPrice: string,
36
- highPrice: string,
37
- }
38
-
39
- export interface UserBandData {
40
- id: string,
41
- collAmount: string,
42
- debtAmount: string,
43
- lowPrice: string,
44
- highPrice: string,
45
- userDebtAmount: string,
46
- userCollAmount: string,
47
- }
48
-
49
- export interface CrvUSDGlobalMarketData {
50
- collateral: string,
51
- decimals: string,
52
- activeBand: string,
53
- totalDebt: string,
54
- ammPrice: string,
55
- basePrice: string,
56
- oraclePrice: string,
57
- minted: string,
58
- redeemed: string,
59
- monetaryPolicyRate: string,
60
- ammRate: string,
61
- minBand: string,
62
- maxBand: string,
63
- debtCeiling: string,
64
- borrowRate: string,
65
- futureBorrowRate: string,
66
- leftToBorrow: string,
67
- bands: BandData[],
68
- loanDiscount: string;
69
- }
70
-
71
- export interface CrvUSDAggregatedPositionData {
72
- ratio: string,
73
- supplied: string,
74
- suppliedUsd: string,
75
- borrowedUsd: string,
76
- borrowed: string,
77
- safetyRatio: string,
78
- borrowLimitUsd: string,
79
- minAllowedRatio: number,
80
- collFactor: string,
81
- leveragedType: string,
82
- leveragedAsset?: string,
83
- liquidationPrice?: string,
84
- }
85
-
86
- export interface CrvUSDUsedAsset {
87
- isSupplied: boolean,
88
- supplied: string,
89
- suppliedUsd: string,
90
- borrowed: string,
91
- borrowedUsd: string,
92
- isBorrowed: boolean,
93
- symbol: string,
94
- collateral: boolean,
95
- price: string,
96
- interestRate?: string,
97
- }
98
-
99
- export interface CrvUSDUsedAssets {
100
- [key: string]: CrvUSDUsedAsset,
101
- }
102
-
103
- export interface CrvUSDUserData {
104
- debtAmount: string,
105
- health: string,
106
- healthPercent: string,
107
- priceHigh: string,
108
- priceLow: string,
109
- liquidationDiscount: string,
110
- numOfBands: string,
111
- usedAssets: CrvUSDUsedAssets,
112
- status: CrvUSDStatus,
113
- ratio: string,
114
- supplied: string,
115
- suppliedUsd: string,
116
- borrowedUsd: string,
117
- borrowed: string,
118
- safetyRatio: string,
119
- userBands: UserBandData[],
120
- loanExists: boolean,
121
- borrowRate?: string,
122
- collateralPrice: string,
123
- collRatio: string,
1
+ import { EthAddress, NetworkNumber } from './common';
2
+
3
+ export enum CrvUSDVersions {
4
+ 'crvUSDwstETH' = 'wstETH',
5
+ 'crvUSDWBTC' = 'WBTC',
6
+ 'crvUSDETH' = 'ETH',
7
+ 'crvUSDtBTC' = 'tBTC',
8
+ 'crvUSDsfrxETH' = 'sfrxETH',
9
+ }
10
+
11
+ export enum CrvUSDStatus {
12
+ Nonexistant = 'Nonexistant',
13
+ Safe = 'Safe',
14
+ Risk = 'Risk',
15
+ SoftLiquidating = 'SoftLiquidating',
16
+ SoftLiquidated = 'SoftLiquidated',
17
+ }
18
+
19
+ export interface CrvUSDMarketData {
20
+ chainIds: NetworkNumber[],
21
+ label: string,
22
+ shortLabel: string,
23
+ value: CrvUSDVersions,
24
+ collAsset: string,
25
+ baseAsset: string,
26
+ controllerAddress: EthAddress,
27
+ ammAddress: EthAddress,
28
+ createCollAssets: string[],
29
+ }
30
+
31
+ export interface BandData {
32
+ id: string,
33
+ collAmount: string,
34
+ debtAmount: string,
35
+ lowPrice: string,
36
+ highPrice: string,
37
+ }
38
+
39
+ export interface UserBandData {
40
+ id: string,
41
+ collAmount: string,
42
+ debtAmount: string,
43
+ lowPrice: string,
44
+ highPrice: string,
45
+ userDebtAmount: string,
46
+ userCollAmount: string,
47
+ }
48
+
49
+ export interface CrvUSDGlobalMarketData {
50
+ collateral: string,
51
+ decimals: string,
52
+ activeBand: string,
53
+ totalDebt: string,
54
+ ammPrice: string,
55
+ basePrice: string,
56
+ oraclePrice: string,
57
+ minted: string,
58
+ redeemed: string,
59
+ monetaryPolicyRate: string,
60
+ ammRate: string,
61
+ minBand: string,
62
+ maxBand: string,
63
+ debtCeiling: string,
64
+ borrowRate: string,
65
+ futureBorrowRate: string,
66
+ leftToBorrow: string,
67
+ bands: BandData[],
68
+ loanDiscount: string;
69
+ }
70
+
71
+ export interface CrvUSDAggregatedPositionData {
72
+ ratio: string,
73
+ supplied: string,
74
+ suppliedUsd: string,
75
+ borrowedUsd: string,
76
+ borrowed: string,
77
+ safetyRatio: string,
78
+ borrowLimitUsd: string,
79
+ minAllowedRatio: number,
80
+ collFactor: string,
81
+ leveragedType: string,
82
+ leveragedAsset?: string,
83
+ liquidationPrice?: string,
84
+ }
85
+
86
+ export interface CrvUSDUsedAsset {
87
+ isSupplied: boolean,
88
+ supplied: string,
89
+ suppliedUsd: string,
90
+ borrowed: string,
91
+ borrowedUsd: string,
92
+ isBorrowed: boolean,
93
+ symbol: string,
94
+ collateral: boolean,
95
+ price: string,
96
+ interestRate?: string,
97
+ }
98
+
99
+ export interface CrvUSDUsedAssets {
100
+ [key: string]: CrvUSDUsedAsset,
101
+ }
102
+
103
+ export interface CrvUSDUserData {
104
+ debtAmount: string,
105
+ health: string,
106
+ healthPercent: string,
107
+ priceHigh: string,
108
+ priceLow: string,
109
+ liquidationDiscount: string,
110
+ numOfBands: string,
111
+ usedAssets: CrvUSDUsedAssets,
112
+ status: CrvUSDStatus,
113
+ ratio: string,
114
+ supplied: string,
115
+ suppliedUsd: string,
116
+ borrowedUsd: string,
117
+ borrowed: string,
118
+ safetyRatio: string,
119
+ userBands: UserBandData[],
120
+ loanExists: boolean,
121
+ borrowRate?: string,
122
+ collateralPrice: string,
123
+ collRatio: string,
124
124
  }