@defisaver/positions-sdk 2.1.151 → 2.1.152
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.
- package/cjs/claiming/compV3.js +0 -1
- package/cjs/config/contracts.d.ts +4 -0
- package/cjs/config/contracts.js +4 -0
- package/cjs/helpers/morphoMidnightHelpers/tenor.d.ts +6 -2
- package/cjs/helpers/morphoMidnightHelpers/tenor.js +5 -1
- package/cjs/markets/index.d.ts +1 -1
- package/cjs/markets/index.js +2 -1
- package/cjs/markets/morphoMidnight/index.d.ts +92 -10
- package/cjs/markets/morphoMidnight/index.js +519 -60
- package/cjs/morphoMidnight/index.js +11 -1
- package/cjs/types/morphoMidnight.d.ts +57 -4
- package/cjs/types/morphoMidnight.js +45 -0
- package/esm/claiming/compV3.js +0 -1
- package/esm/config/contracts.d.ts +4 -0
- package/esm/config/contracts.js +4 -0
- package/esm/helpers/morphoMidnightHelpers/tenor.d.ts +6 -2
- package/esm/helpers/morphoMidnightHelpers/tenor.js +6 -2
- package/esm/markets/index.d.ts +1 -1
- package/esm/markets/index.js +1 -1
- package/esm/markets/morphoMidnight/index.d.ts +92 -10
- package/esm/markets/morphoMidnight/index.js +473 -59
- package/esm/morphoMidnight/index.js +11 -1
- package/esm/types/morphoMidnight.d.ts +57 -4
- package/esm/types/morphoMidnight.js +45 -0
- package/package.json +1 -1
- package/src/claiming/compV3.ts +0 -1
- package/src/config/contracts.ts +4 -0
- package/src/helpers/morphoMidnightHelpers/tenor.ts +6 -2
- package/src/markets/index.ts +1 -0
- package/src/markets/morphoMidnight/index.ts +724 -61
- package/src/morphoMidnight/index.ts +8 -1
- package/src/types/morphoMidnight.ts +59 -3
|
@@ -4,17 +4,34 @@ import {
|
|
|
4
4
|
import { ZERO_ADDRESS } from '../../constants';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Morpho Midnight core contract
|
|
8
|
-
*
|
|
9
|
-
* encode for `Midnight.take`.
|
|
7
|
+
* Morpho Midnight core contract, one per chain. Every Midnight market on a chain trades against its core,
|
|
8
|
+
* whoever curates the order book — it is part of the market struct the id is hashed from, and it is what
|
|
9
|
+
* offer tuples encode for `Midnight.take`. Listed at
|
|
10
|
+
* https://docs.morpho.org/get-started/resources/addresses/.
|
|
10
11
|
*/
|
|
11
12
|
export const MIDNIGHT_BASE = '0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A' as const;
|
|
13
|
+
export const MIDNIGHT_ETH = '0x471686c42792F93528B000beF54bC10E3aa2045f' as const;
|
|
14
|
+
|
|
15
|
+
export const midnightCoreAddress = (network: NetworkNumber) => (
|
|
16
|
+
network === NetworkNumber.Eth ? MIDNIGHT_ETH : MIDNIGHT_BASE
|
|
17
|
+
);
|
|
12
18
|
|
|
13
19
|
const USDC_BASE = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' as const;
|
|
14
20
|
const WETH_BASE = '0x4200000000000000000000000000000000000006' as const;
|
|
15
21
|
const CBBTC_BASE = '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf' as const;
|
|
16
22
|
const CBETH_BASE = '0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22' as const;
|
|
17
23
|
|
|
24
|
+
const USDC_ETH = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' as const;
|
|
25
|
+
const WETH_ETH = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2' as const;
|
|
26
|
+
const WBTC_ETH = '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599' as const;
|
|
27
|
+
const CBBTC_ETH = '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf' as const;
|
|
28
|
+
const STRUSD_ETH = '0x280839980a7eD0D7717F64125fE241012E5F5815' as const;
|
|
29
|
+
const WSRUSD_ETH = '0xd3fD63209FA2D55B07A0f6db36C2f43900be3094' as const;
|
|
30
|
+
const USD3_ETH = '0x056B269Eb1f75477a8666ae8C7fE01b64dD55eCc' as const;
|
|
31
|
+
const REUSD_ETH = '0x5086bf358635B81D8C47C66d1C8b9E567Db70c72' as const;
|
|
32
|
+
const SIUSD_ETH = '0xDBDC1Ef57537E34680B898E1FEBD3D68c7389bCB' as const;
|
|
33
|
+
const WSTETH_ETH = '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0' as const;
|
|
34
|
+
|
|
18
35
|
// Tenor's ERC-4626 collateral vaults, one per pair and shared by that pair's whole maturity ladder. Each
|
|
19
36
|
// is a collateral of its markets on-chain without being an asset the app deals in — see the note above
|
|
20
37
|
// the Tenor markets below, and https://www.docs.tenor.finance/technical-docs/addresses/#vaults.
|
|
@@ -22,6 +39,14 @@ const TENOR_CBBTC_USDC_VAULT_BASE = '0xf6a70085b7f79FA76B04EbF7A2D7D87C3c5c04BC'
|
|
|
22
39
|
const TENOR_WETH_USDC_VAULT_BASE = '0xe690a58EF52854513462745237F6A213a0d54dF1' as const;
|
|
23
40
|
const TENOR_CBETH_WETH_VAULT_BASE = '0xFa750DD0099eAdB72d401244De73ce7B89edf90F' as const;
|
|
24
41
|
|
|
42
|
+
const TENOR_WETH_USDC_VAULT_ETH = '0x7579a75658A7A0b7d277296dFaEecF4018746091' as const;
|
|
43
|
+
const TENOR_STRUSD_USDC_VAULT_ETH = '0xef6955d886fce26D87753dA45192eA50F59dc91c' as const;
|
|
44
|
+
const TENOR_WSRUSD_USDC_VAULT_ETH = '0x09409fa71bCfd3f433571dbeec0C0A9C19B0d30E' as const;
|
|
45
|
+
const TENOR_USD3_USDC_VAULT_ETH = '0x26C46ACb48B46cC99ccB3cf6C365BdaFa2556E80' as const;
|
|
46
|
+
const TENOR_REUSD_USDC_VAULT_ETH = '0xe3891d8cA7E00Bc42157D9bb5797C88D9159AAC6' as const;
|
|
47
|
+
const TENOR_SIUSD_USDC_VAULT_ETH = '0x226ecbf4755a5F81ed721E18c3fDA11f004Ea9e0' as const;
|
|
48
|
+
const TENOR_WSTETH_WETH_VAULT_ETH = '0xe1Bdb88eE5DBaCE653ecD2123E8396BB5BA8adc5' as const;
|
|
49
|
+
|
|
25
50
|
|
|
26
51
|
// Sourced from the official listing at https://markets.morpho.org/fixed/base
|
|
27
52
|
|
|
@@ -197,19 +222,20 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20270129 = (networkId = NetworkNumbe
|
|
|
197
222
|
// = Tenor's `fixedMarketIdentifier`; they come back `listed: false`, meaning Tenor — not Morpho — serves
|
|
198
223
|
// the book.
|
|
199
224
|
//
|
|
200
|
-
// Every market below is verified
|
|
201
|
-
// maturity, rcfThreshold, loan token, gates and
|
|
202
|
-
//
|
|
203
|
-
//
|
|
204
|
-
// https://www.docs.tenor.finance/technical-docs/addresses/#vaults). The
|
|
205
|
-
// deals in, so it
|
|
206
|
-
//
|
|
207
|
-
// set, the SDK's positional `prices[i]` / `collateral[i]` reads stay aligned with `collaterals`.
|
|
225
|
+
// Every market below is verified by replaying `MidnightView.toId` over the struct these fields build:
|
|
226
|
+
// core address, maturity, rcfThreshold, loan token, gates and the whole ordered collateral set have to
|
|
227
|
+
// match or the hash does not come back as the recorded `marketId`. On-chain each market carries **two**
|
|
228
|
+
// collaterals — the pair's own token, and Tenor's ERC-4626 vault at 98% LLTV (the `metadata.vault` of the
|
|
229
|
+
// parent tenor market, listed at https://www.docs.tenor.finance/technical-docs/addresses/#vaults). The
|
|
230
|
+
// vault is not an asset the app deals in, so it carries `hidden: true`: everything that renders or prices
|
|
231
|
+
// a position skips it and sees a single-collateral market.
|
|
208
232
|
//
|
|
209
|
-
// It is only
|
|
210
|
-
// to the core has to
|
|
211
|
-
//
|
|
212
|
-
//
|
|
233
|
+
// It is only flagged, never dropped or reordered: the market id is the hash of the full struct, so a
|
|
234
|
+
// `Market` handed to the core has to carry the complete set in the chain's own order or the call
|
|
235
|
+
// addresses a market of its own making — which does not revert, because markets are permissionless. On
|
|
236
|
+
// Base the vault happens to come last every time; on mainnet the order varies per market, which is why
|
|
237
|
+
// the flag lives on the entry rather than in a second list. The take path builds no struct — offer
|
|
238
|
+
// tuples carry the market's full collateral set straight from the router's offer JSON.
|
|
213
239
|
|
|
214
240
|
export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260827 = (networkId = NetworkNumber.Base): MorphoMidnightMarketData => ({
|
|
215
241
|
chainIds: [NetworkNumber.Base],
|
|
@@ -224,12 +250,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260827 = (networkId = Networ
|
|
|
224
250
|
lltv: 0.86,
|
|
225
251
|
liquidationCursor: '300000000000000000',
|
|
226
252
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
227
|
-
}
|
|
228
|
-
hiddenCollaterals: [{
|
|
253
|
+
}, {
|
|
229
254
|
token: TENOR_CBBTC_USDC_VAULT_BASE,
|
|
230
255
|
lltv: 0.98,
|
|
231
256
|
liquidationCursor: '300000000000000000',
|
|
232
257
|
oracle: '0x4a24e4bf269cE26aAD2dF00437e7730d25FCdE26',
|
|
258
|
+
hidden: true,
|
|
233
259
|
}],
|
|
234
260
|
maturity: 1787788800, // 2026-08-27T00:00:00Z
|
|
235
261
|
rcfThreshold: '3000000000',
|
|
@@ -253,12 +279,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260924 = (networkId = Networ
|
|
|
253
279
|
lltv: 0.86,
|
|
254
280
|
liquidationCursor: '300000000000000000',
|
|
255
281
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
256
|
-
}
|
|
257
|
-
hiddenCollaterals: [{
|
|
282
|
+
}, {
|
|
258
283
|
token: TENOR_CBBTC_USDC_VAULT_BASE,
|
|
259
284
|
lltv: 0.98,
|
|
260
285
|
liquidationCursor: '300000000000000000',
|
|
261
286
|
oracle: '0x4a24e4bf269cE26aAD2dF00437e7730d25FCdE26',
|
|
287
|
+
hidden: true,
|
|
262
288
|
}],
|
|
263
289
|
maturity: 1790208000, // 2026-09-24T00:00:00Z
|
|
264
290
|
rcfThreshold: '3000000000',
|
|
@@ -282,12 +308,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261022 = (networkId = Networ
|
|
|
282
308
|
lltv: 0.86,
|
|
283
309
|
liquidationCursor: '300000000000000000',
|
|
284
310
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
285
|
-
}
|
|
286
|
-
hiddenCollaterals: [{
|
|
311
|
+
}, {
|
|
287
312
|
token: TENOR_CBBTC_USDC_VAULT_BASE,
|
|
288
313
|
lltv: 0.98,
|
|
289
314
|
liquidationCursor: '300000000000000000',
|
|
290
315
|
oracle: '0x4a24e4bf269cE26aAD2dF00437e7730d25FCdE26',
|
|
316
|
+
hidden: true,
|
|
291
317
|
}],
|
|
292
318
|
maturity: 1792627200, // 2026-10-22T00:00:00Z
|
|
293
319
|
rcfThreshold: '3000000000',
|
|
@@ -311,12 +337,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261119 = (networkId = Networ
|
|
|
311
337
|
lltv: 0.86,
|
|
312
338
|
liquidationCursor: '300000000000000000',
|
|
313
339
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
314
|
-
}
|
|
315
|
-
hiddenCollaterals: [{
|
|
340
|
+
}, {
|
|
316
341
|
token: TENOR_CBBTC_USDC_VAULT_BASE,
|
|
317
342
|
lltv: 0.98,
|
|
318
343
|
liquidationCursor: '300000000000000000',
|
|
319
344
|
oracle: '0x4a24e4bf269cE26aAD2dF00437e7730d25FCdE26',
|
|
345
|
+
hidden: true,
|
|
320
346
|
}],
|
|
321
347
|
maturity: 1795046400, // 2026-11-19T00:00:00Z
|
|
322
348
|
rcfThreshold: '3000000000',
|
|
@@ -340,12 +366,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261217 = (networkId = Networ
|
|
|
340
366
|
lltv: 0.86,
|
|
341
367
|
liquidationCursor: '300000000000000000',
|
|
342
368
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
343
|
-
}
|
|
344
|
-
hiddenCollaterals: [{
|
|
369
|
+
}, {
|
|
345
370
|
token: TENOR_CBBTC_USDC_VAULT_BASE,
|
|
346
371
|
lltv: 0.98,
|
|
347
372
|
liquidationCursor: '300000000000000000',
|
|
348
373
|
oracle: '0x4a24e4bf269cE26aAD2dF00437e7730d25FCdE26',
|
|
374
|
+
hidden: true,
|
|
349
375
|
}],
|
|
350
376
|
maturity: 1797465600, // 2026-12-17T00:00:00Z
|
|
351
377
|
rcfThreshold: '3000000000',
|
|
@@ -369,12 +395,12 @@ export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260827 = (networkId = Network
|
|
|
369
395
|
lltv: 0.86,
|
|
370
396
|
liquidationCursor: '300000000000000000',
|
|
371
397
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
372
|
-
}
|
|
373
|
-
hiddenCollaterals: [{
|
|
398
|
+
}, {
|
|
374
399
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
375
400
|
lltv: 0.98,
|
|
376
401
|
liquidationCursor: '300000000000000000',
|
|
377
402
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
403
|
+
hidden: true,
|
|
378
404
|
}],
|
|
379
405
|
maturity: 1787788800,
|
|
380
406
|
rcfThreshold: '3000000000',
|
|
@@ -398,12 +424,12 @@ export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260924 = (networkId = Network
|
|
|
398
424
|
lltv: 0.86,
|
|
399
425
|
liquidationCursor: '300000000000000000',
|
|
400
426
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
401
|
-
}
|
|
402
|
-
hiddenCollaterals: [{
|
|
427
|
+
}, {
|
|
403
428
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
404
429
|
lltv: 0.98,
|
|
405
430
|
liquidationCursor: '300000000000000000',
|
|
406
431
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
432
|
+
hidden: true,
|
|
407
433
|
}],
|
|
408
434
|
maturity: 1790208000,
|
|
409
435
|
rcfThreshold: '3000000000',
|
|
@@ -427,12 +453,12 @@ export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261022 = (networkId = Network
|
|
|
427
453
|
lltv: 0.86,
|
|
428
454
|
liquidationCursor: '300000000000000000',
|
|
429
455
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
430
|
-
}
|
|
431
|
-
hiddenCollaterals: [{
|
|
456
|
+
}, {
|
|
432
457
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
433
458
|
lltv: 0.98,
|
|
434
459
|
liquidationCursor: '300000000000000000',
|
|
435
460
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
461
|
+
hidden: true,
|
|
436
462
|
}],
|
|
437
463
|
maturity: 1792627200,
|
|
438
464
|
rcfThreshold: '3000000000',
|
|
@@ -456,12 +482,12 @@ export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261119 = (networkId = Network
|
|
|
456
482
|
lltv: 0.86,
|
|
457
483
|
liquidationCursor: '300000000000000000',
|
|
458
484
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
459
|
-
}
|
|
460
|
-
hiddenCollaterals: [{
|
|
485
|
+
}, {
|
|
461
486
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
462
487
|
lltv: 0.98,
|
|
463
488
|
liquidationCursor: '300000000000000000',
|
|
464
489
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
490
|
+
hidden: true,
|
|
465
491
|
}],
|
|
466
492
|
maturity: 1795046400,
|
|
467
493
|
rcfThreshold: '3000000000',
|
|
@@ -485,12 +511,12 @@ export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261217 = (networkId = Network
|
|
|
485
511
|
lltv: 0.86,
|
|
486
512
|
liquidationCursor: '300000000000000000',
|
|
487
513
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
488
|
-
}
|
|
489
|
-
hiddenCollaterals: [{
|
|
514
|
+
}, {
|
|
490
515
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
491
516
|
lltv: 0.98,
|
|
492
517
|
liquidationCursor: '300000000000000000',
|
|
493
518
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
519
|
+
hidden: true,
|
|
494
520
|
}],
|
|
495
521
|
maturity: 1797465600,
|
|
496
522
|
rcfThreshold: '3000000000',
|
|
@@ -514,12 +540,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20260827 = (networkId = Networ
|
|
|
514
540
|
lltv: 0.945,
|
|
515
541
|
liquidationCursor: '300000000000000000',
|
|
516
542
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
517
|
-
}
|
|
518
|
-
hiddenCollaterals: [{
|
|
543
|
+
}, {
|
|
519
544
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
520
545
|
lltv: 0.98,
|
|
521
546
|
liquidationCursor: '300000000000000000',
|
|
522
547
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
548
|
+
hidden: true,
|
|
523
549
|
}],
|
|
524
550
|
maturity: 1787788800,
|
|
525
551
|
rcfThreshold: '4000000000000000000',
|
|
@@ -543,12 +569,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20260924 = (networkId = Networ
|
|
|
543
569
|
lltv: 0.945,
|
|
544
570
|
liquidationCursor: '300000000000000000',
|
|
545
571
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
546
|
-
}
|
|
547
|
-
hiddenCollaterals: [{
|
|
572
|
+
}, {
|
|
548
573
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
549
574
|
lltv: 0.98,
|
|
550
575
|
liquidationCursor: '300000000000000000',
|
|
551
576
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
577
|
+
hidden: true,
|
|
552
578
|
}],
|
|
553
579
|
maturity: 1790208000,
|
|
554
580
|
rcfThreshold: '4000000000000000000',
|
|
@@ -572,12 +598,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261022 = (networkId = Networ
|
|
|
572
598
|
lltv: 0.945,
|
|
573
599
|
liquidationCursor: '300000000000000000',
|
|
574
600
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
575
|
-
}
|
|
576
|
-
hiddenCollaterals: [{
|
|
601
|
+
}, {
|
|
577
602
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
578
603
|
lltv: 0.98,
|
|
579
604
|
liquidationCursor: '300000000000000000',
|
|
580
605
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
606
|
+
hidden: true,
|
|
581
607
|
}],
|
|
582
608
|
maturity: 1792627200,
|
|
583
609
|
rcfThreshold: '4000000000000000000',
|
|
@@ -601,12 +627,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261119 = (networkId = Networ
|
|
|
601
627
|
lltv: 0.945,
|
|
602
628
|
liquidationCursor: '300000000000000000',
|
|
603
629
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
604
|
-
}
|
|
605
|
-
hiddenCollaterals: [{
|
|
630
|
+
}, {
|
|
606
631
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
607
632
|
lltv: 0.98,
|
|
608
633
|
liquidationCursor: '300000000000000000',
|
|
609
634
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
635
|
+
hidden: true,
|
|
610
636
|
}],
|
|
611
637
|
maturity: 1795046400,
|
|
612
638
|
rcfThreshold: '4000000000000000000',
|
|
@@ -630,12 +656,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261217 = (networkId = Networ
|
|
|
630
656
|
lltv: 0.945,
|
|
631
657
|
liquidationCursor: '300000000000000000',
|
|
632
658
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
633
|
-
}
|
|
634
|
-
hiddenCollaterals: [{
|
|
659
|
+
}, {
|
|
635
660
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
636
661
|
lltv: 0.98,
|
|
637
662
|
liquidationCursor: '300000000000000000',
|
|
638
663
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
664
|
+
hidden: true,
|
|
639
665
|
}],
|
|
640
666
|
maturity: 1797465600,
|
|
641
667
|
rcfThreshold: '4000000000000000000',
|
|
@@ -666,12 +692,12 @@ const createTenorWethUsdcRollingMarket = (
|
|
|
666
692
|
lltv: 0.86,
|
|
667
693
|
liquidationCursor: '300000000000000000',
|
|
668
694
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
669
|
-
}
|
|
670
|
-
hiddenCollaterals: [{
|
|
695
|
+
}, {
|
|
671
696
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
672
697
|
lltv: 0.98,
|
|
673
698
|
liquidationCursor: '300000000000000000',
|
|
674
699
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
700
|
+
hidden: true,
|
|
675
701
|
}],
|
|
676
702
|
maturity,
|
|
677
703
|
rcfThreshold: '3000000000',
|
|
@@ -700,12 +726,12 @@ const createTenorCbEthWethRollingMarket = (
|
|
|
700
726
|
lltv: 0.945,
|
|
701
727
|
liquidationCursor: '300000000000000000',
|
|
702
728
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
703
|
-
}
|
|
704
|
-
hiddenCollaterals: [{
|
|
729
|
+
}, {
|
|
705
730
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
706
731
|
lltv: 0.98,
|
|
707
732
|
liquidationCursor: '300000000000000000',
|
|
708
733
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
734
|
+
hidden: true,
|
|
709
735
|
}],
|
|
710
736
|
maturity,
|
|
711
737
|
rcfThreshold: '4000000000000000000',
|
|
@@ -778,7 +804,589 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20270129 = () => createTenorCb
|
|
|
778
804
|
'0x3cfda244eeec7e5cda2a07ef23e2a5e3fe6ba17882417cafbf3f3c432377ff1d',
|
|
779
805
|
);
|
|
780
806
|
|
|
781
|
-
|
|
807
|
+
// ── ETHEREUM ─────────────────────────────────────────────────────────────────────────────────────
|
|
808
|
+
|
|
809
|
+
const createWBTCUsdcEthMarket = (
|
|
810
|
+
value: MorphoMidnightVersions,
|
|
811
|
+
url: string,
|
|
812
|
+
maturity: number,
|
|
813
|
+
marketId: string,
|
|
814
|
+
): MorphoMidnightMarketData => ({
|
|
815
|
+
chainIds: [NetworkNumber.Eth],
|
|
816
|
+
label: 'Morpho Midnight WBTC/USDC',
|
|
817
|
+
shortLabel: 'WBTC/USDC',
|
|
818
|
+
url,
|
|
819
|
+
value,
|
|
820
|
+
midnight: MIDNIGHT_ETH,
|
|
821
|
+
loanToken: USDC_ETH,
|
|
822
|
+
collaterals: [{
|
|
823
|
+
token: WBTC_ETH,
|
|
824
|
+
lltv: 0.86,
|
|
825
|
+
liquidationCursor: '300000000000000000',
|
|
826
|
+
oracle: '0xDddd770BADd886dF3864029e4B377B5F6a2B6b83',
|
|
827
|
+
}, {
|
|
828
|
+
token: USDC_ETH,
|
|
829
|
+
lltv: 0.98,
|
|
830
|
+
liquidationCursor: '300000000000000000',
|
|
831
|
+
oracle: '0x8d1A84515B54C58bAc3b18315B6b1f17dA5cf6ca',
|
|
832
|
+
hidden: true,
|
|
833
|
+
}],
|
|
834
|
+
maturity,
|
|
835
|
+
rcfThreshold: '300000000000',
|
|
836
|
+
enterGate: ZERO_ADDRESS,
|
|
837
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
838
|
+
marketId,
|
|
839
|
+
protocolName: 'morpho-midnight',
|
|
840
|
+
curator: 'Morpho',
|
|
841
|
+
});
|
|
842
|
+
|
|
843
|
+
const createCbBTCUsdcEthMarket = (
|
|
844
|
+
value: MorphoMidnightVersions,
|
|
845
|
+
url: string,
|
|
846
|
+
maturity: number,
|
|
847
|
+
marketId: string,
|
|
848
|
+
): MorphoMidnightMarketData => ({
|
|
849
|
+
chainIds: [NetworkNumber.Eth],
|
|
850
|
+
label: 'Morpho Midnight cbBTC/USDC',
|
|
851
|
+
shortLabel: 'cbBTC/USDC',
|
|
852
|
+
url,
|
|
853
|
+
value,
|
|
854
|
+
midnight: MIDNIGHT_ETH,
|
|
855
|
+
loanToken: USDC_ETH,
|
|
856
|
+
collaterals: [{
|
|
857
|
+
token: USDC_ETH,
|
|
858
|
+
lltv: 0.98,
|
|
859
|
+
liquidationCursor: '300000000000000000',
|
|
860
|
+
oracle: '0x8d1A84515B54C58bAc3b18315B6b1f17dA5cf6ca',
|
|
861
|
+
hidden: true,
|
|
862
|
+
}, {
|
|
863
|
+
token: CBBTC_ETH,
|
|
864
|
+
lltv: 0.86,
|
|
865
|
+
liquidationCursor: '300000000000000000',
|
|
866
|
+
oracle: '0xA6D6950c9F177F1De7f7757FB33539e3Ec60182a',
|
|
867
|
+
}],
|
|
868
|
+
maturity,
|
|
869
|
+
rcfThreshold: '300000000000',
|
|
870
|
+
enterGate: ZERO_ADDRESS,
|
|
871
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
872
|
+
marketId,
|
|
873
|
+
protocolName: 'morpho-midnight',
|
|
874
|
+
curator: 'Morpho',
|
|
875
|
+
});
|
|
876
|
+
|
|
877
|
+
export const MORPHO_MIDNIGHT_WBTC_USDC_860_20260925_ETH = () => createWBTCUsdcEthMarket(
|
|
878
|
+
MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20260925_Eth,
|
|
879
|
+
'wbtc-usdc-20260925',
|
|
880
|
+
1790348400, // 2026-09-25T15:00:00Z
|
|
881
|
+
'0x6dae37424723dd8cef0da2db84fd2819f7dfa4e3a98e602ccc3c65ee1fac61c2',
|
|
882
|
+
);
|
|
883
|
+
export const MORPHO_MIDNIGHT_WBTC_USDC_860_20261030_ETH = () => createWBTCUsdcEthMarket(
|
|
884
|
+
MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20261030_Eth,
|
|
885
|
+
'wbtc-usdc-20261030',
|
|
886
|
+
1793372400, // 2026-10-30T15:00:00Z
|
|
887
|
+
'0xe5e6fbd5d81875dbfb0c94866cb0d300e1c7b9aacc0a458e63dccbcc0ce278c8',
|
|
888
|
+
);
|
|
889
|
+
export const MORPHO_MIDNIGHT_WBTC_USDC_860_20261127_ETH = () => createWBTCUsdcEthMarket(
|
|
890
|
+
MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20261127_Eth,
|
|
891
|
+
'wbtc-usdc-20261127',
|
|
892
|
+
1795791600, // 2026-11-27T15:00:00Z
|
|
893
|
+
'0xe0efc89dc1f747ba502f6a4100b6b1db9ebd0d57569fd5a54771d3a026b6a27b',
|
|
894
|
+
);
|
|
895
|
+
export const MORPHO_MIDNIGHT_WBTC_USDC_860_20261225_ETH = () => createWBTCUsdcEthMarket(
|
|
896
|
+
MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20261225_Eth,
|
|
897
|
+
'wbtc-usdc-20261225',
|
|
898
|
+
1798210800, // 2026-12-25T15:00:00Z
|
|
899
|
+
'0x3323abf2d2a3ec804f46552db920d900bb9c7ffd3f48143ab879a918fd6c0977',
|
|
900
|
+
);
|
|
901
|
+
export const MORPHO_MIDNIGHT_WBTC_USDC_860_20270129_ETH = () => createWBTCUsdcEthMarket(
|
|
902
|
+
MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20270129_Eth,
|
|
903
|
+
'wbtc-usdc-20270129',
|
|
904
|
+
1801234800, // 2027-01-29T15:00:00Z
|
|
905
|
+
'0xf8052f557ce70d39cf9da1bd6e37e44a49f51757afb5dc881f675490ca6b3e9f',
|
|
906
|
+
);
|
|
907
|
+
export const MORPHO_MIDNIGHT_WBTC_USDC_860_20270226_ETH = () => createWBTCUsdcEthMarket(
|
|
908
|
+
MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20270226_Eth,
|
|
909
|
+
'wbtc-usdc-20270226',
|
|
910
|
+
1803654000, // 2027-02-26T15:00:00Z
|
|
911
|
+
'0x7e399db474781e92b22b5a647d811959f65997b1e2bb68deaade674d8afbbdbd',
|
|
912
|
+
);
|
|
913
|
+
export const MORPHO_MIDNIGHT_WBTC_USDC_860_20270326_ETH = () => createWBTCUsdcEthMarket(
|
|
914
|
+
MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20270326_Eth,
|
|
915
|
+
'wbtc-usdc-20270326',
|
|
916
|
+
1806073200, // 2027-03-26T15:00:00Z
|
|
917
|
+
'0x54a722a6dbaa237cfe088afd295417091bfb792fe3fac96999af41635977b2b0',
|
|
918
|
+
);
|
|
919
|
+
|
|
920
|
+
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260925_ETH = () => createCbBTCUsdcEthMarket(
|
|
921
|
+
MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260925_Eth,
|
|
922
|
+
'cbbtc-usdc-20260925',
|
|
923
|
+
1790348400, // 2026-09-25T15:00:00Z
|
|
924
|
+
'0x2a9ae59053a64e409e819d3b76750948e06065b3164278915eb80cb1b7474b65',
|
|
925
|
+
);
|
|
926
|
+
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261030_ETH = () => createCbBTCUsdcEthMarket(
|
|
927
|
+
MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261030_Eth,
|
|
928
|
+
'cbbtc-usdc-20261030',
|
|
929
|
+
1793372400, // 2026-10-30T15:00:00Z
|
|
930
|
+
'0xeea94e3f7185bb8cfcdf41aca2c9776788e86d6c14de345b911b04f75cd49959',
|
|
931
|
+
);
|
|
932
|
+
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261127_ETH = () => createCbBTCUsdcEthMarket(
|
|
933
|
+
MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261127_Eth,
|
|
934
|
+
'cbbtc-usdc-20261127',
|
|
935
|
+
1795791600, // 2026-11-27T15:00:00Z
|
|
936
|
+
'0xa6454499939a47927d3d27d65dce18486cc2aabbf75f8f5f8482e93567f4a183',
|
|
937
|
+
);
|
|
938
|
+
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261225_ETH = () => createCbBTCUsdcEthMarket(
|
|
939
|
+
MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261225_Eth,
|
|
940
|
+
'cbbtc-usdc-20261225',
|
|
941
|
+
1798210800, // 2026-12-25T15:00:00Z
|
|
942
|
+
'0xcf447db8cff164867b02edbf7ee7af06d241d4f3a44b34d6e3a3ea872ddea5d6',
|
|
943
|
+
);
|
|
944
|
+
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20270129_ETH = () => createCbBTCUsdcEthMarket(
|
|
945
|
+
MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20270129_Eth,
|
|
946
|
+
'cbbtc-usdc-20270129',
|
|
947
|
+
1801234800, // 2027-01-29T15:00:00Z
|
|
948
|
+
'0x9ea83106928cf45829a89c02cea7c73cb3a066d2429d7ca2fcdc0015dc191df1',
|
|
949
|
+
);
|
|
950
|
+
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20270226_ETH = () => createCbBTCUsdcEthMarket(
|
|
951
|
+
MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20270226_Eth,
|
|
952
|
+
'cbbtc-usdc-20270226',
|
|
953
|
+
1803654000, // 2027-02-26T15:00:00Z
|
|
954
|
+
'0xf9c1a9849863863a87600beb24394985a04ad3256b0c750baee0841f35f7f0e2',
|
|
955
|
+
);
|
|
956
|
+
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20270326_ETH = () => createCbBTCUsdcEthMarket(
|
|
957
|
+
MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20270326_Eth,
|
|
958
|
+
'cbbtc-usdc-20270326',
|
|
959
|
+
1806073200, // 2027-03-26T15:00:00Z
|
|
960
|
+
'0xb00767d2cc7d5d9e27501a14e7912a089e34da675a2eb9e030072233db2c4c3b',
|
|
961
|
+
);
|
|
962
|
+
|
|
963
|
+
// ETHEREUM — Tenor-curated, one rolling ladder per pair
|
|
964
|
+
|
|
965
|
+
const createTenorReUSDUsdcEthMarket = (
|
|
966
|
+
value: MorphoMidnightVersions,
|
|
967
|
+
url: string,
|
|
968
|
+
maturity: number,
|
|
969
|
+
marketId: string,
|
|
970
|
+
): MorphoMidnightMarketData => ({
|
|
971
|
+
chainIds: [NetworkNumber.Eth],
|
|
972
|
+
label: 'Tenor reUSD/USDC',
|
|
973
|
+
shortLabel: 'Tenor reUSD/USDC',
|
|
974
|
+
url,
|
|
975
|
+
value,
|
|
976
|
+
midnight: MIDNIGHT_ETH,
|
|
977
|
+
loanToken: USDC_ETH,
|
|
978
|
+
collaterals: [{
|
|
979
|
+
token: REUSD_ETH,
|
|
980
|
+
lltv: 0.915,
|
|
981
|
+
liquidationCursor: '300000000000000000',
|
|
982
|
+
oracle: '0xA66a4F03Fd8031973f8C7718904ce32385f54E70',
|
|
983
|
+
}, {
|
|
984
|
+
token: TENOR_REUSD_USDC_VAULT_ETH,
|
|
985
|
+
lltv: 0.98,
|
|
986
|
+
liquidationCursor: '300000000000000000',
|
|
987
|
+
oracle: '0xE5f7f5A74E6f4dA2F68b1aa017F204a1883eC0df',
|
|
988
|
+
hidden: true,
|
|
989
|
+
}],
|
|
990
|
+
maturity,
|
|
991
|
+
rcfThreshold: '500000000000',
|
|
992
|
+
enterGate: ZERO_ADDRESS,
|
|
993
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
994
|
+
marketId,
|
|
995
|
+
protocolName: 'morpho-midnight',
|
|
996
|
+
curator: 'Tenor',
|
|
997
|
+
});
|
|
998
|
+
|
|
999
|
+
export const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20260925_ETH = () => createTenorReUSDUsdcEthMarket(
|
|
1000
|
+
MorphoMidnightVersions.MorphoMidnightTenorReUSDUSDC_20260925_Eth,
|
|
1001
|
+
'tenor-reusd-usdc-20260925',
|
|
1002
|
+
1790348400, // 2026-09-25T15:00:00Z
|
|
1003
|
+
'0xdba251b941d135577e1b423301b2eb6a76dfe11479c843185d20bee9208e7393',
|
|
1004
|
+
);
|
|
1005
|
+
export const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261030_ETH = () => createTenorReUSDUsdcEthMarket(
|
|
1006
|
+
MorphoMidnightVersions.MorphoMidnightTenorReUSDUSDC_20261030_Eth,
|
|
1007
|
+
'tenor-reusd-usdc-20261030',
|
|
1008
|
+
1793372400, // 2026-10-30T15:00:00Z
|
|
1009
|
+
'0x0fdbbc14a6275905b3fc7372e7ce2828eafced9f2c3e442990682055839092c3',
|
|
1010
|
+
);
|
|
1011
|
+
export const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261127_ETH = () => createTenorReUSDUsdcEthMarket(
|
|
1012
|
+
MorphoMidnightVersions.MorphoMidnightTenorReUSDUSDC_20261127_Eth,
|
|
1013
|
+
'tenor-reusd-usdc-20261127',
|
|
1014
|
+
1795791600, // 2026-11-27T15:00:00Z
|
|
1015
|
+
'0x1cf59f7382f72aee174e251ffaed5b8ada9e052da326fc3f32626bb52e126db6',
|
|
1016
|
+
);
|
|
1017
|
+
export const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261225_ETH = () => createTenorReUSDUsdcEthMarket(
|
|
1018
|
+
MorphoMidnightVersions.MorphoMidnightTenorReUSDUSDC_20261225_Eth,
|
|
1019
|
+
'tenor-reusd-usdc-20261225',
|
|
1020
|
+
1798210800, // 2026-12-25T15:00:00Z
|
|
1021
|
+
'0xc78981202d07dae20266843ca668a20057beaafe3291b326529558227a03c9ad',
|
|
1022
|
+
);
|
|
1023
|
+
|
|
1024
|
+
const createTenorSiUSDUsdcEthMarket = (
|
|
1025
|
+
value: MorphoMidnightVersions,
|
|
1026
|
+
url: string,
|
|
1027
|
+
maturity: number,
|
|
1028
|
+
marketId: string,
|
|
1029
|
+
): MorphoMidnightMarketData => ({
|
|
1030
|
+
chainIds: [NetworkNumber.Eth],
|
|
1031
|
+
label: 'Tenor siUSD/USDC',
|
|
1032
|
+
shortLabel: 'Tenor siUSD/USDC',
|
|
1033
|
+
url,
|
|
1034
|
+
value,
|
|
1035
|
+
midnight: MIDNIGHT_ETH,
|
|
1036
|
+
loanToken: USDC_ETH,
|
|
1037
|
+
collaterals: [{
|
|
1038
|
+
token: TENOR_SIUSD_USDC_VAULT_ETH,
|
|
1039
|
+
lltv: 0.98,
|
|
1040
|
+
liquidationCursor: '300000000000000000',
|
|
1041
|
+
oracle: '0xE872d1d33b13B52aE7cD9A0CDD4102468350e5fa',
|
|
1042
|
+
hidden: true,
|
|
1043
|
+
}, {
|
|
1044
|
+
token: SIUSD_ETH,
|
|
1045
|
+
lltv: 0.915,
|
|
1046
|
+
liquidationCursor: '300000000000000000',
|
|
1047
|
+
oracle: '0xd2cC46b9B2D761502eF933320ecf0268EC0dfa6d',
|
|
1048
|
+
}],
|
|
1049
|
+
maturity,
|
|
1050
|
+
rcfThreshold: '500000000000',
|
|
1051
|
+
enterGate: ZERO_ADDRESS,
|
|
1052
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
1053
|
+
marketId,
|
|
1054
|
+
protocolName: 'morpho-midnight',
|
|
1055
|
+
curator: 'Tenor',
|
|
1056
|
+
});
|
|
1057
|
+
|
|
1058
|
+
export const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20260925_ETH = () => createTenorSiUSDUsdcEthMarket(
|
|
1059
|
+
MorphoMidnightVersions.MorphoMidnightTenorSiUSDUSDC_20260925_Eth,
|
|
1060
|
+
'tenor-siusd-usdc-20260925',
|
|
1061
|
+
1790348400, // 2026-09-25T15:00:00Z
|
|
1062
|
+
'0x48d95ace842493ce2c1c474c0cb60ac208e9d8a714258e278af9c8ae01a88fa5',
|
|
1063
|
+
);
|
|
1064
|
+
export const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261030_ETH = () => createTenorSiUSDUsdcEthMarket(
|
|
1065
|
+
MorphoMidnightVersions.MorphoMidnightTenorSiUSDUSDC_20261030_Eth,
|
|
1066
|
+
'tenor-siusd-usdc-20261030',
|
|
1067
|
+
1793372400, // 2026-10-30T15:00:00Z
|
|
1068
|
+
'0x64985d39a1bae43d2741e7900cd42a2456dbacaee10e73f937abb1c9885d79da',
|
|
1069
|
+
);
|
|
1070
|
+
export const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261127_ETH = () => createTenorSiUSDUsdcEthMarket(
|
|
1071
|
+
MorphoMidnightVersions.MorphoMidnightTenorSiUSDUSDC_20261127_Eth,
|
|
1072
|
+
'tenor-siusd-usdc-20261127',
|
|
1073
|
+
1795791600, // 2026-11-27T15:00:00Z
|
|
1074
|
+
'0xed33721166c3f28bc834ce34135cf19b407056275eedf5faf662ccc7a821b7eb',
|
|
1075
|
+
);
|
|
1076
|
+
export const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261225_ETH = () => createTenorSiUSDUsdcEthMarket(
|
|
1077
|
+
MorphoMidnightVersions.MorphoMidnightTenorSiUSDUSDC_20261225_Eth,
|
|
1078
|
+
'tenor-siusd-usdc-20261225',
|
|
1079
|
+
1798210800, // 2026-12-25T15:00:00Z
|
|
1080
|
+
'0xe47e71bd0faf8383881b81b7d781ab93bf7bd4d4dc44c9c40add360841e5b26d',
|
|
1081
|
+
);
|
|
1082
|
+
|
|
1083
|
+
const createTenorStrUSDUsdcEthMarket = (
|
|
1084
|
+
value: MorphoMidnightVersions,
|
|
1085
|
+
url: string,
|
|
1086
|
+
maturity: number,
|
|
1087
|
+
marketId: string,
|
|
1088
|
+
): MorphoMidnightMarketData => ({
|
|
1089
|
+
chainIds: [NetworkNumber.Eth],
|
|
1090
|
+
label: 'Tenor strUSD/USDC',
|
|
1091
|
+
shortLabel: 'Tenor strUSD/USDC',
|
|
1092
|
+
url,
|
|
1093
|
+
value,
|
|
1094
|
+
midnight: MIDNIGHT_ETH,
|
|
1095
|
+
loanToken: USDC_ETH,
|
|
1096
|
+
collaterals: [{
|
|
1097
|
+
token: STRUSD_ETH,
|
|
1098
|
+
lltv: 0.86,
|
|
1099
|
+
liquidationCursor: '300000000000000000',
|
|
1100
|
+
oracle: '0x1506c98cE61aC63c8438B710C054a51c5dD9A6A4',
|
|
1101
|
+
}, {
|
|
1102
|
+
token: TENOR_STRUSD_USDC_VAULT_ETH,
|
|
1103
|
+
lltv: 0.98,
|
|
1104
|
+
liquidationCursor: '300000000000000000',
|
|
1105
|
+
oracle: '0x361904890a43d4af2D1b8cF642A6C5e661Da5641',
|
|
1106
|
+
hidden: true,
|
|
1107
|
+
}],
|
|
1108
|
+
maturity,
|
|
1109
|
+
rcfThreshold: '300000000000',
|
|
1110
|
+
enterGate: ZERO_ADDRESS,
|
|
1111
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
1112
|
+
marketId,
|
|
1113
|
+
protocolName: 'morpho-midnight',
|
|
1114
|
+
curator: 'Tenor',
|
|
1115
|
+
});
|
|
1116
|
+
|
|
1117
|
+
export const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20260925_ETH = () => createTenorStrUSDUsdcEthMarket(
|
|
1118
|
+
MorphoMidnightVersions.MorphoMidnightTenorStrUSDUSDC_20260925_Eth,
|
|
1119
|
+
'tenor-strusd-usdc-20260925',
|
|
1120
|
+
1790348400, // 2026-09-25T15:00:00Z
|
|
1121
|
+
'0xa46399e45fe90b7d3c0488c4c73e9b361f758c4481734832a43d764ccdde0c64',
|
|
1122
|
+
);
|
|
1123
|
+
export const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261030_ETH = () => createTenorStrUSDUsdcEthMarket(
|
|
1124
|
+
MorphoMidnightVersions.MorphoMidnightTenorStrUSDUSDC_20261030_Eth,
|
|
1125
|
+
'tenor-strusd-usdc-20261030',
|
|
1126
|
+
1793372400, // 2026-10-30T15:00:00Z
|
|
1127
|
+
'0xe473f755d4bd358a676d9385036d8a9e28b64aac250d0959d56d935bed80d675',
|
|
1128
|
+
);
|
|
1129
|
+
export const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261127_ETH = () => createTenorStrUSDUsdcEthMarket(
|
|
1130
|
+
MorphoMidnightVersions.MorphoMidnightTenorStrUSDUSDC_20261127_Eth,
|
|
1131
|
+
'tenor-strusd-usdc-20261127',
|
|
1132
|
+
1795791600, // 2026-11-27T15:00:00Z
|
|
1133
|
+
'0x41d4f364feb13ead0b892b252eeb3636969de96a5be843400c86835aa98b1d67',
|
|
1134
|
+
);
|
|
1135
|
+
export const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261225_ETH = () => createTenorStrUSDUsdcEthMarket(
|
|
1136
|
+
MorphoMidnightVersions.MorphoMidnightTenorStrUSDUSDC_20261225_Eth,
|
|
1137
|
+
'tenor-strusd-usdc-20261225',
|
|
1138
|
+
1798210800, // 2026-12-25T15:00:00Z
|
|
1139
|
+
'0x91e872193d98f3452424b5dd05e15ac291ed38236af5ff9ff02371bb8efbedb7',
|
|
1140
|
+
);
|
|
1141
|
+
|
|
1142
|
+
const createTenorUSD3UsdcEthMarket = (
|
|
1143
|
+
value: MorphoMidnightVersions,
|
|
1144
|
+
url: string,
|
|
1145
|
+
maturity: number,
|
|
1146
|
+
marketId: string,
|
|
1147
|
+
): MorphoMidnightMarketData => ({
|
|
1148
|
+
chainIds: [NetworkNumber.Eth],
|
|
1149
|
+
label: 'Tenor USD3/USDC',
|
|
1150
|
+
shortLabel: 'Tenor USD3/USDC',
|
|
1151
|
+
url,
|
|
1152
|
+
value,
|
|
1153
|
+
midnight: MIDNIGHT_ETH,
|
|
1154
|
+
loanToken: USDC_ETH,
|
|
1155
|
+
collaterals: [{
|
|
1156
|
+
token: USD3_ETH,
|
|
1157
|
+
lltv: 0.915,
|
|
1158
|
+
liquidationCursor: '300000000000000000',
|
|
1159
|
+
oracle: '0x68b4c2B2b2e245AB54a3bD55DfD5A9d84f029C06',
|
|
1160
|
+
}, {
|
|
1161
|
+
token: TENOR_USD3_USDC_VAULT_ETH,
|
|
1162
|
+
lltv: 0.98,
|
|
1163
|
+
liquidationCursor: '300000000000000000',
|
|
1164
|
+
oracle: '0x2C198EC459e0a035078565dEdc3c206604b57d4D',
|
|
1165
|
+
hidden: true,
|
|
1166
|
+
}],
|
|
1167
|
+
maturity,
|
|
1168
|
+
rcfThreshold: '500000000000',
|
|
1169
|
+
enterGate: ZERO_ADDRESS,
|
|
1170
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
1171
|
+
marketId,
|
|
1172
|
+
protocolName: 'morpho-midnight',
|
|
1173
|
+
curator: 'Tenor',
|
|
1174
|
+
});
|
|
1175
|
+
|
|
1176
|
+
export const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20260925_ETH = () => createTenorUSD3UsdcEthMarket(
|
|
1177
|
+
MorphoMidnightVersions.MorphoMidnightTenorUSD3USDC_20260925_Eth,
|
|
1178
|
+
'tenor-usd3-usdc-20260925',
|
|
1179
|
+
1790348400, // 2026-09-25T15:00:00Z
|
|
1180
|
+
'0x1edea0a3875af341ea885fc7eac7e02bfce90c534a1602dbd40fefccfe4c24d4',
|
|
1181
|
+
);
|
|
1182
|
+
export const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261030_ETH = () => createTenorUSD3UsdcEthMarket(
|
|
1183
|
+
MorphoMidnightVersions.MorphoMidnightTenorUSD3USDC_20261030_Eth,
|
|
1184
|
+
'tenor-usd3-usdc-20261030',
|
|
1185
|
+
1793372400, // 2026-10-30T15:00:00Z
|
|
1186
|
+
'0x11c6795118a68a7bf5d8995240614454291a698ac387aa6c0e23db46ec5112ed',
|
|
1187
|
+
);
|
|
1188
|
+
export const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261127_ETH = () => createTenorUSD3UsdcEthMarket(
|
|
1189
|
+
MorphoMidnightVersions.MorphoMidnightTenorUSD3USDC_20261127_Eth,
|
|
1190
|
+
'tenor-usd3-usdc-20261127',
|
|
1191
|
+
1795791600, // 2026-11-27T15:00:00Z
|
|
1192
|
+
'0x72ee2771278a1d78e7970a60dc1723c95e16a4384893b044cdbd707347f1abf6',
|
|
1193
|
+
);
|
|
1194
|
+
export const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261225_ETH = () => createTenorUSD3UsdcEthMarket(
|
|
1195
|
+
MorphoMidnightVersions.MorphoMidnightTenorUSD3USDC_20261225_Eth,
|
|
1196
|
+
'tenor-usd3-usdc-20261225',
|
|
1197
|
+
1798210800, // 2026-12-25T15:00:00Z
|
|
1198
|
+
'0x2a6b8c5d4fc953e0f747590267d7b4018f35246ba0fdbf8adbc269a2491bdde1',
|
|
1199
|
+
);
|
|
1200
|
+
|
|
1201
|
+
const createTenorWETHUsdcEthMarket = (
|
|
1202
|
+
value: MorphoMidnightVersions,
|
|
1203
|
+
url: string,
|
|
1204
|
+
maturity: number,
|
|
1205
|
+
marketId: string,
|
|
1206
|
+
): MorphoMidnightMarketData => ({
|
|
1207
|
+
chainIds: [NetworkNumber.Eth],
|
|
1208
|
+
label: 'Tenor WETH/USDC',
|
|
1209
|
+
shortLabel: 'Tenor WETH/USDC',
|
|
1210
|
+
url,
|
|
1211
|
+
value,
|
|
1212
|
+
midnight: MIDNIGHT_ETH,
|
|
1213
|
+
loanToken: USDC_ETH,
|
|
1214
|
+
collaterals: [{
|
|
1215
|
+
token: TENOR_WETH_USDC_VAULT_ETH,
|
|
1216
|
+
lltv: 0.98,
|
|
1217
|
+
liquidationCursor: '300000000000000000',
|
|
1218
|
+
oracle: '0x5c4fd2864C21F0b81730B4EC74030130aA2193Ca',
|
|
1219
|
+
hidden: true,
|
|
1220
|
+
}, {
|
|
1221
|
+
token: WETH_ETH,
|
|
1222
|
+
lltv: 0.86,
|
|
1223
|
+
liquidationCursor: '300000000000000000',
|
|
1224
|
+
oracle: '0x0F948CBa8231Db7898ef36A4212581Ad7b1B4580',
|
|
1225
|
+
}],
|
|
1226
|
+
maturity,
|
|
1227
|
+
rcfThreshold: '300000000000',
|
|
1228
|
+
enterGate: ZERO_ADDRESS,
|
|
1229
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
1230
|
+
marketId,
|
|
1231
|
+
protocolName: 'morpho-midnight',
|
|
1232
|
+
curator: 'Tenor',
|
|
1233
|
+
});
|
|
1234
|
+
|
|
1235
|
+
export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260925_ETH = () => createTenorWETHUsdcEthMarket(
|
|
1236
|
+
MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20260925_Eth,
|
|
1237
|
+
'tenor-weth-usdc-20260925',
|
|
1238
|
+
1790348400, // 2026-09-25T15:00:00Z
|
|
1239
|
+
'0x6a463fa464b97f7ba86516be7de82761bfa411522701ede713a269c2c385c70a',
|
|
1240
|
+
);
|
|
1241
|
+
export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261030_ETH = () => createTenorWETHUsdcEthMarket(
|
|
1242
|
+
MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261030_Eth,
|
|
1243
|
+
'tenor-weth-usdc-20261030',
|
|
1244
|
+
1793372400, // 2026-10-30T15:00:00Z
|
|
1245
|
+
'0xbd6a19559ca14acff13ac124ac0302c0ce6c41ff6a34841242752601e8b0e42c',
|
|
1246
|
+
);
|
|
1247
|
+
export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261127_ETH = () => createTenorWETHUsdcEthMarket(
|
|
1248
|
+
MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261127_Eth,
|
|
1249
|
+
'tenor-weth-usdc-20261127',
|
|
1250
|
+
1795791600, // 2026-11-27T15:00:00Z
|
|
1251
|
+
'0x348fb368e0f88eb63e739c6753bb0fbf306fb269a8dc0585542a6e4be5c63d6c',
|
|
1252
|
+
);
|
|
1253
|
+
export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261225_ETH = () => createTenorWETHUsdcEthMarket(
|
|
1254
|
+
MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261225_Eth,
|
|
1255
|
+
'tenor-weth-usdc-20261225',
|
|
1256
|
+
1798210800, // 2026-12-25T15:00:00Z
|
|
1257
|
+
'0xbe554be39e1df0ac1e8287d78ec8de26f0ea6197c6797bdeaed5350f45ae5b9f',
|
|
1258
|
+
);
|
|
1259
|
+
|
|
1260
|
+
const createTenorWsrUSDUsdcEthMarket = (
|
|
1261
|
+
value: MorphoMidnightVersions,
|
|
1262
|
+
url: string,
|
|
1263
|
+
maturity: number,
|
|
1264
|
+
marketId: string,
|
|
1265
|
+
): MorphoMidnightMarketData => ({
|
|
1266
|
+
chainIds: [NetworkNumber.Eth],
|
|
1267
|
+
label: 'Tenor wsrUSD/USDC',
|
|
1268
|
+
shortLabel: 'Tenor wsrUSD/USDC',
|
|
1269
|
+
url,
|
|
1270
|
+
value,
|
|
1271
|
+
midnight: MIDNIGHT_ETH,
|
|
1272
|
+
loanToken: USDC_ETH,
|
|
1273
|
+
collaterals: [{
|
|
1274
|
+
token: TENOR_WSRUSD_USDC_VAULT_ETH,
|
|
1275
|
+
lltv: 0.98,
|
|
1276
|
+
liquidationCursor: '300000000000000000',
|
|
1277
|
+
oracle: '0x7C997e4dddF1D4B7C0D5f290B92d0909ba227c14',
|
|
1278
|
+
hidden: true,
|
|
1279
|
+
}, {
|
|
1280
|
+
token: WSRUSD_ETH,
|
|
1281
|
+
lltv: 0.945,
|
|
1282
|
+
liquidationCursor: '300000000000000000',
|
|
1283
|
+
oracle: '0x938D2eDb20425cF80F008E7ec314Eb456940Da15',
|
|
1284
|
+
}],
|
|
1285
|
+
maturity,
|
|
1286
|
+
rcfThreshold: '700000000000',
|
|
1287
|
+
enterGate: ZERO_ADDRESS,
|
|
1288
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
1289
|
+
marketId,
|
|
1290
|
+
protocolName: 'morpho-midnight',
|
|
1291
|
+
curator: 'Tenor',
|
|
1292
|
+
});
|
|
1293
|
+
|
|
1294
|
+
export const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20260925_ETH = () => createTenorWsrUSDUsdcEthMarket(
|
|
1295
|
+
MorphoMidnightVersions.MorphoMidnightTenorWsrUSDUSDC_20260925_Eth,
|
|
1296
|
+
'tenor-wsrusd-usdc-20260925',
|
|
1297
|
+
1790348400, // 2026-09-25T15:00:00Z
|
|
1298
|
+
'0xc028a0b50ba0c606fbf83e5620018f23019b1fb5d1d15b4a5a0d17cc72edcfeb',
|
|
1299
|
+
);
|
|
1300
|
+
export const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261030_ETH = () => createTenorWsrUSDUsdcEthMarket(
|
|
1301
|
+
MorphoMidnightVersions.MorphoMidnightTenorWsrUSDUSDC_20261030_Eth,
|
|
1302
|
+
'tenor-wsrusd-usdc-20261030',
|
|
1303
|
+
1793372400, // 2026-10-30T15:00:00Z
|
|
1304
|
+
'0xc6079abce78d158671adedd6778c55edb786f4e4bc7097a59e7fb56e9ddda1b9',
|
|
1305
|
+
);
|
|
1306
|
+
export const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261127_ETH = () => createTenorWsrUSDUsdcEthMarket(
|
|
1307
|
+
MorphoMidnightVersions.MorphoMidnightTenorWsrUSDUSDC_20261127_Eth,
|
|
1308
|
+
'tenor-wsrusd-usdc-20261127',
|
|
1309
|
+
1795791600, // 2026-11-27T15:00:00Z
|
|
1310
|
+
'0x8d4dafdceb706a31e06fba2946e5e12ac9656f98ba430eeb695b553333d78640',
|
|
1311
|
+
);
|
|
1312
|
+
export const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261225_ETH = () => createTenorWsrUSDUsdcEthMarket(
|
|
1313
|
+
MorphoMidnightVersions.MorphoMidnightTenorWsrUSDUSDC_20261225_Eth,
|
|
1314
|
+
'tenor-wsrusd-usdc-20261225',
|
|
1315
|
+
1798210800, // 2026-12-25T15:00:00Z
|
|
1316
|
+
'0x02763ffcac291ea4b16ed0b3e3e524ee9aa07248a6e4ea6613e3724b54cce116',
|
|
1317
|
+
);
|
|
1318
|
+
|
|
1319
|
+
const createTenorWstETHWethEthMarket = (
|
|
1320
|
+
value: MorphoMidnightVersions,
|
|
1321
|
+
url: string,
|
|
1322
|
+
maturity: number,
|
|
1323
|
+
marketId: string,
|
|
1324
|
+
): MorphoMidnightMarketData => ({
|
|
1325
|
+
chainIds: [NetworkNumber.Eth],
|
|
1326
|
+
label: 'Tenor wstETH/WETH',
|
|
1327
|
+
shortLabel: 'Tenor wstETH/WETH',
|
|
1328
|
+
url,
|
|
1329
|
+
value,
|
|
1330
|
+
midnight: MIDNIGHT_ETH,
|
|
1331
|
+
loanToken: WETH_ETH,
|
|
1332
|
+
collaterals: [{
|
|
1333
|
+
token: WSTETH_ETH,
|
|
1334
|
+
lltv: 0.965,
|
|
1335
|
+
liquidationCursor: '300000000000000000',
|
|
1336
|
+
oracle: '0xbD60A6770b27E084E8617335ddE769241B0e71D8',
|
|
1337
|
+
}, {
|
|
1338
|
+
token: TENOR_WSTETH_WETH_VAULT_ETH,
|
|
1339
|
+
lltv: 0.98,
|
|
1340
|
+
liquidationCursor: '300000000000000000',
|
|
1341
|
+
oracle: '0x4eA702113EFAE91B906fC9eC1415dd7a9B860c89',
|
|
1342
|
+
hidden: true,
|
|
1343
|
+
}],
|
|
1344
|
+
maturity,
|
|
1345
|
+
rcfThreshold: '600000000000000000000',
|
|
1346
|
+
enterGate: ZERO_ADDRESS,
|
|
1347
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
1348
|
+
marketId,
|
|
1349
|
+
protocolName: 'morpho-midnight',
|
|
1350
|
+
curator: 'Tenor',
|
|
1351
|
+
});
|
|
1352
|
+
|
|
1353
|
+
export const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20260925_ETH = () => createTenorWstETHWethEthMarket(
|
|
1354
|
+
MorphoMidnightVersions.MorphoMidnightTenorWstETHWETH_20260925_Eth,
|
|
1355
|
+
'tenor-wsteth-weth-20260925',
|
|
1356
|
+
1790348400, // 2026-09-25T15:00:00Z
|
|
1357
|
+
'0x9ac6a639ace1c291b68b212eb1a95fd080332793f7bfc7dbed58b92bc518ca70',
|
|
1358
|
+
);
|
|
1359
|
+
export const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261030_ETH = () => createTenorWstETHWethEthMarket(
|
|
1360
|
+
MorphoMidnightVersions.MorphoMidnightTenorWstETHWETH_20261030_Eth,
|
|
1361
|
+
'tenor-wsteth-weth-20261030',
|
|
1362
|
+
1793372400, // 2026-10-30T15:00:00Z
|
|
1363
|
+
'0xf032c0184869e9b856b20cdcc298a1ebbec2cd4ee86e6189ff94852fa368a1b3',
|
|
1364
|
+
);
|
|
1365
|
+
export const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261127_ETH = () => createTenorWstETHWethEthMarket(
|
|
1366
|
+
MorphoMidnightVersions.MorphoMidnightTenorWstETHWETH_20261127_Eth,
|
|
1367
|
+
'tenor-wsteth-weth-20261127',
|
|
1368
|
+
1795791600, // 2026-11-27T15:00:00Z
|
|
1369
|
+
'0x0cc2301b2247d109d5a05d7a95012077cbdf9908f9f72f315de601c1f7b438f9',
|
|
1370
|
+
);
|
|
1371
|
+
export const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261225_ETH = () => createTenorWstETHWethEthMarket(
|
|
1372
|
+
MorphoMidnightVersions.MorphoMidnightTenorWstETHWETH_20261225_Eth,
|
|
1373
|
+
'tenor-wsteth-weth-20261225',
|
|
1374
|
+
1798210800, // 2026-12-25T15:00:00Z
|
|
1375
|
+
'0x646f7959780a1555f7696aad335a197fe45710f73f0bcf70f26712923249af4b',
|
|
1376
|
+
);
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* Collaterals we deliberately do not list. Their markets are defined and verified above — they are real
|
|
1380
|
+
* markets — but withheld from the map below, so nothing in the app offers, prices or routes to them.
|
|
1381
|
+
*/
|
|
1382
|
+
const EXCLUDED_COLLATERALS: string[] = [STRUSD_ETH, WSRUSD_ETH, REUSD_ETH, SIUSD_ETH, USD3_ETH];
|
|
1383
|
+
|
|
1384
|
+
const isExcludedMarket = (market: MorphoMidnightMarketData): boolean => market.collaterals.some(
|
|
1385
|
+
(collateral) => !collateral.hidden
|
|
1386
|
+
&& EXCLUDED_COLLATERALS.some((token) => token.toLowerCase() === collateral.token.toLowerCase()),
|
|
1387
|
+
);
|
|
1388
|
+
|
|
1389
|
+
const allMorphoMidnightMarkets = (networkId: NetworkNumber) => ({
|
|
782
1390
|
// BASE — Morpho-curated
|
|
783
1391
|
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260731_Base]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20260731(networkId),
|
|
784
1392
|
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260828_Base]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20260828(networkId),
|
|
@@ -813,9 +1421,60 @@ export const MorphoMidnightMarkets = (networkId: NetworkNumber) => ({
|
|
|
813
1421
|
[MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20261127_Base]: MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261127(),
|
|
814
1422
|
[MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20261225_Base]: MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261225(),
|
|
815
1423
|
[MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20270129_Base]: MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20270129(),
|
|
1424
|
+
// ETHEREUM — Morpho-curated
|
|
1425
|
+
[MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20260925_Eth]: MORPHO_MIDNIGHT_WBTC_USDC_860_20260925_ETH(),
|
|
1426
|
+
[MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20261030_Eth]: MORPHO_MIDNIGHT_WBTC_USDC_860_20261030_ETH(),
|
|
1427
|
+
[MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20261127_Eth]: MORPHO_MIDNIGHT_WBTC_USDC_860_20261127_ETH(),
|
|
1428
|
+
[MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20261225_Eth]: MORPHO_MIDNIGHT_WBTC_USDC_860_20261225_ETH(),
|
|
1429
|
+
[MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20270129_Eth]: MORPHO_MIDNIGHT_WBTC_USDC_860_20270129_ETH(),
|
|
1430
|
+
[MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20270226_Eth]: MORPHO_MIDNIGHT_WBTC_USDC_860_20270226_ETH(),
|
|
1431
|
+
[MorphoMidnightVersions.MorphoMidnightWBTCUSDC_860_20270326_Eth]: MORPHO_MIDNIGHT_WBTC_USDC_860_20270326_ETH(),
|
|
1432
|
+
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260925_Eth]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20260925_ETH(),
|
|
1433
|
+
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261030_Eth]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20261030_ETH(),
|
|
1434
|
+
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261127_Eth]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20261127_ETH(),
|
|
1435
|
+
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261225_Eth]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20261225_ETH(),
|
|
1436
|
+
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20270129_Eth]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20270129_ETH(),
|
|
1437
|
+
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20270226_Eth]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20270226_ETH(),
|
|
1438
|
+
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20270326_Eth]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20270326_ETH(),
|
|
1439
|
+
// ETHEREUM — Tenor-curated
|
|
1440
|
+
[MorphoMidnightVersions.MorphoMidnightTenorReUSDUSDC_20260925_Eth]: MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20260925_ETH(),
|
|
1441
|
+
[MorphoMidnightVersions.MorphoMidnightTenorReUSDUSDC_20261030_Eth]: MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261030_ETH(),
|
|
1442
|
+
[MorphoMidnightVersions.MorphoMidnightTenorReUSDUSDC_20261127_Eth]: MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261127_ETH(),
|
|
1443
|
+
[MorphoMidnightVersions.MorphoMidnightTenorReUSDUSDC_20261225_Eth]: MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261225_ETH(),
|
|
1444
|
+
[MorphoMidnightVersions.MorphoMidnightTenorSiUSDUSDC_20260925_Eth]: MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20260925_ETH(),
|
|
1445
|
+
[MorphoMidnightVersions.MorphoMidnightTenorSiUSDUSDC_20261030_Eth]: MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261030_ETH(),
|
|
1446
|
+
[MorphoMidnightVersions.MorphoMidnightTenorSiUSDUSDC_20261127_Eth]: MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261127_ETH(),
|
|
1447
|
+
[MorphoMidnightVersions.MorphoMidnightTenorSiUSDUSDC_20261225_Eth]: MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261225_ETH(),
|
|
1448
|
+
[MorphoMidnightVersions.MorphoMidnightTenorStrUSDUSDC_20260925_Eth]: MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20260925_ETH(),
|
|
1449
|
+
[MorphoMidnightVersions.MorphoMidnightTenorStrUSDUSDC_20261030_Eth]: MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261030_ETH(),
|
|
1450
|
+
[MorphoMidnightVersions.MorphoMidnightTenorStrUSDUSDC_20261127_Eth]: MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261127_ETH(),
|
|
1451
|
+
[MorphoMidnightVersions.MorphoMidnightTenorStrUSDUSDC_20261225_Eth]: MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261225_ETH(),
|
|
1452
|
+
[MorphoMidnightVersions.MorphoMidnightTenorUSD3USDC_20260925_Eth]: MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20260925_ETH(),
|
|
1453
|
+
[MorphoMidnightVersions.MorphoMidnightTenorUSD3USDC_20261030_Eth]: MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261030_ETH(),
|
|
1454
|
+
[MorphoMidnightVersions.MorphoMidnightTenorUSD3USDC_20261127_Eth]: MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261127_ETH(),
|
|
1455
|
+
[MorphoMidnightVersions.MorphoMidnightTenorUSD3USDC_20261225_Eth]: MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261225_ETH(),
|
|
1456
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20260925_Eth]: MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260925_ETH(),
|
|
1457
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261030_Eth]: MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261030_ETH(),
|
|
1458
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261127_Eth]: MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261127_ETH(),
|
|
1459
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261225_Eth]: MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261225_ETH(),
|
|
1460
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWsrUSDUSDC_20260925_Eth]: MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20260925_ETH(),
|
|
1461
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWsrUSDUSDC_20261030_Eth]: MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261030_ETH(),
|
|
1462
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWsrUSDUSDC_20261127_Eth]: MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261127_ETH(),
|
|
1463
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWsrUSDUSDC_20261225_Eth]: MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261225_ETH(),
|
|
1464
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWstETHWETH_20260925_Eth]: MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20260925_ETH(),
|
|
1465
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWstETHWETH_20261030_Eth]: MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261030_ETH(),
|
|
1466
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWstETHWETH_20261127_Eth]: MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261127_ETH(),
|
|
1467
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWstETHWETH_20261225_Eth]: MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261225_ETH(),
|
|
816
1468
|
}) as const;
|
|
817
1469
|
|
|
818
|
-
|
|
1470
|
+
export const MorphoMidnightMarkets = (networkId: NetworkNumber) => {
|
|
1471
|
+
const all = allMorphoMidnightMarkets(networkId);
|
|
1472
|
+
if (!EXCLUDED_COLLATERALS.length) return all;
|
|
1473
|
+
return Object.fromEntries(
|
|
1474
|
+
Object.entries(all).filter(([, market]) => !isExcludedMarket(market)),
|
|
1475
|
+
) as typeof all;
|
|
1476
|
+
};
|
|
1477
|
+
|
|
819
1478
|
const TENOR_MARKET_IDS = new Set(
|
|
820
1479
|
Object.values(MorphoMidnightMarkets(NetworkNumber.Base))
|
|
821
1480
|
.filter((market) => market.curator === 'Tenor')
|
|
@@ -828,16 +1487,20 @@ export const isTenorMidnightMarket = (market: Pick<MorphoMidnightMarketData, 'cu
|
|
|
828
1487
|
: market.curator === 'Tenor'
|
|
829
1488
|
);
|
|
830
1489
|
|
|
831
|
-
export const findMorphoMidnightMarket = (marketId: string, network
|
|
832
|
-
|
|
1490
|
+
export const findMorphoMidnightMarket = (marketId: string, network?: NetworkNumber): MorphoMidnightMarketData | undefined => (
|
|
1491
|
+
Object.values(MorphoMidnightMarkets(network ?? NetworkNumber.Base))
|
|
1492
|
+
.find((market) => market.marketId.toLowerCase() === marketId.toLowerCase()
|
|
1493
|
+
&& (network === undefined || market.chainIds.includes(network)))
|
|
833
1494
|
);
|
|
834
1495
|
|
|
835
|
-
/**
|
|
836
|
-
* The market's collateral set as the chain knows it: the listed collaterals followed by the curator's
|
|
837
|
-
* hidden ones. This — not `collaterals` — is what a `Market` struct takes, since the market id is the hash
|
|
838
|
-
* of that struct. Anything assembling one for a contract call goes through here so it can't quietly build
|
|
839
|
-
* a market of its own instead.
|
|
840
|
-
*/
|
|
841
1496
|
export const morphoMidnightMarketCollateralParams = (
|
|
842
|
-
market: Pick<MorphoMidnightMarketData, 'collaterals'
|
|
843
|
-
): MorphoMidnightCollateralParams[] =>
|
|
1497
|
+
market: Pick<MorphoMidnightMarketData, 'collaterals'>,
|
|
1498
|
+
): MorphoMidnightCollateralParams[] => market.collaterals.map(({
|
|
1499
|
+
token, lltv, liquidationCursor, oracle,
|
|
1500
|
+
}) => ({
|
|
1501
|
+
token, lltv, liquidationCursor, oracle,
|
|
1502
|
+
}));
|
|
1503
|
+
|
|
1504
|
+
export const morphoMidnightVisibleCollaterals = (
|
|
1505
|
+
market: Pick<MorphoMidnightMarketData, 'collaterals'>,
|
|
1506
|
+
): MorphoMidnightCollateralParams[] => market.collaterals.filter((collateral) => !collateral.hidden);
|