@defisaver/positions-sdk 0.0.164 → 0.0.166-dev

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 (73) hide show
  1. package/.mocharc.json +4 -4
  2. package/.nvmrc +1 -1
  3. package/README.md +69 -69
  4. package/cjs/eulerV2/index.js +10 -4
  5. package/cjs/helpers/eulerHelpers/index.d.ts +2 -1
  6. package/cjs/helpers/eulerHelpers/index.js +11 -8
  7. package/cjs/types/euler.d.ts +1 -0
  8. package/esm/eulerV2/index.js +11 -5
  9. package/esm/helpers/eulerHelpers/index.d.ts +2 -1
  10. package/esm/helpers/eulerHelpers/index.js +9 -7
  11. package/esm/types/euler.d.ts +1 -0
  12. package/package.json +44 -44
  13. package/src/aaveV2/index.ts +227 -227
  14. package/src/aaveV3/index.ts +590 -590
  15. package/src/assets/index.ts +60 -60
  16. package/src/chickenBonds/index.ts +123 -123
  17. package/src/compoundV2/index.ts +219 -219
  18. package/src/compoundV3/index.ts +281 -281
  19. package/src/config/contracts.js +1040 -1040
  20. package/src/constants/index.ts +6 -6
  21. package/src/contracts.ts +130 -130
  22. package/src/curveUsd/index.ts +229 -229
  23. package/src/eulerV2/index.ts +285 -273
  24. package/src/exchange/index.ts +17 -17
  25. package/src/helpers/aaveHelpers/index.ts +194 -194
  26. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  27. package/src/helpers/compoundHelpers/index.ts +246 -246
  28. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  29. package/src/helpers/eulerHelpers/index.ts +230 -228
  30. package/src/helpers/index.ts +8 -8
  31. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  32. package/src/helpers/makerHelpers/index.ts +94 -94
  33. package/src/helpers/morphoBlueHelpers/index.ts +115 -115
  34. package/src/helpers/sparkHelpers/index.ts +150 -150
  35. package/src/index.ts +48 -48
  36. package/src/liquity/index.ts +116 -116
  37. package/src/llamaLend/index.ts +275 -275
  38. package/src/maker/index.ts +117 -117
  39. package/src/markets/aave/index.ts +152 -152
  40. package/src/markets/aave/marketAssets.ts +46 -46
  41. package/src/markets/compound/index.ts +173 -173
  42. package/src/markets/compound/marketsAssets.ts +64 -64
  43. package/src/markets/curveUsd/index.ts +69 -69
  44. package/src/markets/euler/index.ts +37 -37
  45. package/src/markets/index.ts +23 -23
  46. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  47. package/src/markets/llamaLend/index.ts +235 -235
  48. package/src/markets/morphoBlue/index.ts +691 -691
  49. package/src/markets/spark/index.ts +29 -29
  50. package/src/markets/spark/marketAssets.ts +10 -10
  51. package/src/moneymarket/moneymarketCommonService.ts +80 -80
  52. package/src/morphoAaveV2/index.ts +256 -256
  53. package/src/morphoAaveV3/index.ts +630 -630
  54. package/src/morphoBlue/index.ts +171 -171
  55. package/src/multicall/index.ts +22 -22
  56. package/src/services/dsrService.ts +15 -15
  57. package/src/services/priceService.ts +21 -21
  58. package/src/services/utils.ts +56 -56
  59. package/src/setup.ts +8 -8
  60. package/src/spark/index.ts +424 -424
  61. package/src/staking/staking.ts +189 -189
  62. package/src/types/aave.ts +262 -262
  63. package/src/types/chickenBonds.ts +45 -45
  64. package/src/types/common.ts +84 -84
  65. package/src/types/compound.ts +129 -129
  66. package/src/types/curveUsd.ts +118 -118
  67. package/src/types/euler.ts +170 -169
  68. package/src/types/index.ts +9 -9
  69. package/src/types/liquity.ts +30 -30
  70. package/src/types/llamaLend.ts +155 -155
  71. package/src/types/maker.ts +50 -50
  72. package/src/types/morphoBlue.ts +144 -144
  73. package/src/types/spark.ts +127 -127
@@ -1,84 +1,84 @@
1
- // General
2
- export type EthAddress = string;
3
- export type Blockish = number | 'latest';
4
- export type AssetSymbol = string;
5
- export type Amount = string | number;
6
-
7
- export enum NetworkNumber {
8
- Eth = 1,
9
- Opt = 10,
10
- Arb = 42161,
11
- Base = 8453,
12
- }
13
- export type Networkish = string | NetworkNumber;
14
-
15
- // Common
16
- export interface MMAssetData {
17
- symbol: string,
18
- supplyRate: string,
19
- borrowRate: string,
20
- price: string,
21
- collateralFactor: string,
22
- underlyingTokenAddress: string,
23
- marketLiquidity: string,
24
- utilization: string,
25
- borrowCap: string,
26
- totalSupply: string,
27
- canBeBorrowed: boolean,
28
- canBeSupplied: boolean,
29
- totalBorrow: string,
30
- incentiveBorrowApy?: string,
31
- incentiveBorrowToken?: string,
32
- incentiveSupplyApy?: string,
33
- incentiveSupplyToken?: string,
34
- borrowRateP2P?: string,
35
- supplyRateP2P?: string,
36
- }
37
-
38
- export interface MMAssetsData {
39
- [token: string]: MMAssetData,
40
- }
41
- export interface MMMarketData {
42
- assetsData: MMAssetData[],
43
- }
44
- export interface MMUsedAsset {
45
- symbol: string,
46
- supplied: string,
47
- suppliedUsd: string,
48
- isSupplied: boolean,
49
- borrowed: string,
50
- borrowedUsd: string,
51
- isBorrowed: boolean,
52
- debt?: string,
53
- supplyRate?: string,
54
- borrowRate?: string,
55
- discountedBorrowRate?: string,
56
- stableBorrowRate?: string,
57
- interestMode?: string,
58
- collateral?: boolean,
59
- }
60
- export interface MMUsedAssets {
61
- [token: string]: MMUsedAsset,
62
- }
63
- export interface MMUsedAssetWStableB extends MMUsedAsset {
64
- stableBorrowRate: string,
65
- borrowedStable: string,
66
- borrowedVariable: string,
67
- borrowedUsdStable: string,
68
- borrowedUsdVariable: string,
69
- interestMode: string,
70
- }
71
- export interface MMPositionData {
72
- usedAssets: any,
73
- netApy: string,
74
- lastUpdated: number,
75
- // ...
76
- }
77
-
78
- export type Balances = Record<AssetSymbol, Amount>;
79
- export interface PositionBalances {
80
- collateral?: Balances,
81
- debt?: Balances,
82
- selling?: Balances,
83
- deposited?: Balances,
84
- }
1
+ // General
2
+ export type EthAddress = string;
3
+ export type Blockish = number | 'latest';
4
+ export type AssetSymbol = string;
5
+ export type Amount = string | number;
6
+
7
+ export enum NetworkNumber {
8
+ Eth = 1,
9
+ Opt = 10,
10
+ Arb = 42161,
11
+ Base = 8453,
12
+ }
13
+ export type Networkish = string | NetworkNumber;
14
+
15
+ // Common
16
+ export interface MMAssetData {
17
+ symbol: string,
18
+ supplyRate: string,
19
+ borrowRate: string,
20
+ price: string,
21
+ collateralFactor: string,
22
+ underlyingTokenAddress: string,
23
+ marketLiquidity: string,
24
+ utilization: string,
25
+ borrowCap: string,
26
+ totalSupply: string,
27
+ canBeBorrowed: boolean,
28
+ canBeSupplied: boolean,
29
+ totalBorrow: string,
30
+ incentiveBorrowApy?: string,
31
+ incentiveBorrowToken?: string,
32
+ incentiveSupplyApy?: string,
33
+ incentiveSupplyToken?: string,
34
+ borrowRateP2P?: string,
35
+ supplyRateP2P?: string,
36
+ }
37
+
38
+ export interface MMAssetsData {
39
+ [token: string]: MMAssetData,
40
+ }
41
+ export interface MMMarketData {
42
+ assetsData: MMAssetData[],
43
+ }
44
+ export interface MMUsedAsset {
45
+ symbol: string,
46
+ supplied: string,
47
+ suppliedUsd: string,
48
+ isSupplied: boolean,
49
+ borrowed: string,
50
+ borrowedUsd: string,
51
+ isBorrowed: boolean,
52
+ debt?: string,
53
+ supplyRate?: string,
54
+ borrowRate?: string,
55
+ discountedBorrowRate?: string,
56
+ stableBorrowRate?: string,
57
+ interestMode?: string,
58
+ collateral?: boolean,
59
+ }
60
+ export interface MMUsedAssets {
61
+ [token: string]: MMUsedAsset,
62
+ }
63
+ export interface MMUsedAssetWStableB extends MMUsedAsset {
64
+ stableBorrowRate: string,
65
+ borrowedStable: string,
66
+ borrowedVariable: string,
67
+ borrowedUsdStable: string,
68
+ borrowedUsdVariable: string,
69
+ interestMode: string,
70
+ }
71
+ export interface MMPositionData {
72
+ usedAssets: any,
73
+ netApy: string,
74
+ lastUpdated: number,
75
+ // ...
76
+ }
77
+
78
+ export type Balances = Record<AssetSymbol, Amount>;
79
+ export interface PositionBalances {
80
+ collateral?: Balances,
81
+ debt?: Balances,
82
+ selling?: Balances,
83
+ deposited?: Balances,
84
+ }
@@ -1,130 +1,130 @@
1
- import {
2
- MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber,
3
- } from './common';
4
-
5
- export enum CompoundVersions {
6
- 'CompoundV2' = 'v2',
7
- 'CompoundV3USDC' = 'v3-USDC',
8
- 'CompoundV3USDCe' = 'v3-USDC.e',
9
- 'CompoundV3ETH' = 'v3-ETH',
10
- 'CompoundV3USDbC' = 'v3-USDbC',
11
- 'CompoundV3USDT' = 'v3-USDT',
12
- }
13
-
14
- export interface CompoundBulkerOptions {
15
- supply: number | string,
16
- withdraw: number | string,
17
- }
18
-
19
- export interface CompoundMarketData {
20
- chainIds: NetworkNumber[],
21
- label: string,
22
- shortLabel: string,
23
- value: CompoundVersions,
24
- baseAsset: string,
25
- collAssets: readonly string[],
26
- baseMarket: string,
27
- baseMarketAddress: string,
28
- secondLabel: string,
29
- bulkerName: string,
30
- bulkerAddress: string,
31
- bulkerOptions: CompoundBulkerOptions,
32
- // icon: Function,
33
- }
34
-
35
- export interface CompoundUsedAsset extends MMUsedAsset {
36
- collateral: boolean,
37
- limit?: string,
38
- }
39
-
40
- export interface CompoundV2UsedAsset extends CompoundUsedAsset {
41
- }
42
- export interface CompoundV3UsedAsset extends CompoundUsedAsset {
43
- }
44
-
45
- export interface CompoundUsedAssets<T> {
46
- [token: string]: T,
47
- }
48
-
49
- export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
50
- export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
51
-
52
- export interface CompoundAssetData extends MMAssetData {
53
- supplyCapAlternative?: string,
54
- totalSupplyAlternative?: string,
55
- priceAlternative?: string,
56
- sortIndex?: number,
57
- }
58
-
59
- export interface CompoundV2AssetData extends CompoundAssetData {
60
- }
61
- export interface CompoundV3AssetData extends CompoundAssetData {
62
- borrowCollateralFactor: string,
63
- liquidateCollateralFactor: string,
64
- minDebt: string,
65
- liquidationRatio: string,
66
- supplyCap: string,
67
- priceInBaseAsset: string,
68
- }
69
-
70
- export interface CompoundAssetsData<T> {
71
- [token: string]: T
72
- }
73
- export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
74
- export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
75
-
76
- export type CompoundMarketsData<T> = { assetsData: T };
77
- export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
78
- export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
79
-
80
- export interface BaseAdditionalAssetData {
81
- totalBorrow: string,
82
- utilization: string,
83
- marketLiquidity: string,
84
- rewardSupplySpeed: string,
85
- rewardBorrowSpeed: string,
86
- minDebt: string,
87
- isBase: boolean,
88
- }
89
-
90
- export interface CompoundAggregatedPositionData {
91
- suppliedUsd: string,
92
- suppliedCollateralUsd: string,
93
- borrowedUsd: string,
94
- borrowLimitUsd: string,
95
- liquidationLimitUsd: string,
96
- leftToBorrowUsd: string,
97
- ratio: string,
98
- collRatio: string,
99
- netApy: string,
100
- incentiveUsd: string,
101
- totalInterestUsd: string,
102
- liqRatio: string,
103
- liqPercent: string,
104
- leveragedType: string,
105
- leveragedAsset?: string,
106
- leveragedLsdAssetRatio?: string,
107
- liquidationPrice?: string,
108
- minRatio: string,
109
- debtTooLow: boolean,
110
- minDebt: string,
111
- }
112
-
113
- export interface CompoundPositionData extends MMPositionData {
114
- ratio: string,
115
- minRatio: string,
116
- borrowedUsd: string,
117
- borrowLimitUsd: string,
118
- incentiveUsd: string,
119
- totalInterestUsd: string,
120
- isSubscribedToAutomation?: boolean,
121
- automationResubscribeRequired?: boolean,
122
- }
123
-
124
- export interface CompoundV2PositionData extends CompoundPositionData {
125
- usedAssets: CompoundV2UsedAssets,
126
- }
127
-
128
- export interface CompoundV3PositionData extends CompoundPositionData {
129
- usedAssets: CompoundV3UsedAssets,
1
+ import {
2
+ MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber,
3
+ } from './common';
4
+
5
+ export enum CompoundVersions {
6
+ 'CompoundV2' = 'v2',
7
+ 'CompoundV3USDC' = 'v3-USDC',
8
+ 'CompoundV3USDCe' = 'v3-USDC.e',
9
+ 'CompoundV3ETH' = 'v3-ETH',
10
+ 'CompoundV3USDbC' = 'v3-USDbC',
11
+ 'CompoundV3USDT' = 'v3-USDT',
12
+ }
13
+
14
+ export interface CompoundBulkerOptions {
15
+ supply: number | string,
16
+ withdraw: number | string,
17
+ }
18
+
19
+ export interface CompoundMarketData {
20
+ chainIds: NetworkNumber[],
21
+ label: string,
22
+ shortLabel: string,
23
+ value: CompoundVersions,
24
+ baseAsset: string,
25
+ collAssets: readonly string[],
26
+ baseMarket: string,
27
+ baseMarketAddress: string,
28
+ secondLabel: string,
29
+ bulkerName: string,
30
+ bulkerAddress: string,
31
+ bulkerOptions: CompoundBulkerOptions,
32
+ // icon: Function,
33
+ }
34
+
35
+ export interface CompoundUsedAsset extends MMUsedAsset {
36
+ collateral: boolean,
37
+ limit?: string,
38
+ }
39
+
40
+ export interface CompoundV2UsedAsset extends CompoundUsedAsset {
41
+ }
42
+ export interface CompoundV3UsedAsset extends CompoundUsedAsset {
43
+ }
44
+
45
+ export interface CompoundUsedAssets<T> {
46
+ [token: string]: T,
47
+ }
48
+
49
+ export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
50
+ export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
51
+
52
+ export interface CompoundAssetData extends MMAssetData {
53
+ supplyCapAlternative?: string,
54
+ totalSupplyAlternative?: string,
55
+ priceAlternative?: string,
56
+ sortIndex?: number,
57
+ }
58
+
59
+ export interface CompoundV2AssetData extends CompoundAssetData {
60
+ }
61
+ export interface CompoundV3AssetData extends CompoundAssetData {
62
+ borrowCollateralFactor: string,
63
+ liquidateCollateralFactor: string,
64
+ minDebt: string,
65
+ liquidationRatio: string,
66
+ supplyCap: string,
67
+ priceInBaseAsset: string,
68
+ }
69
+
70
+ export interface CompoundAssetsData<T> {
71
+ [token: string]: T
72
+ }
73
+ export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
74
+ export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
75
+
76
+ export type CompoundMarketsData<T> = { assetsData: T };
77
+ export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
78
+ export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
79
+
80
+ export interface BaseAdditionalAssetData {
81
+ totalBorrow: string,
82
+ utilization: string,
83
+ marketLiquidity: string,
84
+ rewardSupplySpeed: string,
85
+ rewardBorrowSpeed: string,
86
+ minDebt: string,
87
+ isBase: boolean,
88
+ }
89
+
90
+ export interface CompoundAggregatedPositionData {
91
+ suppliedUsd: string,
92
+ suppliedCollateralUsd: string,
93
+ borrowedUsd: string,
94
+ borrowLimitUsd: string,
95
+ liquidationLimitUsd: string,
96
+ leftToBorrowUsd: string,
97
+ ratio: string,
98
+ collRatio: string,
99
+ netApy: string,
100
+ incentiveUsd: string,
101
+ totalInterestUsd: string,
102
+ liqRatio: string,
103
+ liqPercent: string,
104
+ leveragedType: string,
105
+ leveragedAsset?: string,
106
+ leveragedLsdAssetRatio?: string,
107
+ liquidationPrice?: string,
108
+ minRatio: string,
109
+ debtTooLow: boolean,
110
+ minDebt: string,
111
+ }
112
+
113
+ export interface CompoundPositionData extends MMPositionData {
114
+ ratio: string,
115
+ minRatio: string,
116
+ borrowedUsd: string,
117
+ borrowLimitUsd: string,
118
+ incentiveUsd: string,
119
+ totalInterestUsd: string,
120
+ isSubscribedToAutomation?: boolean,
121
+ automationResubscribeRequired?: boolean,
122
+ }
123
+
124
+ export interface CompoundV2PositionData extends CompoundPositionData {
125
+ usedAssets: CompoundV2UsedAssets,
126
+ }
127
+
128
+ export interface CompoundV3PositionData extends CompoundPositionData {
129
+ usedAssets: CompoundV3UsedAssets,
130
130
  }
@@ -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
  }