@defisaver/positions-sdk 0.0.166-dev → 0.0.166-dev10-liquity-v2

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 (158) 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 +7 -45
  5. package/cjs/config/contracts.js +3 -3
  6. package/cjs/contracts.d.ts +1 -1
  7. package/cjs/contracts.js +2 -2
  8. package/cjs/helpers/index.d.ts +1 -1
  9. package/cjs/helpers/index.js +2 -2
  10. package/cjs/helpers/liquityV2Helpers/index.d.ts +12 -0
  11. package/cjs/helpers/liquityV2Helpers/index.js +63 -0
  12. package/cjs/index.d.ts +2 -2
  13. package/cjs/index.js +3 -3
  14. package/cjs/liquityV2/index.d.ts +16 -0
  15. package/cjs/liquityV2/index.js +139 -0
  16. package/cjs/markets/compound/marketsAssets.js +3 -3
  17. package/cjs/markets/index.d.ts +1 -1
  18. package/cjs/markets/index.js +3 -3
  19. package/cjs/markets/liquityV2/index.d.ts +8 -0
  20. package/cjs/markets/liquityV2/index.js +34 -0
  21. package/cjs/markets/morphoBlue/index.d.ts +4 -0
  22. package/cjs/markets/morphoBlue/index.js +36 -1
  23. package/cjs/markets/spark/marketAssets.js +1 -1
  24. package/cjs/moneymarket/moneymarketCommonService.js +1 -1
  25. package/cjs/services/utils.d.ts +0 -2
  26. package/cjs/services/utils.js +1 -4
  27. package/cjs/staking/staking.d.ts +1 -0
  28. package/cjs/staking/staking.js +31 -2
  29. package/cjs/types/contracts/generated/LiquityV2View.d.ts +240 -0
  30. package/cjs/types/contracts/generated/index.d.ts +1 -1
  31. package/cjs/types/index.d.ts +1 -1
  32. package/cjs/types/index.js +1 -1
  33. package/cjs/types/liquityV2.d.ts +90 -0
  34. package/cjs/types/liquityV2.js +8 -0
  35. package/cjs/types/morphoBlue.d.ts +3 -1
  36. package/cjs/types/morphoBlue.js +2 -0
  37. package/esm/config/contracts.d.ts +7 -45
  38. package/esm/config/contracts.js +3 -3
  39. package/esm/contracts.d.ts +1 -1
  40. package/esm/contracts.js +1 -1
  41. package/esm/helpers/index.d.ts +1 -1
  42. package/esm/helpers/index.js +1 -1
  43. package/esm/helpers/liquityV2Helpers/index.d.ts +12 -0
  44. package/esm/helpers/liquityV2Helpers/index.js +55 -0
  45. package/esm/index.d.ts +2 -2
  46. package/esm/index.js +2 -2
  47. package/esm/liquityV2/index.d.ts +16 -0
  48. package/esm/liquityV2/index.js +129 -0
  49. package/esm/markets/compound/marketsAssets.js +3 -3
  50. package/esm/markets/index.d.ts +1 -1
  51. package/esm/markets/index.js +1 -1
  52. package/esm/markets/liquityV2/index.d.ts +8 -0
  53. package/esm/markets/liquityV2/index.js +28 -0
  54. package/esm/markets/morphoBlue/index.d.ts +4 -0
  55. package/esm/markets/morphoBlue/index.js +33 -0
  56. package/esm/markets/spark/marketAssets.js +1 -1
  57. package/esm/moneymarket/moneymarketCommonService.js +1 -1
  58. package/esm/services/utils.d.ts +0 -2
  59. package/esm/services/utils.js +0 -2
  60. package/esm/staking/staking.d.ts +1 -0
  61. package/esm/staking/staking.js +29 -1
  62. package/esm/types/contracts/generated/LiquityV2View.d.ts +240 -0
  63. package/esm/types/contracts/generated/index.d.ts +1 -1
  64. package/esm/types/index.d.ts +1 -1
  65. package/esm/types/index.js +1 -1
  66. package/esm/types/liquityV2.d.ts +90 -0
  67. package/esm/types/liquityV2.js +5 -0
  68. package/esm/types/morphoBlue.d.ts +3 -1
  69. package/esm/types/morphoBlue.js +2 -0
  70. package/package.json +49 -44
  71. package/src/aaveV2/index.ts +227 -227
  72. package/src/aaveV3/index.ts +590 -590
  73. package/src/assets/index.ts +60 -60
  74. package/src/chickenBonds/index.ts +123 -123
  75. package/src/compoundV2/index.ts +219 -219
  76. package/src/compoundV3/index.ts +281 -281
  77. package/src/config/contracts.js +1040 -1040
  78. package/src/constants/index.ts +6 -6
  79. package/src/contracts.ts +130 -130
  80. package/src/curveUsd/index.ts +229 -229
  81. package/src/exchange/index.ts +17 -17
  82. package/src/helpers/aaveHelpers/index.ts +194 -194
  83. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  84. package/src/helpers/compoundHelpers/index.ts +246 -246
  85. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  86. package/src/helpers/index.ts +9 -9
  87. package/src/helpers/liquityV2Helpers/index.ts +80 -0
  88. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  89. package/src/helpers/makerHelpers/index.ts +94 -94
  90. package/src/helpers/morphoBlueHelpers/index.ts +115 -115
  91. package/src/helpers/sparkHelpers/index.ts +150 -150
  92. package/src/index.ts +48 -48
  93. package/src/liquity/index.ts +116 -116
  94. package/src/liquityV2/index.ts +159 -0
  95. package/src/llamaLend/index.ts +275 -275
  96. package/src/maker/index.ts +117 -117
  97. package/src/markets/aave/index.ts +152 -152
  98. package/src/markets/aave/marketAssets.ts +46 -46
  99. package/src/markets/compound/index.ts +173 -173
  100. package/src/markets/compound/marketsAssets.ts +64 -64
  101. package/src/markets/curveUsd/index.ts +69 -69
  102. package/src/markets/index.ts +23 -24
  103. package/src/markets/liquityV2/index.ts +31 -0
  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 +728 -691
  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 +630 -630
  112. package/src/morphoBlue/index.ts +171 -171
  113. package/src/multicall/index.ts +22 -22
  114. package/src/services/dsrService.ts +15 -15
  115. package/src/services/priceService.ts +21 -21
  116. package/src/services/utils.ts +54 -57
  117. package/src/setup.ts +8 -8
  118. package/src/spark/index.ts +424 -424
  119. package/src/staking/staking.ts +218 -189
  120. package/src/types/aave.ts +262 -262
  121. package/src/types/chickenBonds.ts +45 -45
  122. package/src/types/common.ts +84 -84
  123. package/src/types/compound.ts +129 -129
  124. package/src/types/contracts/generated/LiquityV2View.ts +311 -0
  125. package/src/types/contracts/generated/index.ts +1 -1
  126. package/src/types/curveUsd.ts +118 -118
  127. package/src/types/index.ts +10 -10
  128. package/src/types/liquity.ts +30 -30
  129. package/src/types/liquityV2.ts +96 -0
  130. package/src/types/llamaLend.ts +155 -155
  131. package/src/types/maker.ts +50 -50
  132. package/src/types/morphoBlue.ts +146 -144
  133. package/src/types/spark.ts +127 -127
  134. package/cjs/eulerV2/index.d.ts +0 -40
  135. package/cjs/eulerV2/index.js +0 -207
  136. package/cjs/helpers/eulerHelpers/index.d.ts +0 -27
  137. package/cjs/helpers/eulerHelpers/index.js +0 -232
  138. package/cjs/markets/euler/index.d.ts +0 -10
  139. package/cjs/markets/euler/index.js +0 -41
  140. package/cjs/types/contracts/generated/EulerV2View.d.ts +0 -333
  141. package/cjs/types/euler.d.ts +0 -148
  142. package/cjs/types/euler.js +0 -15
  143. package/esm/eulerV2/index.d.ts +0 -40
  144. package/esm/eulerV2/index.js +0 -199
  145. package/esm/helpers/eulerHelpers/index.d.ts +0 -27
  146. package/esm/helpers/eulerHelpers/index.js +0 -219
  147. package/esm/markets/euler/index.d.ts +0 -10
  148. package/esm/markets/euler/index.js +0 -34
  149. package/esm/types/contracts/generated/EulerV2View.d.ts +0 -333
  150. package/esm/types/euler.d.ts +0 -148
  151. package/esm/types/euler.js +0 -12
  152. package/src/eulerV2/index.ts +0 -286
  153. package/src/helpers/eulerHelpers/index.ts +0 -231
  154. package/src/markets/euler/index.ts +0 -38
  155. package/src/types/contracts/generated/EulerV2View.ts +0 -434
  156. package/src/types/euler.ts +0 -171
  157. /package/cjs/types/contracts/generated/{EulerV2View.js → LiquityV2View.js} +0 -0
  158. /package/esm/types/contracts/generated/{EulerV2View.js → LiquityV2View.js} +0 -0
@@ -0,0 +1,96 @@
1
+ import { EthAddress, NetworkNumber } from './common';
2
+
3
+ export enum LiquityV2Versions {
4
+ LiquityV2Eth = 'liquityv2eth',
5
+ LiquityV2WstEth = 'liquityv2wsteth',
6
+ }
7
+
8
+ export interface LiquityV2MarketInfo {
9
+ chainIds: NetworkNumber[],
10
+ label: string,
11
+ shortLabel: string,
12
+ url: string,
13
+ value: LiquityV2Versions,
14
+ debtToken: string,
15
+ collateralToken: string,
16
+ marketAddress: string,
17
+ protocolName: string,
18
+ }
19
+
20
+ export interface LiquityV2AssetData {
21
+ symbol: string,
22
+ address: string,
23
+ price: string,
24
+ incentiveSupplyApy?: string,
25
+ incentiveSupplyToken?: string,
26
+ totalSupply: string,
27
+ totalBorrow: string,
28
+ canBeSupplied: boolean,
29
+ canBeBorrowed: boolean,
30
+ }
31
+
32
+ export type LiquityV2AssetsData = { [key: string]: LiquityV2AssetData };
33
+
34
+ export interface InnerLiquityV2MarketData {
35
+ minCollRatio: string,
36
+ hintHelperAddress: EthAddress,
37
+ troveNFTAddress: EthAddress,
38
+ borrowerOperationsAddress: EthAddress,
39
+ troveManagerAddress: EthAddress,
40
+ stabilityPoolAddress: EthAddress,
41
+ collSurplusPoolAddress: EthAddress,
42
+ }
43
+
44
+ export interface LiquityV2MarketData {
45
+ assetsData: LiquityV2AssetsData,
46
+ marketData: InnerLiquityV2MarketData,
47
+ }
48
+
49
+ export interface LiquityV2UsedAsset {
50
+ symbol: string,
51
+ collateral?: boolean,
52
+ supplied: string,
53
+ suppliedUsd: string,
54
+ borrowed: string,
55
+ borrowedUsd: string,
56
+ isSupplied: boolean,
57
+ isBorrowed: boolean,
58
+ }
59
+
60
+ export type LiquityV2UsedAssets = { [key: string]: LiquityV2UsedAsset };
61
+
62
+ export interface LiquityV2AggregatedTroveData {
63
+ suppliedUsd: string,
64
+ borrowedUsd: string,
65
+ borrowLimitUsd: string,
66
+ leftToBorrowUsd: string,
67
+ netApy: string,
68
+ incentiveUsd: string,
69
+ totalInterestUsd: string,
70
+ leveragedType: string,
71
+ leveragedAsset: string,
72
+ liquidationPrice: string,
73
+ ratio: string,
74
+ collRatio: string,
75
+ }
76
+
77
+ export interface LiquityV2TroveData {
78
+ usedAssets: LiquityV2UsedAssets,
79
+ troveId: string,
80
+ ratio: string,
81
+ collRatio: string,
82
+ interestRate: string,
83
+ leftToBorrowUsd: string,
84
+ borrowLimitUsd: string,
85
+ suppliedUsd: string,
86
+ borrowedUsd: string,
87
+ netApy: string,
88
+ incentiveUsd: string,
89
+ totalInterestUsd: string,
90
+ interestBatchManager: EthAddress,
91
+ troveStatus: string,
92
+ leveragedType: string,
93
+ leveragedAsset: string,
94
+ liquidationPrice: string,
95
+ debtInFront: string,
96
+ }
@@ -1,155 +1,155 @@
1
- import { EthAddress, NetworkNumber } from './common';
2
- import { BandData, UserBandData } from './curveUsd';
3
-
4
- export enum LLVersionsEth {
5
- // long only
6
- LLWstethCrvusd = 'llamaLendwstETHcrvUSD',
7
- LLWstethCrvusd2 = 'llamaLendwstETHcrvUSD2',
8
- LLSusdeCrvusd = 'llamaLendsUSDecrvUSD',
9
- LLSusdeCrvusd2 = 'llamaLendsUSDecrvUSD2',
10
- LLWbtcCrvusd = 'llamaLendWBTCcrvUSD',
11
- // LLPufethCrvusd = 'llamaLendPufETHcrvUSD', // temp disabled
12
- LLUsdeCrvusd = 'llamaLendUSDecrvUSD',
13
- LLWethCrvusd2 = 'llamaLendWETHcrvUSD2',
14
- // long and short crv
15
- LLCrvCrvusd = 'llamaLendCRVcrvUSD',
16
- LLCrvusdCrv = 'llamaLendcrvUSDCRV',
17
- // long and short tbtc
18
- LLTbtcCrvusd = 'llamaLendTBTCcrvUSD',
19
- LLCrvusdTbtc = 'llamaLendcrvUSDTBTC',
20
- // long and short weth
21
- LLWethCrvusd = 'llamaLendWETHcrvUSD',
22
- LLCrvusdWeth = 'llamaLendcrvUSDWETH',
23
- }
24
-
25
- export enum LLVersionsArb {
26
- // long only
27
- LLArbCrvusd = 'llamaLendArbcrvUSD',
28
- LLArbCrvusd2 = 'llamaLendArbcrvUSD2',
29
- LLFxnCrvusd = 'llamaLendFXNcrvUSD',
30
- LLWbtcCrvusd = 'llamaLendWBTCcrvUSD',
31
- LLWbtcCrvusd2 = 'llamaLendWBTCcrvUSD2',
32
- LLCrvCrvusd = 'llamaLendCRVcrvUSD',
33
- LLWethCrvusd = 'llamaLendWETHcrvUSD',
34
- LLWethCrvusd2 = 'llamaLendWETHcrvUSD2',
35
- }
36
-
37
- export const LlamaLendVersions = {
38
- ...LLVersionsEth,
39
- ...LLVersionsArb,
40
- } as const;
41
-
42
- export type LlamaLendVersionsType = typeof LlamaLendVersions[keyof typeof LlamaLendVersions];
43
-
44
- export enum LlamaLendStatus {
45
- Nonexistant = 'Nonexistant',
46
- Safe = 'Safe',
47
- Risk = 'Risk',
48
- SoftLiquidating = 'SoftLiquidating',
49
- SoftLiquidated = 'SoftLiquidated',
50
- }
51
-
52
- export interface LlamaLendMarketData {
53
- chainIds: NetworkNumber[],
54
- label: string,
55
- shortLabel: string,
56
- value: LlamaLendVersionsType,
57
- collAsset: string,
58
- baseAsset: string,
59
- controllerAddress: string,
60
- vaultAddress: EthAddress,
61
- url: string,
62
- }
63
- export interface LlamaLendAssetData {
64
- symbol: string,
65
- address: string,
66
- price: string,
67
- supplyRate: string,
68
- borrowRate: string,
69
- totalSupply?: string,
70
- totalBorrow?: string,
71
- canBeSupplied?: boolean,
72
- canBeBorrowed?: boolean,
73
- shares?: string,
74
- }
75
-
76
- export type LlamaLendAssetsData = { [key: string]: LlamaLendAssetData };
77
-
78
- export interface LlamaLendGlobalMarketData {
79
- A:string,
80
- loanDiscount: string,
81
- activeBand: string,
82
- totalDebt: string,
83
- totalDebtSupplied:string,
84
- utilization:string,
85
- ammPrice: string,
86
- basePrice: string,
87
- oraclePrice: string,
88
- minted: string,
89
- redeemed: string,
90
- monetaryPolicyRate: string,
91
- ammRate: string,
92
- minBand: string,
93
- maxBand: string,
94
- borrowRate: string,
95
- lendRate: string,
96
- futureBorrowRate: string,
97
- leftToBorrow: string,
98
- bands: BandData[],
99
- assetsData: LlamaLendAssetsData,
100
- }
101
-
102
- export interface LlamaLendAggregatedPositionData {
103
- ratio: string,
104
- suppliedUsd: string,
105
- borrowedUsd: string,
106
- suppliedForYieldUsd: string,
107
- safetyRatio: string,
108
- borrowLimitUsd: string,
109
- minAllowedRatio: number,
110
- collFactor: string,
111
- leveragedType: string,
112
- leveragedAsset?: string,
113
- liquidationPrice?: string,
114
- netApy: string,
115
- incentiveUsd: string,
116
- totalInterestUsd: string,
117
- }
118
-
119
- export interface LlamaLendUsedAsset {
120
- isSupplied: boolean,
121
- supplied: string,
122
- suppliedUsd: string,
123
- borrowed: string,
124
- borrowedUsd: string,
125
- isBorrowed: boolean,
126
- symbol: string,
127
- collateral: boolean,
128
- price: string,
129
- interestRate?: string,
130
- suppliedForYield?: string,
131
- suppliedForYieldUsd?: string,
132
- shares?: string,
133
- }
134
-
135
- export interface LlamaLendUsedAssets {
136
- [key: string]: LlamaLendUsedAsset,
137
- }
138
-
139
- export interface LlamaLendUserData {
140
- debtAmount: string,
141
- health: string,
142
- healthPercent: string,
143
- priceHigh: string,
144
- priceLow: string,
145
- liquidationDiscount: string,
146
- numOfBands: string,
147
- usedAssets: LlamaLendUsedAssets,
148
- status: LlamaLendStatus,
149
- ratio: string,
150
- suppliedUsd: string,
151
- borrowedUsd: string,
152
- suppliedForYieldUsd: string,
153
- safetyRatio: string,
154
- userBands: UserBandData[],
155
- }
1
+ import { EthAddress, NetworkNumber } from './common';
2
+ import { BandData, UserBandData } from './curveUsd';
3
+
4
+ export enum LLVersionsEth {
5
+ // long only
6
+ LLWstethCrvusd = 'llamaLendwstETHcrvUSD',
7
+ LLWstethCrvusd2 = 'llamaLendwstETHcrvUSD2',
8
+ LLSusdeCrvusd = 'llamaLendsUSDecrvUSD',
9
+ LLSusdeCrvusd2 = 'llamaLendsUSDecrvUSD2',
10
+ LLWbtcCrvusd = 'llamaLendWBTCcrvUSD',
11
+ // LLPufethCrvusd = 'llamaLendPufETHcrvUSD', // temp disabled
12
+ LLUsdeCrvusd = 'llamaLendUSDecrvUSD',
13
+ LLWethCrvusd2 = 'llamaLendWETHcrvUSD2',
14
+ // long and short crv
15
+ LLCrvCrvusd = 'llamaLendCRVcrvUSD',
16
+ LLCrvusdCrv = 'llamaLendcrvUSDCRV',
17
+ // long and short tbtc
18
+ LLTbtcCrvusd = 'llamaLendTBTCcrvUSD',
19
+ LLCrvusdTbtc = 'llamaLendcrvUSDTBTC',
20
+ // long and short weth
21
+ LLWethCrvusd = 'llamaLendWETHcrvUSD',
22
+ LLCrvusdWeth = 'llamaLendcrvUSDWETH',
23
+ }
24
+
25
+ export enum LLVersionsArb {
26
+ // long only
27
+ LLArbCrvusd = 'llamaLendArbcrvUSD',
28
+ LLArbCrvusd2 = 'llamaLendArbcrvUSD2',
29
+ LLFxnCrvusd = 'llamaLendFXNcrvUSD',
30
+ LLWbtcCrvusd = 'llamaLendWBTCcrvUSD',
31
+ LLWbtcCrvusd2 = 'llamaLendWBTCcrvUSD2',
32
+ LLCrvCrvusd = 'llamaLendCRVcrvUSD',
33
+ LLWethCrvusd = 'llamaLendWETHcrvUSD',
34
+ LLWethCrvusd2 = 'llamaLendWETHcrvUSD2',
35
+ }
36
+
37
+ export const LlamaLendVersions = {
38
+ ...LLVersionsEth,
39
+ ...LLVersionsArb,
40
+ } as const;
41
+
42
+ export type LlamaLendVersionsType = typeof LlamaLendVersions[keyof typeof LlamaLendVersions];
43
+
44
+ export enum LlamaLendStatus {
45
+ Nonexistant = 'Nonexistant',
46
+ Safe = 'Safe',
47
+ Risk = 'Risk',
48
+ SoftLiquidating = 'SoftLiquidating',
49
+ SoftLiquidated = 'SoftLiquidated',
50
+ }
51
+
52
+ export interface LlamaLendMarketData {
53
+ chainIds: NetworkNumber[],
54
+ label: string,
55
+ shortLabel: string,
56
+ value: LlamaLendVersionsType,
57
+ collAsset: string,
58
+ baseAsset: string,
59
+ controllerAddress: string,
60
+ vaultAddress: EthAddress,
61
+ url: string,
62
+ }
63
+ export interface LlamaLendAssetData {
64
+ symbol: string,
65
+ address: string,
66
+ price: string,
67
+ supplyRate: string,
68
+ borrowRate: string,
69
+ totalSupply?: string,
70
+ totalBorrow?: string,
71
+ canBeSupplied?: boolean,
72
+ canBeBorrowed?: boolean,
73
+ shares?: string,
74
+ }
75
+
76
+ export type LlamaLendAssetsData = { [key: string]: LlamaLendAssetData };
77
+
78
+ export interface LlamaLendGlobalMarketData {
79
+ A:string,
80
+ loanDiscount: string,
81
+ activeBand: string,
82
+ totalDebt: string,
83
+ totalDebtSupplied:string,
84
+ utilization:string,
85
+ ammPrice: string,
86
+ basePrice: string,
87
+ oraclePrice: string,
88
+ minted: string,
89
+ redeemed: string,
90
+ monetaryPolicyRate: string,
91
+ ammRate: string,
92
+ minBand: string,
93
+ maxBand: string,
94
+ borrowRate: string,
95
+ lendRate: string,
96
+ futureBorrowRate: string,
97
+ leftToBorrow: string,
98
+ bands: BandData[],
99
+ assetsData: LlamaLendAssetsData,
100
+ }
101
+
102
+ export interface LlamaLendAggregatedPositionData {
103
+ ratio: string,
104
+ suppliedUsd: string,
105
+ borrowedUsd: string,
106
+ suppliedForYieldUsd: string,
107
+ safetyRatio: string,
108
+ borrowLimitUsd: string,
109
+ minAllowedRatio: number,
110
+ collFactor: string,
111
+ leveragedType: string,
112
+ leveragedAsset?: string,
113
+ liquidationPrice?: string,
114
+ netApy: string,
115
+ incentiveUsd: string,
116
+ totalInterestUsd: string,
117
+ }
118
+
119
+ export interface LlamaLendUsedAsset {
120
+ isSupplied: boolean,
121
+ supplied: string,
122
+ suppliedUsd: string,
123
+ borrowed: string,
124
+ borrowedUsd: string,
125
+ isBorrowed: boolean,
126
+ symbol: string,
127
+ collateral: boolean,
128
+ price: string,
129
+ interestRate?: string,
130
+ suppliedForYield?: string,
131
+ suppliedForYieldUsd?: string,
132
+ shares?: string,
133
+ }
134
+
135
+ export interface LlamaLendUsedAssets {
136
+ [key: string]: LlamaLendUsedAsset,
137
+ }
138
+
139
+ export interface LlamaLendUserData {
140
+ debtAmount: string,
141
+ health: string,
142
+ healthPercent: string,
143
+ priceHigh: string,
144
+ priceLow: string,
145
+ liquidationDiscount: string,
146
+ numOfBands: string,
147
+ usedAssets: LlamaLendUsedAssets,
148
+ status: LlamaLendStatus,
149
+ ratio: string,
150
+ suppliedUsd: string,
151
+ borrowedUsd: string,
152
+ suppliedForYieldUsd: string,
153
+ safetyRatio: string,
154
+ userBands: UserBandData[],
155
+ }
@@ -1,51 +1,51 @@
1
- import { EthAddress } from './common';
2
-
3
- export interface IlkInfo {
4
- ilkLabel: string;
5
- currentRate: string;
6
- futureRate: string;
7
- minDebt: string;
8
- globalDebtCeiling: string;
9
- globalDebtCurrent: string;
10
- assetPrice: string;
11
- liqRatio: string;
12
- liqPercent: number;
13
- stabilityFee: number;
14
- liquidationFee: string;
15
- creatableDebt: string;
16
- }
17
-
18
- export interface CdpData {
19
- owner: EthAddress,
20
- userAddress: EthAddress,
21
- id: string,
22
- urn: EthAddress,
23
- type: string,
24
- ilk: string,
25
- ilkLabel: string,
26
- asset: string,
27
- collateral: string,
28
- collateralUsd: string,
29
- futureDebt: string,
30
- debtDai: string,
31
- debtUsd: string,
32
- debtInAsset: string,
33
- debtAssetPrice: string,
34
- debtAssetMarketPrice: string,
35
- liquidationPrice: string,
36
- ratio: string,
37
- liqRatio: string,
38
- liqPercent: number,
39
- assetPrice: string,
40
- daiLabel: string,
41
- debtAsset: string,
42
- unclaimedCollateral: string,
43
- debtTooLow: boolean,
44
- minDebt: string,
45
- stabilityFee: number,
46
- creatableDebt: string,
47
- globalDebtCeiling: string,
48
- globalDebtCurrent: string,
49
- liquidationFee: string,
50
- lastUpdated: number,
1
+ import { EthAddress } from './common';
2
+
3
+ export interface IlkInfo {
4
+ ilkLabel: string;
5
+ currentRate: string;
6
+ futureRate: string;
7
+ minDebt: string;
8
+ globalDebtCeiling: string;
9
+ globalDebtCurrent: string;
10
+ assetPrice: string;
11
+ liqRatio: string;
12
+ liqPercent: number;
13
+ stabilityFee: number;
14
+ liquidationFee: string;
15
+ creatableDebt: string;
16
+ }
17
+
18
+ export interface CdpData {
19
+ owner: EthAddress,
20
+ userAddress: EthAddress,
21
+ id: string,
22
+ urn: EthAddress,
23
+ type: string,
24
+ ilk: string,
25
+ ilkLabel: string,
26
+ asset: string,
27
+ collateral: string,
28
+ collateralUsd: string,
29
+ futureDebt: string,
30
+ debtDai: string,
31
+ debtUsd: string,
32
+ debtInAsset: string,
33
+ debtAssetPrice: string,
34
+ debtAssetMarketPrice: string,
35
+ liquidationPrice: string,
36
+ ratio: string,
37
+ liqRatio: string,
38
+ liqPercent: number,
39
+ assetPrice: string,
40
+ daiLabel: string,
41
+ debtAsset: string,
42
+ unclaimedCollateral: string,
43
+ debtTooLow: boolean,
44
+ minDebt: string,
45
+ stabilityFee: number,
46
+ creatableDebt: string,
47
+ globalDebtCeiling: string,
48
+ globalDebtCurrent: string,
49
+ liquidationFee: string,
50
+ lastUpdated: number,
51
51
  }