@defisaver/positions-sdk 2.1.127-midnight-5-dev → 2.1.127-midnight-6-dev
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/constants/index.d.ts +1 -0
- package/cjs/constants/index.js +2 -1
- package/cjs/helpers/morphoMidnightHelpers/index.d.ts +8 -14
- package/cjs/helpers/morphoMidnightHelpers/index.js +50 -62
- package/cjs/helpers/morphoMidnightHelpers/rate.d.ts +11 -0
- package/cjs/helpers/morphoMidnightHelpers/rate.js +49 -0
- package/cjs/helpers/morphoMidnightHelpers/tenor.d.ts +125 -0
- package/cjs/helpers/morphoMidnightHelpers/tenor.js +256 -0
- package/cjs/markets/index.d.ts +1 -1
- package/cjs/markets/index.js +2 -1
- package/cjs/markets/morphoMidnight/index.d.ts +37 -0
- package/cjs/markets/morphoMidnight/index.js +434 -42
- package/cjs/types/morphoMidnight.d.ts +18 -1
- package/cjs/types/morphoMidnight.js +16 -0
- package/esm/constants/index.d.ts +1 -0
- package/esm/constants/index.js +1 -0
- package/esm/helpers/morphoMidnightHelpers/index.d.ts +8 -14
- package/esm/helpers/morphoMidnightHelpers/index.js +27 -45
- package/esm/helpers/morphoMidnightHelpers/rate.d.ts +11 -0
- package/esm/helpers/morphoMidnightHelpers/rate.js +38 -0
- package/esm/helpers/morphoMidnightHelpers/tenor.d.ts +125 -0
- package/esm/helpers/morphoMidnightHelpers/tenor.js +239 -0
- package/esm/markets/index.d.ts +1 -1
- package/esm/markets/index.js +1 -1
- package/esm/markets/morphoMidnight/index.d.ts +37 -0
- package/esm/markets/morphoMidnight/index.js +399 -23
- package/esm/types/morphoMidnight.d.ts +18 -1
- package/esm/types/morphoMidnight.js +16 -0
- package/package.json +1 -1
- package/src/constants/index.ts +1 -0
- package/src/helpers/morphoMidnightHelpers/index.ts +49 -45
- package/src/helpers/morphoMidnightHelpers/rate.ts +46 -0
- package/src/helpers/morphoMidnightHelpers/tenor.ts +411 -0
- package/src/markets/index.ts +1 -1
- package/src/markets/morphoMidnight/index.ts +424 -23
- package/src/types/morphoMidnight.ts +19 -0
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
import { MorphoMidnightMarketData, NetworkNumber } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Morpho Midnight core contract on Base. Every Midnight market trades against this one, whoever curates
|
|
4
|
+
* its order book — it is part of the market struct the id is hashed from, and it is what offer tuples
|
|
5
|
+
* encode for `Midnight.take`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const MIDNIGHT_BASE: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A";
|
|
2
8
|
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260731: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
3
9
|
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260828: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
4
10
|
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260925: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
5
11
|
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261030: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
6
12
|
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261127: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
7
13
|
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261225: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
14
|
+
export declare const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260827: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
15
|
+
export declare const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260924: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
16
|
+
export declare const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261022: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
17
|
+
export declare const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261119: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
18
|
+
export declare const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261217: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
19
|
+
export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260827: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
20
|
+
export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260924: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
21
|
+
export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261022: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
22
|
+
export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261119: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
23
|
+
export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261217: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
24
|
+
export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20260827: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
25
|
+
export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20260924: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
26
|
+
export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261022: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
27
|
+
export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261119: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
28
|
+
export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261217: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
8
29
|
export declare const MorphoMidnightMarkets: (networkId: NetworkNumber) => {
|
|
9
30
|
readonly morphomidnightcbbtcusdc_860_20260731_base: MorphoMidnightMarketData;
|
|
10
31
|
readonly morphomidnightcbbtcusdc_860_20260828_base: MorphoMidnightMarketData;
|
|
@@ -12,5 +33,21 @@ export declare const MorphoMidnightMarkets: (networkId: NetworkNumber) => {
|
|
|
12
33
|
readonly morphomidnightcbbtcusdc_860_20261030_base: MorphoMidnightMarketData;
|
|
13
34
|
readonly morphomidnightcbbtcusdc_860_20261127_base: MorphoMidnightMarketData;
|
|
14
35
|
readonly morphomidnightcbbtcusdc_860_20261225_base: MorphoMidnightMarketData;
|
|
36
|
+
readonly morphomidnighttenorcbbtcusdc_20260827_base: MorphoMidnightMarketData;
|
|
37
|
+
readonly morphomidnighttenorcbbtcusdc_20260924_base: MorphoMidnightMarketData;
|
|
38
|
+
readonly morphomidnighttenorcbbtcusdc_20261022_base: MorphoMidnightMarketData;
|
|
39
|
+
readonly morphomidnighttenorcbbtcusdc_20261119_base: MorphoMidnightMarketData;
|
|
40
|
+
readonly morphomidnighttenorcbbtcusdc_20261217_base: MorphoMidnightMarketData;
|
|
41
|
+
readonly morphomidnighttenorwethusdc_20260827_base: MorphoMidnightMarketData;
|
|
42
|
+
readonly morphomidnighttenorwethusdc_20260924_base: MorphoMidnightMarketData;
|
|
43
|
+
readonly morphomidnighttenorwethusdc_20261022_base: MorphoMidnightMarketData;
|
|
44
|
+
readonly morphomidnighttenorwethusdc_20261119_base: MorphoMidnightMarketData;
|
|
45
|
+
readonly morphomidnighttenorwethusdc_20261217_base: MorphoMidnightMarketData;
|
|
46
|
+
readonly morphomidnighttenorcbethweth_20260827_base: MorphoMidnightMarketData;
|
|
47
|
+
readonly morphomidnighttenorcbethweth_20260924_base: MorphoMidnightMarketData;
|
|
48
|
+
readonly morphomidnighttenorcbethweth_20261022_base: MorphoMidnightMarketData;
|
|
49
|
+
readonly morphomidnighttenorcbethweth_20261119_base: MorphoMidnightMarketData;
|
|
50
|
+
readonly morphomidnighttenorcbethweth_20261217_base: MorphoMidnightMarketData;
|
|
15
51
|
};
|
|
52
|
+
export declare const isTenorMidnightMarket: (market: Pick<MorphoMidnightMarketData, "curator"> | string) => boolean;
|
|
16
53
|
export declare const findMorphoMidnightMarket: (marketId: string, network?: NetworkNumber) => MorphoMidnightMarketData | undefined;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { MorphoMidnightVersions, NetworkNumber } from '../../types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { ZERO_ADDRESS } from '../../constants';
|
|
3
|
+
/**
|
|
4
|
+
* Morpho Midnight core contract on Base. Every Midnight market trades against this one, whoever curates
|
|
5
|
+
* its order book — it is part of the market struct the id is hashed from, and it is what offer tuples
|
|
6
|
+
* encode for `Midnight.take`.
|
|
7
|
+
*/
|
|
8
|
+
export const MIDNIGHT_BASE = '0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A';
|
|
9
|
+
const USDC_BASE = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913';
|
|
10
|
+
const WETH_BASE = '0x4200000000000000000000000000000000000006';
|
|
11
|
+
const CBBTC_BASE = '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf';
|
|
12
|
+
const CBETH_BASE = '0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22';
|
|
13
|
+
// Sourced from the official listing at https://markets.morpho.org/fixed/base
|
|
12
14
|
// BASE — USDC/cbBTC, 86% LLTV, monthly maturity ladder
|
|
13
15
|
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260731 = (networkId = NetworkNumber.Base) => ({
|
|
14
16
|
chainIds: [NetworkNumber.Base],
|
|
@@ -17,9 +19,9 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260731 = (networkId = NetworkNumbe
|
|
|
17
19
|
url: 'cbbtc-usdc-20260731',
|
|
18
20
|
value: MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260731_Base,
|
|
19
21
|
midnight: MIDNIGHT_BASE,
|
|
20
|
-
loanToken:
|
|
22
|
+
loanToken: USDC_BASE,
|
|
21
23
|
collaterals: [{
|
|
22
|
-
token:
|
|
24
|
+
token: CBBTC_BASE,
|
|
23
25
|
lltv: 0.86,
|
|
24
26
|
liquidationCursor: '300000000000000000',
|
|
25
27
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
@@ -30,6 +32,7 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260731 = (networkId = NetworkNumbe
|
|
|
30
32
|
liquidatorGate: ZERO_ADDRESS,
|
|
31
33
|
marketId: '0x168e31250e0008b50d2255a5ab85e0265acd6c12e4f9a1336134b36a65a47937',
|
|
32
34
|
protocolName: 'morpho-midnight',
|
|
35
|
+
curator: 'Morpho',
|
|
33
36
|
});
|
|
34
37
|
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260828 = (networkId = NetworkNumber.Base) => ({
|
|
35
38
|
chainIds: [NetworkNumber.Base],
|
|
@@ -38,9 +41,9 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260828 = (networkId = NetworkNumbe
|
|
|
38
41
|
url: 'cbbtc-usdc-20260828',
|
|
39
42
|
value: MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260828_Base,
|
|
40
43
|
midnight: MIDNIGHT_BASE,
|
|
41
|
-
loanToken:
|
|
44
|
+
loanToken: USDC_BASE,
|
|
42
45
|
collaterals: [{
|
|
43
|
-
token:
|
|
46
|
+
token: CBBTC_BASE,
|
|
44
47
|
lltv: 0.86,
|
|
45
48
|
liquidationCursor: '300000000000000000',
|
|
46
49
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
@@ -51,6 +54,7 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260828 = (networkId = NetworkNumbe
|
|
|
51
54
|
liquidatorGate: ZERO_ADDRESS,
|
|
52
55
|
marketId: '0x05959752fdeff325962b9d263edb421efc6e2186a49360dba6c32e86ebf6c84c',
|
|
53
56
|
protocolName: 'morpho-midnight',
|
|
57
|
+
curator: 'Morpho',
|
|
54
58
|
});
|
|
55
59
|
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260925 = (networkId = NetworkNumber.Base) => ({
|
|
56
60
|
chainIds: [NetworkNumber.Base],
|
|
@@ -59,9 +63,9 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260925 = (networkId = NetworkNumbe
|
|
|
59
63
|
url: 'cbbtc-usdc-20260925',
|
|
60
64
|
value: MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260925_Base,
|
|
61
65
|
midnight: MIDNIGHT_BASE,
|
|
62
|
-
loanToken:
|
|
66
|
+
loanToken: USDC_BASE,
|
|
63
67
|
collaterals: [{
|
|
64
|
-
token:
|
|
68
|
+
token: CBBTC_BASE,
|
|
65
69
|
lltv: 0.86,
|
|
66
70
|
liquidationCursor: '300000000000000000',
|
|
67
71
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
@@ -72,6 +76,7 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260925 = (networkId = NetworkNumbe
|
|
|
72
76
|
liquidatorGate: ZERO_ADDRESS,
|
|
73
77
|
marketId: '0x549cd072daf99328554f3a6d2d4d6f4a07f1c59369e891e6391946f9cf75f221',
|
|
74
78
|
protocolName: 'morpho-midnight',
|
|
79
|
+
curator: 'Morpho',
|
|
75
80
|
});
|
|
76
81
|
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261030 = (networkId = NetworkNumber.Base) => ({
|
|
77
82
|
chainIds: [NetworkNumber.Base],
|
|
@@ -80,9 +85,9 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261030 = (networkId = NetworkNumbe
|
|
|
80
85
|
url: 'cbbtc-usdc-20261030',
|
|
81
86
|
value: MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261030_Base,
|
|
82
87
|
midnight: MIDNIGHT_BASE,
|
|
83
|
-
loanToken:
|
|
88
|
+
loanToken: USDC_BASE,
|
|
84
89
|
collaterals: [{
|
|
85
|
-
token:
|
|
90
|
+
token: CBBTC_BASE,
|
|
86
91
|
lltv: 0.86,
|
|
87
92
|
liquidationCursor: '300000000000000000',
|
|
88
93
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
@@ -93,6 +98,7 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261030 = (networkId = NetworkNumbe
|
|
|
93
98
|
liquidatorGate: ZERO_ADDRESS,
|
|
94
99
|
marketId: '0x43d6120738c57b2bc5835901f8250fdf7fc8054efbb006c6ccba61ec898e5ed9',
|
|
95
100
|
protocolName: 'morpho-midnight',
|
|
101
|
+
curator: 'Morpho',
|
|
96
102
|
});
|
|
97
103
|
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261127 = (networkId = NetworkNumber.Base) => ({
|
|
98
104
|
chainIds: [NetworkNumber.Base],
|
|
@@ -101,9 +107,9 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261127 = (networkId = NetworkNumbe
|
|
|
101
107
|
url: 'cbbtc-usdc-20261127',
|
|
102
108
|
value: MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261127_Base,
|
|
103
109
|
midnight: MIDNIGHT_BASE,
|
|
104
|
-
loanToken:
|
|
110
|
+
loanToken: USDC_BASE,
|
|
105
111
|
collaterals: [{
|
|
106
|
-
token:
|
|
112
|
+
token: CBBTC_BASE,
|
|
107
113
|
lltv: 0.86,
|
|
108
114
|
liquidationCursor: '300000000000000000',
|
|
109
115
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
@@ -114,6 +120,7 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261127 = (networkId = NetworkNumbe
|
|
|
114
120
|
liquidatorGate: ZERO_ADDRESS,
|
|
115
121
|
marketId: '0xe1878eec035b601f301484e63a49a428f8e008e2bf57a2fd88a3fc3a4c1b1acd',
|
|
116
122
|
protocolName: 'morpho-midnight',
|
|
123
|
+
curator: 'Morpho',
|
|
117
124
|
});
|
|
118
125
|
export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261225 = (networkId = NetworkNumber.Base) => ({
|
|
119
126
|
chainIds: [NetworkNumber.Base],
|
|
@@ -122,9 +129,9 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261225 = (networkId = NetworkNumbe
|
|
|
122
129
|
url: 'cbbtc-usdc-20261225',
|
|
123
130
|
value: MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261225_Base,
|
|
124
131
|
midnight: MIDNIGHT_BASE,
|
|
125
|
-
loanToken:
|
|
132
|
+
loanToken: USDC_BASE,
|
|
126
133
|
collaterals: [{
|
|
127
|
-
token:
|
|
134
|
+
token: CBBTC_BASE,
|
|
128
135
|
lltv: 0.86,
|
|
129
136
|
liquidationCursor: '300000000000000000',
|
|
130
137
|
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
@@ -135,14 +142,383 @@ export const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261225 = (networkId = NetworkNumbe
|
|
|
135
142
|
liquidatorGate: ZERO_ADDRESS,
|
|
136
143
|
marketId: '0x9593c3a6dba45b6106af8dc8b45ba8c505d90d3d68a3d33f7c278dd921b637da',
|
|
137
144
|
protocolName: 'morpho-midnight',
|
|
145
|
+
curator: 'Morpho',
|
|
146
|
+
});
|
|
147
|
+
// ── Tenor-curated ────────────────────────────────────────────────────────────────────────────────
|
|
148
|
+
// Tenor Midnight markets are the same structs as Morpho's (`MorphoMidnightMarketData`), on the same core
|
|
149
|
+
// contract; only the order book differs. Identify them on Morpho's `/v0/midnight/markets` by `market_id`
|
|
150
|
+
// = Tenor's `fixedMarketIdentifier`; they come back `listed: false`, meaning Tenor — not Morpho — serves
|
|
151
|
+
// the book.
|
|
152
|
+
//
|
|
153
|
+
// Every market below is verified against `MidnightView.toMarket(marketId)` on Base: core address,
|
|
154
|
+
// maturity, rcfThreshold, loan token, gates and collaterals all match. On-chain each market carries **two**
|
|
155
|
+
// collaterals — the pair's own token at index 0, and Tenor's ERC-4626 vault at index 1 (98% LLTV; the
|
|
156
|
+
// `metadata.vault` of the parent tenor market, listed at
|
|
157
|
+
// https://www.docs.tenor.finance/technical-docs/addresses/#vaults). The vault is not an asset the app
|
|
158
|
+
// deals in, so these are modelled as single-collateral markets: the app supplies and prices index 0, and
|
|
159
|
+
// the SDK reads `prices[i]` / `collateral[i]` positionally, so listing the primary alone keeps those
|
|
160
|
+
// lookups aligned. The on-chain take path is unaffected — offer tuples carry the market's full collateral
|
|
161
|
+
// set straight from the router's offer JSON, which is what the market hash is built from.
|
|
162
|
+
export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260827 = (networkId = NetworkNumber.Base) => ({
|
|
163
|
+
chainIds: [NetworkNumber.Base],
|
|
164
|
+
label: 'Tenor cbBTC/USDC',
|
|
165
|
+
shortLabel: 'Tenor cbBTC/USDC',
|
|
166
|
+
url: 'tenor-cbbtc-usdc-20260827',
|
|
167
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorCbBTCUSDC_20260827_Base,
|
|
168
|
+
midnight: MIDNIGHT_BASE,
|
|
169
|
+
loanToken: USDC_BASE,
|
|
170
|
+
collaterals: [{
|
|
171
|
+
token: CBBTC_BASE,
|
|
172
|
+
lltv: 0.86,
|
|
173
|
+
liquidationCursor: '300000000000000000',
|
|
174
|
+
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
175
|
+
}],
|
|
176
|
+
maturity: 1787788800, // 2026-08-27T00:00:00Z
|
|
177
|
+
rcfThreshold: '3000000000',
|
|
178
|
+
enterGate: ZERO_ADDRESS,
|
|
179
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
180
|
+
marketId: '0x44495af1cca7842191a65a73978e01ed72238731e193c3b11460083efd60a318',
|
|
181
|
+
protocolName: 'morpho-midnight',
|
|
182
|
+
curator: 'Tenor',
|
|
183
|
+
});
|
|
184
|
+
export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260924 = (networkId = NetworkNumber.Base) => ({
|
|
185
|
+
chainIds: [NetworkNumber.Base],
|
|
186
|
+
label: 'Tenor cbBTC/USDC',
|
|
187
|
+
shortLabel: 'Tenor cbBTC/USDC',
|
|
188
|
+
url: 'tenor-cbbtc-usdc-20260924',
|
|
189
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorCbBTCUSDC_20260924_Base,
|
|
190
|
+
midnight: MIDNIGHT_BASE,
|
|
191
|
+
loanToken: USDC_BASE,
|
|
192
|
+
collaterals: [{
|
|
193
|
+
token: CBBTC_BASE,
|
|
194
|
+
lltv: 0.86,
|
|
195
|
+
liquidationCursor: '300000000000000000',
|
|
196
|
+
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
197
|
+
}],
|
|
198
|
+
maturity: 1790208000, // 2026-09-24T00:00:00Z
|
|
199
|
+
rcfThreshold: '3000000000',
|
|
200
|
+
enterGate: ZERO_ADDRESS,
|
|
201
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
202
|
+
marketId: '0x99fbed74bc7cef3c90d68709d8de8f820261a45875ca197a0e65338affd09481',
|
|
203
|
+
protocolName: 'morpho-midnight',
|
|
204
|
+
curator: 'Tenor',
|
|
205
|
+
});
|
|
206
|
+
export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261022 = (networkId = NetworkNumber.Base) => ({
|
|
207
|
+
chainIds: [NetworkNumber.Base],
|
|
208
|
+
label: 'Tenor cbBTC/USDC',
|
|
209
|
+
shortLabel: 'Tenor cbBTC/USDC',
|
|
210
|
+
url: 'tenor-cbbtc-usdc-20261022',
|
|
211
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorCbBTCUSDC_20261022_Base,
|
|
212
|
+
midnight: MIDNIGHT_BASE,
|
|
213
|
+
loanToken: USDC_BASE,
|
|
214
|
+
collaterals: [{
|
|
215
|
+
token: CBBTC_BASE,
|
|
216
|
+
lltv: 0.86,
|
|
217
|
+
liquidationCursor: '300000000000000000',
|
|
218
|
+
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
219
|
+
}],
|
|
220
|
+
maturity: 1792627200, // 2026-10-22T00:00:00Z
|
|
221
|
+
rcfThreshold: '3000000000',
|
|
222
|
+
enterGate: ZERO_ADDRESS,
|
|
223
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
224
|
+
marketId: '0x2f4f088f20c0bebe6167f8c9d7aec11115c08eb73486b6f9642f7c7260d4d094',
|
|
225
|
+
protocolName: 'morpho-midnight',
|
|
226
|
+
curator: 'Tenor',
|
|
227
|
+
});
|
|
228
|
+
export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261119 = (networkId = NetworkNumber.Base) => ({
|
|
229
|
+
chainIds: [NetworkNumber.Base],
|
|
230
|
+
label: 'Tenor cbBTC/USDC',
|
|
231
|
+
shortLabel: 'Tenor cbBTC/USDC',
|
|
232
|
+
url: 'tenor-cbbtc-usdc-20261119',
|
|
233
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorCbBTCUSDC_20261119_Base,
|
|
234
|
+
midnight: MIDNIGHT_BASE,
|
|
235
|
+
loanToken: USDC_BASE,
|
|
236
|
+
collaterals: [{
|
|
237
|
+
token: CBBTC_BASE,
|
|
238
|
+
lltv: 0.86,
|
|
239
|
+
liquidationCursor: '300000000000000000',
|
|
240
|
+
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
241
|
+
}],
|
|
242
|
+
maturity: 1795046400, // 2026-11-19T00:00:00Z
|
|
243
|
+
rcfThreshold: '3000000000',
|
|
244
|
+
enterGate: ZERO_ADDRESS,
|
|
245
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
246
|
+
marketId: '0x776e8d667a394650c21615c9b5a9b5355f4aa777db3cebaebb057ffba588c7af',
|
|
247
|
+
protocolName: 'morpho-midnight',
|
|
248
|
+
curator: 'Tenor',
|
|
249
|
+
});
|
|
250
|
+
export const MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261217 = (networkId = NetworkNumber.Base) => ({
|
|
251
|
+
chainIds: [NetworkNumber.Base],
|
|
252
|
+
label: 'Tenor cbBTC/USDC',
|
|
253
|
+
shortLabel: 'Tenor cbBTC/USDC',
|
|
254
|
+
url: 'tenor-cbbtc-usdc-20261217',
|
|
255
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorCbBTCUSDC_20261217_Base,
|
|
256
|
+
midnight: MIDNIGHT_BASE,
|
|
257
|
+
loanToken: USDC_BASE,
|
|
258
|
+
collaterals: [{
|
|
259
|
+
token: CBBTC_BASE,
|
|
260
|
+
lltv: 0.86,
|
|
261
|
+
liquidationCursor: '300000000000000000',
|
|
262
|
+
oracle: '0x663BECd10daE6C4A3Dcd89F1d76c1174199639B9',
|
|
263
|
+
}],
|
|
264
|
+
maturity: 1797465600, // 2026-12-17T00:00:00Z
|
|
265
|
+
rcfThreshold: '3000000000',
|
|
266
|
+
enterGate: ZERO_ADDRESS,
|
|
267
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
268
|
+
marketId: '0xd82863083585d715a2e0d8ed61e0e20e4f6c566171d3bfed513ad55797177b17',
|
|
269
|
+
protocolName: 'morpho-midnight',
|
|
270
|
+
curator: 'Tenor',
|
|
271
|
+
});
|
|
272
|
+
export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260827 = (networkId = NetworkNumber.Base) => ({
|
|
273
|
+
chainIds: [NetworkNumber.Base],
|
|
274
|
+
label: 'Tenor WETH/USDC',
|
|
275
|
+
shortLabel: 'Tenor WETH/USDC',
|
|
276
|
+
url: 'tenor-weth-usdc-20260827',
|
|
277
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20260827_Base,
|
|
278
|
+
midnight: MIDNIGHT_BASE,
|
|
279
|
+
loanToken: USDC_BASE,
|
|
280
|
+
collaterals: [{
|
|
281
|
+
token: WETH_BASE,
|
|
282
|
+
lltv: 0.86,
|
|
283
|
+
liquidationCursor: '300000000000000000',
|
|
284
|
+
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
285
|
+
}],
|
|
286
|
+
maturity: 1787788800,
|
|
287
|
+
rcfThreshold: '3000000000',
|
|
288
|
+
enterGate: ZERO_ADDRESS,
|
|
289
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
290
|
+
marketId: '0xf27319855df886a604dda3d5675007f0aa6eee504c99f1d789c86b21075f7c20',
|
|
291
|
+
protocolName: 'morpho-midnight',
|
|
292
|
+
curator: 'Tenor',
|
|
293
|
+
});
|
|
294
|
+
export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260924 = (networkId = NetworkNumber.Base) => ({
|
|
295
|
+
chainIds: [NetworkNumber.Base],
|
|
296
|
+
label: 'Tenor WETH/USDC',
|
|
297
|
+
shortLabel: 'Tenor WETH/USDC',
|
|
298
|
+
url: 'tenor-weth-usdc-20260924',
|
|
299
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20260924_Base,
|
|
300
|
+
midnight: MIDNIGHT_BASE,
|
|
301
|
+
loanToken: USDC_BASE,
|
|
302
|
+
collaterals: [{
|
|
303
|
+
token: WETH_BASE,
|
|
304
|
+
lltv: 0.86,
|
|
305
|
+
liquidationCursor: '300000000000000000',
|
|
306
|
+
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
307
|
+
}],
|
|
308
|
+
maturity: 1790208000,
|
|
309
|
+
rcfThreshold: '3000000000',
|
|
310
|
+
enterGate: ZERO_ADDRESS,
|
|
311
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
312
|
+
marketId: '0x9b7fed2a6b24c47b8995dfa4fb2b4bc87fe245c10fb842865e568611a96804aa',
|
|
313
|
+
protocolName: 'morpho-midnight',
|
|
314
|
+
curator: 'Tenor',
|
|
315
|
+
});
|
|
316
|
+
export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261022 = (networkId = NetworkNumber.Base) => ({
|
|
317
|
+
chainIds: [NetworkNumber.Base],
|
|
318
|
+
label: 'Tenor WETH/USDC',
|
|
319
|
+
shortLabel: 'Tenor WETH/USDC',
|
|
320
|
+
url: 'tenor-weth-usdc-20261022',
|
|
321
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261022_Base,
|
|
322
|
+
midnight: MIDNIGHT_BASE,
|
|
323
|
+
loanToken: USDC_BASE,
|
|
324
|
+
collaterals: [{
|
|
325
|
+
token: WETH_BASE,
|
|
326
|
+
lltv: 0.86,
|
|
327
|
+
liquidationCursor: '300000000000000000',
|
|
328
|
+
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
329
|
+
}],
|
|
330
|
+
maturity: 1792627200,
|
|
331
|
+
rcfThreshold: '3000000000',
|
|
332
|
+
enterGate: ZERO_ADDRESS,
|
|
333
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
334
|
+
marketId: '0xfc2562129c7d538fcb6b2490d07aa5c69971d9d0b75e2f9bbf054ef99a311474',
|
|
335
|
+
protocolName: 'morpho-midnight',
|
|
336
|
+
curator: 'Tenor',
|
|
337
|
+
});
|
|
338
|
+
export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261119 = (networkId = NetworkNumber.Base) => ({
|
|
339
|
+
chainIds: [NetworkNumber.Base],
|
|
340
|
+
label: 'Tenor WETH/USDC',
|
|
341
|
+
shortLabel: 'Tenor WETH/USDC',
|
|
342
|
+
url: 'tenor-weth-usdc-20261119',
|
|
343
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261119_Base,
|
|
344
|
+
midnight: MIDNIGHT_BASE,
|
|
345
|
+
loanToken: USDC_BASE,
|
|
346
|
+
collaterals: [{
|
|
347
|
+
token: WETH_BASE,
|
|
348
|
+
lltv: 0.86,
|
|
349
|
+
liquidationCursor: '300000000000000000',
|
|
350
|
+
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
351
|
+
}],
|
|
352
|
+
maturity: 1795046400,
|
|
353
|
+
rcfThreshold: '3000000000',
|
|
354
|
+
enterGate: ZERO_ADDRESS,
|
|
355
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
356
|
+
marketId: '0x8da96adc9a55288bda5f07eb062d501db04d0fa152dd0f78341f6232bc4f884d',
|
|
357
|
+
protocolName: 'morpho-midnight',
|
|
358
|
+
curator: 'Tenor',
|
|
359
|
+
});
|
|
360
|
+
export const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261217 = (networkId = NetworkNumber.Base) => ({
|
|
361
|
+
chainIds: [NetworkNumber.Base],
|
|
362
|
+
label: 'Tenor WETH/USDC',
|
|
363
|
+
shortLabel: 'Tenor WETH/USDC',
|
|
364
|
+
url: 'tenor-weth-usdc-20261217',
|
|
365
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261217_Base,
|
|
366
|
+
midnight: MIDNIGHT_BASE,
|
|
367
|
+
loanToken: USDC_BASE,
|
|
368
|
+
collaterals: [{
|
|
369
|
+
token: WETH_BASE,
|
|
370
|
+
lltv: 0.86,
|
|
371
|
+
liquidationCursor: '300000000000000000',
|
|
372
|
+
oracle: '0xFEa2D58cEfCb9fcb597723c6bAE66fFE4193aFE4',
|
|
373
|
+
}],
|
|
374
|
+
maturity: 1797465600,
|
|
375
|
+
rcfThreshold: '3000000000',
|
|
376
|
+
enterGate: ZERO_ADDRESS,
|
|
377
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
378
|
+
marketId: '0x24684af2c2c9edaa0ab4472dd9b8cc238aa33b7cc8151ae02fe614536f91af86',
|
|
379
|
+
protocolName: 'morpho-midnight',
|
|
380
|
+
curator: 'Tenor',
|
|
381
|
+
});
|
|
382
|
+
export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20260827 = (networkId = NetworkNumber.Base) => ({
|
|
383
|
+
chainIds: [NetworkNumber.Base],
|
|
384
|
+
label: 'Tenor cbETH/WETH',
|
|
385
|
+
shortLabel: 'Tenor cbETH/WETH',
|
|
386
|
+
url: 'tenor-cbeth-weth-20260827',
|
|
387
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20260827_Base,
|
|
388
|
+
midnight: MIDNIGHT_BASE,
|
|
389
|
+
loanToken: WETH_BASE,
|
|
390
|
+
collaterals: [{
|
|
391
|
+
token: CBETH_BASE,
|
|
392
|
+
lltv: 0.945,
|
|
393
|
+
liquidationCursor: '300000000000000000',
|
|
394
|
+
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
395
|
+
}],
|
|
396
|
+
maturity: 1787788800,
|
|
397
|
+
rcfThreshold: '4000000000000000000',
|
|
398
|
+
enterGate: ZERO_ADDRESS,
|
|
399
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
400
|
+
marketId: '0x13cdfedf56f731817322c6932b48f496da937c36a51c7178ac63ed915d02fc98',
|
|
401
|
+
protocolName: 'morpho-midnight',
|
|
402
|
+
curator: 'Tenor',
|
|
403
|
+
});
|
|
404
|
+
export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20260924 = (networkId = NetworkNumber.Base) => ({
|
|
405
|
+
chainIds: [NetworkNumber.Base],
|
|
406
|
+
label: 'Tenor cbETH/WETH',
|
|
407
|
+
shortLabel: 'Tenor cbETH/WETH',
|
|
408
|
+
url: 'tenor-cbeth-weth-20260924',
|
|
409
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20260924_Base,
|
|
410
|
+
midnight: MIDNIGHT_BASE,
|
|
411
|
+
loanToken: WETH_BASE,
|
|
412
|
+
collaterals: [{
|
|
413
|
+
token: CBETH_BASE,
|
|
414
|
+
lltv: 0.945,
|
|
415
|
+
liquidationCursor: '300000000000000000',
|
|
416
|
+
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
417
|
+
}],
|
|
418
|
+
maturity: 1790208000,
|
|
419
|
+
rcfThreshold: '4000000000000000000',
|
|
420
|
+
enterGate: ZERO_ADDRESS,
|
|
421
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
422
|
+
marketId: '0x74e310372280cc5c648a1f185db1ee906d2985a7dab8119568a9213f083efec0',
|
|
423
|
+
protocolName: 'morpho-midnight',
|
|
424
|
+
curator: 'Tenor',
|
|
425
|
+
});
|
|
426
|
+
export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261022 = (networkId = NetworkNumber.Base) => ({
|
|
427
|
+
chainIds: [NetworkNumber.Base],
|
|
428
|
+
label: 'Tenor cbETH/WETH',
|
|
429
|
+
shortLabel: 'Tenor cbETH/WETH',
|
|
430
|
+
url: 'tenor-cbeth-weth-20261022',
|
|
431
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20261022_Base,
|
|
432
|
+
midnight: MIDNIGHT_BASE,
|
|
433
|
+
loanToken: WETH_BASE,
|
|
434
|
+
collaterals: [{
|
|
435
|
+
token: CBETH_BASE,
|
|
436
|
+
lltv: 0.945,
|
|
437
|
+
liquidationCursor: '300000000000000000',
|
|
438
|
+
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
439
|
+
}],
|
|
440
|
+
maturity: 1792627200,
|
|
441
|
+
rcfThreshold: '4000000000000000000',
|
|
442
|
+
enterGate: ZERO_ADDRESS,
|
|
443
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
444
|
+
marketId: '0xcfce553a004af262e842c1b83cdfc01835bb83fbee7a8128f9b91663e2ebaf43',
|
|
445
|
+
protocolName: 'morpho-midnight',
|
|
446
|
+
curator: 'Tenor',
|
|
447
|
+
});
|
|
448
|
+
export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261119 = (networkId = NetworkNumber.Base) => ({
|
|
449
|
+
chainIds: [NetworkNumber.Base],
|
|
450
|
+
label: 'Tenor cbETH/WETH',
|
|
451
|
+
shortLabel: 'Tenor cbETH/WETH',
|
|
452
|
+
url: 'tenor-cbeth-weth-20261119',
|
|
453
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20261119_Base,
|
|
454
|
+
midnight: MIDNIGHT_BASE,
|
|
455
|
+
loanToken: WETH_BASE,
|
|
456
|
+
collaterals: [{
|
|
457
|
+
token: CBETH_BASE,
|
|
458
|
+
lltv: 0.945,
|
|
459
|
+
liquidationCursor: '300000000000000000',
|
|
460
|
+
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
461
|
+
}],
|
|
462
|
+
maturity: 1795046400,
|
|
463
|
+
rcfThreshold: '4000000000000000000',
|
|
464
|
+
enterGate: ZERO_ADDRESS,
|
|
465
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
466
|
+
marketId: '0xb1aa171a525fa9f3333ed47d816170930e9a1a83a1816a6b44ee0d89e1610691',
|
|
467
|
+
protocolName: 'morpho-midnight',
|
|
468
|
+
curator: 'Tenor',
|
|
469
|
+
});
|
|
470
|
+
export const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261217 = (networkId = NetworkNumber.Base) => ({
|
|
471
|
+
chainIds: [NetworkNumber.Base],
|
|
472
|
+
label: 'Tenor cbETH/WETH',
|
|
473
|
+
shortLabel: 'Tenor cbETH/WETH',
|
|
474
|
+
url: 'tenor-cbeth-weth-20261217',
|
|
475
|
+
value: MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20261217_Base,
|
|
476
|
+
midnight: MIDNIGHT_BASE,
|
|
477
|
+
loanToken: WETH_BASE,
|
|
478
|
+
collaterals: [{
|
|
479
|
+
token: CBETH_BASE,
|
|
480
|
+
lltv: 0.945,
|
|
481
|
+
liquidationCursor: '300000000000000000',
|
|
482
|
+
oracle: '0xB03855Ad5AFD6B8db8091DD5551CAC4ed621d9E6',
|
|
483
|
+
}],
|
|
484
|
+
maturity: 1797465600,
|
|
485
|
+
rcfThreshold: '4000000000000000000',
|
|
486
|
+
enterGate: ZERO_ADDRESS,
|
|
487
|
+
liquidatorGate: ZERO_ADDRESS,
|
|
488
|
+
marketId: '0x001f992fd7dbc6f0fee600f1b1c627c4a7b6d70762043221a514b57f8df37cb7',
|
|
489
|
+
protocolName: 'morpho-midnight',
|
|
490
|
+
curator: 'Tenor',
|
|
138
491
|
});
|
|
139
492
|
export const MorphoMidnightMarkets = (networkId) => ({
|
|
140
|
-
// BASE
|
|
493
|
+
// BASE — Morpho-curated
|
|
141
494
|
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260731_Base]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20260731(networkId),
|
|
142
495
|
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260828_Base]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20260828(networkId),
|
|
143
496
|
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20260925_Base]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20260925(networkId),
|
|
144
497
|
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261030_Base]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20261030(networkId),
|
|
145
498
|
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261127_Base]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20261127(networkId),
|
|
146
499
|
[MorphoMidnightVersions.MorphoMidnightCbBTCUSDC_860_20261225_Base]: MORPHO_MIDNIGHT_CBBTC_USDC_860_20261225(networkId),
|
|
500
|
+
// BASE — Tenor-curated
|
|
501
|
+
[MorphoMidnightVersions.MorphoMidnightTenorCbBTCUSDC_20260827_Base]: MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260827(networkId),
|
|
502
|
+
[MorphoMidnightVersions.MorphoMidnightTenorCbBTCUSDC_20260924_Base]: MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20260924(networkId),
|
|
503
|
+
[MorphoMidnightVersions.MorphoMidnightTenorCbBTCUSDC_20261022_Base]: MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261022(networkId),
|
|
504
|
+
[MorphoMidnightVersions.MorphoMidnightTenorCbBTCUSDC_20261119_Base]: MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261119(networkId),
|
|
505
|
+
[MorphoMidnightVersions.MorphoMidnightTenorCbBTCUSDC_20261217_Base]: MORPHO_MIDNIGHT_TENOR_CBBTC_USDC_860_20261217(networkId),
|
|
506
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20260827_Base]: MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260827(networkId),
|
|
507
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20260924_Base]: MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260924(networkId),
|
|
508
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261022_Base]: MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261022(networkId),
|
|
509
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261119_Base]: MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261119(networkId),
|
|
510
|
+
[MorphoMidnightVersions.MorphoMidnightTenorWETHUSDC_20261217_Base]: MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261217(networkId),
|
|
511
|
+
[MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20260827_Base]: MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20260827(networkId),
|
|
512
|
+
[MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20260924_Base]: MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20260924(networkId),
|
|
513
|
+
[MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20261022_Base]: MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261022(networkId),
|
|
514
|
+
[MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20261119_Base]: MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261119(networkId),
|
|
515
|
+
[MorphoMidnightVersions.MorphoMidnightTenorCbETHWETH_20261217_Base]: MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261217(networkId),
|
|
147
516
|
});
|
|
517
|
+
// Which markets Tenor's router quotes, by id, for the quote helpers that only receive one.
|
|
518
|
+
const TENOR_MARKET_IDS = new Set(Object.values(MorphoMidnightMarkets(NetworkNumber.Base))
|
|
519
|
+
.filter((market) => market.curator === 'Tenor')
|
|
520
|
+
.map((market) => market.marketId.toLowerCase()));
|
|
521
|
+
export const isTenorMidnightMarket = (market) => (typeof market === 'string'
|
|
522
|
+
? TENOR_MARKET_IDS.has(market.toLowerCase())
|
|
523
|
+
: market.curator === 'Tenor');
|
|
148
524
|
export const findMorphoMidnightMarket = (marketId, network = NetworkNumber.Base) => Object.values(MorphoMidnightMarkets(network)).find((market) => market.marketId.toLowerCase() === marketId.toLowerCase());
|
|
@@ -5,8 +5,24 @@ export declare enum MorphoMidnightVersions {
|
|
|
5
5
|
MorphoMidnightCbBTCUSDC_860_20260925_Base = "morphomidnightcbbtcusdc_860_20260925_base",
|
|
6
6
|
MorphoMidnightCbBTCUSDC_860_20261030_Base = "morphomidnightcbbtcusdc_860_20261030_base",
|
|
7
7
|
MorphoMidnightCbBTCUSDC_860_20261127_Base = "morphomidnightcbbtcusdc_860_20261127_base",
|
|
8
|
-
MorphoMidnightCbBTCUSDC_860_20261225_Base = "morphomidnightcbbtcusdc_860_20261225_base"
|
|
8
|
+
MorphoMidnightCbBTCUSDC_860_20261225_Base = "morphomidnightcbbtcusdc_860_20261225_base",
|
|
9
|
+
MorphoMidnightTenorCbBTCUSDC_20260827_Base = "morphomidnighttenorcbbtcusdc_20260827_base",
|
|
10
|
+
MorphoMidnightTenorCbBTCUSDC_20260924_Base = "morphomidnighttenorcbbtcusdc_20260924_base",
|
|
11
|
+
MorphoMidnightTenorCbBTCUSDC_20261022_Base = "morphomidnighttenorcbbtcusdc_20261022_base",
|
|
12
|
+
MorphoMidnightTenorCbBTCUSDC_20261119_Base = "morphomidnighttenorcbbtcusdc_20261119_base",
|
|
13
|
+
MorphoMidnightTenorCbBTCUSDC_20261217_Base = "morphomidnighttenorcbbtcusdc_20261217_base",
|
|
14
|
+
MorphoMidnightTenorWETHUSDC_20260827_Base = "morphomidnighttenorwethusdc_20260827_base",
|
|
15
|
+
MorphoMidnightTenorWETHUSDC_20260924_Base = "morphomidnighttenorwethusdc_20260924_base",
|
|
16
|
+
MorphoMidnightTenorWETHUSDC_20261022_Base = "morphomidnighttenorwethusdc_20261022_base",
|
|
17
|
+
MorphoMidnightTenorWETHUSDC_20261119_Base = "morphomidnighttenorwethusdc_20261119_base",
|
|
18
|
+
MorphoMidnightTenorWETHUSDC_20261217_Base = "morphomidnighttenorwethusdc_20261217_base",
|
|
19
|
+
MorphoMidnightTenorCbETHWETH_20260827_Base = "morphomidnighttenorcbethweth_20260827_base",
|
|
20
|
+
MorphoMidnightTenorCbETHWETH_20260924_Base = "morphomidnighttenorcbethweth_20260924_base",
|
|
21
|
+
MorphoMidnightTenorCbETHWETH_20261022_Base = "morphomidnighttenorcbethweth_20261022_base",
|
|
22
|
+
MorphoMidnightTenorCbETHWETH_20261119_Base = "morphomidnighttenorcbethweth_20261119_base",
|
|
23
|
+
MorphoMidnightTenorCbETHWETH_20261217_Base = "morphomidnighttenorcbethweth_20261217_base"
|
|
9
24
|
}
|
|
25
|
+
export type MorphoMidnightCurator = 'Morpho' | 'Tenor';
|
|
10
26
|
export interface MorphoMidnightCollateralParams {
|
|
11
27
|
token: EthAddress;
|
|
12
28
|
lltv: number | string;
|
|
@@ -28,6 +44,7 @@ export interface MorphoMidnightMarketData {
|
|
|
28
44
|
liquidatorGate: EthAddress;
|
|
29
45
|
marketId: string;
|
|
30
46
|
protocolName: string;
|
|
47
|
+
curator: MorphoMidnightCurator;
|
|
31
48
|
}
|
|
32
49
|
export interface MorphoMidnightAssetData {
|
|
33
50
|
symbol: string;
|
|
@@ -9,4 +9,20 @@ export var MorphoMidnightVersions;
|
|
|
9
9
|
MorphoMidnightVersions["MorphoMidnightCbBTCUSDC_860_20261030_Base"] = "morphomidnightcbbtcusdc_860_20261030_base";
|
|
10
10
|
MorphoMidnightVersions["MorphoMidnightCbBTCUSDC_860_20261127_Base"] = "morphomidnightcbbtcusdc_860_20261127_base";
|
|
11
11
|
MorphoMidnightVersions["MorphoMidnightCbBTCUSDC_860_20261225_Base"] = "morphomidnightcbbtcusdc_860_20261225_base";
|
|
12
|
+
// Tenor-hosted Midnight markets (same core, different order book)
|
|
13
|
+
MorphoMidnightVersions["MorphoMidnightTenorCbBTCUSDC_20260827_Base"] = "morphomidnighttenorcbbtcusdc_20260827_base";
|
|
14
|
+
MorphoMidnightVersions["MorphoMidnightTenorCbBTCUSDC_20260924_Base"] = "morphomidnighttenorcbbtcusdc_20260924_base";
|
|
15
|
+
MorphoMidnightVersions["MorphoMidnightTenorCbBTCUSDC_20261022_Base"] = "morphomidnighttenorcbbtcusdc_20261022_base";
|
|
16
|
+
MorphoMidnightVersions["MorphoMidnightTenorCbBTCUSDC_20261119_Base"] = "morphomidnighttenorcbbtcusdc_20261119_base";
|
|
17
|
+
MorphoMidnightVersions["MorphoMidnightTenorCbBTCUSDC_20261217_Base"] = "morphomidnighttenorcbbtcusdc_20261217_base";
|
|
18
|
+
MorphoMidnightVersions["MorphoMidnightTenorWETHUSDC_20260827_Base"] = "morphomidnighttenorwethusdc_20260827_base";
|
|
19
|
+
MorphoMidnightVersions["MorphoMidnightTenorWETHUSDC_20260924_Base"] = "morphomidnighttenorwethusdc_20260924_base";
|
|
20
|
+
MorphoMidnightVersions["MorphoMidnightTenorWETHUSDC_20261022_Base"] = "morphomidnighttenorwethusdc_20261022_base";
|
|
21
|
+
MorphoMidnightVersions["MorphoMidnightTenorWETHUSDC_20261119_Base"] = "morphomidnighttenorwethusdc_20261119_base";
|
|
22
|
+
MorphoMidnightVersions["MorphoMidnightTenorWETHUSDC_20261217_Base"] = "morphomidnighttenorwethusdc_20261217_base";
|
|
23
|
+
MorphoMidnightVersions["MorphoMidnightTenorCbETHWETH_20260827_Base"] = "morphomidnighttenorcbethweth_20260827_base";
|
|
24
|
+
MorphoMidnightVersions["MorphoMidnightTenorCbETHWETH_20260924_Base"] = "morphomidnighttenorcbethweth_20260924_base";
|
|
25
|
+
MorphoMidnightVersions["MorphoMidnightTenorCbETHWETH_20261022_Base"] = "morphomidnighttenorcbethweth_20261022_base";
|
|
26
|
+
MorphoMidnightVersions["MorphoMidnightTenorCbETHWETH_20261119_Base"] = "morphomidnighttenorcbethweth_20261119_base";
|
|
27
|
+
MorphoMidnightVersions["MorphoMidnightTenorCbETHWETH_20261217_Base"] = "morphomidnighttenorcbethweth_20261217_base";
|
|
12
28
|
})(MorphoMidnightVersions || (MorphoMidnightVersions = {}));
|
package/package.json
CHANGED
package/src/constants/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export const SECONDS_PER_WEEK = 7 * SECONDS_PER_DAY;
|
|
|
6
6
|
export const AVG_BLOCK_TIME = 12;
|
|
7
7
|
export const BLOCKS_IN_A_YEAR = SECONDS_PER_YEAR / AVG_BLOCK_TIME;
|
|
8
8
|
export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
|
9
|
+
export const ZERO_BYTES32 = '0x0000000000000000000000000000000000000000000000000000000000000000';
|
|
9
10
|
export const WAD = 1e18;
|
|
10
11
|
export const USD_QUOTE = '0x0000000000000000000000000000000000000348';
|
|
11
12
|
export const borrowOperations = ['borrow', 'payback'];
|