@1delta/margin-fetcher 0.0.409 → 0.0.411

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
@@ -3,7 +3,7 @@ import { Lender } from '@1delta/lender-registry';
3
3
  export { isAaveType, isAaveV2Type, isAaveV32Type, isAaveV3Type, isCompoundV3, isCompoundV3Type, isInit, isMorphoType, isMultiMarket, isYLDR } from '@1delta/lender-registry';
4
4
  import { DebitData, LenderDebitData, LstAcceptedInput } from '@1delta/calldata-sdk';
5
5
  import { RelayProxyConfig } from '@1delta/proxy-fetch';
6
- import { TermMarketConfig, LiquityBranchConfig, LiquityConfigChain, RiverMarketConfig, RiverConfigChain, RiverChainData, InverseMarketConfig, InverseConfigChain, InverseChainData, TellerPoolConfig, MorphoTypeVaultEntry } from '@1delta/data-sdk';
6
+ import { TermMarketConfig, LiquityBranchConfig, LiquityConfigChain, RiverMarketConfig, RiverConfigChain, RiverChainData, InverseMarketConfig, InverseConfigChain, InverseChainData, UsddMarketConfig, UsddConfigChain, UsddChainData, TellerPoolConfig, MorphoTypeVaultEntry } from '@1delta/data-sdk';
7
7
  export { MorphoLensAbi } from '@1delta/abis';
8
8
 
9
9
  interface GenericCurrency {
@@ -444,16 +444,33 @@ interface FixedTermInfo {
444
444
  */
445
445
  auction?: FixedTermAuction;
446
446
  }
447
- /** A Lista loan, attached to its own entry in the positions array. */
447
+ /**
448
+ * A single fixed-term loan, attached to its own entry in the positions array.
449
+ *
450
+ * Named for Lista (the first producer) but SHARED by every fixed-term lender
451
+ * that emits per-loan rows — Lista, Exactly, TermMax, Teller. Fields are
452
+ * therefore mostly optional and several are lender-specific; see
453
+ * [FIXED_TERM_REPAY_TERMS.md](../../../../FIXED_TERM_REPAY_TERMS.md) for which
454
+ * lender populates what and for the exact repay economics behind each number.
455
+ *
456
+ * `loanId` is the WRITE TARGET and its meaning differs per lender (Lista posId /
457
+ * Exactly maturity-as-string / TermMax gtId / Teller bidId) — check the lender
458
+ * before using it. `termId` is the RATE-MENU id and is NOT interchangeable with
459
+ * it (Exactly is the only lender where the two coincide, both = maturity).
460
+ */
448
461
  interface ListaTermLoan {
449
462
  /** loanId — the repay target for the LISTA_BROKER_REPAY composer op. For fixed loans this is the
450
- * posId; for the dynamic (flexible) loan it is the dynamic sentinel (type(uint128).max). */
463
+ * posId; for the dynamic (flexible) loan it is the dynamic sentinel (type(uint128).max).
464
+ * Other lenders reuse the slot: Exactly = String(maturity), TermMax = gtId, Teller = bidId. */
451
465
  loanId: string;
452
466
  /** true for the flexible (dynamic / variable-rate) loan; fixed loans omit it */
453
467
  isDynamic?: boolean;
454
468
  /** best-effort term product id (matched from duration vs the current menu); may be undefined */
455
469
  termId?: number;
456
- /** outstanding debt in loan-token units (principal + accrued interest) */
470
+ /** outstanding debt in loan-token units. Lista: principal + accrued interest.
471
+ * Static-face-value lenders (Exactly / TermMax / Term): the EXIT-NOW cost —
472
+ * for Exactly that is discounted early and penalty-inflated when overdue, so
473
+ * compare against `faceValue` rather than assuming it is the face. */
457
474
  debt: string;
458
475
  /** locked annualised borrow rate in PERCENT (e.g. 3.857 = 3.857% APR) */
459
476
  apr?: number;
@@ -462,9 +479,27 @@ interface ListaTermLoan {
462
479
  termDays?: number;
463
480
  /** outstanding accrued interest in loan-token units */
464
481
  accruedInterest?: string;
465
- /** early-repayment penalty (loan-token units) to close the loan now; 0 once matured */
482
+ /** early-repayment penalty (loan-token units) to close the loan now; 0 once matured.
483
+ * Lista only — the OPPOSITE sign to Exactly's `earlyRepayDiscount` below. */
466
484
  earlyRepayPenalty?: string;
467
485
  isMatured?: boolean;
486
+ /** amount owed AT maturity (principal + fee). Static — no accrual index; it
487
+ * grows only via a late penalty where the protocol has one. */
488
+ faceValue?: string;
489
+ /** Exactly: rebate for repaying BEFORE maturity (`faceValue − debt`). Exactly
490
+ * never charges an early-repay fee, but this is 0 when the fixed pool has no
491
+ * unassigned earnings left, so it is not a guaranteed saving. */
492
+ earlyRepayDiscount?: string;
493
+ /** Exactly: penalty accrued so far past maturity (`debt − faceValue`). */
494
+ latePenalty?: string;
495
+ /** Exactly: further penalty per additional day overdue — LINEAR on face, not
496
+ * compounding. */
497
+ latePenaltyPerDay?: string;
498
+ /** annualized late-penalty rate in PERCENT (Exactly `penaltyRate`; ~164 %/yr).
499
+ * A mutable market parameter, snapshotted per fetch. */
500
+ latePenaltyApr?: number;
501
+ /** seconds past maturity; 0 until overdue */
502
+ secondsLate?: number;
468
503
  }
469
504
  interface MorphoLendingPositions extends BaseLendingPositions {
470
505
  isWhitelisted?: boolean;
@@ -1560,6 +1595,26 @@ interface MarketBook {
1560
1595
  bids: PublicBookLevel[];
1561
1596
  asks: PublicBookLevel[];
1562
1597
  }
1598
+ /**
1599
+ * One entry in a fixed-term rate menu. Lives on `params.market.terms` for
1600
+ * single-borrowable-asset markets, and on `data[*].terms` for cross-margin
1601
+ * multi-asset lenders (Exactly), where each asset has its own fixed pools.
1602
+ *
1603
+ * `termId` semantics are LENDER-SPECIFIC — Exactly/TermMax = the unix maturity,
1604
+ * Teller = duration in seconds, Lista = the broker product id, Midnight/Term =
1605
+ * `0` placeholder. See FIXED_TERM_REPAY_TERMS.md.
1606
+ */
1607
+ interface MarketTermEntry {
1608
+ termId: number;
1609
+ durationSecs: number;
1610
+ durationDays: number;
1611
+ /** annualised borrow rate in PERCENT (e.g. 3.857 = 3.857% APR) */
1612
+ apr: number;
1613
+ /** annualised fixed LEND rate in PERCENT at this maturity (Exactly only) */
1614
+ depositApr?: number;
1615
+ /** borrowable liquidity at this maturity, loan-token human units (Exactly only) */
1616
+ available?: number;
1617
+ }
1563
1618
  interface MorphoMarket {
1564
1619
  /** the 1delta lender enum */
1565
1620
  lender: string;
@@ -1590,19 +1645,13 @@ interface MorphoMarket {
1590
1645
  /** IRM rate floor */
1591
1646
  rateFloor?: string;
1592
1647
  /** Fixed-term rate menu — available term products (Lista brokered markets,
1593
- * Term/Midnight single-maturity markets, Exactly multi-maturity markets —
1594
- * for Exactly `termId` = the pool's unix maturity timestamp). */
1595
- terms?: {
1596
- termId: number;
1597
- durationSecs: number;
1598
- durationDays: number;
1599
- /** annualised borrow rate in PERCENT (e.g. 3.857 = 3.857% APR) */
1600
- apr: number;
1601
- /** annualised fixed LEND rate in PERCENT at this maturity (Exactly only) */
1602
- depositApr?: number;
1603
- /** borrowable liquidity at this maturity, loan-token human units (Exactly only) */
1604
- available?: number;
1605
- }[];
1648
+ * Term/Midnight single-maturity markets).
1649
+ *
1650
+ * MARKET-LEVEL menu, valid only when the lender key has ONE borrowable asset
1651
+ * (every isolated-market fixed-term lender). CROSS-MARGIN multi-asset
1652
+ * lenders — Exactly — carry a menu PER ASSET on `data[*].terms` instead,
1653
+ * since each asset has its own fixed pools. */
1654
+ terms?: MarketTermEntry[];
1606
1655
  /**
1607
1656
  * Canonical cross-protocol fixed-term descriptor (Lista brokered + Morpho
1608
1657
  * Midnight). Present on fixed-rate/fixed-maturity markets only. See
@@ -1653,7 +1702,7 @@ interface MorphoGeneralPublicResponse {
1653
1702
  * - `'zeroInterest'` — NO ongoing rate at all (River/Satoshi). The borrow
1654
1703
  * cost is the one-off `originationFee`, not an APR.
1655
1704
  */
1656
- rateModel?: 'variable' | 'userSet' | 'fixedTerm' | 'zeroInterest';
1705
+ rateModel?: 'variable' | 'userSet' | 'fixedTerm' | 'zeroInterest' | 'dbr' | 'protocolSet';
1657
1706
  /**
1658
1707
  * One-off fee charged ONCE at borrow time, as a PERCENT of the amount
1659
1708
  * borrowed (e.g. `0.5` = 0.5%). Front-loaded cost that is NOT an APR and
@@ -1663,6 +1712,20 @@ interface MorphoGeneralPublicResponse {
1663
1712
  * only for an effective-cost-since-open view.
1664
1713
  */
1665
1714
  originationFee?: number;
1715
+ /**
1716
+ * PER-ASSET fixed-term rate menu, for CROSS-MARGIN multi-asset fixed-term
1717
+ * lenders (Exactly): one lender key covers every asset, and each asset has
1718
+ * its own fixed pools, so the menu cannot live on `params.market`.
1719
+ * Isolated-market fixed-term lenders (Midnight, Term, Lista broker,
1720
+ * TermMax, Teller) keep using `params.market.terms` — read that as the
1721
+ * fallback when this is absent.
1722
+ */
1723
+ terms?: MarketTermEntry[];
1724
+ /**
1725
+ * PER-ASSET fixed-term descriptor, same rationale as `terms` above
1726
+ * (Exactly). Falls back to `params.market.fixedTerm` when absent.
1727
+ */
1728
+ fixedTerm?: FixedTermInfo;
1666
1729
  rewards?: RewardsList;
1667
1730
  decimals: number;
1668
1731
  config: {
@@ -2521,26 +2584,46 @@ interface ExactlyMarketsRaw {
2521
2584
  */
2522
2585
  declare function fetchExactlyMarkets(chainId: string): Promise<ExactlyMarketsRaw>;
2523
2586
 
2524
- /** Synthesized per-market lender key, e.g. `EXACTLY_<MARKET_ADDRESS_HEX_UPPER>`. */
2525
- declare function exactlyLenderKey(market: string): string;
2526
- /** Recover the Market address from an `EXACTLY_<HEX>` lender key (or undefined). */
2527
- declare function exactlyMarketFromLenderKey(lender: string): string | undefined;
2528
2587
  /**
2529
- * Map the on-chain Previewer batch into the shared `MorphoGeneralPublicResponse`
2530
- * shape (identical to Midnight/Term), keyed by `EXACTLY_<MARKET_ADDRESS>` — one
2531
- * key per asset Market (NOT per maturity; the maturity menu is the market's
2532
- * `params.market.terms[]`, `termId` = maturity timestamp).
2588
+ * The ONE Exactly lender key per chain.
2533
2589
  *
2534
- * Per market:
2535
- * - the LOAN entry carries the FLOATING rates (`depositRate` /
2536
- * `variableBorrowRate`) plus the best live fixed borrow APR on
2537
- * `stableBorrowRate`; its own asset is also collateral (self-pair
2538
- * adjustFactor²) since Exactly is cross-margin;
2539
- * - one COLLATERAL entry per SIBLING market (cross-margin: any entered market
2540
- * collateralizes any borrow) with pairwise LTV = adjF_coll × adjF_borrow
2541
- * (multiplicative, Dolomite-style) and the Auditor liquidation bonus;
2542
- * - `params.market.fixedTerm` = `{ model: 'exactly', earlyRepay: 'discount',
2543
- * fees.latePenaltyApr }` see the wrapper README for the repay mechanics.
2590
+ * Exactly is a CROSS-MARGIN protocol: a single per-chain `Auditor` (a
2591
+ * Compound-V2-shaped comptroller, NOT a Euler controller) holds one
2592
+ * `enterMarket` bitmap per account, every entered deposit backs debt in ANY
2593
+ * market simultaneously, and health is one global check. The per-asset `Market`
2594
+ * contracts exist because each is the ERC-4626 share token for its asset and
2595
+ * carries that asset's rates / fixed pools exactly like cUSDC and cETH under
2596
+ * one Comptroller. They are NOT isolated markets.
2597
+ *
2598
+ * So Exactly is modeled like Compound V2: ONE lender key, one entry per asset.
2599
+ * (It was previously split into synthesized `EXACTLY_<MARKET_ADDR>` keys that
2600
+ * only ever existed because `terms[]` / `fixedTerm` lived on `params.market`,
2601
+ * which assumes one borrowable asset per key. Both now also exist per asset on
2602
+ * `data[*]`, so the split is gone along with the cross-margin collateral
2603
+ * mirroring, the double-count hazard and the optimistic per-key health it
2604
+ * forced. Resolve a Market contract from the ASSET via
2605
+ * `exactlyMarketByAsset(chainId, asset)` — or from the entry's `poolId`.)
2606
+ */
2607
+ declare const EXACTLY_LENDER_KEY = "EXACTLY";
2608
+ /**
2609
+ * Map the on-chain Previewer batch into the shared `MorphoGeneralPublicResponse`
2610
+ * shape, under the SINGLE cross-margin {@link EXACTLY_LENDER_KEY} — one entry
2611
+ * per ASSET (the Compound V2 shape), never one key per Market.
2612
+ *
2613
+ * Per asset entry:
2614
+ * - FLOATING rates (`depositRate` / `variableBorrowRate`) plus the best live
2615
+ * fixed borrow APR on `stableBorrowRate`;
2616
+ * - its OWN `terms[]` maturity menu (`termId` = the pool's maturity) and its
2617
+ * OWN `fixedTerm` descriptor pointing at that asset's Market — per-asset
2618
+ * because each asset has its own fixed pools;
2619
+ * - risk as `collateralFactor = adjustFactor` + `borrowFactor = 1/adjustFactor`,
2620
+ * which is the Auditor's own formula (their product = the pairwise LTV);
2621
+ * - `poolId` / `exactly.market` = the Market contract (the write target).
2622
+ *
2623
+ * Every asset is simultaneously borrowable AND collateral for every other, so
2624
+ * there are no sibling-collateral rows. `params.market` carries only the
2625
+ * pool-wide descriptor (Auditor as `id`, a market-level `fixedTerm` without a
2626
+ * provider address). See the wrapper README for the repay mechanics.
2544
2627
  */
2545
2628
  declare function convertExactlyMarketsToResponse(raw: ExactlyMarketsRaw, chainId: string, prices?: {
2546
2629
  [asset: string]: number;
@@ -2566,7 +2649,15 @@ declare function exactlyPenaltyRateToAprPercent(penaltyRatePerSecond: bigint | u
2566
2649
  */
2567
2650
  declare function exactlyPairLtv(collateralAdjustFactor: bigint | undefined, borrowAdjustFactor: bigint | undefined): number;
2568
2651
 
2569
- /** Per-position fixed-term detail attached to the position row (strings raw). */
2652
+ /**
2653
+ * Per-position fixed-term detail attached to the position row (raw strings).
2654
+ *
2655
+ * Carries the FULL exit economics so a repay/withdraw UI needs no second read:
2656
+ * `faceValue` is what is owed/paid at maturity, `previewValue` is what the exit
2657
+ * actually costs/pays RIGHT NOW, and exactly one of `earlyRepayDiscount` /
2658
+ * `earlyExitCost` / `latePenalty` explains the gap. See the "repay terms"
2659
+ * section of the Exactly README for the source-verified formulas.
2660
+ */
2570
2661
  interface ExactlyUserFixedPosition {
2571
2662
  /** unix maturity */
2572
2663
  maturity: number;
@@ -2576,12 +2667,32 @@ interface ExactlyUserFixedPosition {
2576
2667
  principal: string;
2577
2668
  /** face fee locked at trade time (raw asset units) */
2578
2669
  fee: string;
2670
+ /** face value at maturity = principal + fee. Static — Exactly fixed debt does
2671
+ * NOT accrue an index; it only grows via the late penalty below. */
2672
+ faceValue: string;
2579
2673
  /** live exit value now: withdraw-now / repay-now incl. discount or overdue
2580
2674
  * penalty (raw asset units) — from the Previewer */
2581
2675
  previewValue: string;
2582
2676
  /** true once maturity passed and the position is still open (borrows accrue
2583
2677
  * the per-second late penalty until repaid) */
2584
2678
  overdue: boolean;
2679
+ /** seconds past maturity (0 until overdue) */
2680
+ secondsLate: number;
2681
+ /** BORROW before maturity: face − repay-now, the REBATE for repaying early
2682
+ * (Exactly never charges an early-repay fee). Absent otherwise. */
2683
+ earlyRepayDiscount?: string;
2684
+ /** DEPOSIT before maturity: face − payout-now, the HAIRCUT for exiting a
2685
+ * fixed deposit early (sold back at the current curve rate). Absent
2686
+ * otherwise. */
2687
+ earlyExitCost?: string;
2688
+ /** BORROW past maturity: repay-now − face, penalty accrued SO FAR. Absent
2689
+ * otherwise. */
2690
+ latePenalty?: string;
2691
+ /** BORROW: penalty this position accrues per further day overdue (raw units,
2692
+ * linear on face — not compounding). Present for borrows only. */
2693
+ latePenaltyPerDay: string;
2694
+ /** market's linear late-penalty rate as an annualized percent (e.g. 164.24) */
2695
+ latePenaltyApr: number;
2585
2696
  }
2586
2697
 
2587
2698
  /**
@@ -2927,6 +3038,108 @@ interface InversePositionInfo {
2927
3038
  dbrSignedBalance: string;
2928
3039
  }
2929
3040
 
3041
+ /**
3042
+ * One USDD market (= one collateral ilk) after the on-chain batch.
3043
+ * Raw bigints; `null` = failed allowFailure read. Maker fixed-point:
3044
+ * wad 1e18 / ray 1e27 / rad 1e45.
3045
+ */
3046
+ interface UsddMarketRaw {
3047
+ market: UsddMarketConfig;
3048
+ /** Vat.ilks — total normalised debt (wad). */
3049
+ Art: bigint | null;
3050
+ /** Vat.ilks — debt accumulator (ray); debt = Art × rate (rad). */
3051
+ rate: bigint | null;
3052
+ /** Vat.ilks — liquidation-adjusted price (ray): price / (par × mat). */
3053
+ spot: bigint | null;
3054
+ /** Vat.ilks — ilk debt ceiling (rad). */
3055
+ line: bigint | null;
3056
+ /** Vat.ilks — per-urn debt floor (rad). */
3057
+ dust: bigint | null;
3058
+ /** Jug.ilks — per-second stability fee (ray). */
3059
+ duty: bigint | null;
3060
+ /** Spot.ilks — liquidation ratio (ray). */
3061
+ mat: bigint | null;
3062
+ /** gem.balanceOf(gemJoin) — total collateral custodied by the adapter
3063
+ * (locked ink + unswept gem), gem-native decimals. */
3064
+ joinBalance: bigint | null;
3065
+ }
3066
+ interface UsddMarketsRaw {
3067
+ lender: string;
3068
+ config?: UsddConfigChain;
3069
+ chainData?: UsddChainData;
3070
+ markets: UsddMarketRaw[];
3071
+ }
3072
+
3073
+ /** Ilk string → bytes32 (`'WBTC-A'` → right-padded hex). */
3074
+ declare const usddIlkBytes32: (ilk: string) => `0x${string}`;
3075
+ /**
3076
+ * Fetch all market data of ONE USDD (Maker-fork) deployment — FULLY ON-CHAIN
3077
+ * via one retrying multicall. The ilk roster comes from lender-metadata
3078
+ * (`usddConfig`/`usddMarkets`, discovered + verified by its `update:usdd`
3079
+ * generator); this fetch reads the LIVE Vat/Jug/Spot params per ilk plus the
3080
+ * gem-join balance (total custodied collateral — the Vat keeps no per-ilk
3081
+ * ink total).
3082
+ *
3083
+ * The roster is EMPTY on both EVM chains today (`cdpi() = 0`, no ilk filed —
3084
+ * see USDD_PLAN.md), so this returns zero markets without issuing a
3085
+ * multicall. The code path stays live so the day metadata fills, data flows
3086
+ * with no code change.
3087
+ */
3088
+ declare function fetchUsddMarkets(lender: string, chainId: string): Promise<UsddMarketsRaw>;
3089
+
3090
+ /**
3091
+ * Synthesized per-ilk lender key, e.g. `USDD_1_WBTC-A`. The CHAIN ID is part
3092
+ * of the key (Fluid/River convention) because Ethereum and BNB run
3093
+ * INDEPENDENT Maker stacks that could file the same ilk string.
3094
+ */
3095
+ declare function usddLenderKey(lender: string, chainId: string | number, ilk: string): string;
3096
+ /**
3097
+ * Recover `{ lender, chainId, ilk }` from a per-market key (or undefined).
3098
+ * Ilk strings are Maker `<GEM>-<CLASS>` tokens (`WBTC-A`, `PSM-USDT-A`) —
3099
+ * uppercase alphanumerics + dashes; the leading `\d+_` disambiguates from
3100
+ * the bare `USDD` key.
3101
+ */
3102
+ declare function usddKeyParts(key: string): {
3103
+ lender: string;
3104
+ chainId: string;
3105
+ ilk: string;
3106
+ } | undefined;
3107
+ /**
3108
+ * Map one USDD deployment's on-chain batch into the shared
3109
+ * `MorphoGeneralPublicResponse` shape, keyed `USDD_<chainId>_<ILK>` — one key
3110
+ * per collateral ilk.
3111
+ *
3112
+ * Per market:
3113
+ * - COLLATERAL entry: totals = the gem-join balance (the Vat keeps no
3114
+ * per-ilk ink total; the adapter custodies locked + unswept gems);
3115
+ * LTV = 1/mat; liquidation penalty = chop − 1 (Dog.chop, wad).
3116
+ * - LOAN entry (USDD): `totalDebt` = Art × rate (rad → human);
3117
+ * `variableBorrowRate` = the stability fee as a nominal APR percent —
3118
+ * `(duty − RAY)/RAY × YEAR_SECONDS × 100`, the same annualisation as the
3119
+ * Pot's dsr in the savings fetcher (never `^ seconds − 1`, which is the
3120
+ * APY); `borrowLiquidity` = ceiling headroom `(line − Art × rate)/1e45`.
3121
+ * There is NO protocol supply side (USDD is Vat-minted) — the earn side
3122
+ * is sUSDD, carried by the savings provider, so `totalDeposits` on the
3123
+ * loan row is 0 and `depositRate` 0 here.
3124
+ * - Collateral price: Vat.spot × mat (both ray) recovers the par-adjusted
3125
+ * OSM price without reading the pip (whitelisted `peek` would revert);
3126
+ * shared price map as fallback.
3127
+ */
3128
+ declare function convertUsddMarketsToResponse(raw: UsddMarketsRaw, chainId: string, prices?: {
3129
+ [asset: string]: number;
3130
+ }, _additionalYields?: AdditionalYields, tokens?: GenericTokenList): {
3131
+ [m: string]: MorphoGeneralPublicResponse;
3132
+ };
3133
+
3134
+ /** Per-CDP position detail attached to the debt row (raw strings). */
3135
+ interface UsddPositionInfo {
3136
+ /** DssCdpManager id — the sub-account id and every write op's target. */
3137
+ cdpId: string;
3138
+ /** Urn handle in the Vat. */
3139
+ urn: string;
3140
+ ilk: string;
3141
+ }
3142
+
2930
3143
  /**
2931
3144
  * Raw on-chain read for ONE Teller `LenderCommitmentGroup` pool. All amounts are
2932
3145
  * raw token base units; `minRateBps` is the pool's min borrow APR in BASIS
@@ -5018,11 +5231,41 @@ interface LstWithdrawalRequest {
5018
5231
  * ERC-7540 requestId, …). Encoded as a string for cross-protocol
5019
5232
  * uniformity. */
5020
5233
  requestId: string;
5021
- /** Raw underlying amount the request will return on claim. Wei-like
5022
- * integer string. Some protocols only know this at claim time
5023
- * (queue-finalization with floating finalization rate) — those
5024
- * surface the **expected** amount at request time. */
5234
+ /** Raw amount the request will return on claim, in the token that
5235
+ * escrow actually pays out. Wei-like integer string. Some protocols
5236
+ * only know this at claim time (queue-finalization with a floating
5237
+ * finalization rate) — those surface the **expected** amount at
5238
+ * request time.
5239
+ *
5240
+ * Strata is the one entry where the denomination is not simply the
5241
+ * vault's underlying, and it is easy to get wrong: the escrow is
5242
+ * **keyed** by the collateral token (`finalize(sUSDe, user)`) but the
5243
+ * amount it records is whatever that leg settles in — the tranche's
5244
+ * `asset()` (USDe) on the UnstakeCooldown, which books Ethena's
5245
+ * unstake output, and collateral-token shares on the ERC20Cooldown.
5246
+ * We do not normalize between them; read `withdrawQueue` to tell the
5247
+ * legs apart. Fork-verified for the UnstakeCooldown leg 2026-08-04
5248
+ * (10,000 USDe in → 9,997.5 USDe out at a 2.49 bps exit fee, with
5249
+ * zero sUSDe paid); the ERC20Cooldown denomination is read off the
5250
+ * strategy source, which escrows `sUSDe.previewWithdraw(baseAssets)`
5251
+ * shares. */
5025
5252
  amountUnderlying: string;
5253
+ /** Raw share amount of the request, for protocols whose claim call
5254
+ * takes shares (ERC-7540 `redeem`, sUSD3's plain 4626 `redeem`).
5255
+ * Passed back verbatim into the claim builder. */
5256
+ shares?: string;
5257
+ /** The escrow contract this request actually lives on, when the
5258
+ * protocol runs more than one and the registry's default is not
5259
+ * necessarily the right claim target. Strata gives each market both
5260
+ * an `UnstakeCooldown` (base-asset leg) and an `ERC20Cooldown`
5261
+ * (collateral-token leg) — a claim built against the wrong one is a
5262
+ * no-op — so the reader reports which. Passed back verbatim into
5263
+ * the claim builder. */
5264
+ withdrawQueue?: string;
5265
+ /** The token the escrow books this request under, when the claim
5266
+ * call takes it as an argument (Strata's
5267
+ * `finalize(claimToken, user)`). Passed back verbatim. */
5268
+ claimToken?: string;
5026
5269
  /** Status discriminator. */
5027
5270
  status: LstWithdrawalStatus;
5028
5271
  /** Unix seconds when the request becomes claimable. Set for
@@ -5059,7 +5302,7 @@ type LstWithdrawalStatus =
5059
5302
  | 'expired';
5060
5303
  /** Withdrawal-reader implementation kind — drives which enumeration
5061
5304
  * function the user is queried against. */
5062
- type LstWithdrawalReaderKind = 'lidoQueue' | 'etherfiNft' | 'yieldNestNft' | 'staderEthxQueue' | 'staderMaticXQueue' | 'renzoQueue' | 'kelpQueue' | 'benqiSavaxQueue' | 'beetsStSQueue' | 'hyperbeatBeHype7540' | 'erc7540' | 'ethenaCooldown' | 'swellNft' | 'stakeWiseSubgraph' | 'mantleCallerSuppliedIds' | 'pufferCallerSuppliedIds' | 'trufinCallerSuppliedIds' | 'lairCallerSuppliedIds' | 'stceloAccountQueue' | 'kinetiqQueue' | 'beHypeQueue' | 'valantisBurnQueue' | 'listaQueue' | 'iberaQueue' | 'primeStakingQueue' | 'berapawRedeemQueue' | 'stellaUnbondQueue' | 'eventsOnly' | 'noQueue' | 'unverified';
5305
+ type LstWithdrawalReaderKind = 'lidoQueue' | 'etherfiNft' | 'yieldNestNft' | 'staderEthxQueue' | 'staderMaticXQueue' | 'renzoQueue' | 'kelpQueue' | 'benqiSavaxQueue' | 'beetsStSQueue' | 'hyperbeatBeHype7540' | 'erc7540' | 'ethenaCooldown' | 'susd3Cooldown' | 'strataCooldown' | 'swellNft' | 'stakeWiseSubgraph' | 'mantleCallerSuppliedIds' | 'pufferCallerSuppliedIds' | 'trufinCallerSuppliedIds' | 'lairCallerSuppliedIds' | 'stceloAccountQueue' | 'kinetiqQueue' | 'beHypeQueue' | 'valantisBurnQueue' | 'listaQueue' | 'iberaQueue' | 'primeStakingQueue' | 'berapawRedeemQueue' | 'stellaUnbondQueue' | 'eventsOnly' | 'noQueue' | 'unverified';
5063
5306
  /** Map keyed by lowercased LST share-token address. The orchestrator
5064
5307
  * fetches all LSTs on a chain in parallel and returns this map
5065
5308
  * (possibly with empty arrays for LSTs the user has no requests
@@ -5105,6 +5348,17 @@ interface LstWithdrawalRegistryEntry {
5105
5348
  /** Polygon IStakeManager — only for `staderMaticXQueue`. The
5106
5349
  * finalization check requires `epoch()` + `withdrawalDelay()`. */
5107
5350
  polygonStakeManager?: string;
5351
+ /** Second escrow contract probed with the same reader — only for
5352
+ * `strataCooldown`, where a market runs both an `UnstakeCooldown`
5353
+ * (base-asset leg, in `withdrawalContract`) and an `ERC20Cooldown`
5354
+ * (collateral-token leg). Lowercased. */
5355
+ secondaryWithdrawalContract?: string;
5356
+ /** The token an escrow's requests are booked under — only for
5357
+ * `strataCooldown` (`balanceOf(escrowToken, user)` /
5358
+ * `finalize(escrowToken, user)`). The market's staked collateral
5359
+ * (sUSDe, sNUSD, mHYPER, …), NOT the tranche's `asset()`.
5360
+ * Lowercased. */
5361
+ escrowToken?: string;
5108
5362
  }
5109
5363
  /** Returns the withdrawal-registry entries for a chain, or `[]`. */
5110
5364
  declare const getLstWithdrawalRegistry: (chainId: string, extraEntries?: LstWithdrawalRegistryEntry[]) => LstWithdrawalRegistryEntry[];
@@ -7458,4 +7712,4 @@ interface FetchTokenBalancesOptions {
7458
7712
  */
7459
7713
  declare function fetchTokenBalances(chainId: string, account: string, tokens: string[], options?: FetchTokenBalancesOptions): Promise<TokenBalanceResult>;
7460
7714
 
7461
- export { type AaveMetadata, type AaveV2Public, type AaveV2UserReserveResponse, type AaveV3Public, type AaveV3UserReserveResponse, type AdditionalYields, ApiBookSource, type AprData, type BalanceData, type BaseLendingPosition, type BasicReserveResponse, type ChainDiagnostic, type ChainLinkResponse, type ChainQuery, type ChainSummary, type CompoundV2Metadata, type CompoundV3Public, type CompoundV3UserReserveResponse, type ConfigEntry, type CoreValidators, DEFAULT_MIDNIGHT_API, DEFAULT_OUTLIER_GUARD, DEFAULT_STALE_REJECT_SECONDS, DEFAULT_TERMMAX_API, type Denomination, type DepthMap, EMPTY_BALANCE, type EModeAssets, type EModeData, type EModeResult, type EulerEarnVault, type EulerEarnVaults, type EulerV2Metadata, type ExactlyFixedPool, type ExactlyFixedPosition, type ExactlyMarketAccount, type ExactlyMarketsRaw, type ExactlyUserFixedPosition, type ExtraValidationCall, type FeedObservation, type FeedStat, type FeedStatsMap, type FeedTimestampMap, type FetchListaVaultsFromChainOptions, type FetchMorphoVaultsFromChainOptions, type FetchOraclePricesOptions, type FetchTokenBalancesOptions, type FlattenPriorityConfig, type FluidFToken, type FluidFTokens, type FullLenderRewardsMap, GMX_API_HOSTS, GMX_READ_CONTRACTS, GMX_SUPPORTED_CHAINS, type GenericCurrency, type GenericTokenList, type GetVaultPublicDataAllOptions, type GmxExecutionFees, type GmxPendingDeposit, type GmxPendingWithdrawal, type GmxReadContracts, type GmxUserBalance, type GmxUserPositions, type GmxUserPositionsOptions, type GmxVault, type GmxVaultKind, type GmxVaults, type GmxVaultsFetchOptions, type GroupAccumulator, HYPERCORE_VAULT_REGISTRY, type HypercoreLockStatus, type HypercoreUserPositionsOptions, type HypercoreVault, type HypercoreVaultPosition, type HypercoreVaultRegistryEntry, type HypercoreVaults, type HypercoreVaultsFetchOptions, IDLE_MARKET_ID, INTERFACE_IDS, type InitMetadata, type InitPublic, type InitUserReserveResponse, type InterfaceKind, type InverseMarketRaw, type InverseMarketsRaw, type InversePositionInfo, LAGOON_API_URL, LAGOON_CHAIN_IDS, type LagoonApiVault, type LagoonSyncMode, type LagoonVault, type LagoonVaults, type LenderConfigData, type LenderConfigMap, type LenderCrossPoolMeta, type LenderData, type LenderDataEntry, type LenderInfo, type LenderInfoMap, type LenderPublicBase, type LenderRewardsMap, type LenderSummary, type LenderToLenderCrossPoolMeta, type LenderTotalAmounts, type LenderUserQuery, type LenderUserResponse, type LenderYieldComplete, type LenderYields$1 as LenderYields, LendingMode, type LiquityBranchRaw, type LiquityDiscoveredTrove, type LiquityDiscovery, type LiquityMarketsRaw, type LiquitySpInfo, type LiquityTroveInfo, type ListaMarketOverrides, type LoopPostTradeMetrics, type LstDelegation, type LstDelegationKind, type LstValidator, type LstWithdrawalFetchOptions, type LstWithdrawalRegistryEntry, type LstWithdrawalRequest, type LstWithdrawalRequestsByLst, type LstWithdrawalStatus, MORPHO_LENS, MaxParamThresholds, type MergedUserData, type MidnightBook, type MidnightBookLevel, type MidnightBookSource, type ModeBase, type MorphoMarketOverrides, type MorphoSubgraphProxyConfig, type MorphoUserMarketBalance, type MorphoUserReserveResponse, type MorphoVault, type MorphoVaults, type MulticallRpcBatch, type NumberMap, type OracleDiagnostics, type OraclePriceEntry, type OraclePricesResult, type OutlierGuardConfig, type ParsedBalanceData, type ParsedResponse, type ParsedUserBalance, type PermissionParams, type PoolData, type PoolWithMeta, type PortfolioSummary, type PortfolioTotals, type PostTradeMetrics, type PreparedCall, type PreparedMergedMulticallParams, type PreparedMergedRpcCalls, type PreparedTokenBalanceRpcCalls, type PreparedUserDataRpcCalls, type PriceDerivation, type PriceSelection, type ProtocolParams, type ProviderOptions, type RawRpcBatch, type RawRpcCall, type RawRpcResponse, type RiverMarketRaw, type RiverMarketsRaw, type RiverPositionInfo, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, type SelectPricesOptions, type SiloVault, type SiloVaults, type StCeloValidatorGroup, type StaleFeedEntry, type StructuredOraclePrices, type SubAccountSummary, type SumerPositionInput, type SummaryAprData, type SummaryBalanceData, TELLER_CALLS_PER_BID, TERMMAX_CALLS_PER_ACCOUNT, DECIMAL_BASE as TERMMAX_DECIMAL_BASE, TERMMAX_LIQUIDATION_PENALTY, TERMMAX_LIQUIDATION_WINDOW_SECS, TERMMAX_LIQUIDATOR_BONUS, TERMMAX_PARTIAL_CLOSE_FACTOR, TERMMAX_PARTIAL_LIQUIDATION_THRESHOLD_USD, type TellerDiscoveredBid, type TellerDiscovery, type TellerMarketsRaw, type TellerPoolRaw, type TermAuctionOrder, type TermAuctionOrders, type TermBookSource, type TermBookTop, type TermListing, type TermMarketRaw, TermMaxApiSource, type TermMaxBookTop, type TermMaxCurveSegment, type TermMaxDataSource, type TermMaxDiscovery, type TermMaxFeeConfig, type TermMaxMarketConfig, type TermMaxMarketRaw, type TermMaxOrderState, TermSubgraphSource, type TokenApprovalMeta, type TokenApprovalParams, type TokenBalanceEntry, type TokenBalanceQuery, type TokenBalanceResult, type TokenEntry, type TokenList, type TokenListInput, type TrackerDiagnostic, UPSHIFT_CHAIN_IDS, UPSHIFT_VAULTS_URL, type USDPriceMap, type UpshiftApiAsset, type UpshiftApiVault, type UpshiftVault, type UpshiftVaults, type UserApr, type UserConfig, type UserData, type UserDataResult, type UserLendingPosition, VAULT_SHARE_PRICE_PROBE, VOLATILE_VAULT_OVERRIDES, type VaultAprResult, type VaultClassification, type VaultClassificationFields, type VaultLookupEntry, type VaultMarketExposure, type VaultProvider, type VaultPublicDataAll, type VaultPublicDataResult, type VaultYieldSeries, type VaultYieldSnapshot, type YDaemonVault, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, type YearnVault, type YearnVaultKind, type YearnVaults, type YieldProfile, accountDepositListKey, accountWithdrawalListKey, appendSnapshot, applyPositionDelta, attachPricesToFlashLiquidity, buildFluidFTokensCall, buildLiquityUserCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildSumerAccumulators, buildSummaries, buildTellerUserCall, buildTermMaxUserCall, buildVaultLookup, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyFreshness, classifyReliability, classifyVault, collectFeedObservations, computeBorrowDelta, computeCloseTradeDeltas, computeCollateralSwapDeltas, computeDebtSwapDeltas, computeDepositDelta, computeEModeAnalysis, computeOpenTradeDeltas, computePostTradeMetrics, computeRepayDelta, computeSumerBorrowDelta, computeSumerDepositDelta, computeSumerRepayDelta, computeSumerWaterfall, computeSumerWithdrawDelta, computeVaultApr, computeWithdrawDelta, computeZapTradeDeltas, consensusReference, convertExactlyMarketsToResponse, convertInverseMarketsToResponse, convertLenderUserDataResult, convertLiquityMarketsToResponse, convertRiverMarketsToResponse, convertTellerMarketsToResponse, convertTermMarketsToResponse, convertTermMaxMarketsToResponse, createMarketUid, createMidnightBookSource, createMulticallRpcCall, createRawRpcCalls, createTermBookSource, createTermMaxDataSource, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, detectInterfaceKinds, encodeBalanceFetcherCalldata, exactlyLenderKey, exactlyMarketFromLenderKey, exactlyPairLtv, exactlyPenaltyRateToAprPercent, exactlyWadRateToPercent, feedKeyOf, feedStatKey, fetchDolomiteAccountNumbers, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchExactlyMarkets, fetchFlashLiquidityForChain, fetchFluidFTokens, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchInverseMarkets, fetchLagoonApiVaults, fetchLagoonVaults, fetchLiquityMarkets, fetchListaVaultsFromChain, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendlePrices, fetchRiverMarkets, fetchSiloVaults, fetchTellerMarkets, fetchTermMarkets, fetchTermMaxMarkets, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchYearnApiVaults, fetchYearnVaults, filterActiveLenders, filterLendersByProtocol, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, getCachedLiquityTroves, getCachedTellerBids, getCachedTermMaxDiscovery, getCachedTermMaxMarket, getCachedTermMaxMarkets, getCoreValidators, getFluidFTokensConverter, getGmxApiHost, getGmxReadContracts, getGmxUserPositions, getHealthFactor, getHypercoreUserPositions, getHypercoreVaultRegistry, getLenderAssets, getLenderPublicData, getLenderPublicDataAll, getLenderPublicDataViaApi, getLenderUserDataMulti, getLenderUserDataResult, getLendersForChain, getLstDelegation, getLstValidators, getLstWithdrawalRegistry, getLstWithdrawalRequests, getMaxAmountClose, getMaxAmountCollateralSwap, getMaxAmountDebtSwap, getMaxAmountOpen, getMergedUserData, getMorphoTypeMarketConverter, getResolvedDolomiteAccountNumbers, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getVaultPublicDataAll, getVaultWithdrawalRequests, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasUpshiftVaults, hasYearnVaults, inverseKeyParts, inverseLenderKey, isStablecoinSymbol, isYearnV3, keysFromMaps, lenderApiOnly, lenderFamily, liquityCandidateTroveIds, liquityKeyParts, liquityLenderKey, multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, parseBalanceFetcherResult, parseMergedResult, parseMulticallRpcResponses, parseRawRpcBatchResponses, parseRawRpcResponses, parseTermMaxLtv, parseTokenBalanceResult, positivePart, predictInverseEscrow, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, probeAaveFeedTimestamps, pruneFeedStats, readVaultSharePrices, rejectOutliers as rejectPriceOutliers, resolveDerivation, resolveStCeloDepositGroup, riverKeyParts, riverLenderKey, selectAssetGroupPrices, stampVaultClassification, tellerBpsToPercent, tellerImpliedLtv, tellerLenderKey, tellerPoolFromLenderKey, termLenderKey, termMaxApiBase, borrowNif as termMaxBorrowNif, curveApr as termMaxCurveApr, curveAprNumber as termMaxCurveAprNumber, daysToMaturity as termMaxDaysToMaturity, lendNif as termMaxLendNif, mintGtFeeRatio as termMaxMintGtFeeRatio, ratioToNumber as termMaxRatioToNumber, ratioToPercent as termMaxRatioToPercent, tickToAprNumber, tickToPrice, unflattenLenderData, updateFeedStats };
7715
+ export { type AaveMetadata, type AaveV2Public, type AaveV2UserReserveResponse, type AaveV3Public, type AaveV3UserReserveResponse, type AdditionalYields, ApiBookSource, type AprData, type BalanceData, type BaseLendingPosition, type BasicReserveResponse, type ChainDiagnostic, type ChainLinkResponse, type ChainQuery, type ChainSummary, type CompoundV2Metadata, type CompoundV3Public, type CompoundV3UserReserveResponse, type ConfigEntry, type CoreValidators, DEFAULT_MIDNIGHT_API, DEFAULT_OUTLIER_GUARD, DEFAULT_STALE_REJECT_SECONDS, DEFAULT_TERMMAX_API, type Denomination, type DepthMap, EMPTY_BALANCE, type EModeAssets, type EModeData, type EModeResult, EXACTLY_LENDER_KEY, type EulerEarnVault, type EulerEarnVaults, type EulerV2Metadata, type ExactlyFixedPool, type ExactlyFixedPosition, type ExactlyMarketAccount, type ExactlyMarketsRaw, type ExactlyUserFixedPosition, type ExtraValidationCall, type FeedObservation, type FeedStat, type FeedStatsMap, type FeedTimestampMap, type FetchListaVaultsFromChainOptions, type FetchMorphoVaultsFromChainOptions, type FetchOraclePricesOptions, type FetchTokenBalancesOptions, type FlattenPriorityConfig, type FluidFToken, type FluidFTokens, type FullLenderRewardsMap, GMX_API_HOSTS, GMX_READ_CONTRACTS, GMX_SUPPORTED_CHAINS, type GenericCurrency, type GenericTokenList, type GetVaultPublicDataAllOptions, type GmxExecutionFees, type GmxPendingDeposit, type GmxPendingWithdrawal, type GmxReadContracts, type GmxUserBalance, type GmxUserPositions, type GmxUserPositionsOptions, type GmxVault, type GmxVaultKind, type GmxVaults, type GmxVaultsFetchOptions, type GroupAccumulator, HYPERCORE_VAULT_REGISTRY, type HypercoreLockStatus, type HypercoreUserPositionsOptions, type HypercoreVault, type HypercoreVaultPosition, type HypercoreVaultRegistryEntry, type HypercoreVaults, type HypercoreVaultsFetchOptions, IDLE_MARKET_ID, INTERFACE_IDS, type InitMetadata, type InitPublic, type InitUserReserveResponse, type InterfaceKind, type InverseMarketRaw, type InverseMarketsRaw, type InversePositionInfo, LAGOON_API_URL, LAGOON_CHAIN_IDS, type LagoonApiVault, type LagoonSyncMode, type LagoonVault, type LagoonVaults, type LenderConfigData, type LenderConfigMap, type LenderCrossPoolMeta, type LenderData, type LenderDataEntry, type LenderInfo, type LenderInfoMap, type LenderPublicBase, type LenderRewardsMap, type LenderSummary, type LenderToLenderCrossPoolMeta, type LenderTotalAmounts, type LenderUserQuery, type LenderUserResponse, type LenderYieldComplete, type LenderYields$1 as LenderYields, LendingMode, type LiquityBranchRaw, type LiquityDiscoveredTrove, type LiquityDiscovery, type LiquityMarketsRaw, type LiquitySpInfo, type LiquityTroveInfo, type ListaMarketOverrides, type LoopPostTradeMetrics, type LstDelegation, type LstDelegationKind, type LstValidator, type LstWithdrawalFetchOptions, type LstWithdrawalRegistryEntry, type LstWithdrawalRequest, type LstWithdrawalRequestsByLst, type LstWithdrawalStatus, MORPHO_LENS, MaxParamThresholds, type MergedUserData, type MidnightBook, type MidnightBookLevel, type MidnightBookSource, type ModeBase, type MorphoMarketOverrides, type MorphoSubgraphProxyConfig, type MorphoUserMarketBalance, type MorphoUserReserveResponse, type MorphoVault, type MorphoVaults, type MulticallRpcBatch, type NumberMap, type OracleDiagnostics, type OraclePriceEntry, type OraclePricesResult, type OutlierGuardConfig, type ParsedBalanceData, type ParsedResponse, type ParsedUserBalance, type PermissionParams, type PoolData, type PoolWithMeta, type PortfolioSummary, type PortfolioTotals, type PostTradeMetrics, type PreparedCall, type PreparedMergedMulticallParams, type PreparedMergedRpcCalls, type PreparedTokenBalanceRpcCalls, type PreparedUserDataRpcCalls, type PriceDerivation, type PriceSelection, type ProtocolParams, type ProviderOptions, type RawRpcBatch, type RawRpcCall, type RawRpcResponse, type RiverMarketRaw, type RiverMarketsRaw, type RiverPositionInfo, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, type SelectPricesOptions, type SiloVault, type SiloVaults, type StCeloValidatorGroup, type StaleFeedEntry, type StructuredOraclePrices, type SubAccountSummary, type SumerPositionInput, type SummaryAprData, type SummaryBalanceData, TELLER_CALLS_PER_BID, TERMMAX_CALLS_PER_ACCOUNT, DECIMAL_BASE as TERMMAX_DECIMAL_BASE, TERMMAX_LIQUIDATION_PENALTY, TERMMAX_LIQUIDATION_WINDOW_SECS, TERMMAX_LIQUIDATOR_BONUS, TERMMAX_PARTIAL_CLOSE_FACTOR, TERMMAX_PARTIAL_LIQUIDATION_THRESHOLD_USD, type TellerDiscoveredBid, type TellerDiscovery, type TellerMarketsRaw, type TellerPoolRaw, type TermAuctionOrder, type TermAuctionOrders, type TermBookSource, type TermBookTop, type TermListing, type TermMarketRaw, TermMaxApiSource, type TermMaxBookTop, type TermMaxCurveSegment, type TermMaxDataSource, type TermMaxDiscovery, type TermMaxFeeConfig, type TermMaxMarketConfig, type TermMaxMarketRaw, type TermMaxOrderState, TermSubgraphSource, type TokenApprovalMeta, type TokenApprovalParams, type TokenBalanceEntry, type TokenBalanceQuery, type TokenBalanceResult, type TokenEntry, type TokenList, type TokenListInput, type TrackerDiagnostic, UPSHIFT_CHAIN_IDS, UPSHIFT_VAULTS_URL, type USDPriceMap, type UpshiftApiAsset, type UpshiftApiVault, type UpshiftVault, type UpshiftVaults, type UsddMarketRaw, type UsddMarketsRaw, type UsddPositionInfo, type UserApr, type UserConfig, type UserData, type UserDataResult, type UserLendingPosition, VAULT_SHARE_PRICE_PROBE, VOLATILE_VAULT_OVERRIDES, type VaultAprResult, type VaultClassification, type VaultClassificationFields, type VaultLookupEntry, type VaultMarketExposure, type VaultProvider, type VaultPublicDataAll, type VaultPublicDataResult, type VaultYieldSeries, type VaultYieldSnapshot, type YDaemonVault, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, type YearnVault, type YearnVaultKind, type YearnVaults, type YieldProfile, accountDepositListKey, accountWithdrawalListKey, appendSnapshot, applyPositionDelta, attachPricesToFlashLiquidity, buildFluidFTokensCall, buildLiquityUserCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildSumerAccumulators, buildSummaries, buildTellerUserCall, buildTermMaxUserCall, buildVaultLookup, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyFreshness, classifyReliability, classifyVault, collectFeedObservations, computeBorrowDelta, computeCloseTradeDeltas, computeCollateralSwapDeltas, computeDebtSwapDeltas, computeDepositDelta, computeEModeAnalysis, computeOpenTradeDeltas, computePostTradeMetrics, computeRepayDelta, computeSumerBorrowDelta, computeSumerDepositDelta, computeSumerRepayDelta, computeSumerWaterfall, computeSumerWithdrawDelta, computeVaultApr, computeWithdrawDelta, computeZapTradeDeltas, consensusReference, convertExactlyMarketsToResponse, convertInverseMarketsToResponse, convertLenderUserDataResult, convertLiquityMarketsToResponse, convertRiverMarketsToResponse, convertTellerMarketsToResponse, convertTermMarketsToResponse, convertTermMaxMarketsToResponse, convertUsddMarketsToResponse, createMarketUid, createMidnightBookSource, createMulticallRpcCall, createRawRpcCalls, createTermBookSource, createTermMaxDataSource, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, detectInterfaceKinds, encodeBalanceFetcherCalldata, exactlyPairLtv, exactlyPenaltyRateToAprPercent, exactlyWadRateToPercent, feedKeyOf, feedStatKey, fetchDolomiteAccountNumbers, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchExactlyMarkets, fetchFlashLiquidityForChain, fetchFluidFTokens, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchInverseMarkets, fetchLagoonApiVaults, fetchLagoonVaults, fetchLiquityMarkets, fetchListaVaultsFromChain, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendlePrices, fetchRiverMarkets, fetchSiloVaults, fetchTellerMarkets, fetchTermMarkets, fetchTermMaxMarkets, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchUsddMarkets, fetchYearnApiVaults, fetchYearnVaults, filterActiveLenders, filterLendersByProtocol, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, getCachedLiquityTroves, getCachedTellerBids, getCachedTermMaxDiscovery, getCachedTermMaxMarket, getCachedTermMaxMarkets, getCoreValidators, getFluidFTokensConverter, getGmxApiHost, getGmxReadContracts, getGmxUserPositions, getHealthFactor, getHypercoreUserPositions, getHypercoreVaultRegistry, getLenderAssets, getLenderPublicData, getLenderPublicDataAll, getLenderPublicDataViaApi, getLenderUserDataMulti, getLenderUserDataResult, getLendersForChain, getLstDelegation, getLstValidators, getLstWithdrawalRegistry, getLstWithdrawalRequests, getMaxAmountClose, getMaxAmountCollateralSwap, getMaxAmountDebtSwap, getMaxAmountOpen, getMergedUserData, getMorphoTypeMarketConverter, getResolvedDolomiteAccountNumbers, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getVaultPublicDataAll, getVaultWithdrawalRequests, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasUpshiftVaults, hasYearnVaults, inverseKeyParts, inverseLenderKey, isStablecoinSymbol, isYearnV3, keysFromMaps, lenderApiOnly, lenderFamily, liquityCandidateTroveIds, liquityKeyParts, liquityLenderKey, multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, parseBalanceFetcherResult, parseMergedResult, parseMulticallRpcResponses, parseRawRpcBatchResponses, parseRawRpcResponses, parseTermMaxLtv, parseTokenBalanceResult, positivePart, predictInverseEscrow, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, probeAaveFeedTimestamps, pruneFeedStats, readVaultSharePrices, rejectOutliers as rejectPriceOutliers, resolveDerivation, resolveStCeloDepositGroup, riverKeyParts, riverLenderKey, selectAssetGroupPrices, stampVaultClassification, tellerBpsToPercent, tellerImpliedLtv, tellerLenderKey, tellerPoolFromLenderKey, termLenderKey, termMaxApiBase, borrowNif as termMaxBorrowNif, curveApr as termMaxCurveApr, curveAprNumber as termMaxCurveAprNumber, daysToMaturity as termMaxDaysToMaturity, lendNif as termMaxLendNif, mintGtFeeRatio as termMaxMintGtFeeRatio, ratioToNumber as termMaxRatioToNumber, ratioToPercent as termMaxRatioToPercent, tickToAprNumber, tickToPrice, unflattenLenderData, updateFeedStats, usddIlkBytes32, usddKeyParts, usddLenderKey };