@defisaver/positions-sdk 1.0.11-dev → 1.0.11-fluid-dev2

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 (109) 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 +113 -49
  5. package/cjs/config/contracts.js +10 -2
  6. package/cjs/contracts.d.ts +1 -0
  7. package/cjs/contracts.js +2 -1
  8. package/cjs/fluid/index.d.ts +2 -0
  9. package/cjs/fluid/index.js +631 -13
  10. package/cjs/helpers/fluidHelpers/index.d.ts +59 -2
  11. package/cjs/helpers/fluidHelpers/index.js +142 -4
  12. package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
  13. package/cjs/markets/fluid/index.js +276 -245
  14. package/cjs/services/priceService.d.ts +23 -0
  15. package/cjs/services/priceService.js +44 -5
  16. package/cjs/types/contracts/generated/FluidView.d.ts +220 -3
  17. package/cjs/types/contracts/generated/WeETHPriceFeed.d.ts +135 -0
  18. package/cjs/types/contracts/generated/WeETHPriceFeed.js +5 -0
  19. package/cjs/types/contracts/generated/index.d.ts +1 -0
  20. package/cjs/types/fluid.d.ts +39 -10
  21. package/esm/config/contracts.d.ts +113 -49
  22. package/esm/config/contracts.js +10 -2
  23. package/esm/contracts.d.ts +1 -0
  24. package/esm/contracts.js +1 -0
  25. package/esm/fluid/index.d.ts +2 -0
  26. package/esm/fluid/index.js +634 -16
  27. package/esm/helpers/fluidHelpers/index.d.ts +59 -2
  28. package/esm/helpers/fluidHelpers/index.js +137 -3
  29. package/esm/helpers/morphoBlueHelpers/index.js +66 -66
  30. package/esm/markets/fluid/index.js +276 -245
  31. package/esm/services/priceService.d.ts +23 -0
  32. package/esm/services/priceService.js +40 -5
  33. package/esm/types/contracts/generated/FluidView.d.ts +220 -3
  34. package/esm/types/contracts/generated/WeETHPriceFeed.d.ts +135 -0
  35. package/esm/types/contracts/generated/WeETHPriceFeed.js +4 -0
  36. package/esm/types/contracts/generated/index.d.ts +1 -0
  37. package/esm/types/fluid.d.ts +39 -10
  38. package/package.json +54 -54
  39. package/src/aaveV2/index.ts +227 -227
  40. package/src/aaveV3/index.ts +624 -624
  41. package/src/assets/index.ts +60 -60
  42. package/src/chickenBonds/index.ts +123 -123
  43. package/src/compoundV2/index.ts +220 -220
  44. package/src/compoundV3/index.ts +291 -291
  45. package/src/config/contracts.js +1155 -1147
  46. package/src/constants/index.ts +6 -6
  47. package/src/contracts.ts +135 -134
  48. package/src/curveUsd/index.ts +239 -239
  49. package/src/eulerV2/index.ts +303 -303
  50. package/src/exchange/index.ts +17 -17
  51. package/src/fluid/index.ts +1211 -354
  52. package/src/helpers/aaveHelpers/index.ts +203 -203
  53. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  54. package/src/helpers/compoundHelpers/index.ts +248 -248
  55. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  56. package/src/helpers/eulerHelpers/index.ts +234 -234
  57. package/src/helpers/fluidHelpers/index.ts +295 -57
  58. package/src/helpers/index.ts +11 -11
  59. package/src/helpers/liquityV2Helpers/index.ts +80 -80
  60. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  61. package/src/helpers/makerHelpers/index.ts +94 -94
  62. package/src/helpers/morphoBlueHelpers/index.ts +367 -367
  63. package/src/helpers/sparkHelpers/index.ts +154 -154
  64. package/src/index.ts +52 -52
  65. package/src/liquity/index.ts +116 -116
  66. package/src/liquityV2/index.ts +295 -295
  67. package/src/llamaLend/index.ts +275 -275
  68. package/src/maker/index.ts +117 -117
  69. package/src/markets/aave/index.ts +152 -152
  70. package/src/markets/aave/marketAssets.ts +46 -46
  71. package/src/markets/compound/index.ts +213 -213
  72. package/src/markets/compound/marketsAssets.ts +82 -82
  73. package/src/markets/curveUsd/index.ts +69 -69
  74. package/src/markets/euler/index.ts +26 -26
  75. package/src/markets/fluid/index.ts +2043 -2012
  76. package/src/markets/index.ts +27 -27
  77. package/src/markets/liquityV2/index.ts +54 -54
  78. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  79. package/src/markets/llamaLend/index.ts +235 -235
  80. package/src/markets/morphoBlue/index.ts +895 -895
  81. package/src/markets/spark/index.ts +29 -29
  82. package/src/markets/spark/marketAssets.ts +10 -10
  83. package/src/moneymarket/moneymarketCommonService.ts +80 -80
  84. package/src/morphoAaveV2/index.ts +256 -256
  85. package/src/morphoAaveV3/index.ts +630 -630
  86. package/src/morphoBlue/index.ts +202 -202
  87. package/src/multicall/index.ts +33 -33
  88. package/src/services/priceService.ts +130 -91
  89. package/src/services/utils.ts +59 -59
  90. package/src/setup.ts +8 -8
  91. package/src/spark/index.ts +460 -460
  92. package/src/staking/staking.ts +217 -217
  93. package/src/types/aave.ts +275 -275
  94. package/src/types/chickenBonds.ts +45 -45
  95. package/src/types/common.ts +84 -84
  96. package/src/types/compound.ts +133 -133
  97. package/src/types/contracts/generated/FluidView.ts +263 -2
  98. package/src/types/contracts/generated/WeETHPriceFeed.ts +202 -0
  99. package/src/types/contracts/generated/index.ts +1 -0
  100. package/src/types/curveUsd.ts +119 -119
  101. package/src/types/euler.ts +173 -173
  102. package/src/types/fluid.ts +299 -268
  103. package/src/types/index.ts +11 -11
  104. package/src/types/liquity.ts +30 -30
  105. package/src/types/liquityV2.ts +119 -119
  106. package/src/types/llamaLend.ts +155 -155
  107. package/src/types/maker.ts +50 -50
  108. package/src/types/morphoBlue.ts +194 -194
  109. package/src/types/spark.ts +135 -135
@@ -1,31 +1,31 @@
1
- export enum LIQUITY_TROVE_STATUS_ENUM {
2
- nonExistent,
3
- active,
4
- closedByOwner,
5
- closedByLiquidation,
6
- closedByRedemption,
7
- }
8
-
9
- export const LIQUITY_STATUS_MAPPING = {
10
- nonExistent: 'Non existent',
11
- active: 'Active',
12
- closedByOwner: 'Closed',
13
- closedByLiquidation: 'Liquidated',
14
- closedByRedemption: 'Redeemed',
15
- };
16
-
17
- export interface LiquityTroveInfo {
18
- troveStatus: string,
19
- collateral: string,
20
- debtInAsset: string,
21
- TCRatio: string,
22
- recoveryMode: boolean,
23
- claimableCollateral: string,
24
- borrowingRateWithDecay: string,
25
- assetPrice: string,
26
- totalETH: string,
27
- totalLUSD: string,
28
- minCollateralRatio: number,
29
- priceForRecovery: string,
30
- debtInFront: string,
1
+ export enum LIQUITY_TROVE_STATUS_ENUM {
2
+ nonExistent,
3
+ active,
4
+ closedByOwner,
5
+ closedByLiquidation,
6
+ closedByRedemption,
7
+ }
8
+
9
+ export const LIQUITY_STATUS_MAPPING = {
10
+ nonExistent: 'Non existent',
11
+ active: 'Active',
12
+ closedByOwner: 'Closed',
13
+ closedByLiquidation: 'Liquidated',
14
+ closedByRedemption: 'Redeemed',
15
+ };
16
+
17
+ export interface LiquityTroveInfo {
18
+ troveStatus: string,
19
+ collateral: string,
20
+ debtInAsset: string,
21
+ TCRatio: string,
22
+ recoveryMode: boolean,
23
+ claimableCollateral: string,
24
+ borrowingRateWithDecay: string,
25
+ assetPrice: string,
26
+ totalETH: string,
27
+ totalLUSD: string,
28
+ minCollateralRatio: number,
29
+ priceForRecovery: string,
30
+ debtInFront: string,
31
31
  }
@@ -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
+ }