@defisaver/positions-sdk 1.0.3 → 1.0.5

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 (108) hide show
  1. package/.mocharc.json +4 -4
  2. package/.nvmrc +1 -1
  3. package/README.md +69 -69
  4. package/cjs/aaveV3/index.js +7 -7
  5. package/cjs/curveUsd/index.js +8 -1
  6. package/cjs/fluid/index.d.ts +2 -0
  7. package/cjs/helpers/aaveHelpers/index.js +6 -0
  8. package/cjs/helpers/compoundHelpers/index.js +2 -0
  9. package/cjs/helpers/eulerHelpers/index.js +2 -0
  10. package/cjs/helpers/fluidHelpers/index.js +2 -0
  11. package/cjs/helpers/morphoBlueHelpers/index.js +68 -66
  12. package/cjs/helpers/sparkHelpers/index.js +6 -0
  13. package/cjs/staking/staking.d.ts +2 -1
  14. package/cjs/staking/staking.js +3 -7
  15. package/cjs/types/aave.d.ts +4 -0
  16. package/cjs/types/compound.d.ts +2 -0
  17. package/cjs/types/curveUsd.d.ts +1 -0
  18. package/cjs/types/euler.d.ts +2 -0
  19. package/cjs/types/fluid.d.ts +2 -0
  20. package/cjs/types/morphoBlue.d.ts +2 -0
  21. package/cjs/types/spark.d.ts +4 -0
  22. package/esm/aaveV3/index.js +7 -7
  23. package/esm/curveUsd/index.js +10 -3
  24. package/esm/fluid/index.d.ts +2 -0
  25. package/esm/helpers/aaveHelpers/index.js +6 -0
  26. package/esm/helpers/compoundHelpers/index.js +2 -0
  27. package/esm/helpers/eulerHelpers/index.js +2 -0
  28. package/esm/helpers/fluidHelpers/index.js +2 -0
  29. package/esm/helpers/morphoBlueHelpers/index.js +68 -66
  30. package/esm/helpers/sparkHelpers/index.js +6 -0
  31. package/esm/staking/staking.d.ts +2 -1
  32. package/esm/staking/staking.js +3 -6
  33. package/esm/types/aave.d.ts +4 -0
  34. package/esm/types/compound.d.ts +2 -0
  35. package/esm/types/curveUsd.d.ts +1 -0
  36. package/esm/types/euler.d.ts +2 -0
  37. package/esm/types/fluid.d.ts +2 -0
  38. package/esm/types/morphoBlue.d.ts +2 -0
  39. package/esm/types/spark.d.ts +4 -0
  40. package/package.json +54 -52
  41. package/src/aaveV2/index.ts +227 -227
  42. package/src/aaveV3/index.ts +624 -625
  43. package/src/assets/index.ts +60 -60
  44. package/src/chickenBonds/index.ts +123 -123
  45. package/src/compoundV2/index.ts +220 -220
  46. package/src/compoundV3/index.ts +291 -291
  47. package/src/config/contracts.js +1147 -1147
  48. package/src/constants/index.ts +6 -6
  49. package/src/contracts.ts +134 -134
  50. package/src/curveUsd/index.ts +239 -230
  51. package/src/eulerV2/index.ts +303 -303
  52. package/src/exchange/index.ts +17 -17
  53. package/src/fluid/index.ts +354 -354
  54. package/src/helpers/aaveHelpers/index.ts +204 -198
  55. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  56. package/src/helpers/compoundHelpers/index.ts +248 -246
  57. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  58. package/src/helpers/eulerHelpers/index.ts +234 -232
  59. package/src/helpers/fluidHelpers/index.ts +56 -53
  60. package/src/helpers/index.ts +11 -11
  61. package/src/helpers/liquityV2Helpers/index.ts +80 -80
  62. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  63. package/src/helpers/makerHelpers/index.ts +94 -94
  64. package/src/helpers/morphoBlueHelpers/index.ts +367 -365
  65. package/src/helpers/sparkHelpers/index.ts +155 -150
  66. package/src/index.ts +52 -52
  67. package/src/liquity/index.ts +116 -116
  68. package/src/liquityV2/index.ts +295 -295
  69. package/src/llamaLend/index.ts +275 -275
  70. package/src/maker/index.ts +117 -117
  71. package/src/markets/aave/index.ts +152 -152
  72. package/src/markets/aave/marketAssets.ts +44 -44
  73. package/src/markets/compound/index.ts +213 -213
  74. package/src/markets/compound/marketsAssets.ts +82 -82
  75. package/src/markets/curveUsd/index.ts +69 -69
  76. package/src/markets/euler/index.ts +26 -26
  77. package/src/markets/fluid/index.ts +2012 -2012
  78. package/src/markets/index.ts +27 -27
  79. package/src/markets/liquityV2/index.ts +54 -54
  80. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  81. package/src/markets/llamaLend/index.ts +235 -235
  82. package/src/markets/morphoBlue/index.ts +895 -895
  83. package/src/markets/spark/index.ts +29 -29
  84. package/src/markets/spark/marketAssets.ts +10 -10
  85. package/src/moneymarket/moneymarketCommonService.ts +80 -80
  86. package/src/morphoAaveV2/index.ts +256 -256
  87. package/src/morphoAaveV3/index.ts +630 -630
  88. package/src/morphoBlue/index.ts +202 -202
  89. package/src/multicall/index.ts +33 -33
  90. package/src/services/priceService.ts +91 -91
  91. package/src/services/utils.ts +59 -59
  92. package/src/setup.ts +8 -8
  93. package/src/spark/index.ts +460 -460
  94. package/src/staking/staking.ts +217 -220
  95. package/src/types/aave.ts +275 -271
  96. package/src/types/chickenBonds.ts +45 -45
  97. package/src/types/common.ts +84 -84
  98. package/src/types/compound.ts +133 -131
  99. package/src/types/curveUsd.ts +119 -118
  100. package/src/types/euler.ts +173 -171
  101. package/src/types/fluid.ts +268 -266
  102. package/src/types/index.ts +11 -11
  103. package/src/types/liquity.ts +30 -30
  104. package/src/types/liquityV2.ts +119 -119
  105. package/src/types/llamaLend.ts +155 -155
  106. package/src/types/maker.ts +50 -50
  107. package/src/types/morphoBlue.ts +194 -192
  108. package/src/types/spark.ts +135 -131
@@ -1,120 +1,120 @@
1
- import { EthAddress, NetworkNumber } from './common';
2
-
3
- export enum LiquityV2Versions {
4
- LiquityV2Eth = 'liquityv2eth',
5
- LiquityV2WstEth = 'liquityv2wsteth',
6
- LiquityV2REth = 'liquityv2reth',
7
- }
8
-
9
- export enum LIQUITY_V2_TROVE_STATUS_ENUM {
10
- nonExistent,
11
- active,
12
- closedByOwner,
13
- closedByLiquidation,
14
- zombie,
15
- }
16
-
17
- export const LIQUITY_V2_STATUS_MAPPING = {
18
- nonExistent: 'Non existent',
19
- active: 'Active',
20
- closedByOwner: 'Closed',
21
- closedByLiquidation: 'Liquidated',
22
- zombie: 'Zombie',
23
- };
24
-
25
- export interface LiquityV2MarketInfo {
26
- chainIds: NetworkNumber[],
27
- label: string,
28
- shortLabel: string,
29
- url: string,
30
- value: LiquityV2Versions,
31
- debtToken: string,
32
- collateralToken: string,
33
- marketAddress: string,
34
- protocolName: string,
35
- }
36
-
37
- export interface LiquityV2AssetData {
38
- symbol: string,
39
- address: string,
40
- price: string,
41
- incentiveSupplyApy?: string,
42
- incentiveSupplyToken?: string,
43
- totalSupply: string,
44
- totalBorrow: string,
45
- canBeSupplied: boolean,
46
- canBeBorrowed: boolean,
47
- leftToBorrowGlobal: string,
48
- leftToWithdrawGlobal: string,
49
- }
50
-
51
- export type LiquityV2AssetsData = { [key: string]: LiquityV2AssetData };
52
-
53
- export interface InnerLiquityV2MarketData {
54
- minCollRatio: string,
55
- totalCollRatio: string,
56
- criticalCollRatio: string,
57
- isUnderCollateralized: boolean,
58
- hintHelperAddress: EthAddress,
59
- troveNFTAddress: EthAddress,
60
- borrowerOperationsAddress: EthAddress,
61
- troveManagerAddress: EthAddress,
62
- stabilityPoolAddress: EthAddress,
63
- collSurplusPoolAddress: EthAddress,
64
- activePoolAddress: EthAddress,
65
- }
66
-
67
- export interface LiquityV2MarketData {
68
- assetsData: LiquityV2AssetsData,
69
- marketData: InnerLiquityV2MarketData,
70
- }
71
-
72
- export interface LiquityV2UsedAsset {
73
- symbol: string,
74
- collateral?: boolean,
75
- supplied: string,
76
- suppliedUsd: string,
77
- borrowed: string,
78
- borrowedUsd: string,
79
- isSupplied: boolean,
80
- isBorrowed: boolean,
81
- }
82
-
83
- export type LiquityV2UsedAssets = { [key: string]: LiquityV2UsedAsset };
84
-
85
- export interface LiquityV2AggregatedTroveData {
86
- suppliedUsd: string,
87
- borrowedUsd: string,
88
- borrowLimitUsd: string,
89
- leftToBorrowUsd: string,
90
- netApy: string,
91
- incentiveUsd: string,
92
- totalInterestUsd: string,
93
- leveragedType: string,
94
- leveragedAsset: string,
95
- liquidationPrice: string,
96
- ratio: string,
97
- collRatio: string,
98
- }
99
-
100
- export interface LiquityV2TroveData {
101
- usedAssets: LiquityV2UsedAssets,
102
- troveId: string,
103
- ratio: string,
104
- collRatio: string,
105
- interestRate: string,
106
- leftToBorrowUsd: string,
107
- borrowLimitUsd: string,
108
- suppliedUsd: string,
109
- borrowedUsd: string,
110
- netApy: string,
111
- incentiveUsd: string,
112
- totalInterestUsd: string,
113
- interestBatchManager: EthAddress,
114
- troveStatus: string,
115
- leveragedType: string,
116
- leveragedAsset: string,
117
- liquidationPrice: string,
118
- debtInFront: string,
119
- lastInterestRateAdjTime: string,
1
+ import { EthAddress, NetworkNumber } from './common';
2
+
3
+ export enum LiquityV2Versions {
4
+ LiquityV2Eth = 'liquityv2eth',
5
+ LiquityV2WstEth = 'liquityv2wsteth',
6
+ LiquityV2REth = 'liquityv2reth',
7
+ }
8
+
9
+ export enum LIQUITY_V2_TROVE_STATUS_ENUM {
10
+ nonExistent,
11
+ active,
12
+ closedByOwner,
13
+ closedByLiquidation,
14
+ zombie,
15
+ }
16
+
17
+ export const LIQUITY_V2_STATUS_MAPPING = {
18
+ nonExistent: 'Non existent',
19
+ active: 'Active',
20
+ closedByOwner: 'Closed',
21
+ closedByLiquidation: 'Liquidated',
22
+ zombie: 'Zombie',
23
+ };
24
+
25
+ export interface LiquityV2MarketInfo {
26
+ chainIds: NetworkNumber[],
27
+ label: string,
28
+ shortLabel: string,
29
+ url: string,
30
+ value: LiquityV2Versions,
31
+ debtToken: string,
32
+ collateralToken: string,
33
+ marketAddress: string,
34
+ protocolName: string,
35
+ }
36
+
37
+ export interface LiquityV2AssetData {
38
+ symbol: string,
39
+ address: string,
40
+ price: string,
41
+ incentiveSupplyApy?: string,
42
+ incentiveSupplyToken?: string,
43
+ totalSupply: string,
44
+ totalBorrow: string,
45
+ canBeSupplied: boolean,
46
+ canBeBorrowed: boolean,
47
+ leftToBorrowGlobal: string,
48
+ leftToWithdrawGlobal: string,
49
+ }
50
+
51
+ export type LiquityV2AssetsData = { [key: string]: LiquityV2AssetData };
52
+
53
+ export interface InnerLiquityV2MarketData {
54
+ minCollRatio: string,
55
+ totalCollRatio: string,
56
+ criticalCollRatio: string,
57
+ isUnderCollateralized: boolean,
58
+ hintHelperAddress: EthAddress,
59
+ troveNFTAddress: EthAddress,
60
+ borrowerOperationsAddress: EthAddress,
61
+ troveManagerAddress: EthAddress,
62
+ stabilityPoolAddress: EthAddress,
63
+ collSurplusPoolAddress: EthAddress,
64
+ activePoolAddress: EthAddress,
65
+ }
66
+
67
+ export interface LiquityV2MarketData {
68
+ assetsData: LiquityV2AssetsData,
69
+ marketData: InnerLiquityV2MarketData,
70
+ }
71
+
72
+ export interface LiquityV2UsedAsset {
73
+ symbol: string,
74
+ collateral?: boolean,
75
+ supplied: string,
76
+ suppliedUsd: string,
77
+ borrowed: string,
78
+ borrowedUsd: string,
79
+ isSupplied: boolean,
80
+ isBorrowed: boolean,
81
+ }
82
+
83
+ export type LiquityV2UsedAssets = { [key: string]: LiquityV2UsedAsset };
84
+
85
+ export interface LiquityV2AggregatedTroveData {
86
+ suppliedUsd: string,
87
+ borrowedUsd: string,
88
+ borrowLimitUsd: string,
89
+ leftToBorrowUsd: string,
90
+ netApy: string,
91
+ incentiveUsd: string,
92
+ totalInterestUsd: string,
93
+ leveragedType: string,
94
+ leveragedAsset: string,
95
+ liquidationPrice: string,
96
+ ratio: string,
97
+ collRatio: string,
98
+ }
99
+
100
+ export interface LiquityV2TroveData {
101
+ usedAssets: LiquityV2UsedAssets,
102
+ troveId: string,
103
+ ratio: string,
104
+ collRatio: string,
105
+ interestRate: string,
106
+ leftToBorrowUsd: string,
107
+ borrowLimitUsd: string,
108
+ suppliedUsd: string,
109
+ borrowedUsd: string,
110
+ netApy: string,
111
+ incentiveUsd: string,
112
+ totalInterestUsd: string,
113
+ interestBatchManager: EthAddress,
114
+ troveStatus: string,
115
+ leveragedType: string,
116
+ leveragedAsset: string,
117
+ liquidationPrice: string,
118
+ debtInFront: string,
119
+ lastInterestRateAdjTime: string,
120
120
  }
@@ -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
  }