@defisaver/positions-sdk 1.0.19 → 1.0.21-dev-1

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