@1delta/data-sdk 0.0.41 → 0.0.43
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/README.md +116 -0
- package/dist/index.js +479 -380
- package/dist/index.mjs +475 -383
- package/dist/lending/aave.d.ts +44 -0
- package/dist/lending/aaveV4.d.ts +168 -0
- package/dist/lending/common.d.ts +16 -0
- package/dist/lending/compoundV2.d.ts +38 -0
- package/dist/lending/compoundV3.d.ts +35 -0
- package/dist/lending/curvance.d.ts +112 -0
- package/dist/lending/dolomite.d.ts +54 -0
- package/dist/lending/dss.d.ts +139 -0
- package/dist/lending/euler.d.ts +26 -0
- package/dist/lending/exactly.d.ts +53 -0
- package/dist/lending/fluid.d.ts +53 -0
- package/dist/lending/frankencoin.d.ts +76 -0
- package/dist/lending/fraxlend.d.ts +85 -0
- package/dist/lending/gearbox.d.ts +74 -0
- package/dist/lending/index.d.ts +40 -0
- package/dist/lending/initProtocol.d.ts +11 -0
- package/dist/lending/inverse.d.ts +63 -0
- package/dist/lending/liquity.d.ts +120 -0
- package/dist/lending/lista.d.ts +6 -0
- package/dist/lending/llamalend.d.ts +208 -0
- package/dist/lending/midnight.d.ts +72 -0
- package/dist/lending/morpho.d.ts +72 -0
- package/dist/lending/registry.d.ts +140 -0
- package/dist/lending/resupply.d.ts +77 -0
- package/dist/lending/river.d.ts +61 -0
- package/dist/lending/silo.d.ts +129 -0
- package/dist/lending/teller.d.ts +68 -0
- package/dist/lending/term.d.ts +82 -0
- package/dist/lending/termMax.d.ts +65 -0
- package/package.json +1 -1
- package/dist/lending.d.ts +0 -1978
package/dist/lending.d.ts
DELETED
|
@@ -1,1978 +0,0 @@
|
|
|
1
|
-
type AaveTokensType = {
|
|
2
|
-
[fork: string]: {
|
|
3
|
-
[chainId: string]: {
|
|
4
|
-
[underlying: string]: {
|
|
5
|
-
aToken: string;
|
|
6
|
-
sToken: string;
|
|
7
|
-
vToken: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
type GeneralReservesMap = {
|
|
13
|
-
[fork: string]: {
|
|
14
|
-
[chainId: string]: string[];
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
type AavePoolsType = {
|
|
18
|
-
[fork: string]: {
|
|
19
|
-
[chainId: string]: {
|
|
20
|
-
pool: string;
|
|
21
|
-
protocolDataProvider: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
type CompoundV3PoolsType = {
|
|
26
|
-
[chainId: string]: {
|
|
27
|
-
[comet: string]: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
type MorphoPoolsType = {
|
|
31
|
-
[fork: string]: {
|
|
32
|
-
[chainId: string]: string;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
type CompoundV3BulkerType = {
|
|
36
|
-
[lender: string]: {
|
|
37
|
-
[chainId: string]: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
type CompoundV3BaseDataType = {
|
|
41
|
-
[lender: string]: {
|
|
42
|
-
[chainId: string]: {
|
|
43
|
-
baseAsset: string;
|
|
44
|
-
baseBorrowMin: bigint;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
type MorphoBundler3ChainConfig = {
|
|
49
|
-
bundler3: string;
|
|
50
|
-
generalAdapter1: string;
|
|
51
|
-
paraswapAdapter?: string | null;
|
|
52
|
-
erc20WrapperAdapter?: string | null;
|
|
53
|
-
compoundV2MigrationAdapter?: string | null;
|
|
54
|
-
compoundV3MigrationAdapter?: string | null;
|
|
55
|
-
aaveV2MigrationAdapter?: string | null;
|
|
56
|
-
aaveV3CoreMigrationAdapter?: string | null;
|
|
57
|
-
aaveV3PrimeMigrationAdapter?: string | null;
|
|
58
|
-
aaveV3EtherFiMigrationAdapter?: string | null;
|
|
59
|
-
aaveV3OptimizerMigrationAdapter?: string | null;
|
|
60
|
-
};
|
|
61
|
-
type MorphoBundler3Type = {
|
|
62
|
-
[chainId: string]: MorphoBundler3ChainConfig;
|
|
63
|
-
};
|
|
64
|
-
type ListaNativeProviderType = {
|
|
65
|
-
[chainId: string]: {
|
|
66
|
-
nativeProvider: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
/** Per-chain Midnight deployment addresses + HTTP API endpoint. */
|
|
70
|
-
export type MidnightConfigChain = {
|
|
71
|
-
/** Core Midnight contract. */
|
|
72
|
-
midnight: string;
|
|
73
|
-
/** MidnightBundlesV1 periphery (spot supply/borrow/repay bundles). */
|
|
74
|
-
midnightBundles: string;
|
|
75
|
-
/** On-chain mempool log contract where signed offers are published. */
|
|
76
|
-
midnightMempool: string;
|
|
77
|
-
ecrecoverRatifier?: string | null;
|
|
78
|
-
ecrecoverAuthorizer?: string | null;
|
|
79
|
-
setterRatifier?: string | null;
|
|
80
|
-
/** Midnight HTTP API base for book/quote/offer data (defaults to Morpho hosted). */
|
|
81
|
-
apiBaseUrl?: string | null;
|
|
82
|
-
};
|
|
83
|
-
export type MidnightConfigType = {
|
|
84
|
-
[chainId: string]: MidnightConfigChain;
|
|
85
|
-
};
|
|
86
|
-
/** One collateral leg of a Midnight market (mirrors on-chain CollateralParams). */
|
|
87
|
-
export type MidnightCollateralParam = {
|
|
88
|
-
token: string;
|
|
89
|
-
/** WAD-scaled liquidation LTV (as string). */
|
|
90
|
-
lltv: string;
|
|
91
|
-
/** WAD-scaled liquidation cursor (as string). */
|
|
92
|
-
liquidationCursor: string;
|
|
93
|
-
oracle: string;
|
|
94
|
-
decimals: number;
|
|
95
|
-
};
|
|
96
|
-
/** A Midnight market: full struct params needed to build calls + read state. */
|
|
97
|
-
export type MidnightMarketConfig = {
|
|
98
|
-
/** bytes32 market id (IdLib hash of the Market struct). */
|
|
99
|
-
marketId: string;
|
|
100
|
-
loanToken: string;
|
|
101
|
-
loanDecimals: number;
|
|
102
|
-
/** Ordered collateral legs; index = the on-chain `collateralIndex`. */
|
|
103
|
-
collateralParams: MidnightCollateralParam[];
|
|
104
|
-
/** Maturity, unix seconds (as string). */
|
|
105
|
-
maturity: string;
|
|
106
|
-
/** Recovery-close-factor threshold (WAD, as string). */
|
|
107
|
-
rcfThreshold: string;
|
|
108
|
-
enterGate: string;
|
|
109
|
-
liquidatorGate: string;
|
|
110
|
-
/**
|
|
111
|
-
* Mutable per-market settlement fees, one per TTM breakpoint index
|
|
112
|
-
* [0d,1d,7d,30d,90d,180d,360d], in cbp (centi-basis-points; fraction =
|
|
113
|
-
* cbp·1e-6). Governance-settable (`feeSetter`), so it is NOT part of the
|
|
114
|
-
* immutable market id and is snapshotted on-chain each metadata refresh.
|
|
115
|
-
* Absent when the on-chain read was unavailable.
|
|
116
|
-
*/
|
|
117
|
-
settlementFeeCbp?: number[];
|
|
118
|
-
/**
|
|
119
|
-
* Mutable per-market continuous fee (uint32), a per-second WAD rate borne by
|
|
120
|
-
* lenders (annual fraction = continuousFee·secondsPerYear/1e18, capped 1%/yr).
|
|
121
|
-
* Governance-settable; snapshotted on-chain like `settlementFeeCbp`. Stored
|
|
122
|
-
* as a decimal string. Absent when the on-chain read was unavailable.
|
|
123
|
-
*/
|
|
124
|
-
continuousFee?: string;
|
|
125
|
-
/** Optional display label, e.g. "USDC / WETH — 2026-09-18". */
|
|
126
|
-
name?: string;
|
|
127
|
-
};
|
|
128
|
-
export type MidnightMarketsType = {
|
|
129
|
-
[chainId: string]: MidnightMarketConfig[];
|
|
130
|
-
};
|
|
131
|
-
/** Per-chain, protocol-level (evergreen) Term Finance addresses + data endpoint. */
|
|
132
|
-
export type TermConfigChain = {
|
|
133
|
-
/** TermController — validates deployed repos (`isTermDeployed`). */
|
|
134
|
-
termController: string;
|
|
135
|
-
/** RepoTokenLinkedList — the shared secondary-market repo-token order book. */
|
|
136
|
-
repoTokenLinkedList?: string | null;
|
|
137
|
-
/** RepoTokenLinkedListEventEmitter — the listing event source the subgraph indexes. */
|
|
138
|
-
repoTokenListEventEmitter?: string | null;
|
|
139
|
-
/** DiscountRateAdapter — helper used to price secondary listings. */
|
|
140
|
-
discountRateAdapter?: string | null;
|
|
141
|
-
/** TermPriceConsumerV3 — Term's own on-chain price oracle (singleton per
|
|
142
|
-
* chain). `usdValueOfTokens(token, 10^dec)` → per-token USD price (1e18).
|
|
143
|
-
* The same oracle Term liquidates against, so it drives liquidation risk. */
|
|
144
|
-
priceOracle?: string | null;
|
|
145
|
-
/** Term data endpoint base (subgraph/HTTP) for listings + auction state. */
|
|
146
|
-
apiBaseUrl?: string | null;
|
|
147
|
-
};
|
|
148
|
-
export type TermConfigType = {
|
|
149
|
-
[chainId: string]: TermConfigChain;
|
|
150
|
-
};
|
|
151
|
-
/** One collateral leg of a Term repo (mirrors TermRepoCollateralManager state). */
|
|
152
|
-
export type TermCollateralParam = {
|
|
153
|
-
token: string;
|
|
154
|
-
/** WAD-scaled maintenance collateral ratio (as string). */
|
|
155
|
-
maintenanceRatio: string;
|
|
156
|
-
/** WAD-scaled initial collateral ratio (as string). */
|
|
157
|
-
initialRatio?: string;
|
|
158
|
-
/** WAD-scaled liquidated-damages factor (liquidation penalty, as string). */
|
|
159
|
-
liquidatedDamages?: string;
|
|
160
|
-
decimals: number;
|
|
161
|
-
};
|
|
162
|
-
/** A Term Finance repo/market: the serial contract addresses + fixed terms. */
|
|
163
|
-
export type TermMarketConfig = {
|
|
164
|
-
/** bytes32/string term repo id (`termRepoId`). */
|
|
165
|
-
termRepoId: string;
|
|
166
|
-
/** TermRepoServicer — timing + repurchase ledger + redeem/repay. */
|
|
167
|
-
servicer: string;
|
|
168
|
-
/** TermRepoToken — ERC-20 lender claim (balanceOf → lent principal). */
|
|
169
|
-
repoToken: string;
|
|
170
|
-
/** TermRepoCollateralManager — collateral lock/unlock + balances. */
|
|
171
|
-
collateralManager: string;
|
|
172
|
-
/** TermAuction — clears the current/latest auction for this repo (optional). */
|
|
173
|
-
auction?: string;
|
|
174
|
-
/** TermAuctionOfferLocker — lend-side offer submission for the active auction. */
|
|
175
|
-
offerLocker?: string;
|
|
176
|
-
/** TermAuctionBidLocker — borrow-side bid submission for the active auction. */
|
|
177
|
-
bidLocker?: string;
|
|
178
|
-
/** The loan/lend token borrowers receive and lenders supply (== `purchaseToken`). */
|
|
179
|
-
purchaseToken: string;
|
|
180
|
-
loanDecimals: number;
|
|
181
|
-
/** Ordered collateral legs; index = the on-chain collateral index. */
|
|
182
|
-
collateralParams: TermCollateralParam[];
|
|
183
|
-
/** Maturity, unix seconds (as string). */
|
|
184
|
-
maturity: string;
|
|
185
|
-
/** Redemption timestamp, unix seconds (as string). */
|
|
186
|
-
redemptionTimestamp?: string;
|
|
187
|
-
/** End of the repurchase window, unix seconds (as string). */
|
|
188
|
-
endOfRepurchaseWindow?: string;
|
|
189
|
-
/** Fixed redemption value per repo token at maturity (WAD, as string). */
|
|
190
|
-
redemptionValue?: string;
|
|
191
|
-
/** WAD-scaled servicing fee (as string). */
|
|
192
|
-
servicingFee?: string;
|
|
193
|
-
/** Optional display label, e.g. "USDC / WETH — 2026-09-18". */
|
|
194
|
-
name?: string;
|
|
195
|
-
};
|
|
196
|
-
export type TermMarketsType = {
|
|
197
|
-
[chainId: string]: TermMarketConfig[];
|
|
198
|
-
};
|
|
199
|
-
/** Per-chain, protocol-level (evergreen) Exactly addresses. */
|
|
200
|
-
export type ExactlyConfigChain = {
|
|
201
|
-
/** Auditor — cross-margin risk controller (enterMarket / accountLiquidity). */
|
|
202
|
-
auditor: string;
|
|
203
|
-
/** Previewer — read-only aggregate view (markets + fixed pools + account). */
|
|
204
|
-
previewer: string;
|
|
205
|
-
/** RatePreviewer — read-only rate projection helper (optional). */
|
|
206
|
-
ratePreviewer?: string | null;
|
|
207
|
-
/** MarketETHRouter — native-ETH wrapper around the WETH market (optional). */
|
|
208
|
-
marketETHRouter?: string | null;
|
|
209
|
-
/** The WETH Market the ETH router wraps (optional convenience). */
|
|
210
|
-
wethMarket?: string | null;
|
|
211
|
-
/** Debt-rollover periphery — Optimism `DebtManager` (all three roll
|
|
212
|
-
* directions + leverage), Base `DebtRoller` (`rollFixed` ONLY). Same
|
|
213
|
-
* field, different deployment name per chain; consumed by the Exactly
|
|
214
|
-
* rollover builder. */
|
|
215
|
-
debtManager?: string | null;
|
|
216
|
-
/** RewardsController — EXA/OP rewards (optional, not used yet). */
|
|
217
|
-
rewardsController?: string | null;
|
|
218
|
-
};
|
|
219
|
-
export type ExactlyConfigType = {
|
|
220
|
-
[chainId: string]: ExactlyConfigChain;
|
|
221
|
-
};
|
|
222
|
-
/** An Exactly Market: one per underlying asset (maturities live inside it). */
|
|
223
|
-
export type ExactlyMarketConfig = {
|
|
224
|
-
/** Market (ERC4626 vault) address — also the per-market lender-key body. */
|
|
225
|
-
market: string;
|
|
226
|
-
/** Underlying asset address. */
|
|
227
|
-
asset: string;
|
|
228
|
-
/** Market share-token symbol, e.g. "exaUSDC". */
|
|
229
|
-
symbol: string;
|
|
230
|
-
/** Underlying asset symbol, e.g. "USDC". */
|
|
231
|
-
assetSymbol: string;
|
|
232
|
-
/** Market share decimals (== asset decimals for Exactly markets). */
|
|
233
|
-
decimals: number;
|
|
234
|
-
/** Underlying asset decimals. */
|
|
235
|
-
assetDecimals: number;
|
|
236
|
-
/** Number of future fixed pools the market maintains (informational). */
|
|
237
|
-
maxFuturePools?: number;
|
|
238
|
-
/** Optional display label, e.g. "Exactly USDC". */
|
|
239
|
-
name?: string;
|
|
240
|
-
};
|
|
241
|
-
export type ExactlyMarketsType = {
|
|
242
|
-
[chainId: string]: ExactlyMarketConfig[];
|
|
243
|
-
};
|
|
244
|
-
/** Per-chain, protocol-level (evergreen) Teller addresses. */
|
|
245
|
-
export type TellerConfigChain = {
|
|
246
|
-
/** TellerV2 — loan lifecycle: bid reads, repayLoanFull, approveMarketForwarder. */
|
|
247
|
-
tellerV2: string;
|
|
248
|
-
/** MarketRegistry — market owners / default windows / attestation rules. */
|
|
249
|
-
marketRegistry: string;
|
|
250
|
-
/** CollateralManager — per-bid collateral escrow (approve target on open). */
|
|
251
|
-
collateralManager: string;
|
|
252
|
-
/** LenderManager — tokenizes the lender side of an accepted loan (ERC-721). */
|
|
253
|
-
lenderManager?: string | null;
|
|
254
|
-
/** LenderCommitmentForwarder — legacy commitment forwarder (optional). */
|
|
255
|
-
lenderCommitmentForwarder?: string | null;
|
|
256
|
-
/** SmartCommitmentForwarder — borrower entrypoint for pool-backed loans. */
|
|
257
|
-
smartCommitmentForwarder: string;
|
|
258
|
-
/** LenderCommitmentGroup pool factory V1 (Smart pools) — for pool discovery. */
|
|
259
|
-
lenderCommitmentGroupFactory?: string | null;
|
|
260
|
-
/** LenderCommitmentGroup pool factory V2 (ERC-4626 pools; bulk of liquidity). */
|
|
261
|
-
lenderCommitmentGroupFactoryV2?: string | null;
|
|
262
|
-
/** LenderCommitmentGroup pool factory V3 (ERC-4626 pools). */
|
|
263
|
-
lenderCommitmentGroupFactoryV3?: string | null;
|
|
264
|
-
};
|
|
265
|
-
export type TellerConfigType = {
|
|
266
|
-
[chainId: string]: TellerConfigChain;
|
|
267
|
-
};
|
|
268
|
-
/** A Teller LenderCommitmentGroup pool: one fixed principal↔collateral pair. */
|
|
269
|
-
export type TellerPoolConfig = {
|
|
270
|
-
/** Pool (LenderCommitmentGroup) address — also the per-market lender-key body. */
|
|
271
|
-
pool: string;
|
|
272
|
-
/** MarketRegistry market id this pool lends into. Immutable; OPTIONAL —
|
|
273
|
-
* read on-chain via `getMarketId()` when absent (the curated list from the
|
|
274
|
-
* Teller API doesn't carry it). */
|
|
275
|
-
marketId?: string;
|
|
276
|
-
/** Principal (loan / debt) token address. */
|
|
277
|
-
principal: string;
|
|
278
|
-
/** Principal token symbol, e.g. "USDC". */
|
|
279
|
-
principalSymbol: string;
|
|
280
|
-
/** Principal token decimals. */
|
|
281
|
-
principalDecimals: number;
|
|
282
|
-
/** Collateral token address. */
|
|
283
|
-
collateral: string;
|
|
284
|
-
/** Collateral token symbol, e.g. "WETH". */
|
|
285
|
-
collateralSymbol: string;
|
|
286
|
-
/** Collateral token decimals. */
|
|
287
|
-
collateralDecimals: number;
|
|
288
|
-
/** Max loan duration (seconds) the pool allows (borrower picks ≤ this).
|
|
289
|
-
* Immutable; OPTIONAL — read on-chain via `getMaxLoanDuration()` when absent. */
|
|
290
|
-
maxLoanDuration?: number;
|
|
291
|
-
/** Pool generation hint (2 = ERC-4626 `_Pool_V2/V3`, 1 = `_Smart`), from the
|
|
292
|
-
* Teller API `isV2` flag. Borrow path is identical; only supply-side differs. */
|
|
293
|
-
isV2?: boolean;
|
|
294
|
-
/** WAD/bps interest-rate lower bound (informational; enforced on-chain). */
|
|
295
|
-
interestRateLowerBound?: string | number | null;
|
|
296
|
-
/** WAD/bps interest-rate upper bound (informational; enforced on-chain). */
|
|
297
|
-
interestRateUpperBound?: string | number | null;
|
|
298
|
-
/** Optional display label, e.g. "Teller USDC / WETH". */
|
|
299
|
-
name?: string;
|
|
300
|
-
};
|
|
301
|
-
export type TellerPoolsType = {
|
|
302
|
-
[chainId: string]: TellerPoolConfig[];
|
|
303
|
-
};
|
|
304
|
-
/** Per-deployment, per-chain shared Liquity-family addresses + deviation params. */
|
|
305
|
-
export type LiquityConfigChain = {
|
|
306
|
-
/** CollateralRegistry — branch enumeration + redemptions. */
|
|
307
|
-
collateralRegistry: string;
|
|
308
|
-
/** The deployment's stable token (BOLD / feUSD / USDaf / USND / USDQ …). */
|
|
309
|
-
boldToken: string;
|
|
310
|
-
/** Stable token decimals (18 for every known deployment). */
|
|
311
|
-
boldDecimals?: number;
|
|
312
|
-
/** HintHelpers — insert-position hints + upfront-fee predictions. */
|
|
313
|
-
hintHelpers: string;
|
|
314
|
-
/** MultiTroveGetter — paginated rate-ordered trove reads. */
|
|
315
|
-
multiTroveGetter: string;
|
|
316
|
-
/** WETH-equivalent used for the gas compensation pull on openTrove. */
|
|
317
|
-
wethToken: string;
|
|
318
|
-
/** Gas compensation pulled on open, wei (vanilla 0.0375e18; Felix 0; Nerite 1e15). */
|
|
319
|
-
gasCompensation: string;
|
|
320
|
-
/** Minimum trove debt in stable units, WAD (vanilla 2000e18; Nerite/Quill 500e18). */
|
|
321
|
-
minDebt: string;
|
|
322
|
-
/** Interest-rate bounds, WAD annual (vanilla 0.5%–250%; Quill 6%–350%). */
|
|
323
|
-
minAnnualInterestRate: string;
|
|
324
|
-
maxAnnualInterestRate: string;
|
|
325
|
-
/** Upfront-fee averaging period, seconds (vanilla 7 days). */
|
|
326
|
-
upfrontInterestPeriodSeconds?: string;
|
|
327
|
-
/** Premature rate-adjustment cooldown, seconds (vanilla 7 days). */
|
|
328
|
-
interestRateAdjCooldownSeconds?: string;
|
|
329
|
-
/** Share of borrow interest routed to SP depositors, WAD (vanilla 0.75e18). */
|
|
330
|
-
spYieldSplit?: string;
|
|
331
|
-
/** Fork exposes per-branch debt caps (Nerite getDebtLimit / Felix MaxCapDebt). */
|
|
332
|
-
hasDebtCaps?: boolean;
|
|
333
|
-
/** Fork exposes deploy-parameterized constants as TroveManager getters (Quill). */
|
|
334
|
-
hasForkParamGetters?: boolean;
|
|
335
|
-
/** Proxied deployment (Felix/Ebisu): constants are admin-mutable → refresh required. */
|
|
336
|
-
mutableParams?: boolean;
|
|
337
|
-
/**
|
|
338
|
-
* Known trove-opening periphery contracts (WETH / GasComp / Leverage
|
|
339
|
-
* zappers). Troves opened through a zapper have NFT ids salted by the
|
|
340
|
-
* zapper address AND a transformed owner index — user-data discovery must
|
|
341
|
-
* probe these in addition to direct opens (the official frontends open
|
|
342
|
-
* through zappers, so most real troves are zapper-salted).
|
|
343
|
-
*/
|
|
344
|
-
zappers?: string[];
|
|
345
|
-
/**
|
|
346
|
-
* Fork wrapper tokens: collIndex → the user-facing asset the branch
|
|
347
|
-
* collateral wraps. The generator copies these onto branch records
|
|
348
|
-
* (`LiquityBranchConfig.collWrapper`).
|
|
349
|
-
*/
|
|
350
|
-
collWrappers?: {
|
|
351
|
-
[collIndex: string]: string;
|
|
352
|
-
};
|
|
353
|
-
/** Subgraph endpoint for trove discovery enrichment (optional, may be down). */
|
|
354
|
-
subgraphUrl?: string | null;
|
|
355
|
-
/** api.liquity.org-style stats endpoint for APY smoothing (optional, may be down). */
|
|
356
|
-
apiBaseUrl?: string | null;
|
|
357
|
-
};
|
|
358
|
-
export type LiquityConfigType = {
|
|
359
|
-
[lender: string]: {
|
|
360
|
-
[chainId: string]: LiquityConfigChain;
|
|
361
|
-
};
|
|
362
|
-
};
|
|
363
|
-
/** One collateral branch of a Liquity-family deployment (= one market). */
|
|
364
|
-
export type LiquityBranchConfig = {
|
|
365
|
-
/** CollateralRegistry index — also the per-branch lender-key suffix. */
|
|
366
|
-
collIndex: number;
|
|
367
|
-
collToken: string;
|
|
368
|
-
collDecimals: number;
|
|
369
|
-
/**
|
|
370
|
-
* The user-facing asset the branch collateral wraps, when the fork inserts a
|
|
371
|
-
* wrapper (Felix feUBTC←UBTC, USDaf WBTC18←WBTC / ysyBOLD←yBOLD). Deposit /
|
|
372
|
-
* withdraw builders add a wrap/unwrap leg when set. Null/absent = no wrapper.
|
|
373
|
-
*/
|
|
374
|
-
collWrapper?: string | null;
|
|
375
|
-
addressesRegistry: string;
|
|
376
|
-
borrowerOperations: string;
|
|
377
|
-
troveManager: string;
|
|
378
|
-
troveNFT: string;
|
|
379
|
-
stabilityPool: string;
|
|
380
|
-
activePool: string;
|
|
381
|
-
defaultPool?: string;
|
|
382
|
-
sortedTroves: string;
|
|
383
|
-
priceFeed: string;
|
|
384
|
-
/**
|
|
385
|
-
* Decimals of `PriceFeed.lastGoodPrice()`. 18 on canonical (18-dec) collateral
|
|
386
|
-
* and omitted there; forks that list NON-18-dec collateral split into two camps
|
|
387
|
-
* and only metadata tells them apart — see `liquityCollateralPrice` in
|
|
388
|
-
* margin-fetcher. Ebisu bakes the scaling into the feed (`36 - collDecimals`);
|
|
389
|
-
* Enosys keeps the feed at 18 and normalizes collateral inside its CR math.
|
|
390
|
-
*/
|
|
391
|
-
priceDecimals?: number;
|
|
392
|
-
gasPool?: string;
|
|
393
|
-
collSurplusPool?: string;
|
|
394
|
-
/** Branch risk ratios, WAD (snapshotted; proxied forks can change them). */
|
|
395
|
-
ccr: string;
|
|
396
|
-
mcr: string;
|
|
397
|
-
scr: string;
|
|
398
|
-
bcr?: string;
|
|
399
|
-
/** Liquidation penalties, WAD (SP offset / redistribution). */
|
|
400
|
-
liquidationPenaltySP?: string;
|
|
401
|
-
liquidationPenaltyRedistribution?: string;
|
|
402
|
-
/** Branch debt cap in stable units, WAD (only forks with `hasDebtCaps`). */
|
|
403
|
-
debtCap?: string | null;
|
|
404
|
-
/** Optional display label, e.g. "Liquity V2 wstETH". */
|
|
405
|
-
name?: string;
|
|
406
|
-
};
|
|
407
|
-
export type LiquityMarketsType = {
|
|
408
|
-
[lender: string]: {
|
|
409
|
-
[chainId: string]: LiquityBranchConfig[];
|
|
410
|
-
};
|
|
411
|
-
};
|
|
412
|
-
/** Per-chain River deployment seed (hand-maintained). */
|
|
413
|
-
export type RiverConfigChain = {
|
|
414
|
-
/** SatoshiXApp — the EIP-2535 diamond ALL ops are called on. */
|
|
415
|
-
xapp: string;
|
|
416
|
-
/** The debt token (satUSD — a LayerZero OFT; address differs per chain). */
|
|
417
|
-
debtToken: string;
|
|
418
|
-
/** Debt token decimals (18 on every known deployment). */
|
|
419
|
-
debtDecimals?: number;
|
|
420
|
-
/** SatoshiPeriphery proxy (native wrap + OFT-send legs; optional, skippable). */
|
|
421
|
-
periphery?: string | null;
|
|
422
|
-
};
|
|
423
|
-
export type RiverConfigType = {
|
|
424
|
-
[lender: string]: {
|
|
425
|
-
[chainId: string]: RiverConfigChain;
|
|
426
|
-
};
|
|
427
|
-
};
|
|
428
|
-
/** One River market (= one TroveManager beacon proxy, one collateral). */
|
|
429
|
-
export type RiverMarketConfig = {
|
|
430
|
-
/** Factory index — also the per-market lender-key suffix (`RIVER_<index>`). */
|
|
431
|
-
index: number;
|
|
432
|
-
troveManager: string;
|
|
433
|
-
sortedTroves?: string;
|
|
434
|
-
collToken: string;
|
|
435
|
-
collDecimals: number;
|
|
436
|
-
/** WAD strings, snapshotted on-chain each refresh (owner-mutable params). */
|
|
437
|
-
mcr: string;
|
|
438
|
-
/** Protocol-set interest rate (raw; currently 0 everywhere). */
|
|
439
|
-
interestRate?: string;
|
|
440
|
-
/** Decaying-baseRate mint-fee bounds, WAD (floor 0.5%, cap 5% typical). */
|
|
441
|
-
borrowingFeeFloor?: string;
|
|
442
|
-
maxBorrowingFee?: string;
|
|
443
|
-
/** Per-market debt ceiling in debt-token units (owner-settable). */
|
|
444
|
-
maxSystemDebt?: string;
|
|
445
|
-
/** Debt-side gas compensation (2 satUSD typical) — minted on open, burned on close. */
|
|
446
|
-
debtGasCompensation?: string;
|
|
447
|
-
paused?: boolean;
|
|
448
|
-
sunsetting?: boolean;
|
|
449
|
-
/** Optional display label, e.g. "satUSD / WETH". */
|
|
450
|
-
name?: string;
|
|
451
|
-
};
|
|
452
|
-
/** Generated per-chain data: diamond-level params + the TroveManager list. */
|
|
453
|
-
export type RiverChainData = {
|
|
454
|
-
/** Diamond-level minimum net debt (owner-settable — refreshed each run). */
|
|
455
|
-
minNetDebt: string;
|
|
456
|
-
markets: RiverMarketConfig[];
|
|
457
|
-
};
|
|
458
|
-
export type RiverMarketsType = {
|
|
459
|
-
[lender: string]: {
|
|
460
|
-
[chainId: string]: RiverChainData;
|
|
461
|
-
};
|
|
462
|
-
};
|
|
463
|
-
/** Per-chain FiRM deployment seed (hand-maintained). */
|
|
464
|
-
export type InverseConfigChain = {
|
|
465
|
-
/** DOLA — the only debt asset. */
|
|
466
|
-
dola: string;
|
|
467
|
-
/** DBR — the prepaid-interest token (deficit gates borrows AND withdrawals). */
|
|
468
|
-
dbr: string;
|
|
469
|
-
/** Pessimistic oracle (2-day-low `viewPrice`). */
|
|
470
|
-
oracle: string;
|
|
471
|
-
/** BorrowController v4 (contract-caller allowlist; EOAs bypass). */
|
|
472
|
-
borrowController: string;
|
|
473
|
-
/** Debt decimals (18). */
|
|
474
|
-
debtDecimals?: number;
|
|
475
|
-
/** Metadata snapshot of the DBR price in DOLA (= fixed borrow APR as a
|
|
476
|
-
* decimal) — FALLBACK ONLY when the live API/AMM read fails. */
|
|
477
|
-
dbrPriceDolaSnapshot?: string;
|
|
478
|
-
};
|
|
479
|
-
export type InverseConfigType = {
|
|
480
|
-
[lender: string]: {
|
|
481
|
-
[chainId: string]: InverseConfigChain;
|
|
482
|
-
};
|
|
483
|
-
};
|
|
484
|
-
/** Per-chain, protocol-level (evergreen) TermMax addresses. */
|
|
485
|
-
export type TermMaxConfigChain = {
|
|
486
|
-
/** TermMaxRouterV2 — the native atomic write surface (borrow, repay, …). */
|
|
487
|
-
routerV2: string;
|
|
488
|
-
/** OracleAggregatorV2 — `getPrice(asset) → (price, decimals)`; the feed LTV
|
|
489
|
-
* and liquidation are computed against. */
|
|
490
|
-
oracleAggregatorV2: string;
|
|
491
|
-
/** TermMaxViewer — batch position/order reads (the user-data multicall target). */
|
|
492
|
-
viewer: string;
|
|
493
|
-
/** WhitelistManager — gates which markets/adapters the ROUTER will touch.
|
|
494
|
-
* Does NOT gate the market/order/GT primitives (those are permissionless). */
|
|
495
|
-
whitelistManager?: string | null;
|
|
496
|
-
/** TermMaxSwapAdapter — the router swap adapter that executes ORDER swaps
|
|
497
|
-
* inside a `SwapPath`. Required to build `borrowTokenFromCollateral`; the
|
|
498
|
-
* order swaps themselves can be called directly without it. */
|
|
499
|
-
termMaxSwapAdapter?: string | null;
|
|
500
|
-
/** Market factories, newest last. Used for event-based discovery when the
|
|
501
|
-
* API is unavailable; not needed on the happy path. */
|
|
502
|
-
marketFactories?: string[] | null;
|
|
503
|
-
/** Legacy V1 router — retired, kept only so a stale key can be recognised
|
|
504
|
-
* and rejected rather than silently encoded against. */
|
|
505
|
-
routerV1?: string | null;
|
|
506
|
-
/** TermMax data API base, e.g. `https://api.termmax.ts.finance`. Overridable
|
|
507
|
-
* per chain so a self-hosted indexer can be swapped in. */
|
|
508
|
-
apiBaseUrl?: string | null;
|
|
509
|
-
};
|
|
510
|
-
export type TermMaxConfigType = {
|
|
511
|
-
[chainId: string]: TermMaxConfigChain;
|
|
512
|
-
};
|
|
513
|
-
/** One FiRM market (= one Market contract, one collateral). */
|
|
514
|
-
export type InverseMarketConfig = {
|
|
515
|
-
/** Market contract — also the per-market lender-key suffix (`INVERSE_<ADDR>`). */
|
|
516
|
-
address: string;
|
|
517
|
-
collToken: string;
|
|
518
|
-
collDecimals: number;
|
|
519
|
-
/** Escrow implementation the Market clones per user (CREATE2 predict). */
|
|
520
|
-
escrowImplementation: string;
|
|
521
|
-
/** Owner-mutable params, snapshotted each metadata refresh. */
|
|
522
|
-
collateralFactorBps: string;
|
|
523
|
-
liquidationIncentiveBps: string;
|
|
524
|
-
liquidationFactorBps: string;
|
|
525
|
-
/** Replenisher's cut of a force-replenish (1000 = 10%). Optional: older
|
|
526
|
-
* metadata snapshots predate it, and it is bot-side economics — the
|
|
527
|
-
* borrower always pays the full `DBR.replenishmentPriceBps`. */
|
|
528
|
-
replenishmentIncentiveBps?: string;
|
|
529
|
-
/** Smaller borrows revert (DOLA units, human number as string). */
|
|
530
|
-
minDebt: string;
|
|
531
|
-
/** Per-market daily borrow cap (DOLA, human number as string). */
|
|
532
|
-
dailyLimit: string;
|
|
533
|
-
borrowPaused?: boolean;
|
|
534
|
-
name?: string;
|
|
535
|
-
};
|
|
536
|
-
/** Generated per-chain data: the curated Market list. */
|
|
537
|
-
export type InverseChainData = {
|
|
538
|
-
markets: InverseMarketConfig[];
|
|
539
|
-
};
|
|
540
|
-
export type InverseMarketsType = {
|
|
541
|
-
[lender: string]: {
|
|
542
|
-
[chainId: string]: InverseChainData;
|
|
543
|
-
};
|
|
544
|
-
};
|
|
545
|
-
/** Per-chain Frankencoin deployment seed (hand-maintained). */
|
|
546
|
-
export type FrankencoinConfigChain = {
|
|
547
|
-
/** ZCHF — the only debt asset. */
|
|
548
|
-
zchf: string;
|
|
549
|
-
/** MintingHub V2 — clone/challenge entry point. */
|
|
550
|
-
mintingHub: string;
|
|
551
|
-
/** Equity (FPS) — first-loss tranche holding the withheld reserve. */
|
|
552
|
-
equity: string;
|
|
553
|
-
/** PositionRoller (carries a protocol-native ZCHF flash loan). */
|
|
554
|
-
roller?: string;
|
|
555
|
-
/** Leadrate module — the protocol-wide base rate. */
|
|
556
|
-
leadrate?: string;
|
|
557
|
-
/** Savings module (the savings vault leg lives in SAVINGS_REGISTRY;
|
|
558
|
-
* carried here for completeness). */
|
|
559
|
-
savings?: string;
|
|
560
|
-
/** Chainlink-shaped CHF/USD feed — required for USD normalisation. */
|
|
561
|
-
chfUsdFeed?: string;
|
|
562
|
-
/** Debt decimals (18). */
|
|
563
|
-
debtDecimals?: number;
|
|
564
|
-
/** Legacy MintingHub V1 — dead but deployed; positions carrying this hub
|
|
565
|
-
* must never reach the V2 builders. */
|
|
566
|
-
mintingHubV1?: string;
|
|
567
|
-
};
|
|
568
|
-
export type FrankencoinConfigType = {
|
|
569
|
-
[lender: string]: {
|
|
570
|
-
[chainId: string]: FrankencoinConfigChain;
|
|
571
|
-
};
|
|
572
|
-
};
|
|
573
|
-
/** One Frankencoin market (= one ORIGINAL position). */
|
|
574
|
-
export type FrankencoinMarketConfig = {
|
|
575
|
-
/** The original position contract — also the per-market key suffix
|
|
576
|
-
* (`FRANKENCOIN_<chainId>_<ADDR>`). */
|
|
577
|
-
position: string;
|
|
578
|
-
collToken: string;
|
|
579
|
-
collDecimals: number;
|
|
580
|
-
collSymbol?: string;
|
|
581
|
-
/** Owner-declared liquidation price, 36-dec scaled against the
|
|
582
|
-
* collateral's decimals. NOT an oracle quote. */
|
|
583
|
-
price: string;
|
|
584
|
-
/** ppm — risk premium on top of the hub lead rate. */
|
|
585
|
-
riskPremiumPPM: string;
|
|
586
|
-
/** ppm — withheld into the equity reserve at mint (10-40% observed). */
|
|
587
|
-
reserveContribution: string;
|
|
588
|
-
/** Minimum collateral for a clone (raw collateral units). */
|
|
589
|
-
minimumCollateral: string;
|
|
590
|
-
/** Total ZCHF this original + its clones may mint. */
|
|
591
|
-
limitForClones?: string;
|
|
592
|
-
/** Unix seconds — positions EXPIRE (forced sale after). */
|
|
593
|
-
expiration: string;
|
|
594
|
-
start?: string;
|
|
595
|
-
challengePeriod?: string;
|
|
596
|
-
/** Position version — only 2 is supported; V1 is dead. */
|
|
597
|
-
version?: number;
|
|
598
|
-
name?: string;
|
|
599
|
-
};
|
|
600
|
-
/** Generated per-chain data: the curated original-position roster. */
|
|
601
|
-
export type FrankencoinChainData = {
|
|
602
|
-
markets: FrankencoinMarketConfig[];
|
|
603
|
-
};
|
|
604
|
-
export type FrankencoinMarketsType = {
|
|
605
|
-
[lender: string]: {
|
|
606
|
-
[chainId: string]: FrankencoinChainData;
|
|
607
|
-
};
|
|
608
|
-
};
|
|
609
|
-
/** Per-chain, protocol-level (evergreen) Resupply addresses. */
|
|
610
|
-
export type ResupplyConfigChain = {
|
|
611
|
-
/** ResupplyRegistry — `getAllPairAddresses()` IS the market discovery, and
|
|
612
|
-
* `getAddress(key)` resolves every other singleton. */
|
|
613
|
-
registry: string;
|
|
614
|
-
/** reUSD — the only debt asset. */
|
|
615
|
-
reusd: string;
|
|
616
|
-
/** Utilities lens — `getPairInterestRate`, `getUnderlyingSupplyRate`,
|
|
617
|
-
* `getSwapRouteAmountOut`, `isSolventAfterLeverage`. Optional, but every
|
|
618
|
-
* rate and every leverage pre-flight is far cheaper with it. */
|
|
619
|
-
utilities?: string | null;
|
|
620
|
-
/** The built-in Curve `Swapper` — every leg for every pair is already
|
|
621
|
-
* registered on it, so a leverage route needs no aggregator at all. This
|
|
622
|
-
* is THE DEFAULT leverage swapper. */
|
|
623
|
-
curveSwapper?: string | null;
|
|
624
|
-
/** `RouterSwapper` wrapping the Enso router. Whitelisted on every pair, and
|
|
625
|
-
* it executes ARBITRARY router calldata packed into the `address[] path` —
|
|
626
|
-
* which is what makes aggregator-quoted looping possible at all. */
|
|
627
|
-
ensoSwapper?: string | null;
|
|
628
|
-
/** Same, wrapping the LI.FI Diamond. No LI.FI fetcher on our side yet. */
|
|
629
|
-
lifiSwapper?: string | null;
|
|
630
|
-
/** RedemptionHandler — the (communal) peg mechanism. Read-only for us. */
|
|
631
|
-
redemptionHandler?: string | null;
|
|
632
|
-
/** LiquidationHandler — liquidations are insurance-pool-funded, whole-position. */
|
|
633
|
-
liquidationHandler?: string | null;
|
|
634
|
-
/** InsurancePool — reUSD staked as first-loss capital. */
|
|
635
|
-
insurancePool?: string | null;
|
|
636
|
-
/** sreUSD — the savings leg (belongs to SAVINGS_REGISTRY; carried here for
|
|
637
|
-
* completeness so one config row describes the whole protocol). */
|
|
638
|
-
sreusd?: string | null;
|
|
639
|
-
/** PriceWatcher — supplies the off-peg weight the borrow rate is scaled by. */
|
|
640
|
-
priceWatcher?: string | null;
|
|
641
|
-
/** reUSD decimals (18). */
|
|
642
|
-
debtDecimals?: number;
|
|
643
|
-
/** Optional allowlist of pair addresses. When set, on-chain discovery is
|
|
644
|
-
* INTERSECTED with it; when absent (the default) every registered pair
|
|
645
|
-
* with a non-zero `borrowLimit` is published. */
|
|
646
|
-
pairAllowlist?: string[] | null;
|
|
647
|
-
};
|
|
648
|
-
export type ResupplyConfigType = {
|
|
649
|
-
[lender: string]: {
|
|
650
|
-
[chainId: string]: ResupplyConfigChain;
|
|
651
|
-
};
|
|
652
|
-
};
|
|
653
|
-
/** The Position Manager variants Curvance deploys, keyed as the app keys them. */
|
|
654
|
-
export type CurvancePositionManagers = {
|
|
655
|
-
/** Generic non-native ERC-20 legs. The common case (20 of 20 PM'd markets). */
|
|
656
|
-
simplePositionManager?: string;
|
|
657
|
-
/** ERC-4626-style collateral that is entered on leverage. */
|
|
658
|
-
vaultPositionManager?: string;
|
|
659
|
-
/** Wrapped-native collateral — unwraps / swaps into native before depositing. */
|
|
660
|
-
nativeVaultPositionManager?: string;
|
|
661
|
-
/** Pendle principal-token collateral. */
|
|
662
|
-
pendlePtPositionManager?: string;
|
|
663
|
-
};
|
|
664
|
-
/** Per-chain, protocol-level (evergreen) Curvance addresses. */
|
|
665
|
-
export type CurvanceConfigChain = {
|
|
666
|
-
/** `CentralRegistry` — `marketManagers()` IS the market discovery, and every
|
|
667
|
-
* other singleton hangs off it. The one address the provider bootstraps
|
|
668
|
-
* from. */
|
|
669
|
-
centralRegistry: string;
|
|
670
|
-
/** `OracleManager` — `getPrice(asset, inUSD, getLower)`. Prices are WAD USD
|
|
671
|
-
* and carry an `errorCode` that GATES actions (see the abis header). */
|
|
672
|
-
oracleManager?: string;
|
|
673
|
-
/** `ProtocolReader` — `getStaticMarketData()` + `getAllDynamicState(account)`
|
|
674
|
-
* return the entire public book and one account's whole portfolio in two
|
|
675
|
-
* calls. Optional: the fetchers fall back to a plain multicall over the
|
|
676
|
-
* MarketManagers when it is absent. */
|
|
677
|
-
protocolReader?: string;
|
|
678
|
-
/** `OptimizerReader` — lens for the LendingOptimizer ("Vaults") surface. */
|
|
679
|
-
optimizerReader?: string;
|
|
680
|
-
/**
|
|
681
|
-
* Native-leverage Position Managers, keyed by MARKET MANAGER address
|
|
682
|
-
* (lowercase-insensitive on read). A market absent here has no native
|
|
683
|
-
* leverage — which is a real state, not a gap: 5 of 25 markets on Monad
|
|
684
|
-
* have none registered.
|
|
685
|
-
*/
|
|
686
|
-
positionManagers?: {
|
|
687
|
-
[marketManager: string]: CurvancePositionManagers;
|
|
688
|
-
};
|
|
689
|
-
/**
|
|
690
|
-
* `LendingOptimizer` vaults by symbol. Their shares are collateralisable
|
|
691
|
-
* through `LendingOptimizerShareCToken`, which is why `hyAUSD` appears as
|
|
692
|
-
* collateral in two markets.
|
|
693
|
-
*/
|
|
694
|
-
optimizers?: {
|
|
695
|
-
[symbol: string]: string;
|
|
696
|
-
};
|
|
697
|
-
/**
|
|
698
|
-
* Swap targets with a registered `externalCalldataChecker`, i.e. the ONLY
|
|
699
|
-
* routers the native leverage path will accept. Cached here as a hint; the
|
|
700
|
-
* mapping is DAO-mutable in both directions, so a builder must still probe
|
|
701
|
-
* `externalCalldataChecker(target)` live and fail closed.
|
|
702
|
-
*/
|
|
703
|
-
swapTargets?: {
|
|
704
|
-
[aggregator: string]: string;
|
|
705
|
-
};
|
|
706
|
-
/** Optional allowlist of MarketManager addresses. When set, on-chain
|
|
707
|
-
* discovery is INTERSECTED with it; absent (the default) publishes every
|
|
708
|
-
* listed market. */
|
|
709
|
-
marketAllowlist?: string[] | null;
|
|
710
|
-
};
|
|
711
|
-
export type CurvanceConfigType = {
|
|
712
|
-
[lender: string]: {
|
|
713
|
-
[chainId: string]: CurvanceConfigChain;
|
|
714
|
-
};
|
|
715
|
-
};
|
|
716
|
-
/** Per-chain LlamaLend deployment seed (hand-maintained). */
|
|
717
|
-
export type LlamaLendConfigChain = {
|
|
718
|
-
/** v1 `OneWayLendingFactory` — parallel index getters. Absent on chains
|
|
719
|
-
* that only ever got v2. */
|
|
720
|
-
oneWayFactory?: string;
|
|
721
|
-
/** v2 `LendFactory` — struct-returning `markets(i)`; `version()` = `2.0.0`. */
|
|
722
|
-
lendFactory?: string;
|
|
723
|
-
/** v2 LendConfigurator (admin surface; carried for completeness). */
|
|
724
|
-
configurator?: string;
|
|
725
|
-
/**
|
|
726
|
-
* Curve's deployed v1 LeverageZap for this chain, and the aggregator router
|
|
727
|
-
* it is hard-wired to. THIS is how leverage works here — we do not deploy a
|
|
728
|
-
* callbacker.
|
|
729
|
-
*
|
|
730
|
-
* The zap's router is an IMMUTABLE with no allowlist, and `callback_bytes`
|
|
731
|
-
* is forwarded to it verbatim, so arbitrary aggregator calldata is already
|
|
732
|
-
* permitted. Two are deployed per chain (Odos and 1inch); pick whichever
|
|
733
|
-
* aggregator is quoting, and ALWAYS check the quote's target against
|
|
734
|
-
* `*Router` before encoding — the zap forwards mismatched calldata to the
|
|
735
|
-
* wrong contract rather than rejecting it.
|
|
736
|
-
*/
|
|
737
|
-
leverageZapOdos?: string;
|
|
738
|
-
leverageZapOdosRouter?: string;
|
|
739
|
-
leverageZap1inch?: string;
|
|
740
|
-
leverageZap1inchRouter?: string;
|
|
741
|
-
/**
|
|
742
|
-
* Lowest `factoryIndex` the zaps accept — markets below it were deployed
|
|
743
|
-
* from a blueprint the zap does not recognise. 9 on Ethereum and Arbitrum,
|
|
744
|
-
* 0 on Optimism. This is a WIDER gate than delegation: 84.9% of borrows
|
|
745
|
-
* qualify, including markets that are not delegation-capable, because
|
|
746
|
-
* leverage is EOA-direct and needs no grant.
|
|
747
|
-
*/
|
|
748
|
-
leverageStartId?: number;
|
|
749
|
-
/**
|
|
750
|
-
* The crvUSD mint (CDP) factory, when the chain's zap indexes it as
|
|
751
|
-
* `factoryId = 1`. Present on Ethereum only. Recorded because the SAME zap
|
|
752
|
-
* serves those markets — see LLAMALEND.md.
|
|
753
|
-
*/
|
|
754
|
-
crvUsdFactory?: string;
|
|
755
|
-
/** Curve data API base. Overridable so a self-hosted indexer can be
|
|
756
|
-
* swapped in; the default serves every chain and both generations from
|
|
757
|
-
* one call. */
|
|
758
|
-
apiBaseUrl?: string | null;
|
|
759
|
-
/** The chain's slug in the Curve API's `blockchainId` field
|
|
760
|
-
* (`ethereum` / `optimism` / `arbitrum` / `fraxtal` / `sonic`). */
|
|
761
|
-
apiChainSlug?: string;
|
|
762
|
-
};
|
|
763
|
-
export type LlamaLendConfigType = {
|
|
764
|
-
[lender: string]: {
|
|
765
|
-
[chainId: string]: LlamaLendConfigChain;
|
|
766
|
-
};
|
|
767
|
-
};
|
|
768
|
-
/** One LlamaLend market (= one Controller). */
|
|
769
|
-
export type LlamaLendMarketConfig = {
|
|
770
|
-
/** Controller contract — also the per-market key suffix
|
|
771
|
-
* (`LLAMALEND_<CONTROLLER_ADDR>`). */
|
|
772
|
-
controller: string;
|
|
773
|
-
/** ERC-4626 vault — the lender side. TRAP: shares run ~1000x the asset
|
|
774
|
-
* scale (`DEAD_SHARES`), so never assume 1:1. */
|
|
775
|
-
vault: string;
|
|
776
|
-
/** LLAMMA. MUST be excluded from any leverage swap route — the Controller
|
|
777
|
-
* asserts the AMM's band state is unchanged across a callback. */
|
|
778
|
-
amm: string;
|
|
779
|
-
collateralToken: string;
|
|
780
|
-
collateralDecimals: number;
|
|
781
|
-
collateralSymbol?: string;
|
|
782
|
-
borrowedToken: string;
|
|
783
|
-
borrowedDecimals: number;
|
|
784
|
-
borrowedSymbol?: string;
|
|
785
|
-
monetaryPolicy: string;
|
|
786
|
-
priceOracle?: string;
|
|
787
|
-
/** 1 = `oneway` (v1, `*_extended` leverage), 2 = `oneway-v2` (v2, callbacker
|
|
788
|
-
* folded into the base functions). Branch every encoder on this. */
|
|
789
|
-
version: 1 | 2;
|
|
790
|
-
/**
|
|
791
|
-
* Whether this Controller carries the boolean delegation grant
|
|
792
|
-
* (`approve(spender, allow)` + `_for` on the writes).
|
|
793
|
-
*
|
|
794
|
-
* PER-MARKET, not per-protocol: only newer-blueprint controllers have it
|
|
795
|
-
* (48 of 98 markets at 2026-08, and 0 of 22 on Arbitrum). Derived by the
|
|
796
|
-
* metadata generator from a runtime-bytecode selector scan, because an
|
|
797
|
-
* `eth_call` probe cannot distinguish "no such method" from a node hiccup
|
|
798
|
-
* on most public RPCs. FAIL CLOSED — treat `undefined` as `false`.
|
|
799
|
-
*/
|
|
800
|
-
supportsDelegation: boolean;
|
|
801
|
-
/** Band-geometry parameter `A` from the AMM. With `loanDiscount` and the
|
|
802
|
-
* chosen `N` this fixes the effective collateral factor. */
|
|
803
|
-
ammA: string;
|
|
804
|
-
/** WAD haircut used when sizing a loan. */
|
|
805
|
-
loanDiscount: string;
|
|
806
|
-
/** WAD hard-liquidation bonus (applies only BELOW the whole band range —
|
|
807
|
-
* inside it the position soft-liquidates with no penalty). */
|
|
808
|
-
liquidationDiscount: string;
|
|
809
|
-
/**
|
|
810
|
-
* The market's index in its factory — `controllers(i)`. Doubles as the
|
|
811
|
-
* `controller_id` the leverage zap's `callback_args` requires, so it is
|
|
812
|
-
* mandatory for any leveraged encode. The Curve API exposes it as the
|
|
813
|
-
* numeric suffix of `id` (`oneway-41`).
|
|
814
|
-
*/
|
|
815
|
-
factoryIndex: number;
|
|
816
|
-
/**
|
|
817
|
-
* Whether Curve's v1 leverage zap accepts this market
|
|
818
|
-
* (`factoryIndex >= leverageStartId`, and v1 only — v2 markets live in a
|
|
819
|
-
* factory the zap does not index). Independent of `supportsDelegation`.
|
|
820
|
-
*/
|
|
821
|
-
supportsLeverage: boolean;
|
|
822
|
-
/** Band count offered by default in the UI (Curve's own default is 10).
|
|
823
|
-
* There is no single LTV — the collateral factor is a function of N — so
|
|
824
|
-
* public data reports `collateralFactor` at this N and exposes the rest
|
|
825
|
-
* of the curve alongside. */
|
|
826
|
-
defaultBands?: number;
|
|
827
|
-
/** Monetary-policy family: `semilog` (v1) or `hyperbolic` (v2). The
|
|
828
|
-
* `hyperbolic-dynamic` variant pulls its target rate from an external
|
|
829
|
-
* rate calculator tracking a yield-bearing asset, so its curve moves
|
|
830
|
-
* under a cache — never serve it from stale params. */
|
|
831
|
-
rateModel?: 'semilog' | 'hyperbolic' | 'hyperbolic-dynamic';
|
|
832
|
-
/** Gauge (CRV emissions on the vault side), v1 only. */
|
|
833
|
-
gauge?: string | null;
|
|
834
|
-
/** v2 only: 0 DISABLES borrowing. A fresh v2 market looks live but is not. */
|
|
835
|
-
borrowCap?: string;
|
|
836
|
-
name?: string;
|
|
837
|
-
};
|
|
838
|
-
/** Generated per-chain data: the curated market roster. */
|
|
839
|
-
export type LlamaLendChainData = {
|
|
840
|
-
markets: LlamaLendMarketConfig[];
|
|
841
|
-
};
|
|
842
|
-
export type LlamaLendMarketsType = {
|
|
843
|
-
[lender: string]: {
|
|
844
|
-
[chainId: string]: LlamaLendChainData;
|
|
845
|
-
};
|
|
846
|
-
};
|
|
847
|
-
/** One USDD PSM (1:1 stable swap module; NOT a lending market). */
|
|
848
|
-
export type UsddPsmConfig = {
|
|
849
|
-
ilk: string;
|
|
850
|
-
psm: string;
|
|
851
|
-
/** Approval target for `sellGem` (the PSM's own gem adapter). */
|
|
852
|
-
gemJoin: string;
|
|
853
|
-
gem: string;
|
|
854
|
-
gemSymbol?: string;
|
|
855
|
-
/** 6 on Ethereum (USDT/USDC), 18 on BNB (BSC-USDT). */
|
|
856
|
-
gemDecimals: number;
|
|
857
|
-
};
|
|
858
|
-
/** Per-chain USDD deployment seed (hand-maintained). */
|
|
859
|
-
export type UsddConfigChain = {
|
|
860
|
-
/** Core accounting engine — ilk params + urns live here. */
|
|
861
|
-
vat: string;
|
|
862
|
-
/** Stability-fee module (`ilks(ilk).duty`, per-second ray). */
|
|
863
|
-
jug: string;
|
|
864
|
-
/** Oracle liaison (`ilks(ilk)` → pip + mat). */
|
|
865
|
-
spot: string;
|
|
866
|
-
/** Liquidation module (clip, chop, hole per ilk). */
|
|
867
|
-
dog: string;
|
|
868
|
-
/** DssCdpManager — CDP ids, urn handles, `cdpAllow` grants. */
|
|
869
|
-
cdpManager: string;
|
|
870
|
-
/** DssProxyActions — the atomic one-shot target (via DSProxy.execute). */
|
|
871
|
-
proxyActions: string;
|
|
872
|
-
/** ProxyRegistry — `proxies(user)` / `build()` for the DSProxy route. */
|
|
873
|
-
proxyRegistry: string;
|
|
874
|
-
/** The debt token. USDD publishes it as `usdd`; Sky (and any future dss
|
|
875
|
-
* fork) publishes the neutral `debtToken`. Read via `dssDebtToken`. */
|
|
876
|
-
usdd?: string;
|
|
877
|
-
debtToken?: string;
|
|
878
|
-
/** DaiJoin-equivalent for debt enter/exit — `usddJoin` on USDD,
|
|
879
|
-
* `debtJoin` elsewhere. Read via `dssDebtJoin`. */
|
|
880
|
-
usddJoin?: string;
|
|
881
|
-
debtJoin?: string;
|
|
882
|
-
/** Display symbol for the debt asset (`USDD`, `DAI`, …). */
|
|
883
|
-
debtSymbol?: string;
|
|
884
|
-
/** Maker's `IlkRegistry` — enumerates ilks and classifies them
|
|
885
|
-
* (`info(ilk).class`). Present on Sky; USDD ships no registry. */
|
|
886
|
-
ilkRegistry?: string;
|
|
887
|
-
/** Maker chainlog (address book) — Sky only. */
|
|
888
|
-
chainlog?: string;
|
|
889
|
-
end?: string;
|
|
890
|
-
/** Debt decimals (18). */
|
|
891
|
-
debtDecimals?: number;
|
|
892
|
-
/** The savings Pot (sDAI-style; savings side lives in margin-fetcher's
|
|
893
|
-
* SAVINGS_REGISTRY, carried here for completeness). */
|
|
894
|
-
pot?: string;
|
|
895
|
-
susdd?: string;
|
|
896
|
-
/** 1:1 stable PSMs (swap modules — not lending markets). */
|
|
897
|
-
psms?: UsddPsmConfig[];
|
|
898
|
-
};
|
|
899
|
-
export type UsddConfigType = {
|
|
900
|
-
[lender: string]: {
|
|
901
|
-
[chainId: string]: UsddConfigChain;
|
|
902
|
-
};
|
|
903
|
-
};
|
|
904
|
-
/** One USDD market (= one collateral ilk). */
|
|
905
|
-
export type UsddMarketConfig = {
|
|
906
|
-
/** Ilk string (e.g. `WBTC-A`) — also the per-market key suffix
|
|
907
|
-
* (`USDD_<chainId>_<ILK>`). bytes32-encode via stringToHex(size 32). */
|
|
908
|
-
ilk: string;
|
|
909
|
-
/** Collateral adapter — approval target for deposits. */
|
|
910
|
-
gemJoin: string;
|
|
911
|
-
collToken: string;
|
|
912
|
-
collDecimals: number;
|
|
913
|
-
collSymbol?: string;
|
|
914
|
-
/** Price feed behind the Spot (OSM/Median). */
|
|
915
|
-
pip?: string;
|
|
916
|
-
/** Liquidation ratio, ray (Spot.mat). */
|
|
917
|
-
mat: string;
|
|
918
|
-
/** Per-second stability fee, ray (Jug.duty). */
|
|
919
|
-
duty: string;
|
|
920
|
-
/** Dutch-auction contract (Dog.clip). */
|
|
921
|
-
clip?: string;
|
|
922
|
-
/** Liquidation penalty, wad (Dog.chop; 1e18 = none). */
|
|
923
|
-
chop?: string;
|
|
924
|
-
/** Debt ceiling, rad (Vat.ilks.line). */
|
|
925
|
-
line: string;
|
|
926
|
-
/** Per-CDP debt floor, rad (Vat.ilks.dust). */
|
|
927
|
-
dust: string;
|
|
928
|
-
/** `line == 0` ⇒ the ilk was OFFBOARDED: borrowing is disabled but the
|
|
929
|
-
* existing debt is real and repay/withdraw stay open. Set by the Sky
|
|
930
|
-
* generator; absent on USDD rows. */
|
|
931
|
-
offboarded?: boolean;
|
|
932
|
-
name?: string;
|
|
933
|
-
};
|
|
934
|
-
/** Generated per-chain data: verified ilk list + the cdpi trigger snapshot. */
|
|
935
|
-
export type UsddChainData = {
|
|
936
|
-
markets: UsddMarketConfig[];
|
|
937
|
-
/** `cdpManager.cdpi()` at generation time — the USDD.md
|
|
938
|
-
* re-evaluation trigger (0 = no CDP ever opened on this chain). */
|
|
939
|
-
cdpi?: string;
|
|
940
|
-
};
|
|
941
|
-
export type UsddMarketsType = {
|
|
942
|
-
[lender: string]: {
|
|
943
|
-
[chainId: string]: UsddChainData;
|
|
944
|
-
};
|
|
945
|
-
};
|
|
946
|
-
type OracleMap = {
|
|
947
|
-
[lender: string]: {
|
|
948
|
-
[chainId: string]: string;
|
|
949
|
-
};
|
|
950
|
-
};
|
|
951
|
-
type CompoundV3OracleEntry = {
|
|
952
|
-
oracle: string;
|
|
953
|
-
description: string;
|
|
954
|
-
};
|
|
955
|
-
type CompoundV3OracleDataMap = {
|
|
956
|
-
[lender: string]: {
|
|
957
|
-
[chainId: string]: {
|
|
958
|
-
[assetAddress: string]: CompoundV3OracleEntry;
|
|
959
|
-
};
|
|
960
|
-
};
|
|
961
|
-
};
|
|
962
|
-
type CompoundV2PoolsType = {
|
|
963
|
-
[fork: string]: {
|
|
964
|
-
[chainId: string]: string;
|
|
965
|
-
};
|
|
966
|
-
};
|
|
967
|
-
type CompoundV2TokensType = {
|
|
968
|
-
[lender: string]: {
|
|
969
|
-
[chainId: string]: {
|
|
970
|
-
[address: string]: string;
|
|
971
|
-
};
|
|
972
|
-
};
|
|
973
|
-
};
|
|
974
|
-
type CompoundV2TokenArrayType = {
|
|
975
|
-
[lender: string]: {
|
|
976
|
-
[chainId: string]: {
|
|
977
|
-
cToken: string;
|
|
978
|
-
underlying: string;
|
|
979
|
-
}[];
|
|
980
|
-
};
|
|
981
|
-
};
|
|
982
|
-
type InitConfigEntry = {
|
|
983
|
-
pool: string;
|
|
984
|
-
underlying: string;
|
|
985
|
-
modes: number[];
|
|
986
|
-
};
|
|
987
|
-
type InitConfigType = {
|
|
988
|
-
[lender: string]: {
|
|
989
|
-
[chainId: string]: InitConfigEntry[];
|
|
990
|
-
};
|
|
991
|
-
};
|
|
992
|
-
interface MrophoOracleInfo {
|
|
993
|
-
oracle: string;
|
|
994
|
-
loanAsset: string;
|
|
995
|
-
collateralAsset: string;
|
|
996
|
-
loanAssetDecimals: number;
|
|
997
|
-
collateralAssetDecimals: number;
|
|
998
|
-
}
|
|
999
|
-
type MorphoOracles = {
|
|
1000
|
-
[c: string]: MrophoOracleInfo[];
|
|
1001
|
-
};
|
|
1002
|
-
export type FluidResolvers = {
|
|
1003
|
-
lendingResolver: string;
|
|
1004
|
-
vaultResolver: string;
|
|
1005
|
-
liquidityResolver: string;
|
|
1006
|
-
};
|
|
1007
|
-
export type FluidResolversType = {
|
|
1008
|
-
[chainId: string]: FluidResolvers;
|
|
1009
|
-
};
|
|
1010
|
-
/** One asset on a vault side — underlying token and its fToken wrapper (if any). */
|
|
1011
|
-
export type FluidVaultAsset = {
|
|
1012
|
-
/** Lowercased underlying ERC20 address. Native ETH is represented by
|
|
1013
|
-
* `zeroAddress` (`0x0000…0000`) — the Fluid on-chain EEE sentinel is
|
|
1014
|
-
* normalized away at the parser boundary to match the rest of the
|
|
1015
|
-
* lending stack's convention. Use `isNativeAddress` in calldata-sdk
|
|
1016
|
-
* if you need to accept either form. */
|
|
1017
|
-
underlying: string;
|
|
1018
|
-
/** Lowercased fToken address wrapping this underlying, or `null` if none.
|
|
1019
|
-
* `null` does NOT imply "not borrowable" — borrowability is a separate
|
|
1020
|
-
* Liquidity/vault-config property. */
|
|
1021
|
-
fToken: string | null;
|
|
1022
|
-
};
|
|
1023
|
-
/** One side of a Fluid vault — supply or borrow. Uniform shape across all vault
|
|
1024
|
-
* types: `assets.length === 1` means simple, `> 1` means smart (DEX LP).
|
|
1025
|
-
* `dex !== null` is equivalent. */
|
|
1026
|
-
export type FluidVaultSide = {
|
|
1027
|
-
/** 1 entry for simple sides, 2 entries for smart (DEX LP) sides. Order matches
|
|
1028
|
-
* the vault's `constantsView().{supply|borrow}Token.{token0,token1}`. */
|
|
1029
|
-
assets: FluidVaultAsset[];
|
|
1030
|
-
/** Fluid DEX pool contract. `null` for simple sides. */
|
|
1031
|
-
dex: string | null;
|
|
1032
|
-
/** Optional SmartLending wrapper over the DEX LP (ERC4626-like). `null` when unused. */
|
|
1033
|
-
smartLending: string | null;
|
|
1034
|
-
};
|
|
1035
|
-
export type FluidVaultMeta = {
|
|
1036
|
-
vaultId: number;
|
|
1037
|
-
/** Raw `IFluidVault.TYPE()` — Fluid uses scaled constants 10000/20000/30000/40000
|
|
1038
|
-
* for T1/T2/T3/T4. Prefer `side.dex !== null` for smart-side detection. */
|
|
1039
|
-
type: 10000 | 20000 | 30000 | 40000;
|
|
1040
|
-
supply: FluidVaultSide;
|
|
1041
|
-
borrow: FluidVaultSide;
|
|
1042
|
-
};
|
|
1043
|
-
/** Keyed by vault contract address (lowercased) for O(1) lookup. */
|
|
1044
|
-
export type FluidVaultsType = {
|
|
1045
|
-
[chainId: string]: {
|
|
1046
|
-
[vaultAddress: string]: FluidVaultMeta;
|
|
1047
|
-
};
|
|
1048
|
-
};
|
|
1049
|
-
type MorphoTypeOracles = {
|
|
1050
|
-
[chainId: string]: {
|
|
1051
|
-
[protocol: string]: MrophoOracleInfo[];
|
|
1052
|
-
};
|
|
1053
|
-
};
|
|
1054
|
-
type MorphoTypeMarkets = {
|
|
1055
|
-
[protocol: string]: {
|
|
1056
|
-
[chainId: string]: string[];
|
|
1057
|
-
};
|
|
1058
|
-
};
|
|
1059
|
-
/**
|
|
1060
|
-
* Static MetaMorpho-shaped vault registry, keyed by curator-protocol then chain.
|
|
1061
|
-
* Sourced from `data/morpho-type-vaults.json` in `lender-metadata`. Used by the
|
|
1062
|
-
* on-chain `fetchMorphoVaultsFromChain` path for forks / chains where the
|
|
1063
|
-
* Morpho public API or Goldsky subgraph isn't available.
|
|
1064
|
-
*/
|
|
1065
|
-
export type MorphoTypeVaultEntry = {
|
|
1066
|
-
/** Lowercased vault (share-token) contract address. */
|
|
1067
|
-
vault: string;
|
|
1068
|
-
/** Lowercased underlying ERC20 address. */
|
|
1069
|
-
underlying: string;
|
|
1070
|
-
/** Curated display name (e.g. `Lista USD1 Vault`). Optional. */
|
|
1071
|
-
name?: string;
|
|
1072
|
-
/** Vault interface version. `v1` = MetaMorpho (withdraw-queue → markets);
|
|
1073
|
-
* `v2` = Vaults V2 (adapter-based). Drives the on-chain fetcher's
|
|
1074
|
-
* allocation walk. Absent ⇒ the fetcher auto-detects on-chain
|
|
1075
|
-
* (`adaptersLength()` present ⇒ v2). */
|
|
1076
|
-
version?: 'v1' | 'v2';
|
|
1077
|
-
};
|
|
1078
|
-
export type MorphoTypeVaultsType = {
|
|
1079
|
-
[protocol: string]: {
|
|
1080
|
-
[chainId: string]: MorphoTypeVaultEntry[];
|
|
1081
|
-
};
|
|
1082
|
-
};
|
|
1083
|
-
export type GearboxChainResolvers = {
|
|
1084
|
-
/** curator address (lowercased) → curator display name */
|
|
1085
|
-
marketConfigurators: {
|
|
1086
|
-
[addr: string]: string;
|
|
1087
|
-
};
|
|
1088
|
-
/**
|
|
1089
|
-
* BotListV3 contract address for this chain. Used by the lender-permission
|
|
1090
|
-
* fetch to read `botPermissions(bot, creditManager, borrower)`. Sourced
|
|
1091
|
-
* upstream via `AddressProviderV310.getAddressOrRevert("BOT_LIST", 3_10)`.
|
|
1092
|
-
*/
|
|
1093
|
-
botList?: string;
|
|
1094
|
-
};
|
|
1095
|
-
export type GearboxResolversType = {
|
|
1096
|
-
addressProviderV310: string;
|
|
1097
|
-
marketCompressorV310: string;
|
|
1098
|
-
chains: {
|
|
1099
|
-
[chainId: string]: GearboxChainResolvers;
|
|
1100
|
-
};
|
|
1101
|
-
};
|
|
1102
|
-
type AaveOraclesConfigEntry = {
|
|
1103
|
-
/** Base asset address (if lender uses non-USD base) */
|
|
1104
|
-
baseAsset?: string;
|
|
1105
|
-
/** Fallback BASE_CURRENCY_UNIT as string (converted to bigint at usage) */
|
|
1106
|
-
baseCurrencyUnit?: string;
|
|
1107
|
-
/** Another AAVE fork on the same chain to use as source for base asset USD price */
|
|
1108
|
-
baseAssetSource?: string;
|
|
1109
|
-
};
|
|
1110
|
-
type AaveOraclesConfigType = {
|
|
1111
|
-
[lender: string]: {
|
|
1112
|
-
[chainId: string]: AaveOraclesConfigEntry;
|
|
1113
|
-
};
|
|
1114
|
-
};
|
|
1115
|
-
type CompoundV2OraclesConfigEntry = {
|
|
1116
|
-
/** Base asset address (if oracle quotes in a non-USD asset, e.g. native token) */
|
|
1117
|
-
baseAsset?: string;
|
|
1118
|
-
/** Fixed scaling decimals override (defaults to 36 - underlyingDecimals) */
|
|
1119
|
-
scalingDecimals?: number;
|
|
1120
|
-
};
|
|
1121
|
-
type CompoundV2OraclesConfigType = {
|
|
1122
|
-
[lender: string]: {
|
|
1123
|
-
[chainId: string]: CompoundV2OraclesConfigEntry;
|
|
1124
|
-
};
|
|
1125
|
-
};
|
|
1126
|
-
type AaveWethGatewayType = {
|
|
1127
|
-
[fork: string]: {
|
|
1128
|
-
[chainId: string]: string;
|
|
1129
|
-
};
|
|
1130
|
-
};
|
|
1131
|
-
type EulerConfigEntry = {
|
|
1132
|
-
evc: string;
|
|
1133
|
-
eVaultFactory: string;
|
|
1134
|
-
protocolConfig: string;
|
|
1135
|
-
vaultLens: string;
|
|
1136
|
-
accountLens: string;
|
|
1137
|
-
oracleLens: string;
|
|
1138
|
-
irmLens: string;
|
|
1139
|
-
utilsLens: string;
|
|
1140
|
-
};
|
|
1141
|
-
type EulerConfigsType = {
|
|
1142
|
-
[fork: string]: {
|
|
1143
|
-
[chainId: string]: EulerConfigEntry;
|
|
1144
|
-
};
|
|
1145
|
-
};
|
|
1146
|
-
type EulerVaultEntry = {
|
|
1147
|
-
underlying: string;
|
|
1148
|
-
vault: string;
|
|
1149
|
-
};
|
|
1150
|
-
type EulerVaultsType = {
|
|
1151
|
-
[fork: string]: {
|
|
1152
|
-
[chainId: string]: EulerVaultEntry[];
|
|
1153
|
-
};
|
|
1154
|
-
};
|
|
1155
|
-
export type DolomiteAggregator = 'odos' | 'paraswap' | 'oogabooga' | 'enso';
|
|
1156
|
-
export type DolomiteConfigEntry = {
|
|
1157
|
-
dolomiteMargin: string;
|
|
1158
|
-
expiry?: string;
|
|
1159
|
-
markets?: {
|
|
1160
|
-
[marketId: string]: string;
|
|
1161
|
-
};
|
|
1162
|
-
depositWithdrawalProxy?: string;
|
|
1163
|
-
/**
|
|
1164
|
-
* Modern DepositWithdrawalRouter — required for NATIVE (ETH/BNB) wrap/unwrap
|
|
1165
|
-
* ops. The legacy `depositWithdrawalProxy` rejects direct EOA native sends
|
|
1166
|
-
* ("invalid ETH sender"); ERC-20 deposits/withdrawals still use the proxy.
|
|
1167
|
-
*/
|
|
1168
|
-
depositWithdrawalRouter?: string;
|
|
1169
|
-
borrowPositionProxy?: string;
|
|
1170
|
-
genericTraderProxy?: string;
|
|
1171
|
-
aggregatorTraders?: {
|
|
1172
|
-
[K in DolomiteAggregator]?: string;
|
|
1173
|
-
};
|
|
1174
|
-
};
|
|
1175
|
-
export type DolomiteConfigsType = {
|
|
1176
|
-
[chainId: string]: DolomiteConfigEntry;
|
|
1177
|
-
};
|
|
1178
|
-
export type DolomiteCategoryParam = {
|
|
1179
|
-
marginRatioOverride: number;
|
|
1180
|
-
liquidationRewardOverride: number;
|
|
1181
|
-
};
|
|
1182
|
-
export type DolomiteSingleCollateral = {
|
|
1183
|
-
debtMarketIds: string[];
|
|
1184
|
-
marginRatioOverride: number;
|
|
1185
|
-
liquidationRewardOverride: number;
|
|
1186
|
-
};
|
|
1187
|
-
export type DolomiteEmodeChain = {
|
|
1188
|
-
setter: string;
|
|
1189
|
-
categories: {
|
|
1190
|
-
[category: string]: DolomiteCategoryParam;
|
|
1191
|
-
};
|
|
1192
|
-
marketCategories: {
|
|
1193
|
-
[marketId: string]: string;
|
|
1194
|
-
};
|
|
1195
|
-
riskFeatures: {
|
|
1196
|
-
[marketId: string]: {
|
|
1197
|
-
feature: string;
|
|
1198
|
-
singleCollateral?: DolomiteSingleCollateral[];
|
|
1199
|
-
};
|
|
1200
|
-
};
|
|
1201
|
-
};
|
|
1202
|
-
export type DolomiteEmodeType = {
|
|
1203
|
-
[chainId: string]: DolomiteEmodeChain;
|
|
1204
|
-
};
|
|
1205
|
-
export type SiloHalfStatic = {
|
|
1206
|
-
/** silo (vault) address */
|
|
1207
|
-
silo: string;
|
|
1208
|
-
/** underlying borrowable asset for this side */
|
|
1209
|
-
token: string;
|
|
1210
|
-
/** ERC-20 decimals for `token`, cached to avoid an extra RPC */
|
|
1211
|
-
decimals: number;
|
|
1212
|
-
/** Optional symbol cache for UI; not consumed by the fetcher */
|
|
1213
|
-
symbol?: string;
|
|
1214
|
-
/** Share-token addresses (for user-data fetchers / liquidations) */
|
|
1215
|
-
protectedShareToken: string;
|
|
1216
|
-
collateralShareToken: string;
|
|
1217
|
-
debtShareToken: string;
|
|
1218
|
-
/** Per-side oracles (1e18-scaled price quoting) */
|
|
1219
|
-
solvencyOracle: string;
|
|
1220
|
-
maxLtvOracle: string;
|
|
1221
|
-
/** Interest rate model contract */
|
|
1222
|
-
interestRateModel: string;
|
|
1223
|
-
/** LTV at 1e18 scale */
|
|
1224
|
-
maxLtv: string;
|
|
1225
|
-
/** Liquidation threshold (LLTV) at 1e18 scale */
|
|
1226
|
-
lt: string;
|
|
1227
|
-
/** Target LTV after liquidation (1e18) */
|
|
1228
|
-
liquidationTargetLtv: string;
|
|
1229
|
-
/** Fee parameters (1e18) */
|
|
1230
|
-
liquidationFee: string;
|
|
1231
|
-
flashloanFee: string;
|
|
1232
|
-
daoFee: string;
|
|
1233
|
-
deployerFee: string;
|
|
1234
|
-
/** Optional hook receiver / quote-before flag */
|
|
1235
|
-
hookReceiver?: string;
|
|
1236
|
-
callBeforeQuote?: boolean;
|
|
1237
|
-
};
|
|
1238
|
-
export type SiloMarketEntry = {
|
|
1239
|
-
/** Shared SiloConfig address (one per pair) */
|
|
1240
|
-
siloConfig: string;
|
|
1241
|
-
/** Optional human-readable name from the factory event / curated list */
|
|
1242
|
-
name?: string;
|
|
1243
|
-
silo0: SiloHalfStatic;
|
|
1244
|
-
silo1: SiloHalfStatic;
|
|
1245
|
-
};
|
|
1246
|
-
/**
|
|
1247
|
-
* chainId → list of (silo0, silo1) pairs.
|
|
1248
|
-
*
|
|
1249
|
-
* Stored as an array to match the on-disk `silo-v2-markets.json` shape.
|
|
1250
|
-
* Per-chain pair counts are small (~100 max), so the linear lookup in
|
|
1251
|
-
* `getSiloV2MarketEntry` is fine. If that ever changes, build an index
|
|
1252
|
-
* lazily here.
|
|
1253
|
-
*/
|
|
1254
|
-
export type SiloMarketsType = {
|
|
1255
|
-
[chainId: string]: SiloMarketEntry[];
|
|
1256
|
-
};
|
|
1257
|
-
/**
|
|
1258
|
-
* Per-chain Silo v2 peripheral / singleton addresses.
|
|
1259
|
-
*
|
|
1260
|
-
* Both `lens` and `factory` are deployed once per chain and shared by every
|
|
1261
|
-
* Silo v2 market on that chain, so they live together in one map instead of
|
|
1262
|
-
* being split across `siloLens` / `siloFactory`. Add new chain-wide
|
|
1263
|
-
* singletons (e.g. `siloRouter`, `siloIncentivesController`) here.
|
|
1264
|
-
*/
|
|
1265
|
-
export type SiloPeripheralsEntry = {
|
|
1266
|
-
/** SiloLens (v2) — exposes getDepositAPR / getBorrowAPR / getUtilization */
|
|
1267
|
-
lens: string;
|
|
1268
|
-
/** SiloFactory — used by the initializer to discover deployed silo pairs */
|
|
1269
|
-
factory: string;
|
|
1270
|
-
/** Optional: router / wrapped-native gateway, populated when needed */
|
|
1271
|
-
router?: string;
|
|
1272
|
-
/** Optional: incentives controller for reward APR */
|
|
1273
|
-
incentivesController?: string;
|
|
1274
|
-
};
|
|
1275
|
-
/** chainId → Silo v2 peripheral addresses */
|
|
1276
|
-
export type SiloPeripheralsType = {
|
|
1277
|
-
[chainId: string]: SiloPeripheralsEntry;
|
|
1278
|
-
};
|
|
1279
|
-
export type AaveV4ReserveEntry = {
|
|
1280
|
-
reserveId: number;
|
|
1281
|
-
/** Hub-side asset id (scoped to the entry's `hub`) */
|
|
1282
|
-
assetId: number;
|
|
1283
|
-
underlying: string;
|
|
1284
|
-
/**
|
|
1285
|
-
* Per-reserve hub address. Set at reserve init on-chain — different
|
|
1286
|
-
* reserves on the same spoke can have different hubs.
|
|
1287
|
-
*/
|
|
1288
|
-
hub: string;
|
|
1289
|
-
/** Optional per-reserve oracle override (defaults to spoke.oracle) */
|
|
1290
|
-
oracle?: string;
|
|
1291
|
-
oracleDecimals?: number;
|
|
1292
|
-
};
|
|
1293
|
-
export type AaveV4SpokeEntry = {
|
|
1294
|
-
spoke: string;
|
|
1295
|
-
oracle: string;
|
|
1296
|
-
label: string;
|
|
1297
|
-
dynamicConfigKeyMax?: number;
|
|
1298
|
-
/**
|
|
1299
|
-
* UI/grouping hint only (`AAVE_V4_CORE` / `AAVE_V4_PLUS` / `AAVE_V4_PRIME`).
|
|
1300
|
-
* NOT used for routing or lender keying.
|
|
1301
|
-
*/
|
|
1302
|
-
baseHubAttribution?: string;
|
|
1303
|
-
reserves: AaveV4ReserveEntry[];
|
|
1304
|
-
};
|
|
1305
|
-
/** Top-level: chainId → spokeAddrLower → entry */
|
|
1306
|
-
export type AaveV4SpokesType = {
|
|
1307
|
-
[chainId: string]: {
|
|
1308
|
-
[spokeAddrLower: string]: AaveV4SpokeEntry;
|
|
1309
|
-
};
|
|
1310
|
-
};
|
|
1311
|
-
export type AaveV4OracleEntry = {
|
|
1312
|
-
underlying: string;
|
|
1313
|
-
spoke: string;
|
|
1314
|
-
reserveId: number;
|
|
1315
|
-
oracle: string;
|
|
1316
|
-
decimals?: number;
|
|
1317
|
-
source?: string;
|
|
1318
|
-
};
|
|
1319
|
-
/** Top-level chainId only — no fork dimension. */
|
|
1320
|
-
export type AaveV4OraclesType = {
|
|
1321
|
-
[chainId: string]: AaveV4OracleEntry[];
|
|
1322
|
-
};
|
|
1323
|
-
export type AaveV4PerHubGateways = {
|
|
1324
|
-
nativeGateway?: string;
|
|
1325
|
-
signatureGateway?: string;
|
|
1326
|
-
};
|
|
1327
|
-
/**
|
|
1328
|
-
* Per-spoke peripherals — extra metadata the lender-metadata repo carries
|
|
1329
|
-
* for spoke-scoped concerns (curated names, position manager registry, …).
|
|
1330
|
-
* Opaque to the data-sdk; surfaced as `any` so consumers (worker-api,
|
|
1331
|
-
* frontend) can read it without dragging the schema into this package.
|
|
1332
|
-
*/
|
|
1333
|
-
export type AaveV4PerSpokeMeta = {
|
|
1334
|
-
spokeName?: string;
|
|
1335
|
-
spokeId?: string;
|
|
1336
|
-
positionManagers?: Array<{
|
|
1337
|
-
name?: string;
|
|
1338
|
-
address: string;
|
|
1339
|
-
active?: boolean;
|
|
1340
|
-
}>;
|
|
1341
|
-
[k: string]: unknown;
|
|
1342
|
-
};
|
|
1343
|
-
export type AaveV4ChainPeripherals = {
|
|
1344
|
-
/** Chain-wide fallback gateway addresses */
|
|
1345
|
-
nativeGateway?: string;
|
|
1346
|
-
signatureGateway?: string;
|
|
1347
|
-
/** Per-hub gateway overrides (keyed by lowercase hub address) */
|
|
1348
|
-
perHub?: {
|
|
1349
|
-
[hubAddrLower: string]: AaveV4PerHubGateways;
|
|
1350
|
-
};
|
|
1351
|
-
/** Per-spoke metadata (curated names, position managers, …) */
|
|
1352
|
-
perSpoke?: {
|
|
1353
|
-
[spokeAddrLower: string]: AaveV4PerSpokeMeta;
|
|
1354
|
-
};
|
|
1355
|
-
};
|
|
1356
|
-
export type AaveV4PeripheralsType = {
|
|
1357
|
-
[chainId: string]: AaveV4ChainPeripherals;
|
|
1358
|
-
};
|
|
1359
|
-
/** Override datas used in the SDK - works across all module instances */
|
|
1360
|
-
export declare function initializeLenderData({ aaveTokensOverride, aavePoolsOverride, aaveOraclesOverride, compoundV2OraclesOverride, compoundV3OraclesDataOverride, compoundV3PoolsOverride, compoundV3BaseDataOverride, morphoPoolsOverride, compoundV2TokensOverride, compoundV2TokenArrayOverride, compoundV2PoolsOverride, initConfigOverride, aaveReservesOverride, compoundV3ReservesOverride, compoundV2ReservesOverride, morphoOraclesOverride, morphoTypeOraclesOverride, morphoTypeMarketsOverride, morphoTypeVaultsOverride, aaveOraclesConfigOverride, compoundV2OraclesConfigOverride, aaveWethGatewayOverride, morphoBundler3Override, listaNativeProviderOverride, midnightConfigOverride, midnightMarketsOverride, termConfigOverride, termMarketsOverride, exactlyConfigOverride, exactlyMarketsOverride, tellerConfigOverride, tellerPoolsOverride, liquityConfigOverride, liquityMarketsOverride, riverConfigOverride, riverMarketsOverride, inverseConfigOverride, termMaxConfigOverride, inverseMarketsOverride, usddConfigOverride, usddMarketsOverride, skyConfigOverride, skyMarketsOverride, frankencoinConfigOverride, frankencoinMarketsOverride, llamaLendConfigOverride, llamaLendMarketsOverride, resupplyConfigOverride, curvanceConfigOverride, compoundV3BulkerOverride, eulerConfigsOverride, eulerVaultsOverride, dolomiteConfigsOverride, dolomiteEmodeOverride, aaveV4SpokesOverride, aaveV4OraclesOverride, aaveV4PeripheralsOverride, siloMarketsOverride, siloPeripheralsOverride, siloMarketsV3Override, siloPeripheralsV3Override, fluidResolversOverride, fluidVaultsOverride, gearboxResolversOverride, }: {
|
|
1361
|
-
aaveTokensOverride?: AaveTokensType;
|
|
1362
|
-
aavePoolsOverride?: AavePoolsType;
|
|
1363
|
-
aaveOraclesOverride?: OracleMap;
|
|
1364
|
-
compoundV2OraclesOverride?: OracleMap;
|
|
1365
|
-
compoundV3OraclesDataOverride?: CompoundV3OracleDataMap;
|
|
1366
|
-
compoundV3PoolsOverride?: CompoundV3PoolsType;
|
|
1367
|
-
compoundV3BaseDataOverride?: CompoundV3BaseDataType;
|
|
1368
|
-
morphoPoolsOverride?: MorphoPoolsType;
|
|
1369
|
-
compoundV2TokensOverride?: CompoundV2TokensType;
|
|
1370
|
-
compoundV2TokenArrayOverride?: CompoundV2TokenArrayType;
|
|
1371
|
-
compoundV2PoolsOverride?: CompoundV2PoolsType;
|
|
1372
|
-
initConfigOverride?: InitConfigType;
|
|
1373
|
-
aaveReservesOverride?: GeneralReservesMap;
|
|
1374
|
-
compoundV3ReservesOverride?: GeneralReservesMap;
|
|
1375
|
-
compoundV2ReservesOverride?: GeneralReservesMap;
|
|
1376
|
-
morphoOraclesOverride?: MorphoOracles;
|
|
1377
|
-
morphoTypeOraclesOverride?: MorphoTypeOracles;
|
|
1378
|
-
morphoTypeMarketsOverride?: MorphoTypeMarkets;
|
|
1379
|
-
morphoTypeVaultsOverride?: MorphoTypeVaultsType;
|
|
1380
|
-
aaveOraclesConfigOverride?: AaveOraclesConfigType;
|
|
1381
|
-
compoundV2OraclesConfigOverride?: CompoundV2OraclesConfigType;
|
|
1382
|
-
aaveWethGatewayOverride?: AaveWethGatewayType;
|
|
1383
|
-
morphoBundler3Override?: MorphoBundler3Type;
|
|
1384
|
-
listaNativeProviderOverride?: ListaNativeProviderType;
|
|
1385
|
-
midnightConfigOverride?: MidnightConfigType;
|
|
1386
|
-
midnightMarketsOverride?: MidnightMarketsType;
|
|
1387
|
-
termConfigOverride?: TermConfigType;
|
|
1388
|
-
termMarketsOverride?: TermMarketsType;
|
|
1389
|
-
exactlyConfigOverride?: ExactlyConfigType;
|
|
1390
|
-
exactlyMarketsOverride?: ExactlyMarketsType;
|
|
1391
|
-
tellerConfigOverride?: TellerConfigType;
|
|
1392
|
-
tellerPoolsOverride?: TellerPoolsType;
|
|
1393
|
-
liquityConfigOverride?: LiquityConfigType;
|
|
1394
|
-
liquityMarketsOverride?: LiquityMarketsType;
|
|
1395
|
-
riverConfigOverride?: RiverConfigType;
|
|
1396
|
-
riverMarketsOverride?: RiverMarketsType;
|
|
1397
|
-
inverseConfigOverride?: InverseConfigType;
|
|
1398
|
-
termMaxConfigOverride?: TermMaxConfigType;
|
|
1399
|
-
inverseMarketsOverride?: InverseMarketsType;
|
|
1400
|
-
usddConfigOverride?: UsddConfigType;
|
|
1401
|
-
usddMarketsOverride?: UsddMarketsType;
|
|
1402
|
-
skyConfigOverride?: UsddConfigType;
|
|
1403
|
-
skyMarketsOverride?: UsddMarketsType;
|
|
1404
|
-
frankencoinConfigOverride?: FrankencoinConfigType;
|
|
1405
|
-
frankencoinMarketsOverride?: FrankencoinMarketsType;
|
|
1406
|
-
llamaLendConfigOverride?: LlamaLendConfigType;
|
|
1407
|
-
llamaLendMarketsOverride?: LlamaLendMarketsType;
|
|
1408
|
-
resupplyConfigOverride?: ResupplyConfigType;
|
|
1409
|
-
curvanceConfigOverride?: CurvanceConfigType;
|
|
1410
|
-
compoundV3BulkerOverride?: CompoundV3BulkerType;
|
|
1411
|
-
eulerConfigsOverride?: EulerConfigsType;
|
|
1412
|
-
eulerVaultsOverride?: EulerVaultsType;
|
|
1413
|
-
dolomiteConfigsOverride?: DolomiteConfigsType;
|
|
1414
|
-
dolomiteEmodeOverride?: DolomiteEmodeType;
|
|
1415
|
-
aaveV4SpokesOverride?: AaveV4SpokesType;
|
|
1416
|
-
aaveV4OraclesOverride?: AaveV4OraclesType;
|
|
1417
|
-
aaveV4PeripheralsOverride?: AaveV4PeripheralsType;
|
|
1418
|
-
siloMarketsOverride?: SiloMarketsType;
|
|
1419
|
-
siloPeripheralsOverride?: SiloPeripheralsType;
|
|
1420
|
-
siloMarketsV3Override?: SiloMarketsType;
|
|
1421
|
-
siloPeripheralsV3Override?: SiloPeripheralsType;
|
|
1422
|
-
fluidResolversOverride?: FluidResolversType;
|
|
1423
|
-
fluidVaultsOverride?: FluidVaultsType;
|
|
1424
|
-
gearboxResolversOverride?: GearboxResolversType;
|
|
1425
|
-
}): void;
|
|
1426
|
-
export declare const aaveTokens: () => AaveTokensType;
|
|
1427
|
-
export declare const aavePools: () => AavePoolsType;
|
|
1428
|
-
export declare const aaveOracles: () => OracleMap;
|
|
1429
|
-
export declare const compoundV2Oracles: () => OracleMap;
|
|
1430
|
-
export declare const compoundV3OraclesData: () => CompoundV3OracleDataMap;
|
|
1431
|
-
export declare const morphoOracles: () => MorphoOracles;
|
|
1432
|
-
export declare const morphoTypeOracles: () => MorphoTypeOracles;
|
|
1433
|
-
export declare const morphoTypeMarkets: () => MorphoTypeMarkets;
|
|
1434
|
-
export declare const morphoTypeVaults: () => MorphoTypeVaultsType;
|
|
1435
|
-
export declare const aaveReserves: () => GeneralReservesMap;
|
|
1436
|
-
export declare const compoundV3Reserves: () => GeneralReservesMap;
|
|
1437
|
-
export declare const compoundV2Reserves: () => GeneralReservesMap;
|
|
1438
|
-
export declare const compoundV3Pools: () => CompoundV3PoolsType;
|
|
1439
|
-
export declare const morphoPools: () => MorphoPoolsType;
|
|
1440
|
-
export declare const compoundV3BaseData: () => CompoundV3BaseDataType;
|
|
1441
|
-
export declare const compoundV2Pools: () => CompoundV2PoolsType;
|
|
1442
|
-
export declare const compoundV2Tokens: () => CompoundV2TokensType;
|
|
1443
|
-
export declare const compoundV2TokenArray: () => CompoundV2TokenArrayType;
|
|
1444
|
-
export declare const initConfig: () => InitConfigType;
|
|
1445
|
-
export declare const aaveOraclesConfig: () => AaveOraclesConfigType;
|
|
1446
|
-
export declare const compoundV2OraclesConfig: () => CompoundV2OraclesConfigType;
|
|
1447
|
-
export declare const aaveWethGateway: () => AaveWethGatewayType;
|
|
1448
|
-
export declare const morphoBundler3: () => MorphoBundler3Type;
|
|
1449
|
-
export declare const listaNativeProvider: () => ListaNativeProviderType;
|
|
1450
|
-
export declare const midnightConfig: () => MidnightConfigType;
|
|
1451
|
-
export declare const setMidnightApiBase: (url: string | undefined | null) => void;
|
|
1452
|
-
export declare const midnightApiBaseOverride: () => string | undefined;
|
|
1453
|
-
/** Resolve the Midnight API base for a chain: override → config → hosted default. */
|
|
1454
|
-
export declare const resolveMidnightApiBase: (chainId: string) => string;
|
|
1455
|
-
export declare const midnightMarkets: () => MidnightMarketsType;
|
|
1456
|
-
/** All Midnight market configs on a chain (empty array if none/unloaded). */
|
|
1457
|
-
export declare const midnightMarketsByChain: (chainId: string | number) => MidnightMarketConfig[];
|
|
1458
|
-
/** Look up one Midnight market config by its bytes32 id (case-insensitive). */
|
|
1459
|
-
export declare const midnightMarketById: (chainId: string | number, marketId: string) => MidnightMarketConfig | undefined;
|
|
1460
|
-
export declare const termConfig: () => TermConfigType;
|
|
1461
|
-
export declare const setTermApiBase: (url: string | undefined | null) => void;
|
|
1462
|
-
export declare const termApiBaseOverride: () => string | undefined;
|
|
1463
|
-
/**
|
|
1464
|
-
* Resolve the Term data endpoint base for a chain: override → config → ''.
|
|
1465
|
-
* Term has no public hosted endpoint, so an empty string means "no live data
|
|
1466
|
-
* source configured" and callers fall back to static config / on-chain reads.
|
|
1467
|
-
*/
|
|
1468
|
-
export declare const resolveTermApiBase: (chainId: string) => string;
|
|
1469
|
-
export declare const termMarkets: () => TermMarketsType;
|
|
1470
|
-
/** All Term Finance market configs on a chain (empty array if none/unloaded). */
|
|
1471
|
-
export declare const termMarketsByChain: (chainId: string | number) => TermMarketConfig[];
|
|
1472
|
-
/** Look up one Term repo config by its term repo id (case-insensitive). */
|
|
1473
|
-
export declare const termMarketById: (chainId: string | number, termRepoId: string) => TermMarketConfig | undefined;
|
|
1474
|
-
export declare const exactlyConfig: () => ExactlyConfigType;
|
|
1475
|
-
export declare const exactlyMarkets: () => ExactlyMarketsType;
|
|
1476
|
-
/** All Exactly market configs on a chain (empty array if none/unloaded). */
|
|
1477
|
-
export declare const exactlyMarketsByChain: (chainId: string | number) => ExactlyMarketConfig[];
|
|
1478
|
-
/** Look up one Exactly market config by its Market address (case-insensitive). */
|
|
1479
|
-
export declare const exactlyMarketByAddress: (chainId: string | number, market: string) => ExactlyMarketConfig | undefined;
|
|
1480
|
-
/** Look up one Exactly market config by its underlying asset (case-insensitive). */
|
|
1481
|
-
export declare const exactlyMarketByAsset: (chainId: string | number, asset: string) => ExactlyMarketConfig | undefined;
|
|
1482
|
-
export declare const tellerConfig: () => TellerConfigType;
|
|
1483
|
-
export declare const tellerPools: () => TellerPoolsType;
|
|
1484
|
-
/** Per-chain evergreen Teller addresses (undefined if none/unloaded). */
|
|
1485
|
-
export declare const tellerConfigByChain: (chainId: string | number) => TellerConfigChain | undefined;
|
|
1486
|
-
/** All Teller pool configs on a chain (empty array if none/unloaded). */
|
|
1487
|
-
export declare const tellerPoolsByChain: (chainId: string | number) => TellerPoolConfig[];
|
|
1488
|
-
/** Look up one Teller pool config by its LenderCommitmentGroup address (case-insensitive). */
|
|
1489
|
-
export declare const tellerPoolByAddress: (chainId: string | number, pool: string) => TellerPoolConfig | undefined;
|
|
1490
|
-
export declare const liquityConfig: () => LiquityConfigType;
|
|
1491
|
-
/** Shared config for one Liquity-family deployment on a chain (undefined if unloaded). */
|
|
1492
|
-
export declare const liquityConfigFor: (lender: string, chainId: string | number) => LiquityConfigChain | undefined;
|
|
1493
|
-
export declare const liquityMarkets: () => LiquityMarketsType;
|
|
1494
|
-
/** All branches of one Liquity-family deployment on a chain (empty if none/unloaded). */
|
|
1495
|
-
export declare const liquityBranchesByChain: (lender: string, chainId: string | number) => LiquityBranchConfig[];
|
|
1496
|
-
/** Look up one branch by its CollateralRegistry index (the per-branch key suffix). */
|
|
1497
|
-
export declare const liquityBranchByIndex: (lender: string, chainId: string | number, collIndex: number | string) => LiquityBranchConfig | undefined;
|
|
1498
|
-
/** Look up one branch by its TroveManager address (the marketUid address). */
|
|
1499
|
-
export declare const liquityBranchByTroveManager: (lender: string, chainId: string | number, troveManager: string) => LiquityBranchConfig | undefined;
|
|
1500
|
-
/** All Liquity-family lender keys with config on a chain (drives getLendersForChain). */
|
|
1501
|
-
export declare const liquityLendersByChain: (chainId: string | number) => string[];
|
|
1502
|
-
export declare const riverConfig: () => RiverConfigType;
|
|
1503
|
-
/** Deployment seed for one River lender on a chain (undefined if unloaded). */
|
|
1504
|
-
export declare const riverConfigFor: (lender: string, chainId: string | number) => RiverConfigChain | undefined;
|
|
1505
|
-
export declare const riverMarkets: () => RiverMarketsType;
|
|
1506
|
-
/** Generated chain data (minNetDebt + TroveManager list; undefined if unloaded). */
|
|
1507
|
-
export declare const riverChainData: (lender: string, chainId: string | number) => RiverChainData | undefined;
|
|
1508
|
-
export declare const inverseConfig: () => InverseConfigType;
|
|
1509
|
-
/** TermMax per-chain config map (undefined if unloaded). */
|
|
1510
|
-
export declare const termMaxConfig: () => TermMaxConfigType;
|
|
1511
|
-
/** TermMax deployment addresses for one chain (undefined if unloaded). */
|
|
1512
|
-
export declare const termMaxConfigByChain: (chainId: string | number) => TermMaxConfigChain | undefined;
|
|
1513
|
-
/** Chains with a TermMax deployment loaded. */
|
|
1514
|
-
export declare const termMaxChainIds: () => string[];
|
|
1515
|
-
/**
|
|
1516
|
-
* TermMax data API base for a chain. Read through the getter (not a module
|
|
1517
|
-
* constant) for the same reason as Midnight/Term: the per-request metadata
|
|
1518
|
-
* re-init rewrites `termMaxConfig`, so a captured value goes stale.
|
|
1519
|
-
*/
|
|
1520
|
-
export declare const termMaxApiBaseUrl: (chainId: string | number) => string;
|
|
1521
|
-
/** Deployment seed for one Inverse lender on a chain (undefined if unloaded). */
|
|
1522
|
-
export declare const inverseConfigFor: (lender: string, chainId: string | number) => InverseConfigChain | undefined;
|
|
1523
|
-
export declare const inverseMarkets: () => InverseMarketsType;
|
|
1524
|
-
/** Generated chain data (curated Market list; undefined if unloaded). */
|
|
1525
|
-
export declare const inverseChainData: (lender: string, chainId: string | number) => InverseChainData | undefined;
|
|
1526
|
-
/** Find one FiRM market by its Market contract address. */
|
|
1527
|
-
export declare const inverseMarketByAddress: (lender: string, chainId: string | number, address: string) => InverseMarketConfig | undefined;
|
|
1528
|
-
/** Look up one River market by its factory index (the per-market key suffix). */
|
|
1529
|
-
export declare const riverMarketByIndex: (lender: string, chainId: string | number, index: number | string) => RiverMarketConfig | undefined;
|
|
1530
|
-
/** All River lender keys with config on a chain (drives getLendersForChain). */
|
|
1531
|
-
export declare const riverLendersByChain: (chainId: string | number) => string[];
|
|
1532
|
-
/** All Inverse lender keys with config on a chain (drives getLendersForChain). */
|
|
1533
|
-
export declare const inverseLendersByChain: (chainId: string | number) => string[];
|
|
1534
|
-
export declare const llamaLendConfig: () => LlamaLendConfigType;
|
|
1535
|
-
/** Deployment seed for one LlamaLend lender on a chain (undefined if unloaded). */
|
|
1536
|
-
export declare const llamaLendConfigFor: (lender: string, chainId: string | number) => LlamaLendConfigChain | undefined;
|
|
1537
|
-
export declare const llamaLendMarkets: () => LlamaLendMarketsType;
|
|
1538
|
-
/** Generated chain data (curated market roster; undefined if unloaded). */
|
|
1539
|
-
export declare const llamaLendChainData: (lender: string, chainId: string | number) => LlamaLendChainData | undefined;
|
|
1540
|
-
/** Find one LlamaLend market by its Controller address. */
|
|
1541
|
-
export declare const llamaLendMarketByController: (lender: string, chainId: string | number, controller: string) => LlamaLendMarketConfig | undefined;
|
|
1542
|
-
/**
|
|
1543
|
-
* Find one LlamaLend market by its ERC-4626 VAULT address (the lender side).
|
|
1544
|
-
*
|
|
1545
|
-
* The roster is keyed on the Controller because that is the borrow surface,
|
|
1546
|
-
* but other protocols reference LlamaLend by its vault — Resupply, for
|
|
1547
|
-
* instance, custodies the vault SHARE as collateral, so the vault is the only
|
|
1548
|
-
* handle it exposes. This is the join for "which LlamaLend market does that
|
|
1549
|
-
* wrapper actually sit on top of".
|
|
1550
|
-
*/
|
|
1551
|
-
export declare const llamaLendMarketByVault: (lender: string, chainId: string | number, vault: string) => LlamaLendMarketConfig | undefined;
|
|
1552
|
-
/**
|
|
1553
|
-
* All LlamaLend lender keys with config on a chain (drives getLendersForChain).
|
|
1554
|
-
* Gated on a factory being present — a chain entry with neither factory is a
|
|
1555
|
-
* placeholder, not a live deployment.
|
|
1556
|
-
*/
|
|
1557
|
-
export declare const llamaLendLendersByChain: (chainId: string | number) => string[];
|
|
1558
|
-
/**
|
|
1559
|
-
* Whether a LlamaLend market accepts on-behalf calls (`_for` + the boolean
|
|
1560
|
-
* `approve` grant). FAILS CLOSED: an unknown market, an unloaded roster or an
|
|
1561
|
-
* explicit `false` all return `false`, because calling `approve` on an older
|
|
1562
|
-
* controller reverts with no usable reason string.
|
|
1563
|
-
*/
|
|
1564
|
-
export declare const llamaLendSupportsDelegation: (lender: string, chainId: string | number, controller: string) => boolean;
|
|
1565
|
-
/**
|
|
1566
|
-
* Resolve the leverage zap + its hard-wired router for a chain and aggregator.
|
|
1567
|
-
* `undefined` means leverage is unavailable there for that aggregator, which
|
|
1568
|
-
* callers must report rather than silently falling back — there is no Composer
|
|
1569
|
-
* route that can be funded.
|
|
1570
|
-
*/
|
|
1571
|
-
export declare const llamaLendLeverageZap: (lender: string, chainId: string | number, aggregator: "odos" | "1inch") => {
|
|
1572
|
-
zap: string;
|
|
1573
|
-
router: string;
|
|
1574
|
-
} | undefined;
|
|
1575
|
-
/**
|
|
1576
|
-
* Whether a market can be leveraged at all: it must be v1, at or above the
|
|
1577
|
-
* chain's `leverageStartId`, and the chain must have a zap deployed. Fails
|
|
1578
|
-
* closed on an unknown market.
|
|
1579
|
-
*/
|
|
1580
|
-
export declare const llamaLendSupportsLeverage: (lender: string, chainId: string | number, controller: string) => boolean;
|
|
1581
|
-
/**
|
|
1582
|
-
* Curve data API base. Read through the getter (not a module constant) for the
|
|
1583
|
-
* same reason as TermMax/Midnight: the per-request metadata re-init rewrites
|
|
1584
|
-
* `llamaLendConfig`, so a captured value goes stale.
|
|
1585
|
-
*/
|
|
1586
|
-
export declare const llamaLendApiBaseUrl: (lender: string, chainId: string | number) => string;
|
|
1587
|
-
export declare const usddConfig: () => UsddConfigType;
|
|
1588
|
-
/** Deployment seed for one USDD lender on a chain (undefined if unloaded). */
|
|
1589
|
-
export declare const usddConfigFor: (lender: string, chainId: string | number) => UsddConfigChain | undefined;
|
|
1590
|
-
export declare const usddMarkets: () => UsddMarketsType;
|
|
1591
|
-
/** Generated chain data (verified ilk list + cdpi snapshot; undefined if unloaded). */
|
|
1592
|
-
export declare const usddChainData: (lender: string, chainId: string | number) => UsddChainData | undefined;
|
|
1593
|
-
/** Look up one USDD market by its ilk string (the per-market key suffix). */
|
|
1594
|
-
export declare const usddMarketByIlk: (lender: string, chainId: string | number, ilk: string) => UsddMarketConfig | undefined;
|
|
1595
|
-
/** All USDD lender keys with config on a chain (drives getLendersForChain).
|
|
1596
|
-
* NB: config presence (`vat`) — not market presence — gates the fan-out, so
|
|
1597
|
-
* the (empty-roster) provider still runs and reports zero markets rather
|
|
1598
|
-
* than being invisible; the per-ilk keys only exist once metadata fills. */
|
|
1599
|
-
export declare const usddLendersByChain: (chainId: string | number) => string[];
|
|
1600
|
-
export declare const skyConfig: () => UsddConfigType;
|
|
1601
|
-
export declare const skyConfigFor: (lender: string, chainId: string | number) => UsddConfigChain | undefined;
|
|
1602
|
-
export declare const skyMarkets: () => UsddMarketsType;
|
|
1603
|
-
export declare const skyChainData: (lender: string, chainId: string | number) => UsddChainData | undefined;
|
|
1604
|
-
/** All Sky lender keys with config on a chain (drives getLendersForChain). */
|
|
1605
|
-
export declare const skyLendersByChain: (chainId: string | number) => string[];
|
|
1606
|
-
/** Deployment seed for ANY dss lender (Sky or a fork such as USDD). */
|
|
1607
|
-
export declare const dssConfigFor: (lender: string, chainId: string | number) => UsddConfigChain | undefined;
|
|
1608
|
-
/** Generated ilk roster for ANY dss lender. */
|
|
1609
|
-
export declare const dssChainData: (lender: string, chainId: string | number) => UsddChainData | undefined;
|
|
1610
|
-
/**
|
|
1611
|
-
* One ilk of ANY dss lender, by its ilk string.
|
|
1612
|
-
*
|
|
1613
|
-
* Matches on the SEPARATOR-NORMALISED ilk so that both the on-chain spelling
|
|
1614
|
-
* (`WBTC-A`) and the market-key segment (`WBTC_A`) resolve to the same row.
|
|
1615
|
-
* Market keys are hyphen-free by construction — see margin-fetcher's
|
|
1616
|
-
* `dssLenderKey` — and this is the safety net that keeps a caller passing
|
|
1617
|
-
* either form from silently getting `undefined` (which surfaces as a bogus
|
|
1618
|
-
* "no market roster on this chain" error). Injective because Maker ilks never
|
|
1619
|
-
* contain `_`.
|
|
1620
|
-
*/
|
|
1621
|
-
export declare const dssMarketByIlk: (lender: string, chainId: string | number, ilk: string) => UsddMarketConfig | undefined;
|
|
1622
|
-
/** The debt token of a dss deployment, tolerating both field spellings
|
|
1623
|
-
* (`usdd` on the published USDD config, `debtToken` on Sky). */
|
|
1624
|
-
export declare const dssDebtToken: (cfg?: UsddConfigChain) => string | undefined;
|
|
1625
|
-
/** The debt join of a dss deployment (`usddJoin` / `debtJoin`). */
|
|
1626
|
-
export declare const dssDebtJoin: (cfg?: UsddConfigChain) => string | undefined;
|
|
1627
|
-
export declare const frankencoinConfig: () => FrankencoinConfigType;
|
|
1628
|
-
/** Deployment seed for one Frankencoin lender on a chain. */
|
|
1629
|
-
export declare const frankencoinConfigFor: (lender: string, chainId: string | number) => FrankencoinConfigChain | undefined;
|
|
1630
|
-
export declare const frankencoinMarkets: () => FrankencoinMarketsType;
|
|
1631
|
-
/** Generated chain data (curated original-position roster). */
|
|
1632
|
-
export declare const frankencoinChainData: (lender: string, chainId: string | number) => FrankencoinChainData | undefined;
|
|
1633
|
-
/** Look up one market by its ORIGINAL position address (the key suffix). */
|
|
1634
|
-
export declare const frankencoinMarketByPosition: (lender: string, chainId: string | number, position: string) => FrankencoinMarketConfig | undefined;
|
|
1635
|
-
/** All Frankencoin lender keys with config on a chain (drives
|
|
1636
|
-
* getLendersForChain). Gated on the MintingHub, the one address every
|
|
1637
|
-
* flow needs. */
|
|
1638
|
-
export declare const frankencoinLendersByChain: (chainId: string | number) => string[];
|
|
1639
|
-
/**
|
|
1640
|
-
* Built-in Ethereum deployment seed for Resupply.
|
|
1641
|
-
*
|
|
1642
|
-
* Every other lender's config comes exclusively from `lender-metadata`, and a
|
|
1643
|
-
* published `config/resupply.json` still WINS over this (see
|
|
1644
|
-
* `resupplyConfigFor`). The fallback exists because these are immutable
|
|
1645
|
-
* protocol singletons — `RouterSwapper` even hardcodes the registry address in
|
|
1646
|
-
* its own bytecode — and because the whole market roster is discovered from
|
|
1647
|
-
* `registry` at runtime. So the integration is live with nothing to publish,
|
|
1648
|
-
* and publishing later is a pure override.
|
|
1649
|
-
*
|
|
1650
|
-
* Verified on-chain 2026-08-04 (block ~25,683,400). Deliberately NOT taken
|
|
1651
|
-
* from the docs' `faq/contract-addresses` page or the repo's
|
|
1652
|
-
* `deployment/contracts.json`: both are stale and list a REVOKED Odos swapper.
|
|
1653
|
-
* Resolved via `Registry.getAddress(key)` over `getAllKeys()`.
|
|
1654
|
-
*/
|
|
1655
|
-
export declare const RESUPPLY_ETHEREUM_CONFIG: ResupplyConfigChain;
|
|
1656
|
-
export declare const resupplyConfig: () => ResupplyConfigType;
|
|
1657
|
-
/**
|
|
1658
|
-
* Deployment seed for one Resupply lender on a chain. Published metadata wins;
|
|
1659
|
-
* the built-in Ethereum row is the fallback so the provider works before
|
|
1660
|
-
* `config/resupply.json` exists.
|
|
1661
|
-
*/
|
|
1662
|
-
export declare const resupplyConfigFor: (lender: string, chainId: string | number) => ResupplyConfigChain | undefined;
|
|
1663
|
-
/**
|
|
1664
|
-
* All Resupply lender keys with config on a chain (drives getLendersForChain).
|
|
1665
|
-
* Gated on the REGISTRY — the one address the whole provider is bootstrapped
|
|
1666
|
-
* from. Union of published metadata and the built-in row, so the fan-out
|
|
1667
|
-
* happens with or without a publish.
|
|
1668
|
-
*/
|
|
1669
|
-
export declare const resupplyLendersByChain: (chainId: string | number) => string[];
|
|
1670
|
-
/**
|
|
1671
|
-
* Built-in Monad deployment seed for Curvance.
|
|
1672
|
-
*
|
|
1673
|
-
* Same arrangement as Resupply: a published `config/curvance.json` still WINS
|
|
1674
|
-
* (see `curvanceConfigFor`), but the provider is live with nothing to publish
|
|
1675
|
-
* because `centralRegistry` is an immutable protocol singleton and the whole
|
|
1676
|
-
* market roster is discovered from it at runtime.
|
|
1677
|
-
*
|
|
1678
|
-
* The `positionManagers` map is the exception and the reason this seed carries
|
|
1679
|
-
* more than one address: PM registration is an un-enumerable mapping, and Monad
|
|
1680
|
-
* public RPCs cap `eth_getLogs` at 100 blocks so `PositionManagerUpdated`
|
|
1681
|
-
* cannot be scanned. Every entry below was verified on-chain 2026-08-07 —
|
|
1682
|
-
* 23/23 answered `isPositionManager == true` on their market AND reported that
|
|
1683
|
-
* same market back from `marketManager()`.
|
|
1684
|
-
*
|
|
1685
|
-
* FIVE live markets have NO Position Manager and therefore no native leverage:
|
|
1686
|
-
* `PT-AUSD-8OCT2026 | AUSD` (the largest market at ~$45M), `PT-earnAUSD | AUSD`,
|
|
1687
|
-
* both `High Yield AUSD Vault` markets, and `aguaUSDCgc | USDC`. Their absence
|
|
1688
|
-
* here is the truth, not a gap to fill in.
|
|
1689
|
-
*/
|
|
1690
|
-
export declare const CURVANCE_MONAD_CONFIG: CurvanceConfigChain;
|
|
1691
|
-
export declare const curvanceConfig: () => CurvanceConfigType;
|
|
1692
|
-
/**
|
|
1693
|
-
* Deployment seed for one Curvance lender on a chain. Published metadata wins;
|
|
1694
|
-
* the built-in Monad row is the fallback so the provider works before
|
|
1695
|
-
* `config/curvance.json` exists.
|
|
1696
|
-
*/
|
|
1697
|
-
export declare const curvanceConfigFor: (lender: string, chainId: string | number) => CurvanceConfigChain | undefined;
|
|
1698
|
-
/**
|
|
1699
|
-
* All Curvance lender keys with config on a chain (drives getLendersForChain).
|
|
1700
|
-
* Gated on the CENTRAL REGISTRY — the one address the provider bootstraps from.
|
|
1701
|
-
*/
|
|
1702
|
-
export declare const curvanceLendersByChain: (chainId: string | number) => string[];
|
|
1703
|
-
/**
|
|
1704
|
-
* Position Managers registered for one Curvance market. Returns `undefined`
|
|
1705
|
-
* when the market has none — a real state (5 of 25 on Monad, including the
|
|
1706
|
-
* largest market), and the signal that native leverage is unavailable there.
|
|
1707
|
-
*
|
|
1708
|
-
* Lookup is case-insensitive because market-manager addresses arrive from
|
|
1709
|
-
* `queryTokensListed`/config in mixed checksum forms.
|
|
1710
|
-
*/
|
|
1711
|
-
export declare const curvancePositionManagersFor: (lender: string, chainId: string | number, marketManager: string) => CurvancePositionManagers | undefined;
|
|
1712
|
-
/**
|
|
1713
|
-
* The Position Manager to drive for a market, preferring an explicit `kind` and
|
|
1714
|
-
* otherwise falling back to `simplePositionManager` — which is the right default
|
|
1715
|
-
* because every PM'd market has one, and the vault/native variants exist only as
|
|
1716
|
-
* ALTERNATIVES for legs whose collateral needs an extra wrap step.
|
|
1717
|
-
*/
|
|
1718
|
-
export declare const curvancePositionManager: (lender: string, chainId: string | number, marketManager: string, kind?: keyof CurvancePositionManagers) => string | undefined;
|
|
1719
|
-
export declare const compoundV3Bulker: () => CompoundV3BulkerType;
|
|
1720
|
-
export declare const eulerConfigs: () => EulerConfigsType;
|
|
1721
|
-
export declare const eulerVaults: () => EulerVaultsType;
|
|
1722
|
-
export declare const dolomiteConfigs: () => DolomiteConfigsType;
|
|
1723
|
-
export declare const dolomiteChains: () => string[];
|
|
1724
|
-
export declare const dolomiteEmode: () => DolomiteEmodeType;
|
|
1725
|
-
export declare const dolomiteMarketIdByToken: (chainId: string, token: string) => string | undefined;
|
|
1726
|
-
export declare const aaveV4Spokes: () => AaveV4SpokesType;
|
|
1727
|
-
export declare const aaveV4Oracles: () => AaveV4OraclesType;
|
|
1728
|
-
export declare const aaveV4Peripherals: () => AaveV4PeripheralsType;
|
|
1729
|
-
export declare const siloMarkets: () => SiloMarketsType;
|
|
1730
|
-
export declare const siloPeripherals: () => SiloPeripheralsType;
|
|
1731
|
-
export declare const siloMarketsV3: () => SiloMarketsType;
|
|
1732
|
-
export declare const siloPeripheralsV3: () => SiloPeripheralsType;
|
|
1733
|
-
export declare const fluidResolvers: () => FluidResolversType;
|
|
1734
|
-
export declare const fluidVaults: () => FluidVaultsType;
|
|
1735
|
-
/** List of chains where Fluid resolvers are registered. */
|
|
1736
|
-
export declare const fluidChains: () => string[];
|
|
1737
|
-
export declare const gearboxResolvers: () => GearboxResolversType;
|
|
1738
|
-
/** List of chains where Gearbox V3.1 configurators are registered. */
|
|
1739
|
-
export declare const gearboxChains: () => string[];
|
|
1740
|
-
/** V3.1 deterministic MarketCompressor address (same on every chain). */
|
|
1741
|
-
export declare const gearboxMarketCompressor: () => string | undefined;
|
|
1742
|
-
/** V3.1 deterministic AddressProvider address (same on every chain). */
|
|
1743
|
-
export declare const gearboxAddressProviderV310: () => string | undefined;
|
|
1744
|
-
/**
|
|
1745
|
-
* BotListV3 contract address for a chain — used by the lender-permission
|
|
1746
|
-
* fetch to read `botPermissions(bot, creditManager, borrower)`. Read from
|
|
1747
|
-
* the per-chain `gearbox-resolvers.json` entry (`chains[chainId].botList`).
|
|
1748
|
-
* Returns `undefined` when the metadata layer hasn't provided one yet.
|
|
1749
|
-
*/
|
|
1750
|
-
export declare const gearboxBotListV3: (chainId: string) => string | undefined;
|
|
1751
|
-
/**
|
|
1752
|
-
* V3.1 deterministic CreditAccountCompressor address.
|
|
1753
|
-
*
|
|
1754
|
-
* Same CREATE2-derived address on every Gearbox V3.1 chain. Not in the
|
|
1755
|
-
* resolvers JSON yet — hardcoded here until we decide whether to surface
|
|
1756
|
-
* it in `lender-metadata` (the config gains no flexibility; the address
|
|
1757
|
-
* is fixed across chains).
|
|
1758
|
-
*/
|
|
1759
|
-
export declare const GEARBOX_ACCOUNT_COMPRESSOR_V310 = "0x4115708Fc8fe6bB392De2e0C21c2C81dA2222394";
|
|
1760
|
-
export declare const gearboxAccountCompressor: () => string;
|
|
1761
|
-
/**
|
|
1762
|
-
* MarketConfigurator address → curator name for a given chain, or
|
|
1763
|
-
* `undefined` if no curator is registered on that chain.
|
|
1764
|
-
*
|
|
1765
|
-
* Configurators are the entry point into `MarketCompressor.getMarkets`
|
|
1766
|
-
* — each one is operated by a known curator (cp0x, Re7, Chaos Labs, …).
|
|
1767
|
-
*/
|
|
1768
|
-
export declare const gearboxMarketConfigurators: (chainId: string) => {
|
|
1769
|
-
[addr: string]: string;
|
|
1770
|
-
} | undefined;
|
|
1771
|
-
/** Vault entries for a chain as `[address, meta]` tuples. */
|
|
1772
|
-
export declare const fluidVaultEntries: (chainId: string) => [string, FluidVaultMeta][];
|
|
1773
|
-
/**
|
|
1774
|
-
* Look up the spoke entry for a per-spoke V4 lender key (`AAVE_V4_<HEX>`).
|
|
1775
|
-
* Returns `undefined` if no entry exists for that chain/spoke.
|
|
1776
|
-
*/
|
|
1777
|
-
export declare function getAaveV4SpokeEntry(chainId: string, lenderKey: string): AaveV4SpokeEntry | undefined;
|
|
1778
|
-
/**
|
|
1779
|
-
* Native / signature gateway addresses for Aave V4.
|
|
1780
|
-
*
|
|
1781
|
-
* Resolves the spoke from the per-spoke lender key (`AAVE_V4_<HEX>`),
|
|
1782
|
-
* picks the spoke's first reserve to learn its hub, and looks up
|
|
1783
|
-
* `peripherals[chainId].perHub[hub]`. Falls back to the chain-level
|
|
1784
|
-
* default gateways if no per-hub override is set.
|
|
1785
|
-
*
|
|
1786
|
-
* If the caller passes a hub address directly via `hubOverride`, that
|
|
1787
|
-
* takes precedence.
|
|
1788
|
-
*/
|
|
1789
|
-
export declare function getAaveV4GatewayAddresses(chainId: string, lender: string, hubOverride?: string): {
|
|
1790
|
-
nativeGateway?: string;
|
|
1791
|
-
signatureGateway?: string;
|
|
1792
|
-
};
|
|
1793
|
-
/**
|
|
1794
|
-
* Look up the per-spoke peripherals metadata for a V4 spoke.
|
|
1795
|
-
*
|
|
1796
|
-
* Sourced from `aave-v4-peripherals.json` `perSpoke[<spokeAddrLower>]`.
|
|
1797
|
-
* Carries curated extras the metadata team maintains alongside the core
|
|
1798
|
-
* registry — most usefully the position-manager registry. Returns
|
|
1799
|
-
* `undefined` if no entry exists for the spoke or if the lender key is
|
|
1800
|
-
* not a per-spoke V4 key.
|
|
1801
|
-
*
|
|
1802
|
-
* Note: the spoke's `label` (curated UI name) lives directly on the
|
|
1803
|
-
* `AaveV4SpokeEntry` from `aaveV4Spokes()` — `perSpoke.spokeName` is a
|
|
1804
|
-
* duplicate of that and is intentionally not surfaced through the public-
|
|
1805
|
-
* data normalizer. Read it through this helper if a consumer needs the
|
|
1806
|
-
* exact value from the peripherals file.
|
|
1807
|
-
*/
|
|
1808
|
-
export declare function getAaveV4SpokePeripherals(chainId: string, lenderKey: string): AaveV4PerSpokeMeta | undefined;
|
|
1809
|
-
/**
|
|
1810
|
-
* Active position-manager addresses for an Aave V4 spoke.
|
|
1811
|
-
*
|
|
1812
|
-
* Returns the lowercase addresses of every entry in
|
|
1813
|
-
* `perSpoke[<spoke>].positionManagers` whose `active` flag is truthy.
|
|
1814
|
-
* Empty array if the spoke has no peripherals entry or no active PMs.
|
|
1815
|
-
*
|
|
1816
|
-
* Use the `byName` lookup form when you need a specific PM (e.g. the
|
|
1817
|
-
* native gateway). Names are matched case-insensitively against the
|
|
1818
|
-
* curated `name` field; partial matches are accepted.
|
|
1819
|
-
*/
|
|
1820
|
-
export declare function getAaveV4PositionManagers(chainId: string, lenderKey: string): string[];
|
|
1821
|
-
/**
|
|
1822
|
-
* Look up a single position-manager address by curated name (partial,
|
|
1823
|
-
* case-insensitive). Returns `undefined` if no match. Useful for
|
|
1824
|
-
* targeting specific PMs like `"native gateway"` or `"signature gateway"`
|
|
1825
|
-
* without hardcoding the addresses.
|
|
1826
|
-
*/
|
|
1827
|
-
export declare function findAaveV4PositionManager(chainId: string, lenderKey: string, nameQuery: string): string | undefined;
|
|
1828
|
-
/**
|
|
1829
|
-
* Synthesize the per-spoke lender key for an Aave V4 spoke.
|
|
1830
|
-
*
|
|
1831
|
-
* Mirrors the Morpho `MORPHO_BLUE_<HEX_NO_0X_UPPER>` convention so the rest
|
|
1832
|
-
* of the codebase can treat each spoke as an isolated market — exactly like a
|
|
1833
|
-
* Morpho Blue market or a Compound V3 Comet — without any V4-specific logic.
|
|
1834
|
-
*
|
|
1835
|
-
* Format: `AAVE_V4_${spokeAddr.slice(2).toUpperCase()}`
|
|
1836
|
-
*
|
|
1837
|
-
* Example:
|
|
1838
|
-
* spoke = "0x94e7a5dcbe816e498b89ab752661904e2f56c485"
|
|
1839
|
-
* → = "AAVE_V4_94E7A5DCBE816E498B89AB752661904E2F56C485"
|
|
1840
|
-
*
|
|
1841
|
-
* The full spoke address is preserved (no truncation) so the key is globally
|
|
1842
|
-
* unique and stable across spoke implementation upgrades (proxy address).
|
|
1843
|
-
* Note: chainId is intentionally NOT in the lender token — the same spoke
|
|
1844
|
-
* address can in principle exist on multiple chains via deterministic
|
|
1845
|
-
* deploys, and chain scoping happens at the marketUid level instead.
|
|
1846
|
-
*
|
|
1847
|
-
* `isAaveV4Type()` continues to work because it uses `startsWith('AAVE_V4')`.
|
|
1848
|
-
*/
|
|
1849
|
-
export declare function aaveV4SpokeLenderKey(spoke: string): string;
|
|
1850
|
-
/**
|
|
1851
|
-
* Inverse of `aaveV4SpokeLenderKey`: given a per-spoke lender key, return
|
|
1852
|
-
* `{ spokeAddrLower }`. Returns `undefined` if the key isn't a per-spoke V4
|
|
1853
|
-
* key (e.g. someone passed the bare prefix `AAVE_V4`).
|
|
1854
|
-
*/
|
|
1855
|
-
export declare function parseAaveV4SpokeLenderKey(lenderKey: string): {
|
|
1856
|
-
spokeAddrLower: string;
|
|
1857
|
-
} | undefined;
|
|
1858
|
-
/**
|
|
1859
|
-
* Synthesize the per-pair lender key for a Silo v2 market.
|
|
1860
|
-
*
|
|
1861
|
-
* Mirrors `aaveV4SpokeLenderKey` and the Morpho `MORPHO_BLUE_<HEX>`
|
|
1862
|
-
* convention so each Silo pair shows up as its own isolated lender —
|
|
1863
|
-
* exactly like an Aave V4 spoke or a Morpho Blue market — without any
|
|
1864
|
-
* Silo-specific routing logic in the rest of the codebase.
|
|
1865
|
-
*
|
|
1866
|
-
* Format: `SILO_V2_${siloConfigAddr.slice(2).toUpperCase()}`
|
|
1867
|
-
*
|
|
1868
|
-
* Keyed by `SiloConfig` rather than either silo because the config is the
|
|
1869
|
-
* stable, shared identity of the pair (silo0/silo1 are derived from it).
|
|
1870
|
-
*
|
|
1871
|
-
* `isSiloV2Type()` works on this because it matches `startsWith('SILO_V2')`.
|
|
1872
|
-
*/
|
|
1873
|
-
export declare function siloV2LenderKey(siloConfig: string): string;
|
|
1874
|
-
/**
|
|
1875
|
-
* Inverse of `siloV2LenderKey`: given a per-pair lender key, return
|
|
1876
|
-
* `{ siloConfigAddrLower }`. Returns `undefined` if the key isn't a per-pair
|
|
1877
|
-
* Silo v2 key (e.g. someone passed the bare prefix `SILO_V2`).
|
|
1878
|
-
*/
|
|
1879
|
-
export declare function parseSiloV2LenderKey(lenderKey: string): {
|
|
1880
|
-
siloConfigAddrLower: string;
|
|
1881
|
-
} | undefined;
|
|
1882
|
-
/**
|
|
1883
|
-
* Look up a Silo v2 market entry by per-pair lender key.
|
|
1884
|
-
* Returns `undefined` if no entry exists for that chain/config.
|
|
1885
|
-
*/
|
|
1886
|
-
export declare function getSiloV2MarketEntry(chainId: string, lenderKey: string): SiloMarketEntry | undefined;
|
|
1887
|
-
/**
|
|
1888
|
-
* Silo v3 per-pair lender key helpers.
|
|
1889
|
-
*
|
|
1890
|
-
* Silo v3 uses the exact same on-chain data model and metadata shape as v2
|
|
1891
|
-
* (`SiloMarketEntry`/`SiloHalfStatic`) — only the deployment set, factory
|
|
1892
|
-
* and indexer protocol tag differ — so v3 pairs get their own isolated
|
|
1893
|
-
* lender token namespace (`SILO_V3_<HEX>`) and live in a separate
|
|
1894
|
-
* `siloMarketsV3` registry slot. Keeping the two separate means a v2 and
|
|
1895
|
-
* v3 pair with the same `SiloConfig` address could in principle coexist
|
|
1896
|
-
* without clashing, and downstream consumers can filter by prefix.
|
|
1897
|
-
*
|
|
1898
|
-
* Format: `SILO_V3_${siloConfigAddr.slice(2).toUpperCase()}`
|
|
1899
|
-
*/
|
|
1900
|
-
export declare function siloV3LenderKey(siloConfig: string): string;
|
|
1901
|
-
export declare function parseSiloV3LenderKey(lenderKey: string): {
|
|
1902
|
-
siloConfigAddrLower: string;
|
|
1903
|
-
} | undefined;
|
|
1904
|
-
/**
|
|
1905
|
-
* Look up a Silo v3 market entry by per-pair lender key.
|
|
1906
|
-
* Returns `undefined` if no entry exists for that chain/config.
|
|
1907
|
-
*/
|
|
1908
|
-
export declare function getSiloV3MarketEntry(chainId: string, lenderKey: string): SiloMarketEntry | undefined;
|
|
1909
|
-
/**
|
|
1910
|
-
* Synthesize the per-CreditManager lender key for a Gearbox V3 market.
|
|
1911
|
-
*
|
|
1912
|
-
* Mirrors `siloV2LenderKey` / `aaveV4SpokeLenderKey` — each CreditManager
|
|
1913
|
-
* is its own isolated lending venue (positions in CM-A are invisible to
|
|
1914
|
-
* CM-B even when both draw from the same pool), so it gets its own lender
|
|
1915
|
-
* key rather than a config bucket under a shared parent.
|
|
1916
|
-
*
|
|
1917
|
-
* Format: `GEARBOX_V3_${creditManagerAddr.slice(2).toUpperCase()}`
|
|
1918
|
-
*
|
|
1919
|
-
* `isGearboxV3()` works on this because it matches `startsWith('GEARBOX_V3')`.
|
|
1920
|
-
*/
|
|
1921
|
-
export declare function gearboxV3LenderKey(creditManager: string): string;
|
|
1922
|
-
/**
|
|
1923
|
-
* Inverse of `gearboxV3LenderKey`: given a per-CM lender key, return
|
|
1924
|
-
* `{ creditManagerAddrLower }`. Returns `undefined` if the key isn't a
|
|
1925
|
-
* per-CM Gearbox V3 key (e.g. someone passed the bare prefix `GEARBOX_V3`).
|
|
1926
|
-
*/
|
|
1927
|
-
export declare function parseGearboxV3LenderKey(lenderKey: string): {
|
|
1928
|
-
creditManagerAddrLower: string;
|
|
1929
|
-
} | undefined;
|
|
1930
|
-
/**
|
|
1931
|
-
* Synthesize the per-market lender key for a TermMax market.
|
|
1932
|
-
*
|
|
1933
|
-
* Mirrors `EXACTLY_<MARKET_ADDRESS_HEX>` / `TELLER_<POOL_ADDRESS_HEX>`. One key
|
|
1934
|
-
* per TermMax market, i.e. per (debtToken, collateral, maturity) tuple — the
|
|
1935
|
-
* maturity is baked into the market contract, so unlike Exactly there is NO
|
|
1936
|
-
* `terms[]` menu underneath a key.
|
|
1937
|
-
*
|
|
1938
|
-
* Format: `TERMMAX_${marketAddr.slice(2).toUpperCase()}`
|
|
1939
|
-
*
|
|
1940
|
-
* chainId is intentionally NOT in the token (chain scoping happens at the
|
|
1941
|
-
* marketUid level), matching every other per-market key in this file.
|
|
1942
|
-
*
|
|
1943
|
-
* `isTermMax()` works on this because it matches `startsWith('TERMMAX')`.
|
|
1944
|
-
*/
|
|
1945
|
-
export declare function termMaxLenderKey(market: string): string;
|
|
1946
|
-
/**
|
|
1947
|
-
* Inverse of `termMaxLenderKey`: given a per-market lender key, return
|
|
1948
|
-
* `{ marketAddrLower }`. Returns `undefined` if the key isn't a per-market
|
|
1949
|
-
* TermMax key (e.g. someone passed the bare prefix `TERMMAX`).
|
|
1950
|
-
*/
|
|
1951
|
-
export declare function parseTermMaxLenderKey(lenderKey: string): {
|
|
1952
|
-
marketAddrLower: string;
|
|
1953
|
-
} | undefined;
|
|
1954
|
-
/**
|
|
1955
|
-
* Per-market lender key for one LlamaLend market, keyed by its CONTROLLER (the
|
|
1956
|
-
* borrow-side contract), not the vault — the Controller is what every write
|
|
1957
|
-
* and every user read targets.
|
|
1958
|
-
*
|
|
1959
|
-
* Format: `LLAMALEND_${controllerAddr.slice(2).toUpperCase()}`
|
|
1960
|
-
*
|
|
1961
|
-
* Both generations share this key space deliberately: they are one brand to the
|
|
1962
|
-
* user, and the Curve API returns them in one list. The `version` field on the
|
|
1963
|
-
* market row is what encoders branch on. chainId is intentionally NOT in the
|
|
1964
|
-
* token (chain scoping happens at the marketUid level), matching every other
|
|
1965
|
-
* per-market key in this file.
|
|
1966
|
-
*
|
|
1967
|
-
* `isLlamaLend()` works on this because it matches `startsWith('LLAMALEND')`.
|
|
1968
|
-
*/
|
|
1969
|
-
export declare function llamaLendLenderKey(controller: string): string;
|
|
1970
|
-
/**
|
|
1971
|
-
* Inverse of `llamaLendLenderKey`: given a per-market lender key, return
|
|
1972
|
-
* `{ controllerAddrLower }`. Returns `undefined` if the key isn't a per-market
|
|
1973
|
-
* LlamaLend key (e.g. someone passed the bare prefix `LLAMALEND`).
|
|
1974
|
-
*/
|
|
1975
|
-
export declare function parseLlamaLendLenderKey(lenderKey: string): {
|
|
1976
|
-
controllerAddrLower: string;
|
|
1977
|
-
} | undefined;
|
|
1978
|
-
export {};
|