@defisaver/positions-sdk 1.0.11-fluid-dev9 → 1.0.11-fluid-dev11

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 (78) hide show
  1. package/.mocharc.json +4 -4
  2. package/.nvmrc +1 -1
  3. package/README.md +69 -69
  4. package/cjs/config/contracts.js +2 -2
  5. package/cjs/fluid/index.js +33 -8
  6. package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
  7. package/esm/config/contracts.js +2 -2
  8. package/esm/fluid/index.js +33 -8
  9. package/esm/helpers/morphoBlueHelpers/index.js +66 -66
  10. package/package.json +54 -54
  11. package/src/aaveV2/index.ts +227 -227
  12. package/src/aaveV3/index.ts +624 -624
  13. package/src/assets/index.ts +60 -60
  14. package/src/chickenBonds/index.ts +123 -123
  15. package/src/compoundV2/index.ts +220 -220
  16. package/src/compoundV3/index.ts +291 -291
  17. package/src/config/contracts.js +1155 -1155
  18. package/src/constants/index.ts +6 -6
  19. package/src/contracts.ts +135 -135
  20. package/src/curveUsd/index.ts +239 -239
  21. package/src/eulerV2/index.ts +303 -303
  22. package/src/exchange/index.ts +17 -17
  23. package/src/fluid/index.ts +1261 -1224
  24. package/src/helpers/aaveHelpers/index.ts +203 -203
  25. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  26. package/src/helpers/compoundHelpers/index.ts +248 -248
  27. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  28. package/src/helpers/eulerHelpers/index.ts +234 -234
  29. package/src/helpers/fluidHelpers/index.ts +294 -294
  30. package/src/helpers/index.ts +11 -11
  31. package/src/helpers/liquityV2Helpers/index.ts +80 -80
  32. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  33. package/src/helpers/makerHelpers/index.ts +94 -94
  34. package/src/helpers/morphoBlueHelpers/index.ts +367 -367
  35. package/src/helpers/sparkHelpers/index.ts +154 -154
  36. package/src/index.ts +52 -52
  37. package/src/liquity/index.ts +116 -116
  38. package/src/liquityV2/index.ts +295 -295
  39. package/src/llamaLend/index.ts +275 -275
  40. package/src/maker/index.ts +117 -117
  41. package/src/markets/aave/index.ts +152 -152
  42. package/src/markets/aave/marketAssets.ts +46 -46
  43. package/src/markets/compound/index.ts +213 -213
  44. package/src/markets/compound/marketsAssets.ts +82 -82
  45. package/src/markets/curveUsd/index.ts +69 -69
  46. package/src/markets/euler/index.ts +26 -26
  47. package/src/markets/fluid/index.ts +2454 -2454
  48. package/src/markets/index.ts +27 -27
  49. package/src/markets/liquityV2/index.ts +54 -54
  50. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  51. package/src/markets/llamaLend/index.ts +235 -235
  52. package/src/markets/morphoBlue/index.ts +895 -895
  53. package/src/markets/spark/index.ts +29 -29
  54. package/src/markets/spark/marketAssets.ts +10 -10
  55. package/src/moneymarket/moneymarketCommonService.ts +80 -80
  56. package/src/morphoAaveV2/index.ts +256 -256
  57. package/src/morphoAaveV3/index.ts +630 -630
  58. package/src/morphoBlue/index.ts +202 -202
  59. package/src/multicall/index.ts +33 -33
  60. package/src/services/priceService.ts +130 -130
  61. package/src/services/utils.ts +59 -59
  62. package/src/setup.ts +8 -8
  63. package/src/spark/index.ts +460 -460
  64. package/src/staking/staking.ts +217 -217
  65. package/src/types/aave.ts +275 -275
  66. package/src/types/chickenBonds.ts +45 -45
  67. package/src/types/common.ts +84 -84
  68. package/src/types/compound.ts +133 -133
  69. package/src/types/curveUsd.ts +119 -119
  70. package/src/types/euler.ts +173 -173
  71. package/src/types/fluid.ts +325 -325
  72. package/src/types/index.ts +11 -11
  73. package/src/types/liquity.ts +30 -30
  74. package/src/types/liquityV2.ts +119 -119
  75. package/src/types/llamaLend.ts +155 -155
  76. package/src/types/maker.ts +50 -50
  77. package/src/types/morphoBlue.ts +194 -194
  78. package/src/types/spark.ts +135 -135
@@ -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
  }
@@ -1,194 +1,194 @@
1
- import { MMUsedAssets, NetworkNumber } from './common';
2
-
3
- export enum MorphoBlueVersions {
4
- // MAINNET
5
- MorphoBlueWstEthUSDC = 'morphobluewstethusdc', // wstETH/USDC
6
- MorphoBlueSDAIUSDC = 'morphobluesdaiusdc', // sDAI/USDC
7
- MorphoBlueWBTCUSDC = 'morphobluewbtcusdc', // WBTC/USDC
8
- MorphoBlueEthUSDC = 'morphoblueethusdc', // ETH/USDC
9
- MorphoBlueWBTCUSDT = 'morphobluewbtcusdt', // WBTC/USDT
10
- MorphoBlueWstEthUSDT = 'morphobluewstethusdt', // wstETH/USDT
11
- MorphoBlueWstEthUSDA_Exchange_Rate = 'morphobluewstethusda_exchange_rate', // wstETH/USDA
12
- MorphoBlueWstEthPYUSD = 'morphobluwstethpyusd', // wstETH/PYUSD
13
- MorphoBlueREthEth_945 = 'morphoblueretheth_945', // rETH/ETH
14
- MorphoBlueWBTCPYUSD = 'morphobluewbtcpyusd', // WBTC/PYUSD
15
- MorphoBlueWBTCEth = 'morphobluewbtceth', // WBTC/ETH
16
- MorphoBlueUSDeUSDT = 'morphoblueusdeusdt', // USDe/USDT
17
- MorphoBlueSUSDeUSDT = 'morphobluesusdeusdt', // sUSDe/USDT
18
- MorphoBlueSDAIEth = 'morphobluesdaieth', // sDAI/ETH
19
- MorphoBlueMKRUSDC = 'morphobluemkrusdc', // MKR/USDC
20
- MorphoBlueTBTCUSDC = 'morphobluetbtcusdc', // tBTC/USDC
21
- MorphoBlueCbBTCEth_915 = 'morphobluecbbtceth', // cbBTC/Eth
22
- MorphoBlueCbBTCUSDC_860 = 'morphobluecbbtcusdc', // cbBTC/USDC
23
- MorphoBlueSUSDeUSDC_915 = 'morphobluesusdeusdc_915', // sUSDe/USDC
24
- MorphoBlueLBTCWBTC_945 = 'morphobluelbtcwbtc_945', // LBTC/WBTC
25
- MorphoBlueUSRUSDC_915 = 'morphoblueusrusdc_915', // USR/USDC
26
- // ezETH/ETH
27
- MorphoBlueEzEthEth_860 = 'morphoblueezetheth_860',
28
- MorphoBlueEzEthEth_945 = 'morphoblueezetheth_945',
29
- // weETH/ETH
30
- MorphoBlueWeEthEth_860 = 'morphoblueweetheth_860',
31
- MorphoBlueWeEthEth_945 = 'morphoblueweetheth_945',
32
- // wstETH/WETH
33
- MorphoBlueWstEthEth_945 = 'morphobluewstetheth_945',
34
- MorphoBlueWstEthEth_945_Exchange_Rate = 'morphobluewstetheth_945_exchange_rate',
35
- MorphoBlueWstEthEth_965_Exchange_Rate = 'morphobluewstetheth_965_exchange_rate',
36
- // sUSDe/DAI
37
- MorphoBlueSUSDeDAI_770 = 'morphobluesusdedai_770',
38
- MorphoBlueSUSDeDAI_860 = 'morphobluesusdedai_860',
39
- MorphoBlueSUSDeDAI_915 = 'morphobluesusdedai_915',
40
- MorphoBlueSUSDeDAI_945 = 'morphobluesusdedai_945',
41
- // USDe/DAI
42
- MorphoBlueUSDeDAI_770 = 'morphoblueusdedai_770',
43
- MorphoBlueUSDeDAI_860 = 'morphoblueusdedai_860',
44
- MorphoBlueUSDeDAI_915 = 'morphoblueusdedai_915',
45
- MorphoBlueUSDeDAI_945 = 'morphoblueusdedai_945',
46
-
47
- // BASE
48
- MorphoBlueCbEthUSDC_860_Base = 'morphobluecbethusdc_860_base',
49
- MorphoBlueCbEthUSDC_860_Base_1c21c59d = 'morphobluecbethusdc_860_base_1c21c59d',
50
- MorphoBlueWstEthUSDC_860_Base = 'morphobluewstethusdc_860_base',
51
- MorphoBlueWstEthUSDC_860_Base_13c42741 = 'morphobluewstethusdc_860_base_13c42741',
52
- MorphoBlueEthUSDC_860_Base = 'morphoblueethusdc_860_base',
53
- MorphoBlueCbEthEth_945_Base = 'morphobluecbetheth_945_base',
54
- MorphoBlueCbEthEth_965_Base = 'morphobluecbetheth_965_base',
55
- MorphoBlueWstEthEth_945_Base = 'morphobluewstetheth_945_base',
56
- MorphoBlueWstEthEth_965_Base = 'morphobluewstetheth_965_base',
57
- MorphoBlueREthUSDC_860_Base = 'morphobluerethusdc_860_base',
58
- MorphoBlueREthEth_945_Base = 'morphoblueretheth_945_base',
59
- MorphoBlueCbBTCEth_915_Base = 'morphobluecbbtceth_915_base',
60
- MorphoBlueCbBTCUSDC_860_Base = 'morphobluecbbtcusdc_860_base',
61
- MorphoBlueWsuperOETHbWETH_915_Base = 'morphobluewsuperoethbweth_915_base',
62
- MorphoBlueLBTCCbBTC_945_Base = 'morphobluelbtccbbtc_945_base', // LBTC/cbBTC
63
- MorphoBlueWstEthEURC_860_Base = 'morphobluewstetheurc_860_base', // wstETH/EURC
64
- MorphoBlueCbBTCEURC_860_Base = 'morphobluecbbtceurc_860_base', // cbBTC/EURC
65
- }
66
-
67
- export enum MorphoBlueOracleType {
68
- MARKET_RATE = 'Market rate',
69
- LIDO_RATE = 'Lido rate',
70
- ETHENA_RATE = 'Ethena rate',
71
- CONTRACT_RATE = 'Contract rate',
72
- }
73
-
74
- export interface MorphoBlueMarketData {
75
- chainIds: NetworkNumber[],
76
- label: string,
77
- shortLabel: string,
78
- url: string,
79
- value: MorphoBlueVersions,
80
- loanToken: string,
81
- collateralToken: string,
82
- oracle: string,
83
- oracleType: MorphoBlueOracleType,
84
- irm: string,
85
- lltv: number | string,
86
- marketId: string,
87
- // icon: Function,
88
- protocolName: string,
89
- }
90
-
91
- export interface MorphoBlueAssetData {
92
- symbol: string,
93
- address: string,
94
- price: string,
95
- supplyRate: string,
96
- borrowRate: string,
97
- incentiveSupplyApy?: string,
98
- incentiveSupplyToken?: string,
99
- incentiveBorrowApy?: string,
100
- incentiveBorrowToken?: string,
101
- totalSupply?: string,
102
- totalBorrow?: string,
103
- canBeSupplied?: boolean,
104
- canBeBorrowed?: boolean,
105
- }
106
-
107
- export type MorphoBlueAssetsData = { [key: string]: MorphoBlueAssetData };
108
-
109
- export interface MorphoBlueMarketInfo {
110
- id: string,
111
- fee: string,
112
- loanToken: string,
113
- collateralToken: string,
114
- utillization: string,
115
- oracle: string,
116
- oracleType: MorphoBlueOracleType,
117
- lltv: string,
118
- minRatio: string,
119
- assetsData: MorphoBlueAssetsData,
120
- }
121
-
122
- export interface MorphoBlueAggregatedPositionData {
123
- suppliedUsd: string,
124
- suppliedCollateralUsd: string,
125
- borrowedUsd: string,
126
- borrowLimitUsd: string,
127
- liquidationLimitUsd: string,
128
- leftToBorrowUsd: string,
129
- leftToBorrow: string,
130
- netApy: string,
131
- incentiveUsd: string,
132
- totalInterestUsd: string,
133
- ltv: string,
134
- ratio: string,
135
- leveragedType: string,
136
- leveragedAsset?: string,
137
- leveragedLsdAssetRatio?: string,
138
- liquidationPrice?: string,
139
- minCollRatio?: string,
140
- collLiquidationRatio?: string,
141
- }
142
-
143
- export interface MorphoBluePositionData {
144
- usedAssets: MMUsedAssets,
145
- suppliedUsd: string,
146
- suppliedCollateralUsd: string,
147
- borrowedUsd: string,
148
- borrowLimitUsd: string,
149
- liquidationLimitUsd: string,
150
- leftToBorrowUsd: string,
151
- leftToBorrow: string,
152
- netApy: string,
153
- incentiveUsd: string,
154
- totalInterestUsd: string,
155
- ltv: string,
156
- ratio: string,
157
- leveragedType: string,
158
- leveragedAsset?: string,
159
- leveragedLsdAssetRatio?: string,
160
- liquidationPrice?: string,
161
- supplyShares: string,
162
- borrowShares: string,
163
- }
164
-
165
- export interface MorphoBlueVault {
166
- address: string,
167
- }
168
-
169
- export interface MorphoBlueAllocationMarket {
170
- loanAsset: { address: string },
171
- collateralAsset: { address: string },
172
- oracle: { address: string },
173
- irmAddress: string,
174
- lltv: string,
175
- uniqueKey: string,
176
- }
177
-
178
- export interface MorphoBluePublicAllocatorItem {
179
- vault: MorphoBlueVault,
180
- assets: string,
181
- allocationMarket: MorphoBlueAllocationMarket,
182
- }
183
-
184
- export interface MorphoBlueAllocatorMarketState {
185
- borrowAssets: string,
186
- supplyAssets: string,
187
- }
188
-
189
- export interface MorphoBlueRealloactionMarketData {
190
- reallocatableLiquidityAssets: string,
191
- targetBorrowUtilization: string,
192
- publicAllocatorSharedLiquidity: MorphoBluePublicAllocatorItem[],
193
- state: MorphoBlueAllocatorMarketState,
194
- }
1
+ import { MMUsedAssets, NetworkNumber } from './common';
2
+
3
+ export enum MorphoBlueVersions {
4
+ // MAINNET
5
+ MorphoBlueWstEthUSDC = 'morphobluewstethusdc', // wstETH/USDC
6
+ MorphoBlueSDAIUSDC = 'morphobluesdaiusdc', // sDAI/USDC
7
+ MorphoBlueWBTCUSDC = 'morphobluewbtcusdc', // WBTC/USDC
8
+ MorphoBlueEthUSDC = 'morphoblueethusdc', // ETH/USDC
9
+ MorphoBlueWBTCUSDT = 'morphobluewbtcusdt', // WBTC/USDT
10
+ MorphoBlueWstEthUSDT = 'morphobluewstethusdt', // wstETH/USDT
11
+ MorphoBlueWstEthUSDA_Exchange_Rate = 'morphobluewstethusda_exchange_rate', // wstETH/USDA
12
+ MorphoBlueWstEthPYUSD = 'morphobluwstethpyusd', // wstETH/PYUSD
13
+ MorphoBlueREthEth_945 = 'morphoblueretheth_945', // rETH/ETH
14
+ MorphoBlueWBTCPYUSD = 'morphobluewbtcpyusd', // WBTC/PYUSD
15
+ MorphoBlueWBTCEth = 'morphobluewbtceth', // WBTC/ETH
16
+ MorphoBlueUSDeUSDT = 'morphoblueusdeusdt', // USDe/USDT
17
+ MorphoBlueSUSDeUSDT = 'morphobluesusdeusdt', // sUSDe/USDT
18
+ MorphoBlueSDAIEth = 'morphobluesdaieth', // sDAI/ETH
19
+ MorphoBlueMKRUSDC = 'morphobluemkrusdc', // MKR/USDC
20
+ MorphoBlueTBTCUSDC = 'morphobluetbtcusdc', // tBTC/USDC
21
+ MorphoBlueCbBTCEth_915 = 'morphobluecbbtceth', // cbBTC/Eth
22
+ MorphoBlueCbBTCUSDC_860 = 'morphobluecbbtcusdc', // cbBTC/USDC
23
+ MorphoBlueSUSDeUSDC_915 = 'morphobluesusdeusdc_915', // sUSDe/USDC
24
+ MorphoBlueLBTCWBTC_945 = 'morphobluelbtcwbtc_945', // LBTC/WBTC
25
+ MorphoBlueUSRUSDC_915 = 'morphoblueusrusdc_915', // USR/USDC
26
+ // ezETH/ETH
27
+ MorphoBlueEzEthEth_860 = 'morphoblueezetheth_860',
28
+ MorphoBlueEzEthEth_945 = 'morphoblueezetheth_945',
29
+ // weETH/ETH
30
+ MorphoBlueWeEthEth_860 = 'morphoblueweetheth_860',
31
+ MorphoBlueWeEthEth_945 = 'morphoblueweetheth_945',
32
+ // wstETH/WETH
33
+ MorphoBlueWstEthEth_945 = 'morphobluewstetheth_945',
34
+ MorphoBlueWstEthEth_945_Exchange_Rate = 'morphobluewstetheth_945_exchange_rate',
35
+ MorphoBlueWstEthEth_965_Exchange_Rate = 'morphobluewstetheth_965_exchange_rate',
36
+ // sUSDe/DAI
37
+ MorphoBlueSUSDeDAI_770 = 'morphobluesusdedai_770',
38
+ MorphoBlueSUSDeDAI_860 = 'morphobluesusdedai_860',
39
+ MorphoBlueSUSDeDAI_915 = 'morphobluesusdedai_915',
40
+ MorphoBlueSUSDeDAI_945 = 'morphobluesusdedai_945',
41
+ // USDe/DAI
42
+ MorphoBlueUSDeDAI_770 = 'morphoblueusdedai_770',
43
+ MorphoBlueUSDeDAI_860 = 'morphoblueusdedai_860',
44
+ MorphoBlueUSDeDAI_915 = 'morphoblueusdedai_915',
45
+ MorphoBlueUSDeDAI_945 = 'morphoblueusdedai_945',
46
+
47
+ // BASE
48
+ MorphoBlueCbEthUSDC_860_Base = 'morphobluecbethusdc_860_base',
49
+ MorphoBlueCbEthUSDC_860_Base_1c21c59d = 'morphobluecbethusdc_860_base_1c21c59d',
50
+ MorphoBlueWstEthUSDC_860_Base = 'morphobluewstethusdc_860_base',
51
+ MorphoBlueWstEthUSDC_860_Base_13c42741 = 'morphobluewstethusdc_860_base_13c42741',
52
+ MorphoBlueEthUSDC_860_Base = 'morphoblueethusdc_860_base',
53
+ MorphoBlueCbEthEth_945_Base = 'morphobluecbetheth_945_base',
54
+ MorphoBlueCbEthEth_965_Base = 'morphobluecbetheth_965_base',
55
+ MorphoBlueWstEthEth_945_Base = 'morphobluewstetheth_945_base',
56
+ MorphoBlueWstEthEth_965_Base = 'morphobluewstetheth_965_base',
57
+ MorphoBlueREthUSDC_860_Base = 'morphobluerethusdc_860_base',
58
+ MorphoBlueREthEth_945_Base = 'morphoblueretheth_945_base',
59
+ MorphoBlueCbBTCEth_915_Base = 'morphobluecbbtceth_915_base',
60
+ MorphoBlueCbBTCUSDC_860_Base = 'morphobluecbbtcusdc_860_base',
61
+ MorphoBlueWsuperOETHbWETH_915_Base = 'morphobluewsuperoethbweth_915_base',
62
+ MorphoBlueLBTCCbBTC_945_Base = 'morphobluelbtccbbtc_945_base', // LBTC/cbBTC
63
+ MorphoBlueWstEthEURC_860_Base = 'morphobluewstetheurc_860_base', // wstETH/EURC
64
+ MorphoBlueCbBTCEURC_860_Base = 'morphobluecbbtceurc_860_base', // cbBTC/EURC
65
+ }
66
+
67
+ export enum MorphoBlueOracleType {
68
+ MARKET_RATE = 'Market rate',
69
+ LIDO_RATE = 'Lido rate',
70
+ ETHENA_RATE = 'Ethena rate',
71
+ CONTRACT_RATE = 'Contract rate',
72
+ }
73
+
74
+ export interface MorphoBlueMarketData {
75
+ chainIds: NetworkNumber[],
76
+ label: string,
77
+ shortLabel: string,
78
+ url: string,
79
+ value: MorphoBlueVersions,
80
+ loanToken: string,
81
+ collateralToken: string,
82
+ oracle: string,
83
+ oracleType: MorphoBlueOracleType,
84
+ irm: string,
85
+ lltv: number | string,
86
+ marketId: string,
87
+ // icon: Function,
88
+ protocolName: string,
89
+ }
90
+
91
+ export interface MorphoBlueAssetData {
92
+ symbol: string,
93
+ address: string,
94
+ price: string,
95
+ supplyRate: string,
96
+ borrowRate: string,
97
+ incentiveSupplyApy?: string,
98
+ incentiveSupplyToken?: string,
99
+ incentiveBorrowApy?: string,
100
+ incentiveBorrowToken?: string,
101
+ totalSupply?: string,
102
+ totalBorrow?: string,
103
+ canBeSupplied?: boolean,
104
+ canBeBorrowed?: boolean,
105
+ }
106
+
107
+ export type MorphoBlueAssetsData = { [key: string]: MorphoBlueAssetData };
108
+
109
+ export interface MorphoBlueMarketInfo {
110
+ id: string,
111
+ fee: string,
112
+ loanToken: string,
113
+ collateralToken: string,
114
+ utillization: string,
115
+ oracle: string,
116
+ oracleType: MorphoBlueOracleType,
117
+ lltv: string,
118
+ minRatio: string,
119
+ assetsData: MorphoBlueAssetsData,
120
+ }
121
+
122
+ export interface MorphoBlueAggregatedPositionData {
123
+ suppliedUsd: string,
124
+ suppliedCollateralUsd: string,
125
+ borrowedUsd: string,
126
+ borrowLimitUsd: string,
127
+ liquidationLimitUsd: string,
128
+ leftToBorrowUsd: string,
129
+ leftToBorrow: string,
130
+ netApy: string,
131
+ incentiveUsd: string,
132
+ totalInterestUsd: string,
133
+ ltv: string,
134
+ ratio: string,
135
+ leveragedType: string,
136
+ leveragedAsset?: string,
137
+ leveragedLsdAssetRatio?: string,
138
+ liquidationPrice?: string,
139
+ minCollRatio?: string,
140
+ collLiquidationRatio?: string,
141
+ }
142
+
143
+ export interface MorphoBluePositionData {
144
+ usedAssets: MMUsedAssets,
145
+ suppliedUsd: string,
146
+ suppliedCollateralUsd: string,
147
+ borrowedUsd: string,
148
+ borrowLimitUsd: string,
149
+ liquidationLimitUsd: string,
150
+ leftToBorrowUsd: string,
151
+ leftToBorrow: string,
152
+ netApy: string,
153
+ incentiveUsd: string,
154
+ totalInterestUsd: string,
155
+ ltv: string,
156
+ ratio: string,
157
+ leveragedType: string,
158
+ leveragedAsset?: string,
159
+ leveragedLsdAssetRatio?: string,
160
+ liquidationPrice?: string,
161
+ supplyShares: string,
162
+ borrowShares: string,
163
+ }
164
+
165
+ export interface MorphoBlueVault {
166
+ address: string,
167
+ }
168
+
169
+ export interface MorphoBlueAllocationMarket {
170
+ loanAsset: { address: string },
171
+ collateralAsset: { address: string },
172
+ oracle: { address: string },
173
+ irmAddress: string,
174
+ lltv: string,
175
+ uniqueKey: string,
176
+ }
177
+
178
+ export interface MorphoBluePublicAllocatorItem {
179
+ vault: MorphoBlueVault,
180
+ assets: string,
181
+ allocationMarket: MorphoBlueAllocationMarket,
182
+ }
183
+
184
+ export interface MorphoBlueAllocatorMarketState {
185
+ borrowAssets: string,
186
+ supplyAssets: string,
187
+ }
188
+
189
+ export interface MorphoBlueRealloactionMarketData {
190
+ reallocatableLiquidityAssets: string,
191
+ targetBorrowUtilization: string,
192
+ publicAllocatorSharedLiquidity: MorphoBluePublicAllocatorItem[],
193
+ state: MorphoBlueAllocatorMarketState,
194
+ }