@morpho-org/morpho-sdk 5.3.4 → 5.4.0

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.
@@ -6,13 +6,19 @@ export declare const DEFAULT_LLTV_BUFFER: bigint;
6
6
  /** Maximum absolute share price cap (100 RAY). Prevents absurd maxSharePrice values in repay. */
7
7
  export declare const MAX_ABSOLUTE_SHARE_PRICE: bigint;
8
8
  /**
9
- * The default maximum utilization allowed to reach when withdrawing shared liquidity.
9
+ * The default maximum utilization a source market may reach when withdrawing
10
+ * shared liquidity, scaled by WAD. Still overridable through the deprecated
11
+ * `maxWithdrawalUtilization` / `defaultMaxWithdrawalUtilization` options until
12
+ * the next major.
10
13
  */
11
- export declare const DEFAULT_WITHDRAWAL_TARGET_UTILIZATION = 920000000000000000n;
14
+ export declare const DEFAULT_WITHDRAWAL_TARGET_UTILIZATION = 900000000000000000n;
12
15
  /**
13
- * The default target utilization above which shared liquidity reallocations are triggered.
16
+ * The default target utilization above which shared liquidity reallocations are
17
+ * triggered (and the level the target market is brought back to), scaled by WAD.
18
+ * Still overridable through the deprecated `supplyTargetUtilization` /
19
+ * `defaultSupplyTargetUtilization` options until the next major.
14
20
  */
15
- export declare const DEFAULT_SUPPLY_TARGET_UTILIZATION = 905000000000000000n;
21
+ export declare const DEFAULT_SUPPLY_TARGET_UTILIZATION = 900000000000000000n;
16
22
  /**
17
23
  * Tokens that require setting allowance from zero before changing approval.
18
24
  */
@@ -10,13 +10,19 @@ exports.DEFAULT_LLTV_BUFFER = blue_sdk_1.MathLib.WAD / 200n;
10
10
  /** Maximum absolute share price cap (100 RAY). Prevents absurd maxSharePrice values in repay. */
11
11
  exports.MAX_ABSOLUTE_SHARE_PRICE = 100n * blue_sdk_1.MathLib.RAY;
12
12
  /**
13
- * The default maximum utilization allowed to reach when withdrawing shared liquidity.
13
+ * The default maximum utilization a source market may reach when withdrawing
14
+ * shared liquidity, scaled by WAD. Still overridable through the deprecated
15
+ * `maxWithdrawalUtilization` / `defaultMaxWithdrawalUtilization` options until
16
+ * the next major.
14
17
  */
15
- exports.DEFAULT_WITHDRAWAL_TARGET_UTILIZATION = 920000000000000000n;
18
+ exports.DEFAULT_WITHDRAWAL_TARGET_UTILIZATION = 900000000000000000n;
16
19
  /**
17
- * The default target utilization above which shared liquidity reallocations are triggered.
20
+ * The default target utilization above which shared liquidity reallocations are
21
+ * triggered (and the level the target market is brought back to), scaled by WAD.
22
+ * Still overridable through the deprecated `supplyTargetUtilization` /
23
+ * `defaultSupplyTargetUtilization` options until the next major.
18
24
  */
19
- exports.DEFAULT_SUPPLY_TARGET_UTILIZATION = 905000000000000000n;
25
+ exports.DEFAULT_SUPPLY_TARGET_UTILIZATION = 900000000000000000n;
20
26
  /**
21
27
  * Tokens that require setting allowance from zero before changing approval.
22
28
  */
@@ -19,12 +19,20 @@ export interface PublicAllocatorOptions {
19
19
  /**
20
20
  * The maximum utilization each source market may reach when withdrawing
21
21
  * shared liquidity, scaled by WAD.
22
+ *
23
+ * @deprecated The source-market withdrawal ceiling is fixed at 90%
24
+ * ({@link DEFAULT_WITHDRAWAL_TARGET_UTILIZATION}) and will stop being
25
+ * configurable in the next major. Per-market overrides are still honored for now.
22
26
  */
23
27
  readonly maxWithdrawalUtilization?: Readonly<Record<MarketId, bigint | undefined>>;
24
28
  /**
25
29
  * The default maximum utilization source markets may reach when withdrawing
26
30
  * shared liquidity, scaled by WAD.
27
- * @default 92% (920000000000000000n)
31
+ *
32
+ * @default 90% (900000000000000000n)
33
+ * @deprecated The source-market withdrawal ceiling is fixed at 90%
34
+ * ({@link DEFAULT_WITHDRAWAL_TARGET_UTILIZATION}) and will stop being
35
+ * configurable in the next major. Overrides are still honored for now.
28
36
  */
29
37
  readonly defaultMaxWithdrawalUtilization?: bigint;
30
38
  }
@@ -70,12 +78,20 @@ export interface ReallocationComputeOptions extends PublicAllocatorOptions {
70
78
  * Per-market target utilization above which the shared liquidity algorithm
71
79
  * is triggered (scaled by WAD). Overrides `defaultSupplyTargetUtilization`
72
80
  * for the specified market.
81
+ *
82
+ * @deprecated The supply-target trigger is fixed at 90%
83
+ * ({@link DEFAULT_SUPPLY_TARGET_UTILIZATION}) and will stop being configurable
84
+ * in the next major. Per-market overrides are still honored for now.
73
85
  */
74
86
  readonly supplyTargetUtilization?: Readonly<Record<MarketId, bigint | undefined>>;
75
87
  /**
76
88
  * The default target utilization above which the shared liquidity algorithm
77
89
  * is triggered (scaled by WAD).
78
- * @default 90.5% (905000000000000000n)
90
+ *
91
+ * @default 90% (900000000000000000n)
92
+ * @deprecated The supply-target trigger is fixed at 90%
93
+ * ({@link DEFAULT_SUPPLY_TARGET_UTILIZATION}) and will stop being configurable
94
+ * in the next major. Overrides are still honored for now.
79
95
  */
80
96
  readonly defaultSupplyTargetUtilization?: bigint;
81
97
  }
@@ -6,13 +6,19 @@ export declare const DEFAULT_LLTV_BUFFER: bigint;
6
6
  /** Maximum absolute share price cap (100 RAY). Prevents absurd maxSharePrice values in repay. */
7
7
  export declare const MAX_ABSOLUTE_SHARE_PRICE: bigint;
8
8
  /**
9
- * The default maximum utilization allowed to reach when withdrawing shared liquidity.
9
+ * The default maximum utilization a source market may reach when withdrawing
10
+ * shared liquidity, scaled by WAD. Still overridable through the deprecated
11
+ * `maxWithdrawalUtilization` / `defaultMaxWithdrawalUtilization` options until
12
+ * the next major.
10
13
  */
11
- export declare const DEFAULT_WITHDRAWAL_TARGET_UTILIZATION = 920000000000000000n;
14
+ export declare const DEFAULT_WITHDRAWAL_TARGET_UTILIZATION = 900000000000000000n;
12
15
  /**
13
- * The default target utilization above which shared liquidity reallocations are triggered.
16
+ * The default target utilization above which shared liquidity reallocations are
17
+ * triggered (and the level the target market is brought back to), scaled by WAD.
18
+ * Still overridable through the deprecated `supplyTargetUtilization` /
19
+ * `defaultSupplyTargetUtilization` options until the next major.
14
20
  */
15
- export declare const DEFAULT_SUPPLY_TARGET_UTILIZATION = 905000000000000000n;
21
+ export declare const DEFAULT_SUPPLY_TARGET_UTILIZATION = 900000000000000000n;
16
22
  /**
17
23
  * Tokens that require setting allowance from zero before changing approval.
18
24
  */
@@ -7,13 +7,19 @@ export const DEFAULT_LLTV_BUFFER = MathLib.WAD / 200n;
7
7
  /** Maximum absolute share price cap (100 RAY). Prevents absurd maxSharePrice values in repay. */
8
8
  export const MAX_ABSOLUTE_SHARE_PRICE = 100n * MathLib.RAY;
9
9
  /**
10
- * The default maximum utilization allowed to reach when withdrawing shared liquidity.
10
+ * The default maximum utilization a source market may reach when withdrawing
11
+ * shared liquidity, scaled by WAD. Still overridable through the deprecated
12
+ * `maxWithdrawalUtilization` / `defaultMaxWithdrawalUtilization` options until
13
+ * the next major.
11
14
  */
12
- export const DEFAULT_WITHDRAWAL_TARGET_UTILIZATION = 920000000000000000n;
15
+ export const DEFAULT_WITHDRAWAL_TARGET_UTILIZATION = 900000000000000000n;
13
16
  /**
14
- * The default target utilization above which shared liquidity reallocations are triggered.
17
+ * The default target utilization above which shared liquidity reallocations are
18
+ * triggered (and the level the target market is brought back to), scaled by WAD.
19
+ * Still overridable through the deprecated `supplyTargetUtilization` /
20
+ * `defaultSupplyTargetUtilization` options until the next major.
15
21
  */
16
- export const DEFAULT_SUPPLY_TARGET_UTILIZATION = 905000000000000000n;
22
+ export const DEFAULT_SUPPLY_TARGET_UTILIZATION = 900000000000000000n;
17
23
  /**
18
24
  * Tokens that require setting allowance from zero before changing approval.
19
25
  */
@@ -19,12 +19,20 @@ export interface PublicAllocatorOptions {
19
19
  /**
20
20
  * The maximum utilization each source market may reach when withdrawing
21
21
  * shared liquidity, scaled by WAD.
22
+ *
23
+ * @deprecated The source-market withdrawal ceiling is fixed at 90%
24
+ * ({@link DEFAULT_WITHDRAWAL_TARGET_UTILIZATION}) and will stop being
25
+ * configurable in the next major. Per-market overrides are still honored for now.
22
26
  */
23
27
  readonly maxWithdrawalUtilization?: Readonly<Record<MarketId, bigint | undefined>>;
24
28
  /**
25
29
  * The default maximum utilization source markets may reach when withdrawing
26
30
  * shared liquidity, scaled by WAD.
27
- * @default 92% (920000000000000000n)
31
+ *
32
+ * @default 90% (900000000000000000n)
33
+ * @deprecated The source-market withdrawal ceiling is fixed at 90%
34
+ * ({@link DEFAULT_WITHDRAWAL_TARGET_UTILIZATION}) and will stop being
35
+ * configurable in the next major. Overrides are still honored for now.
28
36
  */
29
37
  readonly defaultMaxWithdrawalUtilization?: bigint;
30
38
  }
@@ -70,12 +78,20 @@ export interface ReallocationComputeOptions extends PublicAllocatorOptions {
70
78
  * Per-market target utilization above which the shared liquidity algorithm
71
79
  * is triggered (scaled by WAD). Overrides `defaultSupplyTargetUtilization`
72
80
  * for the specified market.
81
+ *
82
+ * @deprecated The supply-target trigger is fixed at 90%
83
+ * ({@link DEFAULT_SUPPLY_TARGET_UTILIZATION}) and will stop being configurable
84
+ * in the next major. Per-market overrides are still honored for now.
73
85
  */
74
86
  readonly supplyTargetUtilization?: Readonly<Record<MarketId, bigint | undefined>>;
75
87
  /**
76
88
  * The default target utilization above which the shared liquidity algorithm
77
89
  * is triggered (scaled by WAD).
78
- * @default 90.5% (905000000000000000n)
90
+ *
91
+ * @default 90% (900000000000000000n)
92
+ * @deprecated The supply-target trigger is fixed at 90%
93
+ * ({@link DEFAULT_SUPPLY_TARGET_UTILIZATION}) and will stop being configurable
94
+ * in the next major. Overrides are still honored for now.
79
95
  */
80
96
  readonly defaultSupplyTargetUtilization?: bigint;
81
97
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@morpho-org/morpho-sdk",
3
3
  "description": "Abstraction layer for Morpho's complexity.",
4
- "version": "5.3.4",
4
+ "version": "5.4.0",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "contributors": [
7
7
  "Foulks-Plb <https://x.com/FoulkPlb>"
@@ -145,9 +145,9 @@
145
145
  ],
146
146
  "dependencies": {
147
147
  "zod": "^4.4.3",
148
+ "@morpho-org/blue-sdk": "^6.4.0",
148
149
  "@morpho-org/blue-sdk-viem": "^5.2.1",
149
150
  "@morpho-org/midnight-sdk": "^1.2.1",
150
- "@morpho-org/blue-sdk": "^6.4.0",
151
151
  "@morpho-org/morpho-ts": "^2.8.0"
152
152
  },
153
153
  "peerDependencies": {