@defisaver/positions-sdk 2.1.151-midnight-2-dev → 2.1.151
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 +1 -0
- package/cjs/config/contracts.d.ts +0 -4
- package/cjs/config/contracts.js +0 -4
- package/cjs/helpers/morphoMidnightHelpers/tenor.d.ts +2 -6
- package/cjs/helpers/morphoMidnightHelpers/tenor.js +1 -5
- package/cjs/markets/aaveV4/index.d.ts +2 -0
- package/cjs/markets/aaveV4/index.js +13 -1
- package/cjs/markets/index.d.ts +1 -1
- package/cjs/markets/index.js +1 -2
- package/cjs/markets/morphoMidnight/index.d.ts +10 -92
- package/cjs/markets/morphoMidnight/index.js +60 -519
- package/cjs/morphoMidnight/index.js +1 -11
- package/cjs/types/aaveV4.d.ts +1 -0
- package/cjs/types/aaveV4.js +1 -0
- package/cjs/types/morphoMidnight.d.ts +4 -57
- package/cjs/types/morphoMidnight.js +0 -45
- package/esm/claiming/compV3.js +1 -0
- package/esm/config/contracts.d.ts +0 -4
- package/esm/config/contracts.js +0 -4
- package/esm/helpers/morphoMidnightHelpers/tenor.d.ts +2 -6
- package/esm/helpers/morphoMidnightHelpers/tenor.js +2 -6
- package/esm/markets/aaveV4/index.d.ts +2 -0
- package/esm/markets/aaveV4/index.js +11 -0
- package/esm/markets/index.d.ts +1 -1
- package/esm/markets/index.js +1 -1
- package/esm/markets/morphoMidnight/index.d.ts +10 -92
- package/esm/markets/morphoMidnight/index.js +59 -473
- package/esm/morphoMidnight/index.js +1 -11
- package/esm/types/aaveV4.d.ts +1 -0
- package/esm/types/aaveV4.js +1 -0
- package/esm/types/morphoMidnight.d.ts +4 -57
- package/esm/types/morphoMidnight.js +0 -45
- package/package.json +2 -2
- package/src/claiming/compV3.ts +1 -0
- package/src/config/contracts.ts +0 -4
- package/src/helpers/morphoMidnightHelpers/tenor.ts +2 -6
- package/src/markets/aaveV4/index.ts +12 -0
- package/src/markets/index.ts +0 -1
- package/src/markets/morphoMidnight/index.ts +61 -724
- package/src/morphoMidnight/index.ts +1 -8
- package/src/types/aaveV4.ts +1 -0
- package/src/types/morphoMidnight.ts +3 -59
|
@@ -4,34 +4,17 @@ import {
|
|
|
4
4
|
import { ZERO_ADDRESS } from '../../constants';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Morpho Midnight core contract
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* https://docs.morpho.org/get-started/resources/addresses/.
|
|
7
|
+
* Morpho Midnight core contract on Base. Every Midnight market trades against this one, whoever curates
|
|
8
|
+
* its order book — it is part of the market struct the id is hashed from, and it is what offer tuples
|
|
9
|
+
* encode for `Midnight.take`.
|
|
11
10
|
*/
|
|
12
11
|
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
|
-
);
|
|
18
12
|
|
|
19
13
|
const USDC_BASE = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' as const;
|
|
20
14
|
const WETH_BASE = '0x4200000000000000000000000000000000000006' as const;
|
|
21
15
|
const CBBTC_BASE = '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf' as const;
|
|
22
16
|
const CBETH_BASE = '0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22' as const;
|
|
23
17
|
|
|
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
|
-
|
|
35
18
|
// Tenor's ERC-4626 collateral vaults, one per pair and shared by that pair's whole maturity ladder. Each
|
|
36
19
|
// is a collateral of its markets on-chain without being an asset the app deals in — see the note above
|
|
37
20
|
// the Tenor markets below, and https://www.docs.tenor.finance/technical-docs/addresses/#vaults.
|
|
@@ -39,14 +22,6 @@ const TENOR_CBBTC_USDC_VAULT_BASE = '0xf6a70085b7f79FA76B04EbF7A2D7D87C3c5c04BC'
|
|
|
39
22
|
const TENOR_WETH_USDC_VAULT_BASE = '0xe690a58EF52854513462745237F6A213a0d54dF1' as const;
|
|
40
23
|
const TENOR_CBETH_WETH_VAULT_BASE = '0xFa750DD0099eAdB72d401244De73ce7B89edf90F' as const;
|
|
41
24
|
|
|
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
|
-
|
|
50
25
|
|
|
51
26
|
// Sourced from the official listing at https://markets.morpho.org/fixed/base
|
|
52
27
|
|
|
@@ -222,20 +197,19 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20270129 = (networkId = NetworkNumbe
|
|
|
222
197
|
// = Tenor's `fixedMarketIdentifier`; they come back `listed: false`, meaning Tenor — not Morpho — serves
|
|
223
198
|
// the book.
|
|
224
199
|
//
|
|
225
|
-
// Every market below is verified
|
|
226
|
-
//
|
|
227
|
-
//
|
|
228
|
-
//
|
|
229
|
-
//
|
|
230
|
-
//
|
|
231
|
-
// a position
|
|
200
|
+
// Every market below is verified against `MidnightView.toMarket(marketId)` on Base: core address,
|
|
201
|
+
// maturity, rcfThreshold, loan token, gates and collaterals all match. On-chain each market carries **two**
|
|
202
|
+
// collaterals — the pair's own token at index 0, and Tenor's ERC-4626 vault at index 1 (98% LLTV; the
|
|
203
|
+
// `metadata.vault` of the parent tenor market, listed at
|
|
204
|
+
// https://www.docs.tenor.finance/technical-docs/addresses/#vaults). The vault is not an asset the app
|
|
205
|
+
// deals in, so it is split out into `hiddenCollaterals` instead of `collaterals`: everything that renders
|
|
206
|
+
// or prices a position sees a single-collateral market, and because the vault stays the *suffix* of the
|
|
207
|
+
// set, the SDK's positional `prices[i]` / `collateral[i]` reads stay aligned with `collaterals`.
|
|
232
208
|
//
|
|
233
|
-
// It is only
|
|
234
|
-
//
|
|
235
|
-
//
|
|
236
|
-
//
|
|
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.
|
|
209
|
+
// It is only split out, never dropped: the market id is the hash of the full struct, so a `Market` handed
|
|
210
|
+
// to the core has to be `[...collaterals, ...hiddenCollaterals]` or the call addresses a market of its own
|
|
211
|
+
// making. The take path builds no struct — offer tuples carry the market's full collateral set straight
|
|
212
|
+
// from the router's offer JSON.
|
|
239
213
|
|
|
240
214
|
export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260827 = (networkId = NetworkNumber.Base): MorphoMidnightMarketData => ({
|
|
241
215
|
chainIds: [NetworkNumber.Base],
|
|
@@ -250,12 +224,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260827 = (networkId = Networ
|
|
|
250
224
|
lltv: 0.86,
|
|
251
225
|
liquidationCursor: '300000000000000000',
|
|
252
226
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
253
|
-
},
|
|
227
|
+
}],
|
|
228
|
+
hiddenCollaterals: [{
|
|
254
229
|
token: TENOR_CBBTC_USDC_VAULT_BASE,
|
|
255
230
|
lltv: 0.98,
|
|
256
231
|
liquidationCursor: '300000000000000000',
|
|
257
232
|
oracle: '0x4a24e4bf269cE26aAD2dF00437e7730d25FCdE26',
|
|
258
|
-
hidden: true,
|
|
259
233
|
}],
|
|
260
234
|
maturity: 1787788800, // 2026-08-27T00:00:00Z
|
|
261
235
|
rcfThreshold: '3000000000',
|
|
@@ -279,12 +253,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260924 = (networkId = Networ
|
|
|
279
253
|
lltv: 0.86,
|
|
280
254
|
liquidationCursor: '300000000000000000',
|
|
281
255
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
282
|
-
},
|
|
256
|
+
}],
|
|
257
|
+
hiddenCollaterals: [{
|
|
283
258
|
token: TENOR_CBBTC_USDC_VAULT_BASE,
|
|
284
259
|
lltv: 0.98,
|
|
285
260
|
liquidationCursor: '300000000000000000',
|
|
286
261
|
oracle: '0x4a24e4bf269cE26aAD2dF00437e7730d25FCdE26',
|
|
287
|
-
hidden: true,
|
|
288
262
|
}],
|
|
289
263
|
maturity: 1790208000, // 2026-09-24T00:00:00Z
|
|
290
264
|
rcfThreshold: '3000000000',
|
|
@@ -308,12 +282,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261022 = (networkId = Networ
|
|
|
308
282
|
lltv: 0.86,
|
|
309
283
|
liquidationCursor: '300000000000000000',
|
|
310
284
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
311
|
-
},
|
|
285
|
+
}],
|
|
286
|
+
hiddenCollaterals: [{
|
|
312
287
|
token: TENOR_CBBTC_USDC_VAULT_BASE,
|
|
313
288
|
lltv: 0.98,
|
|
314
289
|
liquidationCursor: '300000000000000000',
|
|
315
290
|
oracle: '0x4a24e4bf269cE26aAD2dF00437e7730d25FCdE26',
|
|
316
|
-
hidden: true,
|
|
317
291
|
}],
|
|
318
292
|
maturity: 1792627200, // 2026-10-22T00:00:00Z
|
|
319
293
|
rcfThreshold: '3000000000',
|
|
@@ -337,12 +311,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261119 = (networkId = Networ
|
|
|
337
311
|
lltv: 0.86,
|
|
338
312
|
liquidationCursor: '300000000000000000',
|
|
339
313
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
340
|
-
},
|
|
314
|
+
}],
|
|
315
|
+
hiddenCollaterals: [{
|
|
341
316
|
token: TENOR_CBBTC_USDC_VAULT_BASE,
|
|
342
317
|
lltv: 0.98,
|
|
343
318
|
liquidationCursor: '300000000000000000',
|
|
344
319
|
oracle: '0x4a24e4bf269cE26aAD2dF00437e7730d25FCdE26',
|
|
345
|
-
hidden: true,
|
|
346
320
|
}],
|
|
347
321
|
maturity: 1795046400, // 2026-11-19T00:00:00Z
|
|
348
322
|
rcfThreshold: '3000000000',
|
|
@@ -366,12 +340,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261217 = (networkId = Networ
|
|
|
366
340
|
lltv: 0.86,
|
|
367
341
|
liquidationCursor: '300000000000000000',
|
|
368
342
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
369
|
-
},
|
|
343
|
+
}],
|
|
344
|
+
hiddenCollaterals: [{
|
|
370
345
|
token: TENOR_CBBTC_USDC_VAULT_BASE,
|
|
371
346
|
lltv: 0.98,
|
|
372
347
|
liquidationCursor: '300000000000000000',
|
|
373
348
|
oracle: '0x4a24e4bf269cE26aAD2dF00437e7730d25FCdE26',
|
|
374
|
-
hidden: true,
|
|
375
349
|
}],
|
|
376
350
|
maturity: 1797465600, // 2026-12-17T00:00:00Z
|
|
377
351
|
rcfThreshold: '3000000000',
|
|
@@ -395,12 +369,12 @@ export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260827 = (networkId = Network
|
|
|
395
369
|
lltv: 0.86,
|
|
396
370
|
liquidationCursor: '300000000000000000',
|
|
397
371
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
398
|
-
},
|
|
372
|
+
}],
|
|
373
|
+
hiddenCollaterals: [{
|
|
399
374
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
400
375
|
lltv: 0.98,
|
|
401
376
|
liquidationCursor: '300000000000000000',
|
|
402
377
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
403
|
-
hidden: true,
|
|
404
378
|
}],
|
|
405
379
|
maturity: 1787788800,
|
|
406
380
|
rcfThreshold: '3000000000',
|
|
@@ -424,12 +398,12 @@ export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260924 = (networkId = Network
|
|
|
424
398
|
lltv: 0.86,
|
|
425
399
|
liquidationCursor: '300000000000000000',
|
|
426
400
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
427
|
-
},
|
|
401
|
+
}],
|
|
402
|
+
hiddenCollaterals: [{
|
|
428
403
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
429
404
|
lltv: 0.98,
|
|
430
405
|
liquidationCursor: '300000000000000000',
|
|
431
406
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
432
|
-
hidden: true,
|
|
433
407
|
}],
|
|
434
408
|
maturity: 1790208000,
|
|
435
409
|
rcfThreshold: '3000000000',
|
|
@@ -453,12 +427,12 @@ export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261022 = (networkId = Network
|
|
|
453
427
|
lltv: 0.86,
|
|
454
428
|
liquidationCursor: '300000000000000000',
|
|
455
429
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
456
|
-
},
|
|
430
|
+
}],
|
|
431
|
+
hiddenCollaterals: [{
|
|
457
432
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
458
433
|
lltv: 0.98,
|
|
459
434
|
liquidationCursor: '300000000000000000',
|
|
460
435
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
461
|
-
hidden: true,
|
|
462
436
|
}],
|
|
463
437
|
maturity: 1792627200,
|
|
464
438
|
rcfThreshold: '3000000000',
|
|
@@ -482,12 +456,12 @@ export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261119 = (networkId = Network
|
|
|
482
456
|
lltv: 0.86,
|
|
483
457
|
liquidationCursor: '300000000000000000',
|
|
484
458
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
485
|
-
},
|
|
459
|
+
}],
|
|
460
|
+
hiddenCollaterals: [{
|
|
486
461
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
487
462
|
lltv: 0.98,
|
|
488
463
|
liquidationCursor: '300000000000000000',
|
|
489
464
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
490
|
-
hidden: true,
|
|
491
465
|
}],
|
|
492
466
|
maturity: 1795046400,
|
|
493
467
|
rcfThreshold: '3000000000',
|
|
@@ -511,12 +485,12 @@ export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261217 = (networkId = Network
|
|
|
511
485
|
lltv: 0.86,
|
|
512
486
|
liquidationCursor: '300000000000000000',
|
|
513
487
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
514
|
-
},
|
|
488
|
+
}],
|
|
489
|
+
hiddenCollaterals: [{
|
|
515
490
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
516
491
|
lltv: 0.98,
|
|
517
492
|
liquidationCursor: '300000000000000000',
|
|
518
493
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
519
|
-
hidden: true,
|
|
520
494
|
}],
|
|
521
495
|
maturity: 1797465600,
|
|
522
496
|
rcfThreshold: '3000000000',
|
|
@@ -540,12 +514,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20260827 = (networkId = Networ
|
|
|
540
514
|
lltv: 0.945,
|
|
541
515
|
liquidationCursor: '300000000000000000',
|
|
542
516
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
543
|
-
},
|
|
517
|
+
}],
|
|
518
|
+
hiddenCollaterals: [{
|
|
544
519
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
545
520
|
lltv: 0.98,
|
|
546
521
|
liquidationCursor: '300000000000000000',
|
|
547
522
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
548
|
-
hidden: true,
|
|
549
523
|
}],
|
|
550
524
|
maturity: 1787788800,
|
|
551
525
|
rcfThreshold: '4000000000000000000',
|
|
@@ -569,12 +543,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20260924 = (networkId = Networ
|
|
|
569
543
|
lltv: 0.945,
|
|
570
544
|
liquidationCursor: '300000000000000000',
|
|
571
545
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
572
|
-
},
|
|
546
|
+
}],
|
|
547
|
+
hiddenCollaterals: [{
|
|
573
548
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
574
549
|
lltv: 0.98,
|
|
575
550
|
liquidationCursor: '300000000000000000',
|
|
576
551
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
577
|
-
hidden: true,
|
|
578
552
|
}],
|
|
579
553
|
maturity: 1790208000,
|
|
580
554
|
rcfThreshold: '4000000000000000000',
|
|
@@ -598,12 +572,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261022 = (networkId = Networ
|
|
|
598
572
|
lltv: 0.945,
|
|
599
573
|
liquidationCursor: '300000000000000000',
|
|
600
574
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
601
|
-
},
|
|
575
|
+
}],
|
|
576
|
+
hiddenCollaterals: [{
|
|
602
577
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
603
578
|
lltv: 0.98,
|
|
604
579
|
liquidationCursor: '300000000000000000',
|
|
605
580
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
606
|
-
hidden: true,
|
|
607
581
|
}],
|
|
608
582
|
maturity: 1792627200,
|
|
609
583
|
rcfThreshold: '4000000000000000000',
|
|
@@ -627,12 +601,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261119 = (networkId = Networ
|
|
|
627
601
|
lltv: 0.945,
|
|
628
602
|
liquidationCursor: '300000000000000000',
|
|
629
603
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
630
|
-
},
|
|
604
|
+
}],
|
|
605
|
+
hiddenCollaterals: [{
|
|
631
606
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
632
607
|
lltv: 0.98,
|
|
633
608
|
liquidationCursor: '300000000000000000',
|
|
634
609
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
635
|
-
hidden: true,
|
|
636
610
|
}],
|
|
637
611
|
maturity: 1795046400,
|
|
638
612
|
rcfThreshold: '4000000000000000000',
|
|
@@ -656,12 +630,12 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261217 = (networkId = Networ
|
|
|
656
630
|
lltv: 0.945,
|
|
657
631
|
liquidationCursor: '300000000000000000',
|
|
658
632
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
659
|
-
},
|
|
633
|
+
}],
|
|
634
|
+
hiddenCollaterals: [{
|
|
660
635
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
661
636
|
lltv: 0.98,
|
|
662
637
|
liquidationCursor: '300000000000000000',
|
|
663
638
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
664
|
-
hidden: true,
|
|
665
639
|
}],
|
|
666
640
|
maturity: 1797465600,
|
|
667
641
|
rcfThreshold: '4000000000000000000',
|
|
@@ -692,12 +666,12 @@ const createTenorWethUsdcRollingMarket = (
|
|
|
692
666
|
lltv: 0.86,
|
|
693
667
|
liquidationCursor: '300000000000000000',
|
|
694
668
|
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
695
|
-
},
|
|
669
|
+
}],
|
|
670
|
+
hiddenCollaterals: [{
|
|
696
671
|
token: TENOR_WETH_USDC_VAULT_BASE,
|
|
697
672
|
lltv: 0.98,
|
|
698
673
|
liquidationCursor: '300000000000000000',
|
|
699
674
|
oracle: '0x784519B1b59A1e1498f077066bB9336672bcc3EE',
|
|
700
|
-
hidden: true,
|
|
701
675
|
}],
|
|
702
676
|
maturity,
|
|
703
677
|
rcfThreshold: '3000000000',
|
|
@@ -726,12 +700,12 @@ const createTenorCbEthWethRollingMarket = (
|
|
|
726
700
|
lltv: 0.945,
|
|
727
701
|
liquidationCursor: '300000000000000000',
|
|
728
702
|
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
729
|
-
},
|
|
703
|
+
}],
|
|
704
|
+
hiddenCollaterals: [{
|
|
730
705
|
token: TENOR_CBETH_WETH_VAULT_BASE,
|
|
731
706
|
lltv: 0.98,
|
|
732
707
|
liquidationCursor: '300000000000000000',
|
|
733
708
|
oracle: '0xa02f629871be35d6db0F88C944cF955554Ec87c0',
|
|
734
|
-
hidden: true,
|
|
735
709
|
}],
|
|
736
710
|
maturity,
|
|
737
711
|
rcfThreshold: '4000000000000000000',
|
|
@@ -804,589 +778,7 @@ export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20270129 = () => createTenorCb
|
|
|
804
778
|
'0x3cfda244eeec7e5cda2a07ef23e2a5e3fe6ba17882417cafbf3f3c432377ff1d',
|
|
805
779
|
);
|
|
806
780
|
|
|
807
|
-
|
|
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) => ({
|
|
781
|
+
export const MorphoMidnightMarkets = (networkId: NetworkNumber) => ({
|
|
1390
782
|
// BASE — Morpho-curated
|
|
1391
783
|
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260731_Base]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20260731(networkId),
|
|
1392
784
|
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260828_Base]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20260828(networkId),
|
|
@@ -1421,60 +813,9 @@ const allMorphoMidnightMarkets = (networkId: NetworkNumber) => ({
|
|
|
1421
813
|
[MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20261127_Base]: MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261127(),
|
|
1422
814
|
[MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20261225_Base]: MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261225(),
|
|
1423
815
|
[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(),
|
|
1468
816
|
}) as const;
|
|
1469
817
|
|
|
1470
|
-
|
|
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
|
-
|
|
818
|
+
// Which markets Tenor's router quotes, by id, for the quote helpers that only receive one.
|
|
1478
819
|
const TENOR_MARKET_IDS = new Set(
|
|
1479
820
|
Object.values(MorphoMidnightMarkets(NetworkNumber.Base))
|
|
1480
821
|
.filter((market) => market.curator === 'Tenor')
|
|
@@ -1487,20 +828,16 @@ export const isTenorMidnightMarket = (market: Pick<MorphoMidnightMarketData, 'cu
|
|
|
1487
828
|
: market.curator === 'Tenor'
|
|
1488
829
|
);
|
|
1489
830
|
|
|
1490
|
-
export const findMorphoMidnightMarket = (marketId: string, network
|
|
1491
|
-
|
|
1492
|
-
.find((market) => market.marketId.toLowerCase() === marketId.toLowerCase()
|
|
1493
|
-
&& (network === undefined || market.chainIds.includes(network)))
|
|
831
|
+
export const findMorphoMidnightMarket = (marketId: string, network: NetworkNumber = NetworkNumber.Base): MorphoMidnightMarketData | undefined => Object.values(MorphoMidnightMarkets(network)).find(
|
|
832
|
+
(market) => market.marketId.toLowerCase() === marketId.toLowerCase(),
|
|
1494
833
|
);
|
|
1495
834
|
|
|
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
|
+
*/
|
|
1496
841
|
export const morphoMidnightMarketCollateralParams = (
|
|
1497
|
-
market: Pick<MorphoMidnightMarketData, 'collaterals'>,
|
|
1498
|
-
): MorphoMidnightCollateralParams[] => market.collaterals.
|
|
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);
|
|
842
|
+
market: Pick<MorphoMidnightMarketData, 'collaterals' | 'hiddenCollaterals'>,
|
|
843
|
+
): MorphoMidnightCollateralParams[] => [...market.collaterals, ...(market.hiddenCollaterals || [])];
|