@1delta/margin-fetcher 0.0.410 → 0.0.412
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 +593 -37
- package/dist/index.js +2371 -377
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
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, UsddMarketConfig, UsddConfigChain, UsddChainData, TellerPoolConfig, MorphoTypeVaultEntry } from '@1delta/data-sdk';
|
|
6
|
+
import { TermMarketConfig, LiquityBranchConfig, LiquityConfigChain, RiverMarketConfig, RiverConfigChain, RiverChainData, InverseMarketConfig, InverseConfigChain, InverseChainData, ResupplyConfigChain, LlamaLendMarketConfig, LlamaLendConfigChain, LlamaLendChainData, UsddMarketConfig, UsddConfigChain, UsddChainData, FrankencoinMarketConfig, FrankencoinConfigChain, FrankencoinChainData, 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
|
-
/**
|
|
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
|
|
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
|
|
1594
|
-
*
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
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
|
|
@@ -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
|
-
*
|
|
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
|
-
*
|
|
2535
|
-
*
|
|
2536
|
-
*
|
|
2537
|
-
*
|
|
2538
|
-
*
|
|
2539
|
-
*
|
|
2540
|
-
*
|
|
2541
|
-
*
|
|
2542
|
-
*
|
|
2543
|
-
*
|
|
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;
|
|
@@ -2874,6 +2957,14 @@ interface InverseMarketRaw {
|
|
|
2874
2957
|
borrowPaused: boolean | null;
|
|
2875
2958
|
/** Borrows already taken today against `dailyLimit` — API only. */
|
|
2876
2959
|
dailyBorrows: number | null;
|
|
2960
|
+
/**
|
|
2961
|
+
* `Market.replenishmentIncentiveBps` (1000 = 10%) — the replenisher
|
|
2962
|
+
* bot's cut of a force-replenish, per market. It is carved OUT of the
|
|
2963
|
+
* `replenishmentPriceBps` cost and paid in DOLA from the market's own
|
|
2964
|
+
* liquidity; the borrower's debt grows by the FULL cost either way, so
|
|
2965
|
+
* this is a protocol/bot split, not an extra borrower charge.
|
|
2966
|
+
*/
|
|
2967
|
+
replenishmentIncentiveBps: number | null;
|
|
2877
2968
|
}
|
|
2878
2969
|
/** Raw public-data batch for the FiRM deployment (one chain). */
|
|
2879
2970
|
interface InverseMarketsRaw {
|
|
@@ -2937,6 +3028,184 @@ declare function convertInverseMarketsToResponse(raw: InverseMarketsRaw, chainId
|
|
|
2937
3028
|
[m: string]: MorphoGeneralPublicResponse;
|
|
2938
3029
|
};
|
|
2939
3030
|
|
|
3031
|
+
/**
|
|
3032
|
+
* The immutable half of a Resupply pair. Cached across refreshes because none
|
|
3033
|
+
* of it can change: `collateral` and `underlying` are set in the pair's
|
|
3034
|
+
* constructor and there is no setter (`setConvexPool` only moves where the
|
|
3035
|
+
* SHARES are staked, never what the collateral token is).
|
|
3036
|
+
*/
|
|
3037
|
+
interface ResupplyPairIdentity {
|
|
3038
|
+
pair: string;
|
|
3039
|
+
/** e.g. `Resupply Pair (CurveLend: crvUSD/sfrxUSD) - 1`. */
|
|
3040
|
+
name: string;
|
|
3041
|
+
/** The ERC-4626 share of the WRAPPED market — the accounting unit. */
|
|
3042
|
+
collateral: string;
|
|
3043
|
+
/** What the user actually deposits and withdraws: crvUSD or frxUSD. */
|
|
3044
|
+
underlying: string;
|
|
3045
|
+
collateralDecimals: number;
|
|
3046
|
+
underlyingDecimals: number;
|
|
3047
|
+
}
|
|
3048
|
+
/**
|
|
3049
|
+
* One Resupply pair after the state batch. Raw bigints; `null` = failed
|
|
3050
|
+
* allowFailure read.
|
|
3051
|
+
*/
|
|
3052
|
+
interface ResupplyPairRaw {
|
|
3053
|
+
identity: ResupplyPairIdentity;
|
|
3054
|
+
/** 1e5-scaled (95000 = 95%). */
|
|
3055
|
+
maxLTV: bigint | null;
|
|
3056
|
+
/** Debt ceiling. ZERO ⇒ paused/retired — this is the liveness signal. */
|
|
3057
|
+
borrowLimit: bigint | null;
|
|
3058
|
+
/** 1e5-scaled penalty on top of the debt at liquidation. */
|
|
3059
|
+
liquidationFee: bigint | null;
|
|
3060
|
+
/** 1e5-scaled fee added to minted debt (0 on every live pair). */
|
|
3061
|
+
mintFee: bigint | null;
|
|
3062
|
+
/** Hard per-position floor (1,000 reUSD). */
|
|
3063
|
+
minimumBorrowAmount: bigint | null;
|
|
3064
|
+
/** Face reUSD debt, interest previewed. */
|
|
3065
|
+
totalBorrowAmount: bigint | null;
|
|
3066
|
+
totalBorrowShares: bigint | null;
|
|
3067
|
+
/** Collateral SHARES held by the pair. */
|
|
3068
|
+
totalCollateral: bigint | null;
|
|
3069
|
+
/** 1e18-scaled per SECOND, from `currentRateInfo` (last checkpoint). */
|
|
3070
|
+
ratePerSec: bigint | null;
|
|
3071
|
+
/** Same, but recomputed live by the Utilities lens — preferred. */
|
|
3072
|
+
liveRatePerSec: bigint | null;
|
|
3073
|
+
/** The WRAPPED market's supply rate per second, 1e18-scaled. */
|
|
3074
|
+
underlyingSupplyRatePerSec: bigint | null;
|
|
3075
|
+
/** `convertToAssets(1e18)` on the collateral vault — UNDERLYING per share.
|
|
3076
|
+
* ~1e15 for Curve Lend vaults, ~1e18 for Fraxlend pairs. */
|
|
3077
|
+
collateralPrice: bigint | null;
|
|
3078
|
+
/** Cached `1e36 / collateralPrice` from the pair (stale between writes). */
|
|
3079
|
+
exchangeRate: bigint | null;
|
|
3080
|
+
}
|
|
3081
|
+
interface ResupplyMarketsRaw {
|
|
3082
|
+
lender: string;
|
|
3083
|
+
config?: ResupplyConfigChain;
|
|
3084
|
+
pairs: ResupplyPairRaw[];
|
|
3085
|
+
}
|
|
3086
|
+
|
|
3087
|
+
/**
|
|
3088
|
+
* Fetch every Resupply market on a chain — FULLY ON-CHAIN, no API and no
|
|
3089
|
+
* published market roster.
|
|
3090
|
+
*
|
|
3091
|
+
* Discovery is `ResupplyRegistry.getAllPairAddresses()`. That is deliberate:
|
|
3092
|
+
* governance adds pairs (7 appeared between the docs' published list and
|
|
3093
|
+
* 2026-08) and retires them by zeroing `borrowLimit`, so a static file would
|
|
3094
|
+
* both miss new markets and advertise frozen ones as borrowable. The registry
|
|
3095
|
+
* is permissionless to read and is the same source the protocol's own
|
|
3096
|
+
* periphery uses.
|
|
3097
|
+
*
|
|
3098
|
+
* Three rounds cold, two warm:
|
|
3099
|
+
* 1. registry → pair addresses (intersected with `pairAllowlist` if set);
|
|
3100
|
+
* 2. identity (`name`/`collateral`/`underlying` + both tokens' decimals) for
|
|
3101
|
+
* pairs not already cached — immutable, so this is once per pair ever;
|
|
3102
|
+
* 3. state: terms, accounting, rates and the collateral vault's share price.
|
|
3103
|
+
*
|
|
3104
|
+
* The rate is read from the `Utilities` lens rather than `currentRateInfo`,
|
|
3105
|
+
* which is only a checkpoint from the last write — on a quiet pair that can be
|
|
3106
|
+
* hours stale, and the off-peg amplifier moves with the reUSD price. The
|
|
3107
|
+
* checkpoint is kept as a fallback.
|
|
3108
|
+
*/
|
|
3109
|
+
declare function fetchResupplyMarkets(lender: string, chainId: string): Promise<ResupplyMarketsRaw>;
|
|
3110
|
+
|
|
3111
|
+
/**
|
|
3112
|
+
* The external lending market a Resupply pair wraps.
|
|
3113
|
+
*
|
|
3114
|
+
* Every Resupply pair's collateral IS another lender's supply position, so a
|
|
3115
|
+
* position here carries that market's risk on top of Resupply's own. This
|
|
3116
|
+
* resolves the link where we can: the collateral vault is matched against the
|
|
3117
|
+
* LlamaLend roster by ADDRESS (LlamaLend indexes markets by Controller, so the
|
|
3118
|
+
* lookup goes through `llamaLendMarketByVault`).
|
|
3119
|
+
*
|
|
3120
|
+
* Verified 2026-08-04: 16 of the 21 registered pairs match a LlamaLend market
|
|
3121
|
+
* exactly, and the generation agrees independently — Resupply's own
|
|
3122
|
+
* `CurveLend:` names map to LlamaLend `version: 1` and `CurveLendV2:` to
|
|
3123
|
+
* `version: 2`. The other 5 are Fraxlend pairs, which we do not integrate as a
|
|
3124
|
+
* lender, so they resolve to `provider: 'fraxlend'` with no market key.
|
|
3125
|
+
*/
|
|
3126
|
+
interface ResupplyWrappedMarket {
|
|
3127
|
+
/** Which protocol the collateral position lives in. */
|
|
3128
|
+
provider: 'llamalend' | 'fraxlend' | 'unknown';
|
|
3129
|
+
/** The ERC-4626 the pair custodies — always known (it IS the collateral). */
|
|
3130
|
+
vault: string;
|
|
3131
|
+
/** `LLAMALEND_<CONTROLLER_ADDR>` when we integrate that market, else absent.
|
|
3132
|
+
* This is the key to look the wrapped market up in our own data. */
|
|
3133
|
+
lender?: string;
|
|
3134
|
+
/** LlamaLend Controller (the borrow surface of the wrapped market). */
|
|
3135
|
+
controller?: string;
|
|
3136
|
+
/** LlamaLend LLAMMA. Carried because a leverage route through Resupply must
|
|
3137
|
+
* never touch it — the wrapped Controller asserts its band state. */
|
|
3138
|
+
amm?: string;
|
|
3139
|
+
/** 1 = `oneway`, 2 = `oneway-v2`. Matches Resupply's CurveLend/CurveLendV2. */
|
|
3140
|
+
version?: 1 | 2;
|
|
3141
|
+
/** What the wrapped market lends against, e.g. `sfrxUSD`. */
|
|
3142
|
+
collateralSymbol?: string;
|
|
3143
|
+
}
|
|
3144
|
+
/**
|
|
3145
|
+
* Synthesized per-pair lender key, e.g. `RESUPPLY_1_C5184CCC…`. The chain id
|
|
3146
|
+
* rides in the key (Fluid/River/Frankencoin convention) even though Resupply
|
|
3147
|
+
* is Ethereum-only today.
|
|
3148
|
+
*/
|
|
3149
|
+
declare function resupplyLenderKey(lender: string, chainId: string | number, pair: string): string;
|
|
3150
|
+
/** Recover `{ lender, chainId, pair }` from a per-pair key. */
|
|
3151
|
+
declare function resupplyKeyParts(key: string): {
|
|
3152
|
+
lender: string;
|
|
3153
|
+
chainId: string;
|
|
3154
|
+
pair: string;
|
|
3155
|
+
} | undefined;
|
|
3156
|
+
/**
|
|
3157
|
+
* Map one Resupply deployment's on-chain batch into the shared
|
|
3158
|
+
* `MorphoGeneralPublicResponse` shape, keyed `RESUPPLY_<chainId>_<PAIR>`.
|
|
3159
|
+
*
|
|
3160
|
+
* Four modelling decisions worth knowing (all from RESUPPLY_PLAN.md):
|
|
3161
|
+
*
|
|
3162
|
+
* - **The collateral we publish is the UNDERLYING (crvUSD / frxUSD), not the
|
|
3163
|
+
* ERC-4626 share.** The share is an internal accounting unit that no token
|
|
3164
|
+
* list carries and no price feed covers, and both user-facing entry points
|
|
3165
|
+
* (`addCollateral` / `removeCollateral`) are denominated in the underlying.
|
|
3166
|
+
* Share amounts are converted with the vault's own
|
|
3167
|
+
* `convertToAssets(1e18)` — the exact number Resupply's oracle uses. NB
|
|
3168
|
+
* that price is ~**1e15** for Curve Lend vaults, so the share count is
|
|
3169
|
+
* ~1000x the underlying; a bare 1e18 divide is wrong by three orders of
|
|
3170
|
+
* magnitude.
|
|
3171
|
+
* - **The collateral carries the wrapped market's yield.** A Resupply deposit
|
|
3172
|
+
* is a Curve Lend / Fraxlend supply position, so `getUnderlyingSupplyRate`
|
|
3173
|
+
* is published as the collateral row's `intrinsicYield`. Without it the
|
|
3174
|
+
* position looks like it pays nothing, when in fact the whole product is
|
|
3175
|
+
* the spread between that and the ~half-of-it borrow rate.
|
|
3176
|
+
* - **`borrowLimit == 0` means PAUSED.** `pause()` zeroes it and there is no
|
|
3177
|
+
* `isPaused`; 9 of 21 pairs sat at zero at integration. Such a pair is
|
|
3178
|
+
* reported frozen and non-borrowable, but deposits/withdrawals stay open so
|
|
3179
|
+
* users can exit.
|
|
3180
|
+
* - **There is no supply side** — reUSD is minted — so `totalDeposits` on the
|
|
3181
|
+
* loan row is 0 and `depositRate` is 0. The earn leg is sreUSD, which
|
|
3182
|
+
* belongs to the savings provider.
|
|
3183
|
+
*/
|
|
3184
|
+
declare function convertResupplyMarketsToResponse(raw: ResupplyMarketsRaw, chainId: string, prices?: {
|
|
3185
|
+
[asset: string]: number;
|
|
3186
|
+
}, _additionalYields?: AdditionalYields, tokens?: GenericTokenList): {
|
|
3187
|
+
[m: string]: MorphoGeneralPublicResponse;
|
|
3188
|
+
};
|
|
3189
|
+
|
|
3190
|
+
/** Per-position Resupply detail attached to the debt row (raw strings). */
|
|
3191
|
+
interface ResupplyPositionInfo {
|
|
3192
|
+
/** Internal borrow shares. NOT an amount — see `debt` for reUSD units. */
|
|
3193
|
+
borrowShares: string;
|
|
3194
|
+
/** Collateral in VAULT SHARES (the pair's own accounting unit). */
|
|
3195
|
+
collateralShares: string;
|
|
3196
|
+
/** `convertToAssets(1e18)` on the collateral vault at read time — the
|
|
3197
|
+
* factor that turned those shares into the reported underlying. ~1e15 for
|
|
3198
|
+
* Curve Lend vaults. */
|
|
3199
|
+
collateralSharePrice: string;
|
|
3200
|
+
/** The pair contract — the market id and every write target. */
|
|
3201
|
+
pair: string;
|
|
3202
|
+
/** The collateral vault (Curve Lend / Fraxlend 4626 share token). */
|
|
3203
|
+
collateralVault: string;
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3206
|
+
/** Test seam — drops the roster + discovery caches. */
|
|
3207
|
+
declare function __resetResupplyUserCaches(): void;
|
|
3208
|
+
|
|
2940
3209
|
/** Off-chain `Market.predictEscrow(user)`. */
|
|
2941
3210
|
declare function predictInverseEscrow(market: Address, escrowImplementation: Address, user: Address): Address;
|
|
2942
3211
|
|
|
@@ -2953,6 +3222,184 @@ interface InversePositionInfo {
|
|
|
2953
3222
|
dbrDeficit: string;
|
|
2954
3223
|
/** DBR signed balance (raw, may be negative). */
|
|
2955
3224
|
dbrSignedBalance: string;
|
|
3225
|
+
/** `DBR.debts(user)` (raw DOLA) — debt across ALL FiRM markets, which is
|
|
3226
|
+
* what burns DBR at 1 per DOLA-year. Chain-wide, repeated on every row. */
|
|
3227
|
+
dbrTotalDebt: string;
|
|
3228
|
+
/** Seconds until `dbrBalance` is exhausted at that burn ('0' if no debt). */
|
|
3229
|
+
dbrRunwaySeconds: string;
|
|
3230
|
+
/** Unix seconds of the projected depletion — past that point anyone can
|
|
3231
|
+
* force-replenish the account, charging the replenished DBR to its DOLA
|
|
3232
|
+
* debt at `replenishmentPriceBps`, and withdrawals freeze. Absent when
|
|
3233
|
+
* there is no debt. */
|
|
3234
|
+
dbrDepletionTimestamp?: string;
|
|
3235
|
+
}
|
|
3236
|
+
|
|
3237
|
+
/**
|
|
3238
|
+
* Per-market snapshot of a LlamaLend market. Amounts are HUMAN units (the
|
|
3239
|
+
* Curve API serves human numbers; the on-chain fallback normalizes to match).
|
|
3240
|
+
* Rates are DECIMALS (0.0391 = 3.91% APR), nominal — never the compounded
|
|
3241
|
+
* `borrowApy` the API also carries.
|
|
3242
|
+
*
|
|
3243
|
+
* `null` marks a value the active source could not provide; the converter
|
|
3244
|
+
* degrades per field rather than dropping the market.
|
|
3245
|
+
*/
|
|
3246
|
+
interface LlamaLendMarketRaw {
|
|
3247
|
+
market: LlamaLendMarketConfig;
|
|
3248
|
+
/** Controller.total_debt — borrowed-token units (human). */
|
|
3249
|
+
totalDebt: number | null;
|
|
3250
|
+
/** Vault.totalAssets — borrowed-token units (human). */
|
|
3251
|
+
totalSupplied: number | null;
|
|
3252
|
+
/**
|
|
3253
|
+
* Borrowable right now. v2: `Controller.available_balance()`. v1:
|
|
3254
|
+
* `borrowedToken.balanceOf(controller)`. This is also the withdrawal
|
|
3255
|
+
* ceiling for lenders — the vault cannot pay out what is lent.
|
|
3256
|
+
*/
|
|
3257
|
+
availableToBorrow: number | null;
|
|
3258
|
+
/** Nominal borrow APR as a decimal. */
|
|
3259
|
+
borrowApr: number | null;
|
|
3260
|
+
/** Nominal lend APR as a decimal. */
|
|
3261
|
+
lendApr: number | null;
|
|
3262
|
+
/** Collateral price in borrowed-token terms, from the AMM's EMA oracle. */
|
|
3263
|
+
collateralPrice: number | null;
|
|
3264
|
+
/** USD price of the collateral, API only (the chain read has no USD leg). */
|
|
3265
|
+
collateralPriceUsd: number | null;
|
|
3266
|
+
/** USD price of the borrowed token, API only. */
|
|
3267
|
+
borrowedPriceUsd: number | null;
|
|
3268
|
+
/**
|
|
3269
|
+
* Effective collateral factor at the market's `defaultBands`, derived from
|
|
3270
|
+
* `max_borrowable(1 unit, N)` divided by the oracle price.
|
|
3271
|
+
*
|
|
3272
|
+
* There is NO market-constant LTV in LlamaLend — the number moves with the
|
|
3273
|
+
* band count. Measured on sreUSD/crvUSD: 0.991 at N=4 down to 0.886 at
|
|
3274
|
+
* N=50. Reporting the N=4 maximum would flatter every risk comparison
|
|
3275
|
+
* against Aave/Morpho, so the default N is what gets reported and the rest
|
|
3276
|
+
* of the curve travels alongside in `bandLtv`.
|
|
3277
|
+
*/
|
|
3278
|
+
collateralFactor: number | null;
|
|
3279
|
+
/** `{ [N]: collateralFactor }` — the trade-off curve for the UI and sizer. */
|
|
3280
|
+
bandLtv: {
|
|
3281
|
+
[bands: string]: number;
|
|
3282
|
+
} | null;
|
|
3283
|
+
/**
|
|
3284
|
+
* v2 borrow cap in borrowed-token units (human). `0` DISABLES borrowing —
|
|
3285
|
+
* a fresh v2 market looks live but is not. `null` on v1 (uncapped).
|
|
3286
|
+
*/
|
|
3287
|
+
borrowCap: number | null;
|
|
3288
|
+
/** Whether new borrows are possible at all right now. */
|
|
3289
|
+
borrowingEnabled: boolean;
|
|
3290
|
+
/** Vault.maxDeposit — `0` disables deposits (v2 `max_supply`). */
|
|
3291
|
+
maxDeposit: number | null;
|
|
3292
|
+
/** Number of open loans, for the liquidations surface. */
|
|
3293
|
+
nLoans: number | null;
|
|
3294
|
+
/**
|
|
3295
|
+
* Soft-liquidation state of the market as a whole: the AMM's active band.
|
|
3296
|
+
* Not a per-user value, but it tells the UI whether the market is currently
|
|
3297
|
+
* converting anyone's collateral.
|
|
3298
|
+
*/
|
|
3299
|
+
activeBand: number | null;
|
|
3300
|
+
}
|
|
3301
|
+
/** Raw public-data batch for one LlamaLend chain (both generations together). */
|
|
3302
|
+
interface LlamaLendMarketsRaw {
|
|
3303
|
+
/** The bare lender key, `LLAMALEND`. */
|
|
3304
|
+
lender: string;
|
|
3305
|
+
config: LlamaLendConfigChain | undefined;
|
|
3306
|
+
chainData: LlamaLendChainData | undefined;
|
|
3307
|
+
markets: LlamaLendMarketRaw[];
|
|
3308
|
+
/** Which source filled the market rows. */
|
|
3309
|
+
source: 'api' | 'chain' | 'none';
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
declare function fetchLlamaLendMarkets(lender: string, chainId: string): Promise<LlamaLendMarketsRaw>;
|
|
3313
|
+
|
|
3314
|
+
/**
|
|
3315
|
+
* Synthesized per-market lender key, e.g.
|
|
3316
|
+
* `LLAMALEND_4F79FE450A2BAF833E8F50340BD230F5A3ECAFE9` (= the sreUSD/crvUSD
|
|
3317
|
+
* market). Keyed by the CONTROLLER, which is what every write and every user
|
|
3318
|
+
* read targets — the vault is a lookup off it. Address-suffixed
|
|
3319
|
+
* (Teller/Exactly/Inverse convention); the chain id is not part of the key
|
|
3320
|
+
* because chain scoping happens at the marketUid level.
|
|
3321
|
+
*
|
|
3322
|
+
* Both generations share this key space on purpose: to a user they are one
|
|
3323
|
+
* protocol, and the Curve API returns them in one list. The `version` field on
|
|
3324
|
+
* the market row is what encoders branch on.
|
|
3325
|
+
*/
|
|
3326
|
+
declare function llamaLendLenderKey(lender: string, controller: string): string;
|
|
3327
|
+
/** Recover `{ lender, controller }` from a per-market key (or undefined). */
|
|
3328
|
+
declare function llamaLendKeyParts(key: string): {
|
|
3329
|
+
lender: string;
|
|
3330
|
+
controller: string;
|
|
3331
|
+
} | undefined;
|
|
3332
|
+
/**
|
|
3333
|
+
* Map the LlamaLend batch into the shared `MorphoGeneralPublicResponse` shape,
|
|
3334
|
+
* keyed by `LLAMALEND_<CONTROLLER_ADDR>` — one key per market.
|
|
3335
|
+
*
|
|
3336
|
+
* Per market, two entries in the isolated-pair layout:
|
|
3337
|
+
*
|
|
3338
|
+
* - COLLATERAL entry — deposit-only. `collateralFactor` is the LTV AT THE
|
|
3339
|
+
* MARKET'S DEFAULT BAND COUNT, because LlamaLend has no market-constant
|
|
3340
|
+
* LTV: it is a function of `N` and moves 0.886..0.991 on a single market.
|
|
3341
|
+
* The whole curve rides along in `params.market.llamalend.bandLtv` so the
|
|
3342
|
+
* UI can show the trade-off and the leverage sizer can use the real number
|
|
3343
|
+
* for the `N` the user actually picks.
|
|
3344
|
+
* - LOAN entry — the borrowed token. Supply side is the ERC-4626 vault, so
|
|
3345
|
+
* unlike Inverse this one HAS `totalDeposits`.
|
|
3346
|
+
*
|
|
3347
|
+
* SOFT LIQUIDATION is the thing this shape cannot express natively, so it is
|
|
3348
|
+
* carried explicitly in the descriptor. `liquidationPenalty` here is the HARD
|
|
3349
|
+
* liquidation bonus only — it applies below the entire band range. Inside the
|
|
3350
|
+
* range a position is converted gradually through the market's own AMM with no
|
|
3351
|
+
* penalty at all, and a consumer that renders `liquidationPenalty` as "what
|
|
3352
|
+
* you lose when the price hits X" is describing the wrong event.
|
|
3353
|
+
*/
|
|
3354
|
+
declare function convertLlamaLendMarketsToResponse(raw: LlamaLendMarketsRaw, chainId: string, prices?: {
|
|
3355
|
+
[asset: string]: number;
|
|
3356
|
+
}, additionalYields?: AdditionalYields, tokens?: GenericTokenList): {
|
|
3357
|
+
[m: string]: MorphoGeneralPublicResponse;
|
|
3358
|
+
};
|
|
3359
|
+
|
|
3360
|
+
/**
|
|
3361
|
+
* Per-position LlamaLend detail attached to the debt row (raw strings unless
|
|
3362
|
+
* noted).
|
|
3363
|
+
*
|
|
3364
|
+
* The two fields a consumer must not ignore:
|
|
3365
|
+
*
|
|
3366
|
+
* - `softLiquidating` / `priceUpper` / `priceLower` — a LlamaLend position
|
|
3367
|
+
* does not have a liquidation price. It has a band RANGE, and it starts
|
|
3368
|
+
* converting collateral into the borrowed token as soon as the oracle
|
|
3369
|
+
* enters that range. Rendering a single number here misrepresents the
|
|
3370
|
+
* protocol.
|
|
3371
|
+
* - `bandCollateralInBorrowed` — the borrowed-token leg the LLAMMA has
|
|
3372
|
+
* already produced from the user's collateral. It sits inside the position,
|
|
3373
|
+
* offsets debt, and is NOT a wallet balance.
|
|
3374
|
+
*/
|
|
3375
|
+
interface LlamaLendPositionInfo {
|
|
3376
|
+
/** Signed health, WAD. `< 0` ⇒ hard-liquidatable. */
|
|
3377
|
+
health: string;
|
|
3378
|
+
/** Upper bound of the soft-liquidation band range, WAD. */
|
|
3379
|
+
priceUpper: string;
|
|
3380
|
+
/** Lower bound of the soft-liquidation band range, WAD. */
|
|
3381
|
+
priceLower: string;
|
|
3382
|
+
/** Band indices `[n1, n2]` the collateral currently occupies. */
|
|
3383
|
+
bands: [number, number] | undefined;
|
|
3384
|
+
/** Band count `N` chosen at loan creation — IMMUTABLE for the loan's life. */
|
|
3385
|
+
bandCount: number;
|
|
3386
|
+
/**
|
|
3387
|
+
* Borrowed-token amount held inside the user's bands (raw). Non-zero means
|
|
3388
|
+
* the position IS or HAS BEEN in soft liquidation.
|
|
3389
|
+
*/
|
|
3390
|
+
bandCollateralInBorrowed: string;
|
|
3391
|
+
/** True when the LLAMMA currently holds a borrowed-token leg for this user. */
|
|
3392
|
+
softLiquidating: boolean;
|
|
3393
|
+
/**
|
|
3394
|
+
* Whether the probed spender holds the Controller's boolean grant for this
|
|
3395
|
+
* market. FAILS CLOSED — older-blueprint controllers have no `approval`
|
|
3396
|
+
* method, the call fails, and this reads `false`, which is correct.
|
|
3397
|
+
*/
|
|
3398
|
+
delegated: boolean;
|
|
3399
|
+
/** Whether the market's Controller supports delegation at all. */
|
|
3400
|
+
supportsDelegation: boolean;
|
|
3401
|
+
/** Market generation — the leverage/encoder ABIs differ. */
|
|
3402
|
+
version: 1 | 2;
|
|
2956
3403
|
}
|
|
2957
3404
|
|
|
2958
3405
|
/**
|
|
@@ -3057,6 +3504,115 @@ interface UsddPositionInfo {
|
|
|
3057
3504
|
ilk: string;
|
|
3058
3505
|
}
|
|
3059
3506
|
|
|
3507
|
+
/**
|
|
3508
|
+
* One Frankencoin market (= one ORIGINAL position) after the on-chain batch.
|
|
3509
|
+
* Raw bigints; `null` = failed allowFailure read.
|
|
3510
|
+
*/
|
|
3511
|
+
interface FrankencoinMarketRaw {
|
|
3512
|
+
market: FrankencoinMarketConfig;
|
|
3513
|
+
/** Owner-declared liquidation price, 36-dec scaled vs collateral decimals. */
|
|
3514
|
+
price: bigint | null;
|
|
3515
|
+
/** FACE debt on the original itself (clones carry their own). */
|
|
3516
|
+
minted: bigint | null;
|
|
3517
|
+
/** ZCHF the original + its clones may still draw — market borrow capacity. */
|
|
3518
|
+
availableForClones: bigint | null;
|
|
3519
|
+
/** Collateral custodied by the ORIGINAL position contract. */
|
|
3520
|
+
collateralBalance: bigint | null;
|
|
3521
|
+
/** Hub lead rate + risk premium, ppm. */
|
|
3522
|
+
annualInterestPPM: bigint | null;
|
|
3523
|
+
/** Upfront fee for minting now (pro-rata to expiry), ppm. */
|
|
3524
|
+
currentFeePPM: bigint | null;
|
|
3525
|
+
/** Withheld into the equity reserve at mint, ppm. */
|
|
3526
|
+
reserveContribution: bigint | null;
|
|
3527
|
+
/** Non-zero while a Dutch-auction challenge is running. */
|
|
3528
|
+
challengedAmount: bigint | null;
|
|
3529
|
+
expiration: bigint | null;
|
|
3530
|
+
isClosed: boolean | null;
|
|
3531
|
+
}
|
|
3532
|
+
interface FrankencoinMarketsRaw {
|
|
3533
|
+
lender: string;
|
|
3534
|
+
config?: FrankencoinConfigChain;
|
|
3535
|
+
chainData?: FrankencoinChainData;
|
|
3536
|
+
markets: FrankencoinMarketRaw[];
|
|
3537
|
+
}
|
|
3538
|
+
|
|
3539
|
+
/**
|
|
3540
|
+
* Fetch all market data of ONE Frankencoin deployment — FULLY ON-CHAIN via
|
|
3541
|
+
* one retrying multicall over the curated ORIGINAL-position roster from
|
|
3542
|
+
* lender-metadata (`frankencoinConfig` / `frankencoinMarkets`, generated by
|
|
3543
|
+
* its `update:frankencoin` job, which filters to V2 + open + a priceable
|
|
3544
|
+
* collateral allowlist).
|
|
3545
|
+
*
|
|
3546
|
+
* Only originals are read here: they carry the terms AND the market-level
|
|
3547
|
+
* borrow capacity (`availableForClones`). Clones are USER positions and are
|
|
3548
|
+
* resolved per-account in the user-data path.
|
|
3549
|
+
*
|
|
3550
|
+
* NB `price` is the owner-DECLARED liquidation price, not an oracle quote —
|
|
3551
|
+
* see the converter for how that is surfaced.
|
|
3552
|
+
*/
|
|
3553
|
+
declare function fetchFrankencoinMarkets(lender: string, chainId: string): Promise<FrankencoinMarketsRaw>;
|
|
3554
|
+
|
|
3555
|
+
/**
|
|
3556
|
+
* Synthesized per-market lender key, e.g.
|
|
3557
|
+
* `FRANKENCOIN_1_5F2C10F7…` — one per ORIGINAL position. The chain id is part
|
|
3558
|
+
* of the key (Fluid/River convention) even though Frankencoin is
|
|
3559
|
+
* Ethereum-only today, so an L2 hub would not collide.
|
|
3560
|
+
*/
|
|
3561
|
+
declare function frankencoinLenderKey(lender: string, chainId: string | number, position: string): string;
|
|
3562
|
+
/** Recover `{ lender, chainId, position }` from a per-market key. */
|
|
3563
|
+
declare function frankencoinKeyParts(key: string): {
|
|
3564
|
+
lender: string;
|
|
3565
|
+
chainId: string;
|
|
3566
|
+
position: string;
|
|
3567
|
+
} | undefined;
|
|
3568
|
+
/**
|
|
3569
|
+
* Map one Frankencoin deployment's on-chain batch into the shared
|
|
3570
|
+
* `MorphoGeneralPublicResponse` shape, keyed `FRANKENCOIN_<chainId>_<ORIGINAL>`.
|
|
3571
|
+
*
|
|
3572
|
+
* Three modelling decisions worth knowing (all from FRANKENCOIN_PLAN.md):
|
|
3573
|
+
*
|
|
3574
|
+
* - **The liquidation price is owner-DECLARED, not an oracle.** `price` is
|
|
3575
|
+
* 36-dec scaled against the collateral's decimals and is policed by a
|
|
3576
|
+
* Dutch-auction challenge game. We surface it as the LIQUIDATION price
|
|
3577
|
+
* (it defines `collateralFactor = 1`, i.e. minting is allowed up to
|
|
3578
|
+
* `coll × price`) but value collateral with OUR price feeds. The
|
|
3579
|
+
* divergence between the two is the risk signal, and it is carried
|
|
3580
|
+
* verbatim in `params.market.frankencoin.declaredPrice` so a consumer can
|
|
3581
|
+
* compute it. Never present the resulting health as a protocol invariant.
|
|
3582
|
+
* - **Debt ≠ proceeds.** `minted` is FACE debt including the withheld
|
|
3583
|
+
* `reserveContribution` (10–40 %) plus the upfront pro-rata fee. Both
|
|
3584
|
+
* ppm figures ride along in the descriptor so a quote layer can convert.
|
|
3585
|
+
* - **Positions expire.** `expiration` is surfaced and an expired market is
|
|
3586
|
+
* reported halted (its collateral is subject to forced sale).
|
|
3587
|
+
*
|
|
3588
|
+
* Per market: a COLLATERAL entry (the original's own collateral) and a LOAN
|
|
3589
|
+
* entry (ZCHF). There is no protocol supply side — ZCHF is minted, and the
|
|
3590
|
+
* earn leg is the separate savings module carried by the savings provider —
|
|
3591
|
+
* so `totalDeposits` on the loan row is 0.
|
|
3592
|
+
*/
|
|
3593
|
+
declare function convertFrankencoinMarketsToResponse(raw: FrankencoinMarketsRaw, chainId: string, prices?: {
|
|
3594
|
+
[asset: string]: number;
|
|
3595
|
+
}, _additionalYields?: AdditionalYields, tokens?: GenericTokenList): {
|
|
3596
|
+
[m: string]: MorphoGeneralPublicResponse;
|
|
3597
|
+
};
|
|
3598
|
+
|
|
3599
|
+
/** Per-position detail attached to the debt row (raw strings). */
|
|
3600
|
+
interface FrankencoinPositionInfo {
|
|
3601
|
+
/** The position contract — the sub-account id and every write op's target. */
|
|
3602
|
+
position: string;
|
|
3603
|
+
/** The ORIGINAL this position was cloned from (its market). */
|
|
3604
|
+
original: string;
|
|
3605
|
+
/** Owner-declared liquidation price (raw, 36-dec scaled). */
|
|
3606
|
+
declaredPrice: string;
|
|
3607
|
+
/** Unix seconds; a position past this is subject to forced sale. */
|
|
3608
|
+
expiration: string;
|
|
3609
|
+
/** Non-zero while a Dutch-auction challenge is running against it. */
|
|
3610
|
+
challengedAmount: string;
|
|
3611
|
+
/** ppm withheld into the equity reserve — needed to quote a close, since
|
|
3612
|
+
* repaying burns with reserve credit and costs LESS than `minted`. */
|
|
3613
|
+
reserveContributionPPM: string;
|
|
3614
|
+
}
|
|
3615
|
+
|
|
3060
3616
|
/**
|
|
3061
3617
|
* Raw on-chain read for ONE Teller `LenderCommitmentGroup` pool. All amounts are
|
|
3062
3618
|
* raw token base units; `minRateBps` is the pool's min borrow APR in BASIS
|
|
@@ -7629,4 +8185,4 @@ interface FetchTokenBalancesOptions {
|
|
|
7629
8185
|
*/
|
|
7630
8186
|
declare function fetchTokenBalances(chainId: string, account: string, tokens: string[], options?: FetchTokenBalancesOptions): Promise<TokenBalanceResult>;
|
|
7631
8187
|
|
|
7632
|
-
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 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, 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, 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 };
|
|
8188
|
+
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 FrankencoinMarketRaw, type FrankencoinMarketsRaw, type FrankencoinPositionInfo, 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 LlamaLendMarketRaw, type LlamaLendMarketsRaw, type LlamaLendPositionInfo, 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 ResupplyMarketsRaw, type ResupplyPairIdentity, type ResupplyPairRaw, type ResupplyPositionInfo, type ResupplyWrappedMarket, 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, __resetResupplyUserCaches, 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, convertFrankencoinMarketsToResponse, convertInverseMarketsToResponse, convertLenderUserDataResult, convertLiquityMarketsToResponse, convertLlamaLendMarketsToResponse, convertResupplyMarketsToResponse, 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, fetchFrankencoinMarkets, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchInverseMarkets, fetchLagoonApiVaults, fetchLagoonVaults, fetchLiquityMarkets, fetchListaVaultsFromChain, fetchLlamaLendMarkets, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendlePrices, fetchResupplyMarkets, fetchRiverMarkets, fetchSiloVaults, fetchTellerMarkets, fetchTermMarkets, fetchTermMaxMarkets, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchUsddMarkets, fetchYearnApiVaults, fetchYearnVaults, filterActiveLenders, filterLendersByProtocol, frankencoinKeyParts, frankencoinLenderKey, 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, llamaLendKeyParts, llamaLendLenderKey, 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, resupplyKeyParts, resupplyLenderKey, 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 };
|