@1delta/margin-fetcher 5.0.74 → 5.0.76

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/dist/index.d.ts CHANGED
@@ -2024,7 +2024,13 @@ interface MorphoMarket {
2024
2024
  * MARKET-LEVEL menu, valid only when the lender key has ONE borrowable asset
2025
2025
  * (every isolated-market fixed-term lender). CROSS-MARGIN multi-asset
2026
2026
  * lenders — Exactly — carry a menu PER ASSET on `data[*].terms` instead,
2027
- * since each asset has its own fixed pools. */
2027
+ * since each asset has its own fixed pools.
2028
+ *
2029
+ * A market-level card still has to be ATTRIBUTED to a row, and matching
2030
+ * `loanAddress` against each row's asset is wrong the moment the loan token
2031
+ * is also a collateral leg (Morpho Midnight permits it). So Midnight ALSO
2032
+ * puts the card on its loan row (`data[<loan uid>].terms`); prefer the row's
2033
+ * own card wherever one is present and treat this as the fallback. */
2028
2034
  terms?: MarketTermEntry[];
2029
2035
  /**
2030
2036
  * Canonical cross-protocol fixed-term descriptor (Lista brokered + Morpho
@@ -2090,9 +2096,15 @@ interface MorphoGeneralPublicResponse {
2090
2096
  * PER-ASSET fixed-term rate menu, for CROSS-MARGIN multi-asset fixed-term
2091
2097
  * lenders (Exactly): one lender key covers every asset, and each asset has
2092
2098
  * its own fixed pools, so the menu cannot live on `params.market`.
2093
- * Isolated-market fixed-term lenders (Midnight, Term, Lista broker,
2094
- * TermMax, Teller) keep using `params.market.terms` — read that as the
2095
- * fallback when this is absent.
2099
+ * Isolated-market fixed-term lenders (Term, Lista broker, TermMax,
2100
+ * Teller) keep using `params.market.terms` — read that as the fallback
2101
+ * when this is absent. Morpho Midnight emits BOTH: the card sits on its
2102
+ * loan row as well, so a consumer never has to decide which row of the
2103
+ * market is the borrow side (a loan token can also be a collateral leg
2104
+ * there, and a `loanAddress` match then picks two rows).
2105
+ *
2106
+ * Invariant, whichever level it is read from: a rate card describes a
2107
+ * BORROW side. A row with `borrowingEnabled: false` never carries one.
2096
2108
  */
2097
2109
  terms?: MarketTermEntry[];
2098
2110
  /**
@@ -8656,6 +8668,28 @@ interface SavingsVault extends VaultClassificationFields {
8656
8668
  /** Sum of `supplyRate + rewardsRate` — what a depositor actually
8657
8669
  * earns. */
8658
8670
  depositRate: number;
8671
+ /**
8672
+ * Incentive APR the vault's POSITION earns that a depositor does NOT, in
8673
+ * percent. Absent ⇒ not established; `0` ⇒ established and currently none.
8674
+ *
8675
+ * Deliberately outside `rewardsRate`/`depositRate`, which are what a
8676
+ * depositor actually earns — this is the opposite claim, and summing it in
8677
+ * would overstate every affected row.
8678
+ *
8679
+ * Venus's Liquidity Hub is the case it exists for. Its Core YieldGroup holds
8680
+ * vTokens, so XVS supply emissions accrue to that contract inside the
8681
+ * Comptroller — but nothing on the Hub, the YieldGroup or `AdapterCoreV1`
8682
+ * claims them, and nothing routes them into `totalAssets()`. After the
8683
+ * permissionless `claimVenus` the XVS sits on the YieldGroup and can only
8684
+ * leave through an ACM-gated `sweep`. The value is real, measurable, and
8685
+ * not the depositor's.
8686
+ *
8687
+ * Publishing it is a MONITOR, not a headline. Every Core market these Hubs
8688
+ * use read `venusSupplySpeeds == 0` at integration, so today this is `0` —
8689
+ * and the day Venus turns emissions back on, this is the only field on the
8690
+ * row that moves.
8691
+ */
8692
+ strandedRewardsRate?: number;
8659
8693
  /** Whether the share token implements ERC-4626. True for every entry
8660
8694
  * except Native's wNLP, which is a bespoke wrapper (`asset()`,
8661
8695
  * `totalAssets()` and `convertToAssets()` all revert) — the
@@ -8718,6 +8752,20 @@ interface SavingsVault extends VaultClassificationFields {
8718
8752
  * instant leg at all.
8719
8753
  */
8720
8754
  withdrawFeeBps?: number;
8755
+ /**
8756
+ * ENTRY fee in basis points — the mirror of `withdrawFeeBps`, same units and
8757
+ * same discipline: absent means NOT READ, `0` means read and currently free.
8758
+ *
8759
+ * Charged out of the deposit before shares are minted, so a depositor funds
8760
+ * `assets` and is credited on `assets × (1 − bps/10_000)`. `convertToShares`
8761
+ * on this row is already net of it wherever a reader publishes both, so a
8762
+ * consumer sizing an entry does not need to apply it twice.
8763
+ *
8764
+ * Populated only by readers whose protocol exposes the dial. Saturn's
8765
+ * `sUSDat` is the case: 0 at integration against a `MAX_DEPOSIT_FEE_BPS` of
8766
+ * 500, on a `DEFAULT_ADMIN_ROLE` setter, while its docs claim 10 bps.
8767
+ */
8768
+ depositFeeBps?: number;
8721
8769
  /**
8722
8770
  * Seconds a FRESH deposit earns nothing before the rate applies.
8723
8771
  *
@@ -11423,6 +11471,12 @@ interface ClassifyVaultInput {
11423
11471
  address: string;
11424
11472
  /** Underlying token symbol, when known (drives `denomination`). */
11425
11473
  underlyingSymbol?: string;
11474
+ /**
11475
+ * Underlying token ADDRESS, when known. Consulted against
11476
+ * {@link STABLECOIN_UNDERLYING_OVERRIDES} before the symbol heuristic, for
11477
+ * the underlyings whose ticker cannot identify them.
11478
+ */
11479
+ underlyingAddress?: string;
11426
11480
  }
11427
11481
  /**
11428
11482
  * Classify a vault on both axes. Pure — no I/O. `yieldProfile` is