@defisaver/positions-sdk 0.0.200 → 0.0.201-fluid-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 (135) hide show
  1. package/.mocharc.json +4 -4
  2. package/.nvmrc +1 -1
  3. package/README.md +69 -69
  4. package/cjs/config/contracts.d.ts +43 -0
  5. package/cjs/config/contracts.js +6 -0
  6. package/cjs/contracts.d.ts +1 -0
  7. package/cjs/contracts.js +2 -1
  8. package/cjs/fluid/index.d.ts +39 -0
  9. package/cjs/fluid/index.js +216 -0
  10. package/cjs/helpers/fluidHelpers/index.d.ts +6 -0
  11. package/cjs/helpers/fluidHelpers/index.js +40 -0
  12. package/cjs/helpers/index.d.ts +1 -0
  13. package/cjs/helpers/index.js +2 -1
  14. package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
  15. package/cjs/index.d.ts +2 -1
  16. package/cjs/index.js +3 -1
  17. package/cjs/markets/aave/marketAssets.js +1 -1
  18. package/cjs/markets/fluid/index.d.ts +176 -0
  19. package/cjs/markets/fluid/index.js +1630 -0
  20. package/cjs/markets/index.d.ts +1 -0
  21. package/cjs/markets/index.js +5 -1
  22. package/cjs/morphoBlue/index.js +1 -2
  23. package/cjs/multicall/index.d.ts +1 -0
  24. package/cjs/multicall/index.js +8 -1
  25. package/cjs/services/utils.d.ts +1 -0
  26. package/cjs/services/utils.js +3 -1
  27. package/cjs/types/contracts/generated/FluidView.d.ts +276 -0
  28. package/cjs/types/contracts/generated/FluidView.js +5 -0
  29. package/cjs/types/contracts/generated/index.d.ts +1 -0
  30. package/cjs/types/fluid.d.ts +236 -0
  31. package/cjs/types/fluid.js +129 -0
  32. package/cjs/types/index.d.ts +1 -0
  33. package/cjs/types/index.js +1 -0
  34. package/esm/config/contracts.d.ts +43 -0
  35. package/esm/config/contracts.js +6 -0
  36. package/esm/contracts.d.ts +1 -0
  37. package/esm/contracts.js +1 -0
  38. package/esm/fluid/index.d.ts +39 -0
  39. package/esm/fluid/index.js +205 -0
  40. package/esm/helpers/fluidHelpers/index.d.ts +6 -0
  41. package/esm/helpers/fluidHelpers/index.js +33 -0
  42. package/esm/helpers/index.d.ts +1 -0
  43. package/esm/helpers/index.js +1 -0
  44. package/esm/helpers/morphoBlueHelpers/index.js +66 -66
  45. package/esm/index.d.ts +2 -1
  46. package/esm/index.js +2 -1
  47. package/esm/markets/aave/marketAssets.js +1 -1
  48. package/esm/markets/fluid/index.d.ts +176 -0
  49. package/esm/markets/fluid/index.js +1538 -0
  50. package/esm/markets/index.d.ts +1 -0
  51. package/esm/markets/index.js +1 -0
  52. package/esm/morphoBlue/index.js +1 -2
  53. package/esm/multicall/index.d.ts +1 -0
  54. package/esm/multicall/index.js +6 -0
  55. package/esm/services/utils.d.ts +1 -0
  56. package/esm/services/utils.js +1 -0
  57. package/esm/types/contracts/generated/FluidView.d.ts +276 -0
  58. package/esm/types/contracts/generated/FluidView.js +4 -0
  59. package/esm/types/contracts/generated/index.d.ts +1 -0
  60. package/esm/types/fluid.d.ts +236 -0
  61. package/esm/types/fluid.js +126 -0
  62. package/esm/types/index.d.ts +1 -0
  63. package/esm/types/index.js +1 -0
  64. package/package.json +51 -49
  65. package/src/aaveV2/index.ts +227 -227
  66. package/src/aaveV3/index.ts +625 -625
  67. package/src/assets/index.ts +60 -60
  68. package/src/chickenBonds/index.ts +123 -123
  69. package/src/compoundV2/index.ts +220 -220
  70. package/src/compoundV3/index.ts +291 -291
  71. package/src/config/contracts.js +1115 -1109
  72. package/src/constants/index.ts +6 -6
  73. package/src/contracts.ts +134 -133
  74. package/src/curveUsd/index.ts +229 -229
  75. package/src/eulerV2/index.ts +303 -303
  76. package/src/exchange/index.ts +17 -17
  77. package/src/fluid/index.ts +277 -0
  78. package/src/helpers/aaveHelpers/index.ts +198 -198
  79. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  80. package/src/helpers/compoundHelpers/index.ts +246 -246
  81. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  82. package/src/helpers/eulerHelpers/index.ts +232 -232
  83. package/src/helpers/fluidHelpers/index.ts +54 -0
  84. package/src/helpers/index.ts +11 -10
  85. package/src/helpers/liquityV2Helpers/index.ts +79 -79
  86. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  87. package/src/helpers/makerHelpers/index.ts +94 -94
  88. package/src/helpers/morphoBlueHelpers/index.ts +365 -365
  89. package/src/helpers/sparkHelpers/index.ts +150 -150
  90. package/src/index.ts +52 -50
  91. package/src/liquity/index.ts +116 -116
  92. package/src/liquityV2/index.ts +227 -227
  93. package/src/llamaLend/index.ts +275 -275
  94. package/src/maker/index.ts +117 -117
  95. package/src/markets/aave/index.ts +152 -152
  96. package/src/markets/aave/marketAssets.ts +44 -44
  97. package/src/markets/compound/index.ts +213 -213
  98. package/src/markets/compound/marketsAssets.ts +82 -82
  99. package/src/markets/curveUsd/index.ts +69 -69
  100. package/src/markets/euler/index.ts +26 -26
  101. package/src/markets/fluid/index.ts +1635 -0
  102. package/src/markets/index.ts +25 -24
  103. package/src/markets/liquityV2/index.ts +43 -43
  104. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  105. package/src/markets/llamaLend/index.ts +235 -235
  106. package/src/markets/morphoBlue/index.ts +895 -895
  107. package/src/markets/spark/index.ts +29 -29
  108. package/src/markets/spark/marketAssets.ts +10 -10
  109. package/src/moneymarket/moneymarketCommonService.ts +80 -80
  110. package/src/morphoAaveV2/index.ts +256 -256
  111. package/src/morphoAaveV3/index.ts +631 -631
  112. package/src/morphoBlue/index.ts +202 -204
  113. package/src/multicall/index.ts +32 -23
  114. package/src/services/dsrService.ts +15 -15
  115. package/src/services/priceService.ts +62 -62
  116. package/src/services/utils.ts +59 -57
  117. package/src/setup.ts +8 -8
  118. package/src/spark/index.ts +461 -461
  119. package/src/staking/staking.ts +220 -220
  120. package/src/types/aave.ts +271 -271
  121. package/src/types/chickenBonds.ts +45 -45
  122. package/src/types/common.ts +84 -84
  123. package/src/types/compound.ts +131 -131
  124. package/src/types/contracts/generated/FluidView.ts +317 -0
  125. package/src/types/contracts/generated/index.ts +1 -0
  126. package/src/types/curveUsd.ts +118 -118
  127. package/src/types/euler.ts +171 -171
  128. package/src/types/fluid.ts +251 -0
  129. package/src/types/index.ts +12 -11
  130. package/src/types/liquity.ts +30 -30
  131. package/src/types/liquityV2.ts +118 -118
  132. package/src/types/llamaLend.ts +155 -155
  133. package/src/types/maker.ts +50 -50
  134. package/src/types/morphoBlue.ts +192 -192
  135. package/src/types/spark.ts +131 -131
@@ -0,0 +1,317 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type BN from "bn.js";
6
+ import type { ContractOptions } from "web3-eth-contract";
7
+ import type { EventLog } from "web3-core";
8
+ import type { EventEmitter } from "events";
9
+ import type {
10
+ Callback,
11
+ PayableTransactionObject,
12
+ NonPayableTransactionObject,
13
+ BlockType,
14
+ ContractEventLog,
15
+ BaseContract,
16
+ } from "./types";
17
+
18
+ export interface EventOptions {
19
+ filter?: object;
20
+ fromBlock?: BlockType;
21
+ topics?: string[];
22
+ }
23
+
24
+ export declare namespace FluidView {
25
+ export type UserPositionStruct =
26
+ | [
27
+ number | string | BN,
28
+ string,
29
+ boolean,
30
+ boolean,
31
+ number | string | BN,
32
+ number | string | BN,
33
+ number | string | BN,
34
+ number | string | BN,
35
+ number | string | BN
36
+ ]
37
+ | {
38
+ nftId: number | string | BN;
39
+ owner: string;
40
+ isLiquidated: boolean;
41
+ isSupplyPosition: boolean;
42
+ supply: number | string | BN;
43
+ borrow: number | string | BN;
44
+ ratio: number | string | BN;
45
+ tick: number | string | BN;
46
+ tickId: number | string | BN;
47
+ };
48
+
49
+ export type UserPositionStructOutputArray = [
50
+ string,
51
+ string,
52
+ boolean,
53
+ boolean,
54
+ string,
55
+ string,
56
+ string,
57
+ string,
58
+ string
59
+ ];
60
+ export type UserPositionStructOutputStruct = {
61
+ nftId: string;
62
+ owner: string;
63
+ isLiquidated: boolean;
64
+ isSupplyPosition: boolean;
65
+ supply: string;
66
+ borrow: string;
67
+ ratio: string;
68
+ tick: string;
69
+ tickId: string;
70
+ };
71
+ export type UserPositionStructOutput = UserPositionStructOutputArray &
72
+ UserPositionStructOutputStruct;
73
+
74
+ export type VaultDataStruct =
75
+ | [
76
+ string,
77
+ number | string | BN,
78
+ number | string | BN,
79
+ boolean,
80
+ boolean,
81
+ string,
82
+ string,
83
+ string,
84
+ string,
85
+ number | string | BN,
86
+ number | string | BN,
87
+ number | string | BN,
88
+ number | string | BN,
89
+ number | string | BN,
90
+ number | string | BN,
91
+ number | string | BN,
92
+ number | string | BN,
93
+ number | string | BN,
94
+ number | string | BN,
95
+ string,
96
+ number | string | BN,
97
+ number | string | BN,
98
+ number | string | BN,
99
+ number | string | BN,
100
+ number | string | BN,
101
+ number | string | BN,
102
+ number | string | BN,
103
+ number | string | BN,
104
+ number | string | BN,
105
+ number | string | BN,
106
+ number | string | BN,
107
+ number | string | BN,
108
+ number | string | BN,
109
+ number | string | BN,
110
+ number | string | BN,
111
+ number | string | BN,
112
+ number | string | BN,
113
+ number | string | BN,
114
+ number | string | BN,
115
+ number | string | BN,
116
+ number | string | BN,
117
+ number | string | BN,
118
+ number | string | BN,
119
+ number | string | BN,
120
+ number | string | BN,
121
+ number | string | BN
122
+ ]
123
+ | {
124
+ vault: string;
125
+ vaultId: number | string | BN;
126
+ vaultType: number | string | BN;
127
+ isSmartColl: boolean;
128
+ isSmartDebt: boolean;
129
+ supplyToken0: string;
130
+ supplyToken1: string;
131
+ borrowToken0: string;
132
+ borrowToken1: string;
133
+ supplyToken0Decimals: number | string | BN;
134
+ supplyToken1Decimals: number | string | BN;
135
+ borrowToken0Decimals: number | string | BN;
136
+ borrowToken1Decimals: number | string | BN;
137
+ collateralFactor: number | string | BN;
138
+ liquidationThreshold: number | string | BN;
139
+ liquidationMaxLimit: number | string | BN;
140
+ withdrawalGap: number | string | BN;
141
+ liquidationPenalty: number | string | BN;
142
+ borrowFee: number | string | BN;
143
+ oracle: string;
144
+ oraclePriceOperate: number | string | BN;
145
+ oraclePriceLiquidate: number | string | BN;
146
+ vaultSupplyExchangePrice: number | string | BN;
147
+ vaultBorrowExchangePrice: number | string | BN;
148
+ supplyRateVault: number | string | BN;
149
+ borrowRateVault: number | string | BN;
150
+ rewardsOrFeeRateSupply: number | string | BN;
151
+ rewardsOrFeeRateBorrow: number | string | BN;
152
+ totalPositions: number | string | BN;
153
+ totalSupplyVault: number | string | BN;
154
+ totalBorrowVault: number | string | BN;
155
+ withdrawalLimit: number | string | BN;
156
+ withdrawableUntilLimit: number | string | BN;
157
+ withdrawable: number | string | BN;
158
+ baseWithdrawalLimit: number | string | BN;
159
+ withdrawExpandPercent: number | string | BN;
160
+ withdrawExpandDuration: number | string | BN;
161
+ borrowLimit: number | string | BN;
162
+ borrowableUntilLimit: number | string | BN;
163
+ borrowable: number | string | BN;
164
+ borrowLimitUtilization: number | string | BN;
165
+ maxBorrowLimit: number | string | BN;
166
+ borrowExpandPercent: number | string | BN;
167
+ borrowExpandDuration: number | string | BN;
168
+ baseBorrowLimit: number | string | BN;
169
+ minimumBorrowing: number | string | BN;
170
+ };
171
+
172
+ export type VaultDataStructOutputArray = [
173
+ string,
174
+ string,
175
+ string,
176
+ boolean,
177
+ boolean,
178
+ string,
179
+ string,
180
+ string,
181
+ string,
182
+ string,
183
+ string,
184
+ string,
185
+ string,
186
+ string,
187
+ string,
188
+ string,
189
+ string,
190
+ string,
191
+ string,
192
+ string,
193
+ string,
194
+ string,
195
+ string,
196
+ string,
197
+ string,
198
+ string,
199
+ string,
200
+ string,
201
+ string,
202
+ string,
203
+ string,
204
+ string,
205
+ string,
206
+ string,
207
+ string,
208
+ string,
209
+ string,
210
+ string,
211
+ string,
212
+ string,
213
+ string,
214
+ string,
215
+ string,
216
+ string,
217
+ string,
218
+ string
219
+ ];
220
+ export type VaultDataStructOutputStruct = {
221
+ vault: string;
222
+ vaultId: string;
223
+ vaultType: string;
224
+ isSmartColl: boolean;
225
+ isSmartDebt: boolean;
226
+ supplyToken0: string;
227
+ supplyToken1: string;
228
+ borrowToken0: string;
229
+ borrowToken1: string;
230
+ supplyToken0Decimals: string;
231
+ supplyToken1Decimals: string;
232
+ borrowToken0Decimals: string;
233
+ borrowToken1Decimals: string;
234
+ collateralFactor: string;
235
+ liquidationThreshold: string;
236
+ liquidationMaxLimit: string;
237
+ withdrawalGap: string;
238
+ liquidationPenalty: string;
239
+ borrowFee: string;
240
+ oracle: string;
241
+ oraclePriceOperate: string;
242
+ oraclePriceLiquidate: string;
243
+ vaultSupplyExchangePrice: string;
244
+ vaultBorrowExchangePrice: string;
245
+ supplyRateVault: string;
246
+ borrowRateVault: string;
247
+ rewardsOrFeeRateSupply: string;
248
+ rewardsOrFeeRateBorrow: string;
249
+ totalPositions: string;
250
+ totalSupplyVault: string;
251
+ totalBorrowVault: string;
252
+ withdrawalLimit: string;
253
+ withdrawableUntilLimit: string;
254
+ withdrawable: string;
255
+ baseWithdrawalLimit: string;
256
+ withdrawExpandPercent: string;
257
+ withdrawExpandDuration: string;
258
+ borrowLimit: string;
259
+ borrowableUntilLimit: string;
260
+ borrowable: string;
261
+ borrowLimitUtilization: string;
262
+ maxBorrowLimit: string;
263
+ borrowExpandPercent: string;
264
+ borrowExpandDuration: string;
265
+ baseBorrowLimit: string;
266
+ minimumBorrowing: string;
267
+ };
268
+ export type VaultDataStructOutput = VaultDataStructOutputArray &
269
+ VaultDataStructOutputStruct;
270
+ }
271
+
272
+ export interface FluidView extends BaseContract {
273
+ constructor(
274
+ jsonInterface: any[],
275
+ address?: string,
276
+ options?: ContractOptions
277
+ ): FluidView;
278
+ clone(): FluidView;
279
+ methods: {
280
+ getPositionByNftId(
281
+ _nftId: number | string | BN
282
+ ): NonPayableTransactionObject<
283
+ [FluidView.UserPositionStructOutput, FluidView.VaultDataStructOutput] & {
284
+ position: FluidView.UserPositionStructOutput;
285
+ vault: FluidView.VaultDataStructOutput;
286
+ }
287
+ >;
288
+
289
+ getRatio(_nftId: number | string | BN): NonPayableTransactionObject<string>;
290
+
291
+ getUserNftIds(_user: string): NonPayableTransactionObject<string[]>;
292
+
293
+ getUserPositions(
294
+ _user: string
295
+ ): NonPayableTransactionObject<
296
+ [
297
+ FluidView.UserPositionStructOutput[],
298
+ FluidView.VaultDataStructOutput[]
299
+ ] & {
300
+ positions: FluidView.UserPositionStructOutput[];
301
+ vaults: FluidView.VaultDataStructOutput[];
302
+ }
303
+ >;
304
+
305
+ getVaultAddresses(
306
+ _ids: number | string | BN[],
307
+ _fetchAll: boolean
308
+ ): NonPayableTransactionObject<string[]>;
309
+
310
+ getVaultData(
311
+ _vault: string
312
+ ): NonPayableTransactionObject<FluidView.VaultDataStructOutput>;
313
+ };
314
+ events: {
315
+ allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
316
+ };
317
+ }
@@ -32,6 +32,7 @@ export type { ETHPriceFeed } from "./ETHPriceFeed";
32
32
  export type { Erc20 } from "./Erc20";
33
33
  export type { EulerV2View } from "./EulerV2View";
34
34
  export type { FeedRegistry } from "./FeedRegistry";
35
+ export type { FluidView } from "./FluidView";
35
36
  export type { GHO } from "./GHO";
36
37
  export type { GhoDiscountRateStrategy } from "./GhoDiscountRateStrategy";
37
38
  export type { IAToken } from "./IAToken";
@@ -1,119 +1,119 @@
1
- import { 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: string,
27
- ammAddress: string,
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
- }
69
-
70
- export interface CrvUSDAggregatedPositionData {
71
- ratio: string,
72
- supplied: string,
73
- suppliedUsd: string,
74
- borrowedUsd: string,
75
- borrowed: string,
76
- safetyRatio: string,
77
- borrowLimitUsd: string,
78
- minAllowedRatio: number,
79
- collFactor: string,
80
- leveragedType: string,
81
- leveragedAsset?: string,
82
- liquidationPrice?: string,
83
- }
84
-
85
- export interface CrvUSDUsedAsset {
86
- isSupplied: boolean,
87
- supplied: string,
88
- suppliedUsd: string,
89
- borrowed: string,
90
- borrowedUsd: string,
91
- isBorrowed: boolean,
92
- symbol: string,
93
- collateral: boolean,
94
- price: string,
95
- interestRate?: string,
96
- }
97
-
98
- export interface CrvUSDUsedAssets {
99
- [key: string]: CrvUSDUsedAsset,
100
- }
101
-
102
- export interface CrvUSDUserData {
103
- debtAmount: string,
104
- health: string,
105
- healthPercent: string,
106
- priceHigh: string,
107
- priceLow: string,
108
- liquidationDiscount: string,
109
- numOfBands: string,
110
- usedAssets: CrvUSDUsedAssets,
111
- status: CrvUSDStatus,
112
- ratio: string,
113
- supplied: string,
114
- suppliedUsd: string,
115
- borrowedUsd: string,
116
- borrowed: string,
117
- safetyRatio: string,
118
- userBands: UserBandData[],
1
+ import { 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: string,
27
+ ammAddress: string,
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
+ }
69
+
70
+ export interface CrvUSDAggregatedPositionData {
71
+ ratio: string,
72
+ supplied: string,
73
+ suppliedUsd: string,
74
+ borrowedUsd: string,
75
+ borrowed: string,
76
+ safetyRatio: string,
77
+ borrowLimitUsd: string,
78
+ minAllowedRatio: number,
79
+ collFactor: string,
80
+ leveragedType: string,
81
+ leveragedAsset?: string,
82
+ liquidationPrice?: string,
83
+ }
84
+
85
+ export interface CrvUSDUsedAsset {
86
+ isSupplied: boolean,
87
+ supplied: string,
88
+ suppliedUsd: string,
89
+ borrowed: string,
90
+ borrowedUsd: string,
91
+ isBorrowed: boolean,
92
+ symbol: string,
93
+ collateral: boolean,
94
+ price: string,
95
+ interestRate?: string,
96
+ }
97
+
98
+ export interface CrvUSDUsedAssets {
99
+ [key: string]: CrvUSDUsedAsset,
100
+ }
101
+
102
+ export interface CrvUSDUserData {
103
+ debtAmount: string,
104
+ health: string,
105
+ healthPercent: string,
106
+ priceHigh: string,
107
+ priceLow: string,
108
+ liquidationDiscount: string,
109
+ numOfBands: string,
110
+ usedAssets: CrvUSDUsedAssets,
111
+ status: CrvUSDStatus,
112
+ ratio: string,
113
+ supplied: string,
114
+ suppliedUsd: string,
115
+ borrowedUsd: string,
116
+ borrowed: string,
117
+ safetyRatio: string,
118
+ userBands: UserBandData[],
119
119
  }