@1delta/margin-fetcher 5.0.140 → 5.0.141

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { Chain, isEvmChainId, isRetiredChain, isSvmChainId } from '@1delta/chain
9
9
  import { multicallRetryUniversal, getEvmClient, getEvmClientWithCustomRpcsUniversal, LIST_OVERRIDES, getEvmChain, createMulticallRetryUniversal, getEvmClientUniversal } from '@1delta/providers';
10
10
  import { LiquityTroveManagerAbi, LiquityActivePoolAbi, LiquityStabilityPoolAbi, LiquityPriceFeedAbi, LiquitySortedTrovesAbi, RiverTroveManagerAbi, RiverStabilityPoolAbi, TellerMarketRegistryAbi, TellerV2Abi, InverseMarketAbi, InverseOracleAbi, InverseDbrAbi, CurveTricryptoOracleAbi, Erc20Abi, CoolerMonoAbi, CoolerLtvOracleAbi, LlamaLendControllerAbi, LlamaLendControllerV1Abi, LlamaLendControllerV2Abi, LlamaLendVaultAbi, LlamaLendAmmAbi, TwyneCollateralVaultAbi, MetaMorphoAbi, FluidDexResolverAbi, ExactlyPreviewerAbi, ExactlyAuditorAbi, FlyingTulipLendingLensAbi, LiquityMultiTroveGetterAbi, LenderCommitmentGroupAbi, ResupplyRegistryAbi, ResupplyPairAbi, ResupplyUtilitiesAbi, ResupplyRewardHandlerAbi, ResupplyPairEmissionsAbi, ConvexPoolUtilAbi, FraxlendPairAbi, FraxlendLeverAbi, RipeMissionControlAbi, RipeLedgerAbi, RipeVaultBookAbi, RipePriceDeskAbi, RipeVaultAbi, RipeCreditEngineAbi, FrankencoinPositionAbi, FluidLendingResolverAbi, FluidVaultResolverAbi, FluidLiquidityResolverAbi, MoolahVaultAbi, UsddVatAbi, UsddJugAbi, UsddSpotAbi, MorphoLensAbi, AaveV4SpokeAbi, AaveV4OracleAbi, AaveV4HubAbi, DolomiteMarginAbi, GearboxMarketCompressorV310Abi, RipeHqAbi, MorphoBlueAbi, MidnightAbi, TermRepoTokenAbi, TermRepoServicerAbi, TermRepoCollateralManagerAbi, LiquityTroveNFTAbi, LiquityCollSurplusPoolAbi, TellerCollateralManagerAbi, TermMaxViewerAbi, InverseEscrowAbi, AlchemixAlchemistAbi, FlexTroveManagerAbi, CurvanceMarketManagerAbi, CurvanceCTokenAbi, GearboxCreditAccountCompressorV310Abi, TwyneVaultManagerAbi, TwyneCollateralVaultFactoryAbi, AaveV2V3Abi, TwyneATokenWrapperAbi, AlchemixPositionNftAbi, UsddCdpManagerAbi, UsddProxyRegistryAbi, CurvanceProtocolReaderAbi, CurvanceCentralRegistryAbi, TermPriceConsumerAbi, CurvanceOracleManagerAbi, FlexPriceOracleAbi, TermMaxOracleAggregatorV2Abi, AlchemixTransmuterAbi, FlexSortedTrovesAbi, FlexTokenizedStrategyAbi } from '@1delta/abis';
11
11
  export { MorphoLensAbi } from '@1delta/abis';
12
- import { NEST_SAVINGS_VAULTS, NEST_PREDICATE_PROXY, NEST_USDC, SUPERFORM_SUPERVAULTS, ROYCO_TRANCHES, STRATA_META_TRANCHES, MIDAS_VAULTS, MORINI_FXARB, EMBER_VAULTS, EVA_VAULTS, prepareDebitDataMulticall, prepareLenderDebitMulticall, parseDebitDataResult, parseLenderDebitResult, getPermit2ContractAddress, getLstAcceptedInputs, savingsVerbRequires, savingsSupportsVerb, getCompoundV2Comptroller as getCompoundV2Comptroller$1, getCompoundV3CometAddress as getCompoundV3CometAddress$1, getMorphoAddress, FLUID_VAULT_FACTORY, getAaveStyleLenderTokenAddress, LendingMode, getAaveCollateralTokenAddress, getSiloHalfForUnderlying, findSavingsWithdrawEntry, bandLtvCurve, InitMarginAddresses, ignoresReceiver, buildLstWithdrawRequest, SAVINGS_RECEIVER_CAPABILITY } from '@1delta/calldata-sdk';
12
+ import { NEST_SAVINGS_VAULTS, NEST_PREDICATE_PROXY, NEST_USDC, SUPERFORM_SUPERVAULTS, ROYCO_TRANCHES, STRATA_META_TRANCHES, MIDAS_VAULTS, MORINI_FXARB, EMBER_VAULTS, USDAI_STAKED, MAKINA_MACHINES, YUZU_VAULTS, CONCRETE_VAULTS, MELLOW_VAULTS, AERA_VAULTS, EVA_VAULTS, prepareDebitDataMulticall, prepareLenderDebitMulticall, parseDebitDataResult, parseLenderDebitResult, getPermit2ContractAddress, getLstAcceptedInputs, savingsVerbRequires, savingsSupportsVerb, getCompoundV2Comptroller as getCompoundV2Comptroller$1, getCompoundV3CometAddress as getCompoundV3CometAddress$1, getMorphoAddress, FLUID_VAULT_FACTORY, getAaveStyleLenderTokenAddress, LendingMode, getAaveCollateralTokenAddress, getSiloHalfForUnderlying, findSavingsWithdrawEntry, bandLtvCurve, InitMarginAddresses, ignoresReceiver, buildLstWithdrawRequest, savingsReceiverCapability } from '@1delta/calldata-sdk';
13
13
  import { proxyNativeFetch } from '@1delta/proxy-fetch';
14
14
  import { BALANCER_V2_FORKS, BALANCER_V3_FORKS, UNISWAP_V4_FORKS, isFlashLoanSourceExcluded, FLASH_LOAN_IDS } from '@1delta/dex-registry';
15
15
  import { getNativeDecimals, getWrappedNativeAddressSafe, isNativeWrapOneToOne } from '@1delta/wnative';
@@ -48475,6 +48475,7 @@ var SWETH_URL = "https://v3-lst.svc.swellnetwork.io/api/tokens/sweth/apr";
48475
48475
  var rsweth = "Restaked Swell ETH::RSWETH";
48476
48476
  var SWETH_KEYS = ["Swell Ethereum::SWETH", "Swell Ethereum::swETH"];
48477
48477
  var E18 = 10n ** 18n;
48478
+ var RSWETH_MAX_PLAUSIBLE_APR = 12;
48478
48479
  var SWETH_SPEC = {
48479
48480
  tag: "swETH",
48480
48481
  chainId: "1",
@@ -48532,10 +48533,12 @@ var rswethFetcher = {
48532
48533
  computeShareRateApr(RSWETH_SPEC)
48533
48534
  ]);
48534
48535
  const out = {};
48535
- if (sw.status === "fulfilled") for (const k of SWETH_KEYS) out[k] = sw.value;
48536
- if (rsw.status === "fulfilled") out[rsweth] = rsw.value;
48537
- if (!Object.keys(out).length)
48538
- throw new Error(`swell: ${String(sw.reason)}`);
48536
+ if (sw.status === "fulfilled" && sw.value >= 0 && sw.value <= RSWETH_MAX_PLAUSIBLE_APR)
48537
+ for (const k of SWETH_KEYS) out[k] = sw.value;
48538
+ if (rsw.status === "fulfilled" && rsw.value >= 0 && rsw.value <= RSWETH_MAX_PLAUSIBLE_APR)
48539
+ out[rsweth] = rsw.value;
48540
+ if (sw.status === "rejected" && rsw.status === "rejected")
48541
+ throw new Error(`swell: ${String(sw.reason)}; ${String(rsw.reason)}`);
48539
48542
  return out;
48540
48543
  }
48541
48544
  };
@@ -48792,6 +48795,17 @@ var cbethFetcher = {
48792
48795
  }
48793
48796
  };
48794
48797
 
48798
+ // src/yields/intrinsic/fetchers/liquidCollective.ts
48799
+ var LSETH_POOL_ID = "465d177e-3d0d-42c0-b5f5-31c857567135";
48800
+ var KEYS = ["Liquid Staked ETH::LSETH", "LSETH"];
48801
+ var lsethFetcher = {
48802
+ label: "LSETH",
48803
+ fetch: async () => {
48804
+ const apr = apyToAprPercent(await fetchDefiLlamaApy(LSETH_POOL_ID));
48805
+ return Object.fromEntries(KEYS.map((k) => [k, apr]));
48806
+ }
48807
+ };
48808
+
48795
48809
  // src/yields/intrinsic/fetchers/mantle.ts
48796
48810
  var METH_URL = "https://meth.mantle.xyz/api/stats/apy";
48797
48811
  var methFetcher = {
@@ -50198,6 +50212,181 @@ var sflrFetcher = {
50198
50212
  fetch: async () => ({ [SFLR_YIELD_KEY]: await computeSflrApr() })
50199
50213
  };
50200
50214
 
50215
+ // src/yields/intrinsic/fetchers/vaultShareRates.ts
50216
+ var E6 = 10n ** 6n;
50217
+ var E182 = 10n ** 18n;
50218
+ var erc4626 = (tag, chainId, share, unit, keys, opts = {}) => ({
50219
+ tag,
50220
+ chainId,
50221
+ share,
50222
+ unit,
50223
+ keys,
50224
+ reads: [{ address: share, fn: "convertToAssets", arg: true }],
50225
+ ...opts
50226
+ });
50227
+ var VAULT_SHARE_RATE_SPECS = [
50228
+ // Bedrock uniETH moved to `BEDROCK_UNIETH_SPECS` below (2026-10-27): its
50229
+ // LST row wires the fetcher, and a vault-wired fetcher may not also be
50230
+ // lending-only (the disjointness rule).
50231
+ // Avalon sUSDa — the ERC-20 on every chain is a bare LayerZero OFT; the
50232
+ // vault is Ethereum's `SavingAccount` (0x01e3…), whose
50233
+ // `getAmountByShares(1e18)` is USDa per sUSDa. Posted `targetAPR` 4 %, the
50234
+ // measured delta 4.02 %. Every chain's sUSDa row uses the bare group SUSDA.
50235
+ {
50236
+ tag: "sUSDa",
50237
+ chainId: "1",
50238
+ share: "0x2b66aade1e9c062ff411bd47c44e0ad696d43bd9",
50239
+ unit: E182,
50240
+ keys: ["SUSDA"],
50241
+ reads: [
50242
+ {
50243
+ address: "0x01e3cc8E17755989ad2CAFE78A822354Eb5DdFA6",
50244
+ fn: "getAmountByShares",
50245
+ arg: true
50246
+ }
50247
+ ]
50248
+ },
50249
+ // NOT here: Main Street msY (0x890a…, 4626 over msUSD). Its share price
50250
+ // still climbs 6.4 % a year in msUSD, but msUSD's reserve attestation was
50251
+ // withdrawn in June 2026 and the token is reported ~90 % off peg — a rate
50252
+ // on a claim nobody verifies would rank msY loops on paper yield. Left
50253
+ // absent (the Resolv precedent publishes 0 for a compromised book).
50254
+ // Pareto sUSP — ERC-4626 over Pareto's synthetic dollar USP (0x97cc…, NOT
50255
+ // Piku's "USP Yield Optimized Stablecoin" 0x0986…), 6.35 %, ~765k USP.
50256
+ erc4626("sUSP", "1", "0x271c616157e69a43b4977412a64183cf110edf16", E182, [
50257
+ "Pareto Staked USP::SUSP"
50258
+ ]),
50259
+ // Origin wsuperOETHb (Base) moved to `llamaGap.ts` (2026-10-27): it now
50260
+ // carries a savings row, which vault-wires its own fetcher.
50261
+ // Origin/Lido ARM (stETH redemption arbitrage) — ERC-4626 over WETH,
50262
+ // 2.45 %, ~1,880 WETH. An arb book can lose: negatives are published.
50263
+ erc4626(
50264
+ "ARM-WETH-stETH",
50265
+ "1",
50266
+ "0x85b78aca6deae198fbf201c82daf6ca21942acc6",
50267
+ E182,
50268
+ ["stETH ARM LP Token::ARM-WETH-STETH"],
50269
+ { allowNegative: true }
50270
+ ),
50271
+ // Concentrator asdCRV — auto-compounding sdCRV (ERC-4626-shaped),
50272
+ // 14.72 %, ~17.2M sdCRV. Yield is in sdCRV units.
50273
+ erc4626("asdCRV", "1", "0x43e54c2e7b3e294de3a155785f52ab49d87b9922", E182, [
50274
+ "Aladdin sdCRV::ASDCRV"
50275
+ ]),
50276
+ // Shadow x33 (Sonic) — ERC-4626 over xSHADOW, compounding rebases +
50277
+ // voting rewards. 25.9 % (30d) / 27.5 % (90d), in xSHADOW units — a real
50278
+ // rate on a volatile, exit-penalised base token.
50279
+ // Aladdin asdPENDLE — auto-compounding sdPENDLE (ERC-4626-shaped), in
50280
+ // sdPENDLE units; listed 2026-10-16.
50281
+ erc4626("asdPENDLE", "1", "0x606462126e4bd5c4d153fe09967e4c46c9c7fecf", E182, [
50282
+ "Aladdin sdPENDLE::asdPENDLE"
50283
+ ]),
50284
+ // IPOR Fusion stETH looping vault — 20-decimal shares (offset 2 over stETH).
50285
+ erc4626(
50286
+ "fusnstETH",
50287
+ "1",
50288
+ "0xb8a451107a9f87fde481d4d686247d6e43ed715e",
50289
+ 10n ** 20n,
50290
+ ["Fusion stETH looping Ethereum::fusnstETH"]
50291
+ ),
50292
+ erc4626("x33", "146", "0x3333111a391cc08fa51353e9195526a70b333333", E182, [
50293
+ "Shadow Liquid Staking Token::X33"
50294
+ ]),
50295
+ // Makina "Dialectic" machines — the share token has no rate; the Machine
50296
+ // (its owner) prices it: `convertToAssets(1e18)` in the accounting token.
50297
+ // DUSD and DETH carry savings rows now and moved to `gapSweep.ts` (the
50298
+ // disjointness rule); DBIT (1.12 %, WBTC, ~8.5 BTC) has no row and stays.
50299
+ // Strategy books — negatives published.
50300
+ {
50301
+ tag: "DBIT",
50302
+ chainId: "1",
50303
+ share: "0x972966bcc17f7d818de4f27dc146ef539c231bdf",
50304
+ unit: E182,
50305
+ keys: ["Dialectic BTC::DBIT"],
50306
+ reads: [
50307
+ {
50308
+ address: "0xfcbe132452b6caa32addd4768db8fa02af73d841",
50309
+ fn: "convertToAssets",
50310
+ arg: true
50311
+ }
50312
+ ],
50313
+ allowNegative: true
50314
+ },
50315
+ // Ember eEARN moved to `ember.ts` (2026-10-22): it now carries a savings
50316
+ // row, which vault-wires its own fetcher, and its rate is a step function
50317
+ // measured mark to mark.
50318
+ // Veda PlasmaUSD (Plasma) moved to `llamaGap.ts` (2026-10-27) with its
50319
+ // savings row, for the same reason.
50320
+ // Gains gUSDC (Arbitrum) — the share price carries trader PnL against the
50321
+ // vault, so it is a MARK, not an accrual: +5.4 % (7d), −9.5 % (30d),
50322
+ // +4.3 % (90d) at measurement. A 90-day realized window, negatives
50323
+ // published (never clamped).
50324
+ erc4626(
50325
+ "gUSDC",
50326
+ "42161",
50327
+ "0xd3443ee1e91af28e5fb858fbd0d72a63ba8046e0",
50328
+ E6,
50329
+ ["Gains Network USDC::gUSDC"],
50330
+ { allowNegative: true, windowDays: 90 }
50331
+ ),
50332
+ // Harmonix hakHYPE (HyperEVM) — ERC-4626 over kHYPE; composed through
50333
+ // Kinetiq's StakingAccountant `kHYPEToHYPE` so the APR is in HYPE and
50334
+ // includes kHYPE's own staking yield (the vault leg alone is ~0.19 %).
50335
+ {
50336
+ tag: "hakHYPE",
50337
+ chainId: "999",
50338
+ share: "0x1368ee9d1212ae5b26ff166049220051a9eebc42",
50339
+ unit: E182,
50340
+ keys: ["Harmonix kHYPE::HAKHYPE"],
50341
+ reads: [
50342
+ {
50343
+ address: "0x1368ee9d1212ae5b26ff166049220051a9eebc42",
50344
+ fn: "convertToAssets",
50345
+ arg: true
50346
+ },
50347
+ {
50348
+ address: "0x9209648Ec9D448EF57116B73A2f081835643dc7A",
50349
+ fn: "kHYPEToHYPE",
50350
+ arg: true
50351
+ }
50352
+ ]
50353
+ }
50354
+ ];
50355
+ var vaultShareRatesFetcher = createShareRateFetcher(
50356
+ "VAULT_SHARE_RATES",
50357
+ VAULT_SHARE_RATE_SPECS
50358
+ );
50359
+ var SYUSD_KEY = "Staked YUSD::sYUSD";
50360
+ var EXPIRED_W_SAVINGS_SPECS = [
50361
+ erc4626("sYUSD", "1", "0xfe0ccc9942e98c963fe6b4e5194eb6e3baa4cb64", E182, [
50362
+ SYUSD_KEY
50363
+ ])
50364
+ ];
50365
+ var expiredWSavingsFetcher = createShareRateFetcher(
50366
+ "EXPIRED_W_SAVINGS",
50367
+ EXPIRED_W_SAVINGS_SPECS
50368
+ );
50369
+ var BEDROCK_UNIETH_SPECS = [
50370
+ {
50371
+ tag: "uniETH",
50372
+ chainId: "1",
50373
+ share: "0xf1376bcef0f78459c0ed0ba5ddce976f1ddf51f4",
50374
+ unit: E182,
50375
+ keys: ["Universal ETH::uniETH"],
50376
+ reads: [
50377
+ {
50378
+ address: "0x4beFa2aA9c305238AA3E0b5D17eB20C045269E9d",
50379
+ fn: "exchangeRatio",
50380
+ arg: false
50381
+ }
50382
+ ]
50383
+ }
50384
+ ];
50385
+ var bedrockUniEthFetcher = createShareRateFetcher(
50386
+ "BEDROCK_UNIETH",
50387
+ BEDROCK_UNIETH_SPECS
50388
+ );
50389
+
50201
50390
  // src/vaults/lst/registry.ts
50202
50391
  var LST_REGISTRY = {
50203
50392
  // Monad (143) — native-MON LSTs. shMON / aprMON are ERC-4626 over native
@@ -50478,7 +50667,62 @@ var LST_REGISTRY = {
50478
50667
  mintInputAsset: "native",
50479
50668
  withdrawalMode: "queued",
50480
50669
  yieldFetcher: rswethFetcher,
50481
- yieldKey: "Restaked Swell ETH::RSWETH"
50670
+ yieldKey: "Restaked Swell ETH::RSWETH",
50671
+ // Swell paused deposits AND withdrawals on 2026-10-23 after the rate
50672
+ // was inflated 5.1 % on 2026-10-22 (block 26244447). The pause is read
50673
+ // live, so the row recovers on its own when Swell unpauses.
50674
+ readerExtras: {
50675
+ swellAccessControlManager: "0x796592b2092f7e150c48643da19dd2f28be3333f"
50676
+ }
50677
+ },
50678
+ {
50679
+ // Swell swETH. Same incident and pause as rswETH above (2026-10-22 rate
50680
+ // inflation +6.2 %, everything paused 2026-10-23); risk-data scores it
50681
+ // 5. Served behind the same live pause read, so it shows paused and
50682
+ // recovers on its own. Exit: swEXIT NFT queue (`withdrawals/registry`).
50683
+ address: "0xf951e335afb289353dc249e82926178eac7ded78",
50684
+ underlying: "0x0000000000000000000000000000000000000000",
50685
+ symbol: "swETH",
50686
+ brand: "Swell",
50687
+ decimals: 18,
50688
+ reader: "swellGetRate",
50689
+ isErc4626: false,
50690
+ isRebasing: false,
50691
+ isMintable: true,
50692
+ isNativeUnderlying: true,
50693
+ mintContract: "0xf951e335afb289353dc249e82926178eac7ded78",
50694
+ mintInputAsset: "native",
50695
+ withdrawalMode: "queued",
50696
+ yieldFetcher: rswethFetcher,
50697
+ yieldKey: "Swell Ethereum::SWETH",
50698
+ readerExtras: {
50699
+ swellAccessControlManager: "0x625087d72c762254a72cb22cc2eca40da6b95eac"
50700
+ }
50701
+ },
50702
+ {
50703
+ // Bedrock uniETH (RockX lineage) — `Staking` 0x4bef…9e9d mints
50704
+ // payable `mint(minToMint, deadline)` to msg.sender at `exchangeRatio()`
50705
+ // (1.144582 ETH on 2026-10-27; 8,975 uniETH ≈ 10,273 ETH). Exits: an
50706
+ // `instantSwap` out of unstaked deposits (0.014 ETH buffer — effectively
50707
+ // closed) or `redeemFromValidators` in WHOLE 32-ETH lots → Redeem
50708
+ // contract → `claim(to, amount)`; see `readers/bedrock.ts`. 10 %
50709
+ // manager fee on rewards (`managerFeeShare` = 100‰), netted in the
50710
+ // ratio. Rate = the on-chain ratio delta (`BEDROCK_UNIETH_SPECS`).
50711
+ address: "0xf1376bcef0f78459c0ed0ba5ddce976f1ddf51f4",
50712
+ underlying: "0x0000000000000000000000000000000000000000",
50713
+ symbol: "uniETH",
50714
+ brand: "Bedrock",
50715
+ decimals: 18,
50716
+ reader: "bedrockUniEth",
50717
+ isErc4626: false,
50718
+ isRebasing: false,
50719
+ isMintable: true,
50720
+ isNativeUnderlying: true,
50721
+ mintContract: "0x4befa2aa9c305238aa3e0b5d17eb20c045269e9d",
50722
+ mintInputAsset: "native",
50723
+ withdrawalMode: "instant-or-queued",
50724
+ yieldFetcher: bedrockUniEthFetcher,
50725
+ yieldKey: "Universal ETH::uniETH"
50482
50726
  },
50483
50727
  {
50484
50728
  // Puffer pufETH. The underlying is **WETH**, not wstETH: `asset()`
@@ -50651,6 +50895,29 @@ var LST_REGISTRY = {
50651
50895
  yieldFetcher: cbethFetcher,
50652
50896
  yieldKey: "CBETH"
50653
50897
  },
50898
+ {
50899
+ // Liquid Collective LsETH (River). Institutional: BOTH `deposit()` and
50900
+ // `requestRedeem()` revert `Unauthorized(address)` for an address the
50901
+ // Allowlist (0xebc83bb472b2816ec5b5de8d34f0efc9088bb2ce) has not
50902
+ // permissioned — verified 2026-10-27 from an arbitrary EOA. A data row:
50903
+ // it gives the rate and price to LsETH collateral we already serve
50904
+ // (Frankencoin, Morpho), and advertises no mint and no exit route.
50905
+ address: "0x8c1bed5b9a0928467c9b1341da1d7bd5e10b6549",
50906
+ underlying: "0x0000000000000000000000000000000000000000",
50907
+ symbol: "LsETH",
50908
+ brand: "Liquid Collective",
50909
+ decimals: 18,
50910
+ reader: "riverLsEth",
50911
+ isErc4626: false,
50912
+ isRebasing: false,
50913
+ isMintable: false,
50914
+ isNativeUnderlying: true,
50915
+ // Redemption exists on-chain but only for allowlisted holders — the
50916
+ // cbETH shape: through the institution, not a permissionless queue.
50917
+ withdrawalMode: "off-chain",
50918
+ yieldFetcher: lsethFetcher,
50919
+ yieldKey: "LSETH"
50920
+ },
50654
50921
  {
50655
50922
  // Binance wBETH — the *other* exchange LST, and unlike cbETH above
50656
50923
  // it is genuinely permissionless on-chain in both directions:
@@ -52818,6 +53085,45 @@ var yzPrimeFetcher = {
52818
53085
  return { [YZPRIME]: apr };
52819
53086
  }
52820
53087
  };
53088
+ var YZSYRUP_KEY = "Yuzu Syrup::yzSyrup";
53089
+ var YZSYRUP_ETH = "0xc9854f2af89d4d26837004d1e154bd3c3c1009b1";
53090
+ var yzSyrupOnChain = async () => {
53091
+ let lastErr;
53092
+ for (let rpcId = 0; rpcId < 3; rpcId++) {
53093
+ try {
53094
+ const ppm = await getEvmClient(
53095
+ Chain.ETHEREUM_MAINNET,
53096
+ rpcId
53097
+ ).readContract({
53098
+ address: YZSYRUP_ETH,
53099
+ abi: DAILY_RATE_ABI,
53100
+ functionName: "dailyLinearYieldRatePpm"
53101
+ });
53102
+ const apr = Number(ppm) * 365 / 1e4;
53103
+ if (!(apr >= 0 && apr < 100)) throw new Error(`yzSyrup: bad rate ${ppm}`);
53104
+ return apr;
53105
+ } catch (e) {
53106
+ lastErr = e;
53107
+ }
53108
+ }
53109
+ throw lastErr;
53110
+ };
53111
+ var yzSyrupFetcher = {
53112
+ label: "YZSYRUP",
53113
+ fetch: async () => {
53114
+ const apr = await yzSyrupOnChain().catch(
53115
+ () => computeShareRateApr({
53116
+ tag: "yzSyrup",
53117
+ chainId: "1",
53118
+ share: YZSYRUP_ETH,
53119
+ unit: 10n ** 18n,
53120
+ keys: [YZSYRUP_KEY],
53121
+ reads: [{ address: YZSYRUP_ETH, fn: "convertToAssets", arg: true }]
53122
+ })
53123
+ );
53124
+ return { [YZSYRUP_KEY]: apr };
53125
+ }
53126
+ };
52821
53127
  var CHAIN_ID12 = "1";
52822
53128
  var WSTGBP = "0x57c3571f10767e49c9d7b60feb6c67804783b7ae";
52823
53129
  var WREN_NAV_GROWTH_URL = "https://wstgbp.com/api/nav-growth";
@@ -55536,6 +55842,118 @@ var BITWAY_ENTRIES = {
55536
55842
  })
55537
55843
  )
55538
55844
  };
55845
+ var VAULT_ETH = "0x9ef52d8953d184840f2c69096b7b3a7da7093685";
55846
+ var WITHDRAW_VAULT_ETH = "0xc4a718735f0783e81fdcaa999773199c2d1498d4";
55847
+ var VAULT3 = "0xcc5df5c68d8c991035b6a437d4e00a99875228e4";
55848
+ var WITHDRAW_VAULT = "0xe2c7925b1173013a59b8573daa3eda6c613ded45";
55849
+ var ZKUSDT = "0xa6c17e2c8a3ad6307ae159d1cbc9e33b4d53958e";
55850
+ var ZKUSDC = "0xdfdaa3b21234ecece29d84a885d29180a47c3f2d";
55851
+ var ZEROBASE_LEGS = [
55852
+ [
55853
+ Chain.ETHEREUM_MAINNET,
55854
+ "zkUSDT",
55855
+ "Zerobase USDT",
55856
+ "0x7336c89ff7af86131d336d504e677db0eb338a16",
55857
+ "0xdac17f958d2ee523a2206206994597c13d831ec7",
55858
+ "USDT",
55859
+ 6,
55860
+ VAULT_ETH,
55861
+ WITHDRAW_VAULT_ETH
55862
+ ],
55863
+ [
55864
+ Chain.BNB_SMART_CHAIN_MAINNET,
55865
+ "zkUSDT",
55866
+ "Zerobase USDT",
55867
+ ZKUSDT,
55868
+ "0x55d398326f99059ff775485246999027b3197955",
55869
+ "USDT",
55870
+ 18,
55871
+ VAULT3,
55872
+ WITHDRAW_VAULT
55873
+ ],
55874
+ [
55875
+ Chain.BNB_SMART_CHAIN_MAINNET,
55876
+ "zkUSDC",
55877
+ "Zerobase USDC",
55878
+ ZKUSDC,
55879
+ "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
55880
+ "USDC",
55881
+ 18,
55882
+ VAULT3,
55883
+ WITHDRAW_VAULT
55884
+ ],
55885
+ [
55886
+ Chain.ARBITRUM_ONE,
55887
+ "zkUSDT",
55888
+ "Zerobase USDT",
55889
+ ZKUSDT,
55890
+ "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",
55891
+ "USDT",
55892
+ 6,
55893
+ VAULT3,
55894
+ WITHDRAW_VAULT
55895
+ ],
55896
+ [
55897
+ Chain.OP_MAINNET,
55898
+ "zkUSDT",
55899
+ "Zerobase USDT",
55900
+ ZKUSDT,
55901
+ "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",
55902
+ "USDT",
55903
+ 6,
55904
+ VAULT3,
55905
+ WITHDRAW_VAULT
55906
+ ],
55907
+ [
55908
+ Chain.BASE,
55909
+ "zkUSDC",
55910
+ "Zerobase USDC",
55911
+ ZKUSDC,
55912
+ "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
55913
+ "USDC",
55914
+ 6,
55915
+ VAULT3,
55916
+ WITHDRAW_VAULT
55917
+ ]
55918
+ ];
55919
+ var ZEROBASE_ENTRIES = (() => {
55920
+ const out = {};
55921
+ for (const [
55922
+ chainId,
55923
+ symbol,
55924
+ label,
55925
+ address,
55926
+ underlying,
55927
+ underlyingSymbol,
55928
+ decimals,
55929
+ vault,
55930
+ withdrawVault
55931
+ ] of ZEROBASE_LEGS) {
55932
+ (out[chainId] ??= []).push({
55933
+ reader: "zerobase-vault",
55934
+ address,
55935
+ underlying,
55936
+ symbol,
55937
+ label,
55938
+ brand: "Zerobase",
55939
+ description: `${symbol} is the receipt for ${underlyingSymbol} staked into Zerobase CeDeFi. The stablecoins sit in Ceffu custody and are traded off-chain; the yield is a fixed rate Zerobase's admin sets and can change at any time, simple interest on principal, with no on-chain solvency invariant. Exit: free 7-day queue (payout frozen at request) or an instant 0.5% penalty withdrawal capped by a small on-chain buffer. Every leg acts on the staking address only.`,
55940
+ decimals,
55941
+ underlyingDecimals: decimals,
55942
+ isRebasing: false,
55943
+ isMintable: true,
55944
+ mintContract: vault,
55945
+ accrual: "linear",
55946
+ withdrawalMode: "fee-or-queued",
55947
+ withdrawalCooldownSeconds: 604800,
55948
+ withdrawQueue: withdrawVault,
55949
+ // The instant leg pays from the vault's own balance and the rate
55950
+ // lives on the vault (two-arg convertToAssets) — both the vault.
55951
+ inventoryContract: vault,
55952
+ priceOracle: vault
55953
+ });
55954
+ }
55955
+ return out;
55956
+ })();
55539
55957
 
55540
55958
  // src/yields/intrinsic/fetchers/vesper.ts
55541
55959
  var vesperYieldKey = (chainId, poolAddress) => `VESPER::${chainId}::${poolAddress.toLowerCase()}`;
@@ -57411,225 +57829,6 @@ var ETH_STABLES_A_ENTRIES = {
57411
57829
  ]
57412
57830
  };
57413
57831
 
57414
- // src/yields/intrinsic/fetchers/vaultShareRates.ts
57415
- var E6 = 10n ** 6n;
57416
- var E182 = 10n ** 18n;
57417
- var erc4626 = (tag, chainId, share, unit, keys, opts = {}) => ({
57418
- tag,
57419
- chainId,
57420
- share,
57421
- unit,
57422
- keys,
57423
- reads: [{ address: share, fn: "convertToAssets", arg: true }],
57424
- ...opts
57425
- });
57426
- var VAULT_SHARE_RATE_SPECS = [
57427
- // Bedrock uniETH — LST; value is the staking contract's `exchangeRatio()`
57428
- // (ETH per uniETH, 1e18). 2.42 % (30d) / 2.47 % (90d); ~9.0k uniETH. The
57429
- // Arbitrum (0x3d15…) and Linea (0x15ee…) mirrors share the group.
57430
- {
57431
- tag: "uniETH",
57432
- chainId: "1",
57433
- share: "0xf1376bcef0f78459c0ed0ba5ddce976f1ddf51f4",
57434
- unit: E182,
57435
- keys: ["Universal ETH::uniETH"],
57436
- reads: [
57437
- {
57438
- address: "0x4beFa2aA9c305238AA3E0b5D17eB20C045269E9d",
57439
- fn: "exchangeRatio",
57440
- arg: false
57441
- }
57442
- ]
57443
- },
57444
- // Avalon sUSDa — the ERC-20 on every chain is a bare LayerZero OFT; the
57445
- // vault is Ethereum's `SavingAccount` (0x01e3…), whose
57446
- // `getAmountByShares(1e18)` is USDa per sUSDa. Posted `targetAPR` 4 %, the
57447
- // measured delta 4.02 %. Every chain's sUSDa row uses the bare group SUSDA.
57448
- {
57449
- tag: "sUSDa",
57450
- chainId: "1",
57451
- share: "0x2b66aade1e9c062ff411bd47c44e0ad696d43bd9",
57452
- unit: E182,
57453
- keys: ["SUSDA"],
57454
- reads: [
57455
- {
57456
- address: "0x01e3cc8E17755989ad2CAFE78A822354Eb5DdFA6",
57457
- fn: "getAmountByShares",
57458
- arg: true
57459
- }
57460
- ]
57461
- },
57462
- // NOT here: Main Street msY (0x890a…, 4626 over msUSD). Its share price
57463
- // still climbs 6.4 % a year in msUSD, but msUSD's reserve attestation was
57464
- // withdrawn in June 2026 and the token is reported ~90 % off peg — a rate
57465
- // on a claim nobody verifies would rank msY loops on paper yield. Left
57466
- // absent (the Resolv precedent publishes 0 for a compromised book).
57467
- // Pareto sUSP — ERC-4626 over Pareto's synthetic dollar USP (0x97cc…, NOT
57468
- // Piku's "USP Yield Optimized Stablecoin" 0x0986…), 6.35 %, ~765k USP.
57469
- erc4626("sUSP", "1", "0x271c616157e69a43b4977412a64183cf110edf16", E182, [
57470
- "Pareto Staked USP::SUSP"
57471
- ]),
57472
- // Origin wsuperOETHb (Base) — ERC-4626 over the rebasing superOETHb,
57473
- // 2.81 %, ~1,345 superOETHb.
57474
- erc4626(
57475
- "wsuperOETHb",
57476
- "8453",
57477
- "0x7fcd174e80f264448ebee8c88a7c4476aaf58ea6",
57478
- E182,
57479
- ["WSUPEROETHB"]
57480
- ),
57481
- // Origin/Lido ARM (stETH redemption arbitrage) — ERC-4626 over WETH,
57482
- // 2.45 %, ~1,880 WETH. An arb book can lose: negatives are published.
57483
- erc4626(
57484
- "ARM-WETH-stETH",
57485
- "1",
57486
- "0x85b78aca6deae198fbf201c82daf6ca21942acc6",
57487
- E182,
57488
- ["stETH ARM LP Token::ARM-WETH-STETH"],
57489
- { allowNegative: true }
57490
- ),
57491
- // Concentrator asdCRV — auto-compounding sdCRV (ERC-4626-shaped),
57492
- // 14.72 %, ~17.2M sdCRV. Yield is in sdCRV units.
57493
- erc4626("asdCRV", "1", "0x43e54c2e7b3e294de3a155785f52ab49d87b9922", E182, [
57494
- "Aladdin sdCRV::ASDCRV"
57495
- ]),
57496
- // Shadow x33 (Sonic) — ERC-4626 over xSHADOW, compounding rebases +
57497
- // voting rewards. 25.9 % (30d) / 27.5 % (90d), in xSHADOW units — a real
57498
- // rate on a volatile, exit-penalised base token.
57499
- // Aladdin asdPENDLE — auto-compounding sdPENDLE (ERC-4626-shaped), in
57500
- // sdPENDLE units; listed 2026-10-16.
57501
- erc4626("asdPENDLE", "1", "0x606462126e4bd5c4d153fe09967e4c46c9c7fecf", E182, [
57502
- "Aladdin sdPENDLE::asdPENDLE"
57503
- ]),
57504
- // IPOR Fusion stETH looping vault — 20-decimal shares (offset 2 over stETH).
57505
- erc4626(
57506
- "fusnstETH",
57507
- "1",
57508
- "0xb8a451107a9f87fde481d4d686247d6e43ed715e",
57509
- 10n ** 20n,
57510
- ["Fusion stETH looping Ethereum::fusnstETH"]
57511
- ),
57512
- erc4626("x33", "146", "0x3333111a391cc08fa51353e9195526a70b333333", E182, [
57513
- "Shadow Liquid Staking Token::X33"
57514
- ]),
57515
- // Makina "Dialectic" machines — the share token has no rate; the Machine
57516
- // (its owner) prices it: `convertToAssets(1e18)` in the accounting token.
57517
- // DUSD 7.05 % (USDC, ~$1.9M AUM), DETH 4.13 % (WETH, ~2,506 ETH), DBIT
57518
- // 1.12 % (WBTC, ~8.5 BTC). Strategy books — negatives published.
57519
- {
57520
- tag: "DUSD",
57521
- chainId: "1",
57522
- share: "0x1e33e98af620f1d563fcd3cfd3c75ace841204ef",
57523
- unit: E182,
57524
- keys: ["Dialectic USD::DUSD"],
57525
- reads: [
57526
- {
57527
- address: "0x6b006870c83b1cd49e766ac9209f8d68763df721",
57528
- fn: "convertToAssets",
57529
- arg: true
57530
- }
57531
- ],
57532
- allowNegative: true
57533
- },
57534
- {
57535
- tag: "DETH",
57536
- chainId: "1",
57537
- share: "0x871ab8e36cae9af35c6a3488b049965233deb7ed",
57538
- unit: E182,
57539
- keys: ["Dialectic ETH::DETH"],
57540
- reads: [
57541
- {
57542
- address: "0x0447d0ad7fd6a3409b48ecbb9ddb075c1e11d735",
57543
- fn: "convertToAssets",
57544
- arg: true
57545
- }
57546
- ],
57547
- allowNegative: true
57548
- },
57549
- {
57550
- tag: "DBIT",
57551
- chainId: "1",
57552
- share: "0x972966bcc17f7d818de4f27dc146ef539c231bdf",
57553
- unit: E182,
57554
- keys: ["Dialectic BTC::DBIT"],
57555
- reads: [
57556
- {
57557
- address: "0xfcbe132452b6caa32addd4768db8fa02af73d841",
57558
- fn: "convertToAssets",
57559
- arg: true
57560
- }
57561
- ],
57562
- allowNegative: true
57563
- },
57564
- // Ember eEARN moved to `ember.ts` (2026-10-22): it now carries a savings
57565
- // row, which vault-wires its own fetcher, and its rate is a step function
57566
- // measured mark to mark.
57567
- // Veda PlasmaUSD (Plasma) — BoringVault; the rate is its accountant's
57568
- // `getRate()` (USDT0 per share, 6 dec). 4.07 %, ~$30.6M.
57569
- {
57570
- tag: "PlasmaUSD",
57571
- chainId: "9745",
57572
- share: "0xd1074e0ae85610ddba0147e29ebe0d8e5873a000",
57573
- unit: E6,
57574
- keys: ["Plasma USD Vault::PlasmaUSD"],
57575
- reads: [
57576
- {
57577
- address: "0x737f2522d09e58a3ea9dccfdb127dd0df5eb3f18",
57578
- fn: "getRate",
57579
- arg: false
57580
- }
57581
- ]
57582
- },
57583
- // Gains gUSDC (Arbitrum) — the share price carries trader PnL against the
57584
- // vault, so it is a MARK, not an accrual: +5.4 % (7d), −9.5 % (30d),
57585
- // +4.3 % (90d) at measurement. A 90-day realized window, negatives
57586
- // published (never clamped).
57587
- erc4626(
57588
- "gUSDC",
57589
- "42161",
57590
- "0xd3443ee1e91af28e5fb858fbd0d72a63ba8046e0",
57591
- E6,
57592
- ["Gains Network USDC::gUSDC"],
57593
- { allowNegative: true, windowDays: 90 }
57594
- ),
57595
- // Harmonix hakHYPE (HyperEVM) — ERC-4626 over kHYPE; composed through
57596
- // Kinetiq's StakingAccountant `kHYPEToHYPE` so the APR is in HYPE and
57597
- // includes kHYPE's own staking yield (the vault leg alone is ~0.19 %).
57598
- {
57599
- tag: "hakHYPE",
57600
- chainId: "999",
57601
- share: "0x1368ee9d1212ae5b26ff166049220051a9eebc42",
57602
- unit: E182,
57603
- keys: ["Harmonix kHYPE::HAKHYPE"],
57604
- reads: [
57605
- {
57606
- address: "0x1368ee9d1212ae5b26ff166049220051a9eebc42",
57607
- fn: "convertToAssets",
57608
- arg: true
57609
- },
57610
- {
57611
- address: "0x9209648Ec9D448EF57116B73A2f081835643dc7A",
57612
- fn: "kHYPEToHYPE",
57613
- arg: true
57614
- }
57615
- ]
57616
- }
57617
- ];
57618
- var vaultShareRatesFetcher = createShareRateFetcher(
57619
- "VAULT_SHARE_RATES",
57620
- VAULT_SHARE_RATE_SPECS
57621
- );
57622
- var SYUSD_KEY = "Staked YUSD::sYUSD";
57623
- var EXPIRED_W_SAVINGS_SPECS = [
57624
- erc4626("sYUSD", "1", "0xfe0ccc9942e98c963fe6b4e5194eb6e3baa4cb64", E182, [
57625
- SYUSD_KEY
57626
- ])
57627
- ];
57628
- var expiredWSavingsFetcher = createShareRateFetcher(
57629
- "EXPIRED_W_SAVINGS",
57630
- EXPIRED_W_SAVINGS_SPECS
57631
- );
57632
-
57633
57832
  // src/vaults/savings/registryExpiredW.ts
57634
57833
  var EXPIRED_W_ENTRIES = {
57635
57834
  "1": [
@@ -58938,6 +59137,1145 @@ var MIDAS_ENTRIES = {
58938
59137
  ]
58939
59138
  };
58940
59139
 
59140
+ // src/yields/intrinsic/fetchers/llamaGap.ts
59141
+ var E62 = 10n ** 6n;
59142
+ var E184 = 10n ** 18n;
59143
+ var LLAMA_GAP_KEYS = {
59144
+ liquidETH: "Ether.Fi Liquid ETH::LIQUIDETH",
59145
+ liquidUSD: "Ether.Fi Liquid USD::LIQUIDUSD",
59146
+ // Provisional, the liquidETH form (`name()` "Ether.Fi Liquid BTC") — not
59147
+ // in token-lists yet.
59148
+ liquidBTC: "Ether.Fi Liquid BTC::LIQUIDBTC",
59149
+ PlasmaUSD: "Plasma USD Vault::PlasmaUSD",
59150
+ iETHv2: "Instadapp ETH v2::IETHV2",
59151
+ fLiteUSD: "Fluid Lite USD Vault::fLiteUSD",
59152
+ wOETH: "Wrapped OETH::WOETH",
59153
+ wsuperOETHb: "WSUPEROETHB",
59154
+ autoETH: "Tokemak autoETH::autoETH",
59155
+ autoUSD: "Tokemak autoUSD::autoUSD",
59156
+ baseUSD: "Tokemak baseUSD::baseUSD",
59157
+ xHYPE: "xHYPE::XHYPE",
59158
+ xBTC: "xBTC::XBTC",
59159
+ xLEND: "xLEND::XLEND",
59160
+ JUSD: "JUSD Credit Vault::JUSD"
59161
+ };
59162
+ var erc46262 = (tag, chainId, share, unit, keys, opts = {}) => ({
59163
+ tag,
59164
+ chainId,
59165
+ share,
59166
+ unit,
59167
+ keys,
59168
+ reads: [{ address: share, fn: "convertToAssets", arg: true }],
59169
+ ...opts
59170
+ });
59171
+ var vedaAccountant = (tag, chainId, share, unit, accountant, keys) => ({
59172
+ tag,
59173
+ chainId,
59174
+ share,
59175
+ unit,
59176
+ keys,
59177
+ reads: [{ address: accountant, fn: "getRate", arg: false }]
59178
+ });
59179
+ var LLAMA_GAP_SAVINGS_SPECS = [
59180
+ // ether.fi Liquid ETH — accountant base WETH (18 dec).
59181
+ vedaAccountant(
59182
+ "liquidETH",
59183
+ "1",
59184
+ "0xf0bb20865277abd641a307ece5ee04e79073416c",
59185
+ E184,
59186
+ "0x0d05d94a5f1e76c18fbeb7a13d17c8a314088198",
59187
+ [LLAMA_GAP_KEYS.liquidETH]
59188
+ ),
59189
+ // ether.fi Liquid USD — accountant base USDC (6 dec, 6-dec shares).
59190
+ vedaAccountant(
59191
+ "liquidUSD",
59192
+ "1",
59193
+ "0x08c6f91e2b681faf5e17227f2a44c307b3c1364c",
59194
+ E62,
59195
+ "0xc315d6e14ddcdc7407784e2caf815d131bc1d3e7",
59196
+ [LLAMA_GAP_KEYS.liquidUSD]
59197
+ ),
59198
+ // ether.fi Liquid BTC — accountant base WBTC (8 dec, 8-dec shares). A MARK
59199
+ // that has fallen (−8.9 bps, 2025-03 → 04), so a negative window is
59200
+ // published, not dropped. The Optimism rows share this rate (one
59201
+ // accountant value on both chains) and this key.
59202
+ {
59203
+ ...vedaAccountant(
59204
+ "liquidBTC",
59205
+ "1",
59206
+ "0x5f46d540b6ed704c3c8789105f30e075aa900726",
59207
+ 10n ** 8n,
59208
+ "0xea23ac6d7d11f6b181d6b98174d334478adae6b0",
59209
+ [LLAMA_GAP_KEYS.liquidBTC]
59210
+ ),
59211
+ allowNegative: true
59212
+ },
59213
+ // Veda PlasmaUSD (Plasma) — accountant base USDT0 (6 dec). Moved from the
59214
+ // lending-only `vaultShareRates.ts` when its row was added.
59215
+ vedaAccountant(
59216
+ "PlasmaUSD",
59217
+ "9745",
59218
+ "0xd1074e0ae85610ddba0147e29ebe0d8e5873a000",
59219
+ E62,
59220
+ "0x737f2522d09e58a3ea9dccfdb127dd0df5eb3f18",
59221
+ [LLAMA_GAP_KEYS.PlasmaUSD]
59222
+ ),
59223
+ // Fluid Lite iETHv2 — 4626 over stETH (18 dec).
59224
+ erc46262("iETHv2", "1", "0xa0d3707c569ff8c87fa923d3823ec5d81c98be78", E184, [
59225
+ LLAMA_GAP_KEYS.iETHv2
59226
+ ]),
59227
+ // Fluid Lite USD — 18-dec shares over 6-dec USDC.
59228
+ erc46262("fLiteUSD", "1", "0x273da948aca9261043fbdb2a857bc255ecc29012", E184, [
59229
+ LLAMA_GAP_KEYS.fLiteUSD
59230
+ ]),
59231
+ // Origin wOETH — 4626 over rebasing OETH.
59232
+ erc46262("wOETH", "1", "0xdcee70654261af21c44c093c300ed3bb97b78192", E184, [
59233
+ LLAMA_GAP_KEYS.wOETH
59234
+ ]),
59235
+ // Origin wsuperOETHb (Base) — 4626 over rebasing superOETHb. Moved from
59236
+ // `vaultShareRates.ts` when its row was added.
59237
+ erc46262(
59238
+ "wsuperOETHb",
59239
+ "8453",
59240
+ "0x7fcd174e80f264448ebee8c88a7c4476aaf58ea6",
59241
+ E184,
59242
+ [LLAMA_GAP_KEYS.wsuperOETHb]
59243
+ )
59244
+ ];
59245
+ var LLAMA_FALLBACK = {
59246
+ liquidETH: "b86d4934-2e75-415a-bdd2-e28143d72491",
59247
+ liquidUSD: "7c12f175-37bc-41db-967a-1d7f1f4a23c4",
59248
+ liquidBTC: "2f063aed-0a5a-4ba5-8b63-8404b2a99fca",
59249
+ PlasmaUSD: "95d4f805-1800-4184-98a0-6e49b3ccad8a",
59250
+ // Instadapp's pool APY is GROSS of the 20 % revenue fee — a ceiling.
59251
+ iETHv2: "e72916f7-a2d1-47ad-a4b9-2b054337cfd6",
59252
+ fLiteUSD: "488f06db-5a36-450e-9ba9-b4321be39c7c",
59253
+ // `origin-ether` OETH (Ethereum) / superOETHb (Base) — the rebase rate the
59254
+ // wrapper captures.
59255
+ wOETH: "423681e3-4787-40ce-ae43-e9f67c5269b3",
59256
+ wsuperOETHb: "f388573e-5c0f-4dac-9f70-116a4aabaf17"
59257
+ };
59258
+ var realizedOrLlama = async (spec, pool) => {
59259
+ try {
59260
+ return await computeShareRateApr(spec);
59261
+ } catch (e) {
59262
+ if (!pool) {
59263
+ console.warn(`[LLAMA_GAP] ${String(e)}`);
59264
+ return void 0;
59265
+ }
59266
+ try {
59267
+ return apyToAprPercent(await fetchDefiLlamaApy(pool));
59268
+ } catch (e2) {
59269
+ console.warn(`[LLAMA_GAP] ${spec.tag}: ${String(e)}; llama ${String(e2)}`);
59270
+ return void 0;
59271
+ }
59272
+ }
59273
+ };
59274
+ var llamaGapShareRateFetcher = {
59275
+ label: "LLAMA_GAP_SAVINGS",
59276
+ fetch: async () => {
59277
+ const rates = await Promise.all(
59278
+ LLAMA_GAP_SAVINGS_SPECS.map(
59279
+ (s) => realizedOrLlama(s, LLAMA_FALLBACK[s.tag])
59280
+ )
59281
+ );
59282
+ const out = {};
59283
+ rates.forEach((r, i) => {
59284
+ if (r === void 0) return;
59285
+ for (const k of LLAMA_GAP_SAVINGS_SPECS[i].keys) out[k] = r;
59286
+ });
59287
+ return out;
59288
+ }
59289
+ };
59290
+ var TOKEMAK_API = (chainId) => `https://autopools-api.tokemaklabs.com/api/${chainId}/gen3`;
59291
+ var TOKEMAK_SPECS = [
59292
+ erc46262(
59293
+ "autoETH",
59294
+ "1",
59295
+ "0x0a2b94f6871c1d7a32fe58e1ab5e6dea2f114e56",
59296
+ E184,
59297
+ [LLAMA_GAP_KEYS.autoETH],
59298
+ { allowNegative: true }
59299
+ ),
59300
+ erc46262("autoUSD", "1", "0xa7569a44f348d3d70d8ad5889e50f78e33d80d35", E184, [
59301
+ LLAMA_GAP_KEYS.autoUSD
59302
+ ]),
59303
+ erc46262(
59304
+ "baseUSD",
59305
+ "8453",
59306
+ "0x9c6864105aec23388c89600046213a44c384c831",
59307
+ E184,
59308
+ [LLAMA_GAP_KEYS.baseUSD]
59309
+ )
59310
+ ];
59311
+ var tokemakBaseApy = (body, pool) => {
59312
+ const pools = body?.autopools;
59313
+ if (!Array.isArray(pools)) return void 0;
59314
+ const row = pools.find((p) => p?.id?.toLowerCase() === pool.toLowerCase());
59315
+ const apy = Number(row?.baseApy);
59316
+ return Number.isFinite(apy) ? apy : void 0;
59317
+ };
59318
+ var tokemakAutopoolsFetcher = {
59319
+ label: "TOKEMAK_AUTOPOOLS",
59320
+ fetch: async () => {
59321
+ const chains = [...new Set(TOKEMAK_SPECS.map((s) => s.chainId))];
59322
+ const bodies = /* @__PURE__ */ new Map();
59323
+ await Promise.all(
59324
+ chains.map(async (c) => {
59325
+ try {
59326
+ const r = await fetch(TOKEMAK_API(c), {
59327
+ headers: { Accept: "application/json" },
59328
+ signal: AbortSignal.timeout(1e4)
59329
+ });
59330
+ if (r.ok) bodies.set(c, await r.json());
59331
+ } catch {
59332
+ }
59333
+ })
59334
+ );
59335
+ const out = {};
59336
+ await Promise.all(
59337
+ TOKEMAK_SPECS.map(async (s) => {
59338
+ const apy = tokemakBaseApy(bodies.get(s.chainId), s.share);
59339
+ let apr = apy !== void 0 && apy !== 0 ? apyToAprPercent(apy) : void 0;
59340
+ if (apr === void 0)
59341
+ apr = await computeShareRateApr(s).catch((e) => {
59342
+ console.warn(`[TOKEMAK_AUTOPOOLS] ${String(e)}`);
59343
+ return void 0;
59344
+ });
59345
+ if (apr !== void 0) for (const k of s.keys) out[k] = apr;
59346
+ })
59347
+ );
59348
+ return out;
59349
+ }
59350
+ };
59351
+ var LIMINAL_VAULT_APY_URL = (symbol) => `https://api.liminal.money/sdk/tokenized/${symbol}/apy?range=30d`;
59352
+ var LIMINAL_VAULTS = [
59353
+ {
59354
+ symbol: "xHYPE",
59355
+ key: LLAMA_GAP_KEYS.xHYPE,
59356
+ llama: "84e38fd1-024f-4107-a1fc-0ae8bfc1b195"
59357
+ },
59358
+ {
59359
+ symbol: "xBTC",
59360
+ key: LLAMA_GAP_KEYS.xBTC,
59361
+ llama: "20014711-5ee5-58ea-ade1-9d47310bc356"
59362
+ },
59363
+ {
59364
+ symbol: "xLEND",
59365
+ key: LLAMA_GAP_KEYS.xLEND,
59366
+ llama: "a546653f-1bd8-57e1-ba26-2c0b975f7dd0"
59367
+ }
59368
+ ];
59369
+ var liminalTrailing30d = (rows) => {
59370
+ if (!Array.isArray(rows) || rows.length === 0)
59371
+ throw new Error("Liminal: empty APY series");
59372
+ const v = Number(
59373
+ rows[rows.length - 1]?.trailing30d
59374
+ );
59375
+ if (!Number.isFinite(v)) throw new Error("Liminal trailing30d: not a number");
59376
+ return v;
59377
+ };
59378
+ var liminalVaultsFetcher = {
59379
+ label: "LIMINAL_VAULTS",
59380
+ fetch: async () => {
59381
+ const out = {};
59382
+ await Promise.all(
59383
+ LIMINAL_VAULTS.map(async (v) => {
59384
+ const apy = await fetch(LIMINAL_VAULT_APY_URL(v.symbol), {
59385
+ headers: { Accept: "application/json" },
59386
+ signal: AbortSignal.timeout(1e4)
59387
+ }).then((r) => r.json()).then(liminalTrailing30d).catch(() => fetchDefiLlamaApy(v.llama)).catch(() => void 0);
59388
+ if (apy !== void 0) out[v.key] = apyToAprPercent(apy);
59389
+ })
59390
+ );
59391
+ return out;
59392
+ }
59393
+ };
59394
+ var ACCOUNTABLE_LOAN_URL = "https://yield.accountable.capital/api/loan";
59395
+ var JUSD_CREDIT_LOAN = "0x4c376df2f5182f5373502ccab12700c479d8a128";
59396
+ var jusdLoanApy = (body) => {
59397
+ const items = body?.items;
59398
+ if (!Array.isArray(items)) return void 0;
59399
+ const row = items.find(
59400
+ (l) => l?.loan_address?.toLowerCase() === JUSD_CREDIT_LOAN
59401
+ );
59402
+ const raw = row?.apy_30d ?? row?.apy_7d ?? row?.net_apy;
59403
+ const n = Number(raw);
59404
+ return raw === null || raw === void 0 || !Number.isFinite(n) ? void 0 : n;
59405
+ };
59406
+ var jusdCreditFetcher = {
59407
+ label: "JUSD_CREDIT",
59408
+ fetch: async () => {
59409
+ const body = await fetch(ACCOUNTABLE_LOAN_URL, {
59410
+ headers: { Accept: "application/json" },
59411
+ signal: AbortSignal.timeout(1e4)
59412
+ }).then((r) => r.json());
59413
+ const apy = jusdLoanApy(body);
59414
+ if (apy === void 0) throw new Error("JUSD Credit Vault loan not listed");
59415
+ return { [LLAMA_GAP_KEYS.JUSD]: apyToAprPercent(apy) };
59416
+ }
59417
+ };
59418
+
59419
+ // src/vaults/savings/registryLlamaGap.ts
59420
+ var LIQUID_BTC_DESCRIPTION = "ether.fi's Liquid BTC vault, a Veda BoringVault on Ethereum and Optimism: WBTC, cbBTC or eBTC deposited here is run by ether.fi across BTC lending and restaking positions, and the share's WBTC value is set by the vault's accountant, one rate on both chains. That value is an operator mark, not a computed balance, and it has fallen: about 0.09 % between March and April 2025, after which it went sideways for five months. Exit is a request to Veda's on-chain queue, paid in eBTC (ether.fi's restaked BTC, not WBTC) by ether.fi's solver \u2014 typically within a day, and ether.fi allows itself up to three.";
59421
+ var LIQUID_ETH_OP_DESCRIPTION = "ether.fi's Liquid ETH vault on Optimism \u2014 the same vault and share as on Ethereum, with one accountant rate on both chains: WETH or weETH deposited here joins ether.fi's lending, LRT and basis strategies, most of which run on Ethereum, and the share's ETH value is set by the accountant after a 0.5 % platform fee. That value is an operator mark, not a computed balance. Exit is a request to the vault's queue on Optimism, paid in weETH (not WETH) by ether.fi's solver \u2014 typically within a day, and ether.fi allows itself up to three.";
59422
+ var LIQUID_USD_OP_DESCRIPTION = "ether.fi's Liquid USD vault on Optimism \u2014 the same vault and share as on Ethereum, with one accountant rate on both chains: USDC, USD\u20AE0 or USDT deposited here joins ether.fi's lending, Curve and basis positions, most of which run on Ethereum, and the share's dollar value is set by the accountant. That value is an operator mark, not a computed balance. Exit is a request to the vault's queue on Optimism, paid in USDC, USD\u20AE0 or USDT by ether.fi's solver \u2014 typically within a day, and ether.fi allows itself up to three.";
59423
+ var LLAMA_GAP_ENTRIES = {
59424
+ "1": [
59425
+ // ---- ether.fi Liquid (Veda BoringVaults) ------------------------------
59426
+ {
59427
+ reader: "veda-boring",
59428
+ address: "0xf0bb20865277abd641a307ece5ee04e79073416c",
59429
+ underlying: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
59430
+ // WETH — the accountant's base
59431
+ symbol: "liquidETH",
59432
+ brand: "ether.fi",
59433
+ description: "ether.fi's Liquid ETH vault, a Veda BoringVault: ETH, WETH, stETH, eETH or weETH deposited here is run by ether.fi across lending, LRT and basis strategies, and the share's ETH value is set by the vault's accountant after a 0.5 % platform fee. That value is an operator mark, not a computed balance \u2014 it has not fallen over the past year, but nothing on-chain enforces it. Exit is a request to Veda's on-chain queue, paid in weETH (not WETH) by ether.fi's solver \u2014 typically within a day, and ether.fi allows itself up to three.",
59434
+ decimals: 18,
59435
+ isRebasing: false,
59436
+ isMintable: true,
59437
+ mintContract: "0x9aa79c84b79816ab920bbce20f8f74557b514734",
59438
+ // Teller
59439
+ withdrawalMode: "request-based",
59440
+ withdrawalCooldownSeconds: 3 * 86400,
59441
+ withdrawQueue: "0x0d2df071207e18ca8638b4f04e98c53155ec2ce0",
59442
+ // BoringOnChainQueue
59443
+ priceOracle: "0x0d05d94a5f1e76c18fbeb7a13d17c8a314088198",
59444
+ // Accountant
59445
+ solvency: "nav-attested",
59446
+ yieldFetcher: llamaGapShareRateFetcher,
59447
+ yieldKey: LLAMA_GAP_KEYS.liquidETH
59448
+ },
59449
+ {
59450
+ reader: "veda-boring",
59451
+ address: "0x08c6f91e2b681faf5e17227f2a44c307b3c1364c",
59452
+ underlying: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
59453
+ // USDC
59454
+ symbol: "liquidUSD",
59455
+ brand: "ether.fi",
59456
+ description: "ether.fi's Liquid USD vault, a Veda BoringVault: USDC or USDT deposited here is run by ether.fi across lending, Curve and basis positions on several chains, and the share's dollar value is set by the vault's accountant. That value is an operator mark, not a computed balance. Exit is a request to Veda's on-chain queue, paid in USDC or USDT by ether.fi's solver \u2014 typically within a day, and ether.fi allows itself up to three.",
59457
+ decimals: 6,
59458
+ underlyingDecimals: 6,
59459
+ isRebasing: false,
59460
+ isMintable: true,
59461
+ mintContract: "0x4de413a26fc24c3fc27cc983be70aa9c5c299387",
59462
+ // Teller (NOT vault.hook())
59463
+ withdrawalMode: "request-based",
59464
+ withdrawalCooldownSeconds: 3 * 86400,
59465
+ withdrawQueue: "0x38fc1ba73b7ed289955a07d9f11a85b6e388064a",
59466
+ // BoringOnChainQueue
59467
+ priceOracle: "0xc315d6e14ddcdc7407784e2caf815d131bc1d3e7",
59468
+ // Accountant
59469
+ solvency: "nav-attested",
59470
+ yieldFetcher: llamaGapShareRateFetcher,
59471
+ yieldKey: LLAMA_GAP_KEYS.liquidUSD
59472
+ },
59473
+ {
59474
+ // Queue found 2026-10-27 (see `VEDA_BORING_CONFIG`). The accountant
59475
+ // MARK fell 1.014252 → 1.013353 WBTC (−8.9 bps) between 2025-03-23 and
59476
+ // 2025-04-15 and went sideways until 2025-09, so the row is
59477
+ // `volatile` (`VOLATILE_VAULT_OVERRIDES`).
59478
+ reader: "veda-boring",
59479
+ address: "0x5f46d540b6ed704c3c8789105f30e075aa900726",
59480
+ underlying: "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
59481
+ // WBTC — the accountant's base
59482
+ symbol: "liquidBTC",
59483
+ brand: "ether.fi",
59484
+ description: LIQUID_BTC_DESCRIPTION,
59485
+ decimals: 8,
59486
+ underlyingDecimals: 8,
59487
+ isRebasing: false,
59488
+ isMintable: true,
59489
+ mintContract: "0x8ea0b382d054dbebeb1d0ae47ee4ac433c730353",
59490
+ // Teller (= vault.hook())
59491
+ withdrawalMode: "request-based",
59492
+ withdrawalCooldownSeconds: 3 * 86400,
59493
+ withdrawQueue: "0x77a2fd42f8769d8063f2e75061fc200014e41edf",
59494
+ // BoringOnChainQueue
59495
+ priceOracle: "0xea23ac6d7d11f6b181d6b98174d334478adae6b0",
59496
+ // Accountant
59497
+ solvency: "nav-attested",
59498
+ yieldFetcher: llamaGapShareRateFetcher,
59499
+ yieldKey: LLAMA_GAP_KEYS.liquidBTC
59500
+ },
59501
+ // ---- Fluid Lite (Instadapp) -------------------------------------------
59502
+ {
59503
+ // 70.5k stETH, 33 % of it idle in the vault; the rest is a leveraged
59504
+ // stETH position. `withdrawalFeePercentage()` = 500 / 1e6.
59505
+ reader: "erc4626-idle",
59506
+ address: "0xa0d3707c569ff8c87fa923d3823ec5d81c98be78",
59507
+ underlying: "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
59508
+ // stETH
59509
+ symbol: "iETHv2",
59510
+ brand: "Fluid",
59511
+ description: "Fluid Lite's ETH vault (Instadapp ETH v2): stETH deposited here is run as a leveraged stETH position by Instadapp, earning Lido's staking yield plus the spread over the ETH it borrows, after a 20 % fee on that yield. The rate shown is the realized growth of the share's stETH value, so it already includes Lido's staking. Withdrawals pay stETH instantly, less a 0.05 % fee, up to what the vault holds idle.",
59512
+ decimals: 18,
59513
+ isRebasing: false,
59514
+ isMintable: true,
59515
+ withdrawalMode: "instant-capped",
59516
+ withdrawFeeBps: 5,
59517
+ yieldFetcher: llamaGapShareRateFetcher,
59518
+ yieldKey: LLAMA_GAP_KEYS.iETHv2
59519
+ },
59520
+ {
59521
+ address: "0x273da948aca9261043fbdb2a857bc255ecc29012",
59522
+ underlying: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
59523
+ // USDC
59524
+ symbol: "fLiteUSD",
59525
+ brand: "Fluid",
59526
+ description: "Fluid Lite's USD vault: USDC deposited here is run by Instadapp in leveraged stablecoin positions, and the share price rises with what they earn after fees. The rate shown is realized over 30 days. Withdrawals are instant and pay USDC less a 0.05 % fee.",
59527
+ decimals: 18,
59528
+ underlyingDecimals: 6,
59529
+ isRebasing: false,
59530
+ isMintable: true,
59531
+ withdrawalMode: "instant",
59532
+ // `previewRedeem` nets 5 bps against `convertToAssets` (1.053693 vs
59533
+ // 1.054221 USDC per share, 2026-10-27).
59534
+ withdrawFeeBps: 5,
59535
+ yieldFetcher: llamaGapShareRateFetcher,
59536
+ yieldKey: LLAMA_GAP_KEYS.fLiteUSD
59537
+ },
59538
+ // ---- Origin wOETH -----------------------------------------------------
59539
+ // Plain 4626 (`WOETH`), governor = Origin's TimelockController
59540
+ // 0x35918cDE… (48 h) — the wOUSD row's twin. WETH exit through the OETH
59541
+ // vault queue (`origin` kind).
59542
+ {
59543
+ reader: "origin-wrapper",
59544
+ address: "0xdcee70654261af21c44c093c300ed3bb97b78192",
59545
+ underlying: "0x856c4efb76c1d1ae02e20ceb03a2a6a08b0b8dc3",
59546
+ // OETH
59547
+ symbol: "wOETH",
59548
+ brand: "Origin",
59549
+ description: "wOETH is the non-rebasing wrapper of OETH, Origin's ETH token backed by LSTs, staked ETH and AMO liquidity positions. OETH pays its yield as a balance rebase; wOETH captures it as a rising share price. Wrapping and unwrapping are instant and free, and the unwrap pays OETH. To leave in WETH, the queued exit unwraps and asks Origin's vault for WETH 1:1: it can be claimed about ten minutes later once the vault holds enough WETH, by the same account that requested it. The rate shown is realized over 30 days.",
59550
+ decimals: 18,
59551
+ isRebasing: false,
59552
+ isMintable: true,
59553
+ withdrawalMode: "instant-or-queued",
59554
+ withdrawalCooldownSeconds: 600,
59555
+ withdrawQueue: "0x39254033945aa2e4809cc2977e7087bee48bd7ab",
59556
+ origin: {
59557
+ vault: "0x39254033945aa2e4809cc2977e7087bee48bd7ab",
59558
+ asset: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
59559
+ // WETH
59560
+ oTokenSymbol: "OETH"
59561
+ },
59562
+ yieldFetcher: llamaGapShareRateFetcher,
59563
+ yieldKey: LLAMA_GAP_KEYS.wOETH
59564
+ },
59565
+ // ---- Tokemak autopools ------------------------------------------------
59566
+ {
59567
+ address: "0x0a2b94f6871c1d7a32fe58e1ab5e6dea2f114e56",
59568
+ underlying: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
59569
+ // WETH
59570
+ symbol: "autoETH",
59571
+ brand: "Tokemak",
59572
+ description: "Tokemak's autoETH autopool: WETH deposited here is rebalanced by Tokemak across LST and LRT liquidity pools and lending markets, and the share price moves with what those positions are worth in ETH. It is a mark, not a ratchet \u2014 the share price has dipped between samples \u2014 and the rate shown excludes the TOKE rewards paid only to shares staked in the autopool's rewarder. Withdrawals are instant but unwind positions in the same transaction, and the plain redeem carries no minimum-output guard, so a large exit can pay less than the quoted value.",
59573
+ decimals: 18,
59574
+ isRebasing: false,
59575
+ isMintable: true,
59576
+ withdrawalMode: "instant",
59577
+ yieldFetcher: tokemakAutopoolsFetcher,
59578
+ yieldKey: LLAMA_GAP_KEYS.autoETH
59579
+ },
59580
+ {
59581
+ address: "0xa7569a44f348d3d70d8ad5889e50f78e33d80d35",
59582
+ underlying: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
59583
+ // USDC
59584
+ symbol: "autoUSD",
59585
+ brand: "Tokemak",
59586
+ description: "Tokemak's autoUSD autopool: USDC deposited here is rebalanced by Tokemak across stablecoin lending markets and savings vaults, and the share price rises with what they earn. The rate shown excludes the TOKE rewards paid only to shares staked in the autopool's rewarder. Withdrawals are instant but unwind positions in the same transaction, and the plain redeem carries no minimum-output guard.",
59587
+ decimals: 18,
59588
+ underlyingDecimals: 6,
59589
+ isRebasing: false,
59590
+ isMintable: true,
59591
+ withdrawalMode: "instant",
59592
+ yieldFetcher: tokemakAutopoolsFetcher,
59593
+ yieldKey: LLAMA_GAP_KEYS.autoUSD
59594
+ },
59595
+ // ---- JUSD Credit Vault (Accountable) ----------------------------------
59596
+ {
59597
+ // `totalAssets()` is the IDLE balance (88.6k USDC); the NAV is supply ×
59598
+ // `convertToAssets` (13.05M × 1.0358). ERC-165 answers the 7540
59599
+ // operator interface, so the exit is the `erc7540-redeem` kind.
59600
+ reader: "accountable-vault",
59601
+ address: "0x2b5895b716311a1eac8f93fb88c56af9ec8c1a69",
59602
+ underlying: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
59603
+ // USDC
59604
+ symbol: "JUSD",
59605
+ brand: "JUSD Finance",
59606
+ description: "JUSD Finance's credit vault on Accountable: USDC deposited here is lent on an open-term credit line to JUSD Finance at a set rate, and the share price rises with the interest after Accountable's 3 % performance fee. This is a loan to one borrower, verified through Accountable's reporting rather than collateral on-chain. NOT any of the stablecoins that also trade as JUSD. A withdrawal is a redemption request, paid at once while the vault holds enough idle USDC and otherwise when the borrower repays into it.",
59607
+ decimals: 6,
59608
+ underlyingDecimals: 6,
59609
+ isRebasing: false,
59610
+ isMintable: true,
59611
+ withdrawalMode: "request-based",
59612
+ yieldFetcher: jusdCreditFetcher,
59613
+ yieldKey: LLAMA_GAP_KEYS.JUSD
59614
+ }
59615
+ ],
59616
+ "9745": [
59617
+ {
59618
+ reader: "veda-boring",
59619
+ address: "0xd1074e0ae85610ddba0147e29ebe0d8e5873a000",
59620
+ underlying: "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
59621
+ // USDT0
59622
+ symbol: "PlasmaUSD",
59623
+ brand: "Veda",
59624
+ description: "Veda's Plasma USD Vault, a BoringVault on Plasma: USD\u20AE0 deposited here is deployed by the vault's strategist across Plasma lending and liquidity venues, and the share's USD\u20AE0 value is set by the vault's accountant. That value is an operator mark, not a computed balance. Exit is a request to Veda's on-chain queue, paid in USD\u20AE0 by a solver after the queue's one-hour maturity.",
59625
+ decimals: 6,
59626
+ underlyingDecimals: 6,
59627
+ isRebasing: false,
59628
+ isMintable: true,
59629
+ mintContract: "0x4e7d2186eb8b75fbdca867761636637e05baef1e",
59630
+ // Teller
59631
+ withdrawalMode: "request-based",
59632
+ withdrawalCooldownSeconds: 3600,
59633
+ withdrawQueue: "0xffdcc73ac9f8f46a8fcb0b648afdf1cb03345e50",
59634
+ // BoringOnChainQueue
59635
+ priceOracle: "0x737f2522d09e58a3ea9dccfdb127dd0df5eb3f18",
59636
+ // Accountant
59637
+ solvency: "nav-attested",
59638
+ yieldFetcher: llamaGapShareRateFetcher,
59639
+ yieldKey: LLAMA_GAP_KEYS.PlasmaUSD
59640
+ }
59641
+ ],
59642
+ "8453": [
59643
+ // Origin wsuperOETHb — governor 0xf817cb30… (Origin's Base timelock).
59644
+ {
59645
+ reader: "origin-wrapper",
59646
+ address: "0x7fcd174e80f264448ebee8c88a7c4476aaf58ea6",
59647
+ underlying: "0xdbfefd2e8460a6ee4955a68582f85708baea60a3",
59648
+ // superOETHb
59649
+ symbol: "wsuperOETHb",
59650
+ brand: "Origin",
59651
+ description: "wsuperOETHb is the non-rebasing wrapper of Super OETH, Origin's ETH token on Base backed by bridged LSTs and Aerodrome AMO liquidity. Super OETH pays its yield as a balance rebase; the wrapper captures it as a rising share price. Wrapping and unwrapping are instant and free, and the unwrap pays superOETHb. To leave in WETH, the queued exit unwraps and asks Origin's vault for WETH 1:1: it can be claimed about ten minutes later once the vault holds enough WETH, by the same account that requested it. The rate shown is realized over 30 days.",
59652
+ decimals: 18,
59653
+ isRebasing: false,
59654
+ isMintable: true,
59655
+ withdrawalMode: "instant-or-queued",
59656
+ withdrawalCooldownSeconds: 600,
59657
+ withdrawQueue: "0x98a0cbef61bd2d21435f433be4cd42b56b38cc93",
59658
+ origin: {
59659
+ vault: "0x98a0cbef61bd2d21435f433be4cd42b56b38cc93",
59660
+ asset: "0x4200000000000000000000000000000000000006",
59661
+ // WETH
59662
+ oTokenSymbol: "superOETHb"
59663
+ },
59664
+ yieldFetcher: llamaGapShareRateFetcher,
59665
+ yieldKey: LLAMA_GAP_KEYS.wsuperOETHb
59666
+ },
59667
+ {
59668
+ address: "0x9c6864105aec23388c89600046213a44c384c831",
59669
+ underlying: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
59670
+ // USDC (Base)
59671
+ symbol: "baseUSD",
59672
+ brand: "Tokemak",
59673
+ description: "Tokemak's baseUSD autopool on Base: USDC deposited here is rebalanced by Tokemak across Base stablecoin lending markets and vaults, and the share price rises with what they earn. The rate shown excludes the TOKE rewards paid only to shares staked in the autopool's rewarder. Withdrawals are instant but unwind positions in the same transaction, and the plain redeem carries no minimum-output guard.",
59674
+ decimals: 18,
59675
+ underlyingDecimals: 6,
59676
+ isRebasing: false,
59677
+ isMintable: true,
59678
+ withdrawalMode: "instant",
59679
+ yieldFetcher: tokemakAutopoolsFetcher,
59680
+ yieldKey: LLAMA_GAP_KEYS.baseUSD
59681
+ }
59682
+ ],
59683
+ "10": [
59684
+ // ---- ether.fi Liquid on Optimism — the same vaults, spoke side --------
59685
+ // Same addresses as Ethereum (see the header). Teller `version()` =
59686
+ // "LayerZero Rate Limiting V0.1": its deposit takes a referral address.
59687
+ // Read 2026-10-27: `vault.hook()` = teller, `teller.accountant()`,
59688
+ // `queue.boringVault()` / `queue.accountant()`, deposit and request
59689
+ // capabilities public on each vault's RolesAuthority.
59690
+ liquidOp({
59691
+ address: "0xf0bb20865277abd641a307ece5ee04e79073416c",
59692
+ underlying: "0x4200000000000000000000000000000000000006",
59693
+ // WETH (OP) — accountant base
59694
+ symbol: "liquidETH",
59695
+ description: LIQUID_ETH_OP_DESCRIPTION,
59696
+ decimals: 18,
59697
+ underlyingDecimals: 18,
59698
+ teller: "0x9aa79c84b79816ab920bbce20f8f74557b514734",
59699
+ accountant: "0x0d05d94a5f1e76c18fbeb7a13d17c8a314088198",
59700
+ queue: "0x0d2df071207e18ca8638b4f04e98c53155ec2ce0",
59701
+ exitAsset: "0x5a7facb970d094b6c7ff1df0ea68d99e6e73cbff",
59702
+ // weETH (OP)
59703
+ yieldKey: LLAMA_GAP_KEYS.liquidETH
59704
+ }),
59705
+ liquidOp({
59706
+ address: "0x08c6f91e2b681faf5e17227f2a44c307b3c1364c",
59707
+ underlying: "0x0b2c639c533813f4aa9d7837caf62653d097ff85",
59708
+ // USDC (OP) — accountant base
59709
+ symbol: "liquidUSD",
59710
+ description: LIQUID_USD_OP_DESCRIPTION,
59711
+ decimals: 6,
59712
+ underlyingDecimals: 6,
59713
+ // On Optimism `vault.hook()` IS this teller (on Ethereum it is not).
59714
+ teller: "0x4de413a26fc24c3fc27cc983be70aa9c5c299387",
59715
+ accountant: "0xc315d6e14ddcdc7407784e2caf815d131bc1d3e7",
59716
+ queue: "0x38fc1ba73b7ed289955a07d9f11a85b6e388064a",
59717
+ // USDT0 / USDT are allowed too; USDC is the base.
59718
+ exitAsset: "0x0b2c639c533813f4aa9d7837caf62653d097ff85",
59719
+ yieldKey: LLAMA_GAP_KEYS.liquidUSD
59720
+ }),
59721
+ liquidOp({
59722
+ address: "0x5f46d540b6ed704c3c8789105f30e075aa900726",
59723
+ underlying: "0x68f180fcce6836688e9084f035309e29bf0a2095",
59724
+ // WBTC (OP) — accountant base
59725
+ symbol: "liquidBTC",
59726
+ description: LIQUID_BTC_DESCRIPTION,
59727
+ decimals: 8,
59728
+ underlyingDecimals: 8,
59729
+ teller: "0x8ea0b382d054dbebeb1d0ae47ee4ac433c730353",
59730
+ accountant: "0xea23ac6d7d11f6b181d6b98174d334478adae6b0",
59731
+ queue: "0x77a2fd42f8769d8063f2e75061fc200014e41edf",
59732
+ exitAsset: "0x657e8c867d8b37dcc18fa4caead9c45eb088c642",
59733
+ // eBTC (OP)
59734
+ yieldKey: LLAMA_GAP_KEYS.liquidBTC
59735
+ })
59736
+ ],
59737
+ "999": [
59738
+ liminalEntry(
59739
+ "0xac962fa04bf91b7fd0dc0c5c32414e0ce3c51e03",
59740
+ "xHYPE",
59741
+ "Liminal's xHYPE: despite the name it is a DOLLAR product \u2014 USDC is put into HYPE held spot against an equal short HYPE perpetual on Hyperliquid, so the book earns funding and basis while its HYPE exposure nets to zero, and the share price (NAV over supply) rises with that after Liminal's fees. The NAV is pushed on-chain by Liminal and the assets sit with its strategist, so solvency is attested, not computed. Exit is instant at 0.3 % up to the redemption buffer, or a free request Liminal pays out automatically within about three days.",
59742
+ "0xe7e0b7d87c4869549a4a47a8f216e362d0efc9f9",
59743
+ "0x19f4881cdb479d01ce214f6908c99b4fe76c03e8",
59744
+ "0x6a8c4a63b7bfa6ec58736e1667519bf56dcdafb2",
59745
+ "0xbf97a22b1229b3ffba65003c01df8ba9e7bff042",
59746
+ LLAMA_GAP_KEYS.xHYPE
59747
+ ),
59748
+ liminalEntry(
59749
+ "0x97df58ce4489896f4ec7d16b59b64ad0a56243a8",
59750
+ "xBTC",
59751
+ "Liminal's xBTC: despite the name it is a DOLLAR product \u2014 USDC is put into BTC held spot against an equal short BTC perpetual on Hyperliquid, so the book earns funding and basis while its BTC exposure nets to zero, and the share price (NAV over supply) rises with that after Liminal's fees. The NAV is pushed on-chain by Liminal and the assets sit with its strategist, so solvency is attested, not computed. Exit is instant at 0.3 % up to the redemption buffer, or a free request Liminal pays out automatically within about three days.",
59752
+ "0x629010d62e54cfa49d6ac35e4e3de2240d4ce4bf",
59753
+ "0xfdf08966a8957fafe1ab47488fc97d15217e50fe",
59754
+ "0xd265408ed06ee0aabc3598f1014684c77d7e4e8f",
59755
+ "0x2a6448fc3a0fade5811bb0087836a090eaa34715",
59756
+ LLAMA_GAP_KEYS.xBTC
59757
+ ),
59758
+ liminalEntry(
59759
+ "0x95f6d66c09a22e6f2bb693306b3ed69663066cbb",
59760
+ "xLEND",
59761
+ "Liminal's xLEND: USDC lent across Hyperliquid and HyperEVM money markets by Liminal, with the share price (NAV over supply) rising with the interest after Liminal's fees. The NAV is pushed on-chain by Liminal and the assets sit with its strategist, so solvency is attested, not computed. Exit is instant and free up to the redemption buffer, or a free request Liminal pays out automatically within about three days.",
59762
+ "0x309cf12b14decb39852eba8869dca5bdf9a5b754",
59763
+ "0xce12c415019657083a8b985e7cd5cd6fc486f978",
59764
+ "0x1c22de9fc99c13cd285920a2b9eef4be08e69578",
59765
+ "0xdbb4da0f1548f6237df6960532563804a901c2ae",
59766
+ LLAMA_GAP_KEYS.xLEND
59767
+ )
59768
+ ]
59769
+ };
59770
+ function liquidOp(p) {
59771
+ return {
59772
+ reader: "veda-boring",
59773
+ address: p.address,
59774
+ underlying: p.underlying,
59775
+ symbol: p.symbol,
59776
+ brand: "ether.fi",
59777
+ description: p.description,
59778
+ decimals: p.decimals,
59779
+ underlyingDecimals: p.underlyingDecimals,
59780
+ isRebasing: false,
59781
+ isMintable: true,
59782
+ mintContract: p.teller,
59783
+ withdrawalMode: "request-based",
59784
+ withdrawalCooldownSeconds: 3 * 86400,
59785
+ withdrawQueue: p.queue,
59786
+ priceOracle: p.accountant,
59787
+ solvency: "nav-attested",
59788
+ veda: {
59789
+ accountant: p.accountant,
59790
+ teller: p.teller,
59791
+ queue: p.queue,
59792
+ exitAsset: p.exitAsset,
59793
+ solveCadenceSeconds: 3 * 86400
59794
+ },
59795
+ yieldFetcher: llamaGapShareRateFetcher,
59796
+ yieldKey: p.yieldKey
59797
+ };
59798
+ }
59799
+ function liminalEntry(address, symbol, description, depositPipe, redemptionPipe, liquidityProvider, navOracle, yieldKey) {
59800
+ return {
59801
+ reader: "liminal-pipe",
59802
+ address,
59803
+ underlying: "0xb88339cb7199b77e23db6e890353e22632ba630f",
59804
+ // USDC (HyperEVM)
59805
+ symbol,
59806
+ brand: "Liminal",
59807
+ description,
59808
+ decimals: 18,
59809
+ underlyingDecimals: 6,
59810
+ isRebasing: false,
59811
+ isMintable: true,
59812
+ mintContract: depositPipe,
59813
+ withdrawalMode: "fee-or-queued",
59814
+ withdrawalCooldownSeconds: 3 * 86400,
59815
+ withdrawQueue: redemptionPipe,
59816
+ inventoryContract: liquidityProvider,
59817
+ priceOracle: navOracle,
59818
+ solvency: "nav-attested",
59819
+ yieldFetcher: liminalVaultsFetcher,
59820
+ yieldKey
59821
+ };
59822
+ }
59823
+
59824
+ // src/yields/intrinsic/fetchers/usdai.ts
59825
+ var SUSDAI_KEY = "sUSDai::SUSDAI";
59826
+ var USDAI_DEFILLAMA_POOL = "712ce948-bd9e-4f4a-8916-b72c447f7578";
59827
+ var SUSDAI_RATE_SPEC = {
59828
+ tag: "sUSDai",
59829
+ chainId: "42161",
59830
+ share: "0x0b2b2b2076d95dda7817e785989fe353fe955ef9",
59831
+ unit: 10n ** 18n,
59832
+ keys: [SUSDAI_KEY],
59833
+ reads: [
59834
+ {
59835
+ address: "0x0b2b2b2076d95dda7817e785989fe353fe955ef9",
59836
+ fn: "depositSharePrice",
59837
+ arg: false
59838
+ }
59839
+ ],
59840
+ windowDays: 30,
59841
+ allowNegative: true
59842
+ };
59843
+ var fromDefiLlama = async () => apyToAprPercent(await fetchDefiLlamaApy(USDAI_DEFILLAMA_POOL));
59844
+ var usdaiFetcher = {
59845
+ label: "USDai",
59846
+ fetch: async () => {
59847
+ const apr = await computeShareRateApr(SUSDAI_RATE_SPEC).catch((e) => {
59848
+ console.warn(
59849
+ `[USDai] realized rate unavailable, DefiLlama fallback: ${String(e)}`
59850
+ );
59851
+ return fromDefiLlama();
59852
+ });
59853
+ return { [SUSDAI_KEY]: apr };
59854
+ }
59855
+ };
59856
+
59857
+ // src/yields/intrinsic/fetchers/gapSweep.ts
59858
+ var E63 = 10n ** 6n;
59859
+ var E185 = 10n ** 18n;
59860
+ var makina = (tag, share, machine, key5) => ({
59861
+ tag,
59862
+ chainId: "1",
59863
+ share,
59864
+ unit: E185,
59865
+ keys: [key5],
59866
+ reads: [{ address: machine, fn: "convertToAssets", arg: true }],
59867
+ allowNegative: true
59868
+ });
59869
+ var concrete = (tag, vault, unit, key5, windowDays) => ({
59870
+ tag,
59871
+ chainId: "1",
59872
+ share: vault,
59873
+ unit,
59874
+ keys: [key5],
59875
+ reads: [{ address: vault, fn: "convertToAssets", arg: true }],
59876
+ windowDays,
59877
+ allowNegative: true
59878
+ });
59879
+ var MAKINA_KEYS = {
59880
+ usdSHFmk: "Steakhouse USD Machine::usdSHFmk",
59881
+ DCM: "Dialectic Carry Machine::DCM",
59882
+ DUSD: "Dialectic USD::DUSD",
59883
+ DETH: "Dialectic ETH::DETH"
59884
+ };
59885
+ var CONCRETE_KEYS = {
59886
+ ctDefiUSDT: "Concrete Decentralized Finance USDT::ctDefiUSDT",
59887
+ ctRWA_USD1: "Concrete RWA USD1::ctRWA_USD1",
59888
+ ctZigUSD1: "ZIG USD1::ctZigUSD1",
59889
+ ctColbUSD1: "Colb USD1::ctColbUSD1"
59890
+ };
59891
+ var MAKINA_RATE_SPECS = [
59892
+ makina(
59893
+ "usdSHFmk",
59894
+ "0xac499adf00a54044b988a59b19016655c3494b06",
59895
+ "0x733abb32544f4d3053a58ed747538c060f559108",
59896
+ MAKINA_KEYS.usdSHFmk
59897
+ ),
59898
+ makina(
59899
+ "DCM",
59900
+ "0xbef11279fa6db9fa284cbe7f0fa9799e06b2dcd7",
59901
+ "0xd2f644d0418126ffcc8f16840ed5d52aa62fd4eb",
59902
+ MAKINA_KEYS.DCM
59903
+ ),
59904
+ makina(
59905
+ "DUSD",
59906
+ "0x1e33e98af620f1d563fcd3cfd3c75ace841204ef",
59907
+ "0x6b006870c83b1cd49e766ac9209f8d68763df721",
59908
+ MAKINA_KEYS.DUSD
59909
+ ),
59910
+ makina(
59911
+ "DETH",
59912
+ "0x871ab8e36cae9af35c6a3488b049965233deb7ed",
59913
+ "0x0447d0ad7fd6a3409b48ecbb9ddb075c1e11d735",
59914
+ MAKINA_KEYS.DETH
59915
+ )
59916
+ ];
59917
+ var CONCRETE_RATE_SPECS = [
59918
+ concrete(
59919
+ "ctDefiUSDT",
59920
+ "0x0e609b710da5e0aa476224b6c0e5445ccc21251e",
59921
+ E63,
59922
+ CONCRETE_KEYS.ctDefiUSDT,
59923
+ 90
59924
+ ),
59925
+ concrete(
59926
+ "ctRWA_USD1",
59927
+ "0x86a95dc16d05c62a6c22fa1697ca933ecca380b7",
59928
+ E185,
59929
+ CONCRETE_KEYS.ctRWA_USD1,
59930
+ 30
59931
+ ),
59932
+ concrete(
59933
+ "ctZigUSD1",
59934
+ "0x843033cfd7bc2b7573c67070991e87f97822759f",
59935
+ E185,
59936
+ CONCRETE_KEYS.ctZigUSD1,
59937
+ 30
59938
+ ),
59939
+ concrete(
59940
+ "ctColbUSD1",
59941
+ "0x7e7573e8ce6eeb7af207a4569733c49f87dcd9b6",
59942
+ E185,
59943
+ CONCRETE_KEYS.ctColbUSD1,
59944
+ 30
59945
+ )
59946
+ ];
59947
+ var makinaFetcher = createShareRateFetcher("MAKINA", MAKINA_RATE_SPECS);
59948
+ var concreteFetcher = createShareRateFetcher(
59949
+ "CONCRETE",
59950
+ CONCRETE_RATE_SPECS
59951
+ );
59952
+
59953
+ // src/vaults/savings/registryGapSweep.ts
59954
+ var SUSDAI_ENTRY = {
59955
+ reader: "usdai-staked",
59956
+ address: USDAI_STAKED.vault,
59957
+ underlying: USDAI_STAKED.underlying,
59958
+ symbol: "sUSDai",
59959
+ brand: "USD.AI",
59960
+ description: "Staked USDai: USDai deposited here funds USD.AI's private loans to GPU and AI-infrastructure operators, with the interest accruing into the share price. A deposit mints at USD.AI's optimistic valuation and a redemption pays the conservative one, about 0.33 % lower (2026-10-27), so a quick round trip loses that gap. There is no instant exit: a redemption burns the shares and joins a queue USD.AI services at 30-day epochs, at the conservative price on the service day and limited by idle cash; it cannot be cancelled. USD.AI values the loan book itself.",
59961
+ decimals: 18,
59962
+ underlyingDecimals: 18,
59963
+ isRebasing: false,
59964
+ isMintable: true,
59965
+ withdrawalMode: "request-based",
59966
+ // Worst case: a request made just after an epoch boundary waits a full
59967
+ // 30-day window before it can be serviced (`REDEMPTION_WINDOW`).
59968
+ withdrawalCooldownSeconds: 2592e3,
59969
+ solvency: "nav-attested",
59970
+ yieldFetcher: usdaiFetcher,
59971
+ yieldKey: SUSDAI_KEY
59972
+ };
59973
+ var yuzuEntry = (v) => ({
59974
+ reader: "yuzu-ilp",
59975
+ address: v.vault,
59976
+ underlying: v.underlying,
59977
+ symbol: v.symbol,
59978
+ brand: "Yuzu",
59979
+ description: "Yuzu Syrup (yzSyrup): a Yuzu-managed USDC pool. Deposits are sent to Yuzu's treasury and the share price grows linearly at a daily rate the pool manager sets between pool reports, so the value of a share is what Yuzu reports, not something the contract can verify. Deposits are open up to a supply cap. The exit is a redeem order: the shares are escrowed, Yuzu fills the order within 24 hours, and the USDC is then released to the receiver; an order Yuzu has not filled by its due time can be cancelled for the shares back. The instant redeem draws on a liquidity buffer that is kept at zero.",
59980
+ decimals: v.decimals,
59981
+ underlyingDecimals: v.underlyingDecimals,
59982
+ isRebasing: false,
59983
+ isMintable: true,
59984
+ withdrawalMode: "request-based",
59985
+ // `fillWindow()` = 86,400 s — the order's due time.
59986
+ withdrawalCooldownSeconds: 86400,
59987
+ solvency: "nav-attested",
59988
+ yieldFetcher: yzSyrupFetcher,
59989
+ yieldKey: YZSYRUP_KEY
59990
+ });
59991
+ var MAKINA_COPY = {
59992
+ usdSHFmk: {
59993
+ name: "Steakhouse USD Machine",
59994
+ text: "Steakhouse Financial's USD strategy book run on Makina: USDC deposited here is deployed by Steakhouse across DeFi lending and yield positions, and the share price follows the assets under management its operators post. A redemption is queued and paid by Makina's operators at the lower of the share price when requested and when processed; it cannot be cancelled."
59995
+ },
59996
+ DCM: {
59997
+ name: "Dialectic Carry Machine",
59998
+ text: "Dialectic's carry strategy run on Makina: USDC deployed into yield-carry positions, the share price following the assets under management Dialectic's operators post. Deposits AND redemptions are restricted to Dialectic's allowlist, so this row is shown for holders; a redemption is queued and paid at the lower of the share price when requested and when processed."
59999
+ },
60000
+ DUSD: {
60001
+ name: "Dialectic USD",
60002
+ text: "Dialectic's USD strategy book run on Makina: USDC deployed across DeFi strategies, the share price following the assets under management Dialectic's operators post, so it can fall. A redemption is queued for at least 48 hours, then paid at the lower of the share price when requested and when processed; it cannot be cancelled.",
60003
+ delay: 172800
60004
+ },
60005
+ DETH: {
60006
+ name: "Dialectic ETH",
60007
+ text: "Dialectic's ETH strategy book run on Makina: WETH deployed across ETH yield strategies, the share price (in ETH) following the assets under management Dialectic's operators post, so it can fall. A redemption is queued for at least 48 hours, then paid in WETH at the lower of the share price when requested and when processed; it cannot be cancelled. Deposits are capped by the machine's share limit.",
60008
+ delay: 172800
60009
+ }
60010
+ };
60011
+ var makinaEntry = (m) => {
60012
+ const copy = MAKINA_COPY[m.symbol];
60013
+ return {
60014
+ reader: "makina-machine",
60015
+ address: m.shareToken,
60016
+ underlying: m.accountingToken,
60017
+ symbol: m.symbol,
60018
+ brand: "Makina",
60019
+ description: copy?.text ?? `${m.symbol}: a Makina machine.`,
60020
+ decimals: 18,
60021
+ underlyingDecimals: m.accountingDecimals,
60022
+ isRebasing: false,
60023
+ // DCM's depositor AND redeemer run an allowlist.
60024
+ isMintable: !m.whitelisted,
60025
+ mintContract: m.depositor,
60026
+ withdrawalMode: "request-based",
60027
+ withdrawQueue: m.redeemer,
60028
+ ...copy?.delay !== void 0 ? { withdrawalCooldownSeconds: copy.delay } : {},
60029
+ makinaMachine: m.machine,
60030
+ // `solvency` deliberately ABSENT: the AUM is operator-posted caliber
60031
+ // accounting over on-chain positions — neither an attestation nor a
60032
+ // collateralised loan — and is not assessed here (coverage.pending).
60033
+ yieldFetcher: makinaFetcher,
60034
+ yieldKey: MAKINA_KEYS[m.symbol]
60035
+ };
60036
+ };
60037
+ MAKINA_MACHINES.map(
60038
+ (m) => `${m.chainId}-${m.shareToken}`
60039
+ );
60040
+ var CONCRETE_COPY = {
60041
+ ctDefiUSDT: "Concrete's DeFi USDT vault: USDT allocated by Concrete across DeFi lending strategies, with the strategies' reported value accruing into the share price. Deposits are open. Withdrawals are queued: a redemption is booked into the current epoch and paid at that epoch's share price once Concrete processes it, then claimed; a request can be cancelled while its epoch is still open.",
60042
+ ctRWA_USD1: "Concrete's RWA vault over USD1: USD1 allocated to tokenised real-world-asset strategies, the reported value accruing into the share price. Deposits are restricted to Concrete's allowlist. Withdrawals are booked into the current epoch, paid at that epoch's share price once processed, then claimed; cancellable while the epoch is open.",
60043
+ ctZigUSD1: "A single-mandate Concrete vault over USD1 (ZIG), its reported strategy value accruing into the share price. Deposits are restricted to Concrete's allowlist. Concrete can switch the vault's withdrawal queue on, in which case a redemption is booked into an epoch and claimed once processed; it is off today, so a redemption pays at once from available liquidity.",
60044
+ ctColbUSD1: "A single-mandate Concrete vault over USD1 (Colb), its reported strategy value accruing into the share price. Deposits are restricted to Concrete's allowlist. Withdrawals are booked into the current epoch, paid at that epoch's share price once processed, then claimed; cancellable while the epoch is open."
60045
+ };
60046
+ var concreteEntry = (v) => ({
60047
+ address: v.vault,
60048
+ underlying: v.underlying,
60049
+ symbol: v.symbol,
60050
+ brand: "Concrete",
60051
+ description: CONCRETE_COPY[v.symbol] ?? `${v.symbol}: a Concrete vault.`,
60052
+ decimals: v.decimals,
60053
+ underlyingDecimals: v.decimals,
60054
+ isRebasing: false,
60055
+ isMintable: !v.depositGated,
60056
+ withdrawalMode: "request-based",
60057
+ // `solvency` ABSENT: strategy-reported value, not assessed.
60058
+ yieldFetcher: concreteFetcher,
60059
+ yieldKey: CONCRETE_KEYS[v.symbol]
60060
+ });
60061
+ var GAP_SWEEP_ENTRIES = {
60062
+ "42161": [SUSDAI_ENTRY],
60063
+ "1": [
60064
+ ...YUZU_VAULTS.filter((v) => v.chainId === "1").map(yuzuEntry),
60065
+ ...MAKINA_MACHINES.filter((m) => m.chainId === "1").map(makinaEntry),
60066
+ ...CONCRETE_VAULTS.filter((v) => v.chainId === "1").map(concreteEntry)
60067
+ ]
60068
+ };
60069
+
60070
+ // src/yields/intrinsic/fetchers/mellow.ts
60071
+ var MELLOW_VAULTS_URL = "https://api.mellow.finance/v1/vaults";
60072
+ var MELLOW_KEYS = {
60073
+ "0x277c6a642564a91ff78b008022d65683cee5ccc5": ["Mellow stRATEGY::strETH"],
60074
+ "0x6a37725ca7f4ce81c004c955f7280d5c704a249e": ["Lido Earn ETH::EARNETH"],
60075
+ "0x014e6da8f283c4af65b2aa0f201438680a004452": ["Lido EarnUSD::EARNUSD"]
60076
+ };
60077
+ var mellowLidoEarnFetcher = {
60078
+ label: "MELLOW_LIDO_EARN",
60079
+ fetch: async () => {
60080
+ const res = await fetch(MELLOW_VAULTS_URL, {
60081
+ headers: { accept: "application/json" },
60082
+ signal: AbortSignal.timeout(1e4)
60083
+ });
60084
+ if (!res.ok) throw new Error(`mellow HTTP ${res.status}`);
60085
+ const vaults = await res.json();
60086
+ const out = {};
60087
+ for (const v of Array.isArray(vaults) ? vaults : []) {
60088
+ if (Number(v?.chain_id) !== 1) continue;
60089
+ const keys = MELLOW_KEYS[String(v?.address ?? "").toLowerCase()];
60090
+ if (!keys) continue;
60091
+ const apy = Number(v?.apy);
60092
+ if (!Number.isFinite(apy) || v?.apy === null) continue;
60093
+ const apr = apyToAprPercent(apy);
60094
+ for (const k of keys) out[k] = apr;
60095
+ }
60096
+ return out;
60097
+ }
60098
+ };
60099
+
60100
+ // src/vaults/savings/registryMellow.ts
60101
+ var DESCRIPTIONS2 = {
60102
+ earnETH: "earnETH is Lido Earn's ETH vault on Mellow's core-vault infrastructure, allocated chiefly to Mellow's leveraged stETH vault (strETH) plus restaking and DeFi positions. The share price is not accrued on-chain: a Mellow oracle key reports it about once a day, and the vault mints and redeems at that report. Deposit WETH. Exits are paid in wstETH, not ETH: a small daily allowance redeems at once, anything larger is a request priced at the next report and claimable after about a day and a half. A 15 % performance fee is netted out of the share price.",
60103
+ earnUSD: "earnUSD is Lido Earn's dollar vault, run on Mellow's core-vault infrastructure: USDC is allocated across stablecoin lending and yield strategies. The share price is not accrued on-chain \u2014 a Mellow oracle key reports it about once a day, and the vault mints and redeems at that report. Deposit USDC and the shares mint at the last report. A small daily allowance redeems instantly; anything larger is a request priced at the next report and claimable after about two and a half days. A performance fee is already netted out of the share price."
60104
+ };
60105
+ var QUEUE_SECONDS = {
60106
+ earnETH: 129600,
60107
+ earnUSD: 216e3
60108
+ };
60109
+ var YIELD_KEYS = {
60110
+ earnETH: "Lido Earn ETH::EARNETH",
60111
+ earnUSD: "Lido EarnUSD::EARNUSD"
60112
+ };
60113
+ var MELLOW_ENTRIES = MELLOW_VAULTS.reduce(
60114
+ (out, v) => {
60115
+ const description = DESCRIPTIONS2[v.symbol];
60116
+ if (!description) return out;
60117
+ (out[v.chainId] ??= []).push({
60118
+ reader: "mellow-core",
60119
+ address: v.share,
60120
+ underlying: v.underlying,
60121
+ symbol: v.symbol,
60122
+ brand: "Lido",
60123
+ description,
60124
+ decimals: 18,
60125
+ underlyingDecimals: v.underlyingDecimals,
60126
+ isRebasing: false,
60127
+ isMintable: true,
60128
+ mintContract: v.syncDepositQueue,
60129
+ withdrawalMode: "fee-or-queued",
60130
+ withdrawalCooldownSeconds: QUEUE_SECONDS[v.symbol],
60131
+ withdrawQueue: v.redeemQueue,
60132
+ solvency: "nav-attested",
60133
+ mellow: {
60134
+ vault: v.vault,
60135
+ oracle: v.oracle,
60136
+ feeManager: v.feeManager,
60137
+ syncDepositQueue: v.syncDepositQueue,
60138
+ syncRedeemQueue: v.syncRedeemQueue,
60139
+ redeemQueue: v.redeemQueue
60140
+ },
60141
+ ...YIELD_KEYS[v.symbol] ? {
60142
+ yieldFetcher: mellowLidoEarnFetcher,
60143
+ yieldKey: YIELD_KEYS[v.symbol]
60144
+ } : {}
60145
+ });
60146
+ return out;
60147
+ },
60148
+ {}
60149
+ );
60150
+ var CONVERT = parseAbiItem(
60151
+ "function convertUnitsToToken(address vault, address token, uint256 unitsAmount) view returns (uint256)"
60152
+ );
60153
+ var AERA_RATE_SPECS = [
60154
+ {
60155
+ tag: "gtUSDa",
60156
+ chainId: "8453",
60157
+ vault: "0x000000000001cdb57e58fa75fe420a0f4d6640d5",
60158
+ priceFeeCalculator: "0xa90fd5c2020dbf19c6c29609df85f7e4dbac30db",
60159
+ token: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
60160
+ // One group on every chain: the Ethereum / Arbitrum gtUSDa rows (V1
60161
+ // provisioner, same strategy and accountant — marks agree to the sixth
60162
+ // digit) carry this Base-measured rate too.
60163
+ keys: ["Gauntlet USD Alpha::GTUSDA"],
60164
+ // The current calculator holds ~27 days of state; 21 fits inside it.
60165
+ windowDays: 21
60166
+ }
60167
+ ];
60168
+ var DAY6 = 86400;
60169
+ var UNIT2 = 10n ** 18n;
60170
+ var PER_REQUEST_TIMEOUT_MS7 = 6e3;
60171
+ var SPEC_DEADLINE_MS3 = 2e4;
60172
+ var BLOCK_TIME_SAMPLE7 = 100000n;
60173
+ var MAX_ABS_APR3 = 1e3;
60174
+ var readPrice = async (client, s, blockNumber) => await client.readContract({
60175
+ address: s.priceFeeCalculator,
60176
+ abi: [CONVERT],
60177
+ functionName: "convertUnitsToToken",
60178
+ args: [s.vault, s.token, UNIT2],
60179
+ blockNumber
60180
+ });
60181
+ var computeAeraApr = async (spec, rpcs = ARCHIVAL_RPCS) => {
60182
+ const roster = rpcs[spec.chainId];
60183
+ if (!roster?.length) throw new Error(`${spec.tag}: no archival roster`);
60184
+ const deadline = Date.now() + SPEC_DEADLINE_MS3;
60185
+ let lastErr;
60186
+ for (let rpcId = 0; rpcId < roster.length; rpcId++) {
60187
+ if (Date.now() > deadline) break;
60188
+ try {
60189
+ const client = getEvmClientWithCustomRpcsUniversal({
60190
+ chain: spec.chainId,
60191
+ rpcId,
60192
+ customRpcs: { [spec.chainId]: roster },
60193
+ timeoutMs: PER_REQUEST_TIMEOUT_MS7
60194
+ });
60195
+ const head = await client.getBlock();
60196
+ const sample = await client.getBlock({
60197
+ blockNumber: head.number - BLOCK_TIME_SAMPLE7
60198
+ });
60199
+ const blockTime = Number(head.timestamp - sample.timestamp) / Number(BLOCK_TIME_SAMPLE7);
60200
+ if (!(blockTime > 0)) throw new Error("bad block-time sample");
60201
+ const back = BigInt(Math.floor(spec.windowDays * DAY6 / blockTime));
60202
+ const thenBlock = await client.getBlock({
60203
+ blockNumber: head.number - back
60204
+ });
60205
+ const [now, then] = await Promise.all([
60206
+ readPrice(client, spec, head.number),
60207
+ readPrice(client, spec, thenBlock.number)
60208
+ ]);
60209
+ if (now === 0n || then === 0n) return void 0;
60210
+ if (now === then) throw new Error("identical price (non-archival node?)");
60211
+ const elapsed = Number(head.timestamp - thenBlock.timestamp);
60212
+ const apr = annualizeRateDeltaPercent(now, then, elapsed);
60213
+ if (!Number.isFinite(apr) || Math.abs(apr) > MAX_ABS_APR3)
60214
+ throw new Error(`bad apr ${apr}`);
60215
+ return apr;
60216
+ } catch (e) {
60217
+ lastErr = e;
60218
+ }
60219
+ }
60220
+ throw new Error(`${spec.tag}: no archival read (${String(lastErr)})`);
60221
+ };
60222
+ var aeraVaultsFetcher = {
60223
+ label: "AERA_VAULTS",
60224
+ fetch: async () => {
60225
+ const settled = await Promise.allSettled(
60226
+ AERA_RATE_SPECS.map((s) => computeAeraApr(s))
60227
+ );
60228
+ const out = {};
60229
+ settled.forEach((s, i) => {
60230
+ if (s.status === "fulfilled") {
60231
+ if (s.value === void 0) return;
60232
+ for (const k of AERA_RATE_SPECS[i].keys) out[k] = s.value;
60233
+ } else {
60234
+ console.warn(`[AERA_VAULTS] ${String(s.reason)}`);
60235
+ }
60236
+ });
60237
+ return out;
60238
+ }
60239
+ };
60240
+
60241
+ // src/vaults/savings/registryAera.ts
60242
+ var DESCRIPTION_BASE = "gtUSDa is Gauntlet's USD Alpha vault on Aera V3 infrastructure: USDC is allocated by Gauntlet across lending markets, looping and other on-chain stablecoin strategies. The unit price is not accrued on-chain \u2014 Gauntlet's accountant restates it, and the rate shown is measured between those marks.";
60243
+ var DESCRIPTIONS3 = {
60244
+ 2: `${DESCRIPTION_BASE} Deposits and withdrawals are both requests, filled by an Aera solver at the price of the day it settles (typically within hours); nothing is claimed afterwards \u2014 the solver pays out directly \u2014 and a request not filled by its deadline can be refunded.`,
60245
+ 1: `${DESCRIPTION_BASE} Deposits and withdrawals are both requests, filled by an Aera solver within hours and paid out directly, with no claim. On this chain the units or USDC always go to the account that sent the request; an unfilled request can be refunded after its deadline.`
60246
+ };
60247
+ var QUEUE_SECONDS2 = 6 * 3600;
60248
+ var AERA_ENTRIES = AERA_VAULTS.reduce(
60249
+ (out, v) => {
60250
+ const yieldKey = AERA_RATE_SPECS.find((s) => s.tag === v.symbol)?.keys[0];
60251
+ (out[v.chainId] ??= []).push({
60252
+ reader: "aera-v3",
60253
+ address: v.vault,
60254
+ underlying: v.underlying,
60255
+ symbol: v.symbol,
60256
+ brand: v.curator,
60257
+ description: DESCRIPTIONS3[v.provisionerVersion],
60258
+ decimals: 18,
60259
+ underlyingDecimals: v.underlyingDecimals,
60260
+ isRebasing: false,
60261
+ isMintable: true,
60262
+ mintContract: v.provisioner,
60263
+ withdrawalMode: "request-based",
60264
+ withdrawalCooldownSeconds: QUEUE_SECONDS2,
60265
+ withdrawQueue: v.provisioner,
60266
+ solvency: "nav-attested",
60267
+ aera: {
60268
+ provisioner: v.provisioner,
60269
+ priceFeeCalculator: v.priceFeeCalculator,
60270
+ provisionerVersion: v.provisionerVersion
60271
+ },
60272
+ ...yieldKey ? { yieldFetcher: aeraVaultsFetcher, yieldKey } : {}
60273
+ });
60274
+ return out;
60275
+ },
60276
+ {}
60277
+ );
60278
+
58941
60279
  // src/vaults/savings/registry.ts
58942
60280
  var stUsdGroup = {
58943
60281
  base: {
@@ -61233,6 +62571,10 @@ var SAVINGS_REGISTRY = (() => {
61233
62571
  if (!out[chainId]) out[chainId] = [];
61234
62572
  out[chainId].push(...entries);
61235
62573
  }
62574
+ for (const [chainId, entries] of Object.entries(ZEROBASE_ENTRIES)) {
62575
+ if (!out[chainId]) out[chainId] = [];
62576
+ out[chainId].push(...entries);
62577
+ }
61236
62578
  for (const [chainId, entries] of Object.entries(BITFI_ENTRIES)) {
61237
62579
  if (!out[chainId]) out[chainId] = [];
61238
62580
  out[chainId].push(...entries);
@@ -61261,6 +62603,10 @@ var SAVINGS_REGISTRY = (() => {
61261
62603
  if (!out[chainId]) out[chainId] = [];
61262
62604
  out[chainId].push(...entries);
61263
62605
  }
62606
+ for (const [chainId, entries] of Object.entries(LLAMA_GAP_ENTRIES)) {
62607
+ if (!out[chainId]) out[chainId] = [];
62608
+ out[chainId].push(...entries);
62609
+ }
61264
62610
  for (const [chainId, entries] of Object.entries(L2SD_ENTRIES)) {
61265
62611
  if (!out[chainId]) out[chainId] = [];
61266
62612
  out[chainId].push(...entries);
@@ -61309,6 +62655,18 @@ var SAVINGS_REGISTRY = (() => {
61309
62655
  if (!out[chainId]) out[chainId] = [];
61310
62656
  out[chainId].push(...entries);
61311
62657
  }
62658
+ for (const [chainId, entries] of Object.entries(GAP_SWEEP_ENTRIES)) {
62659
+ if (!out[chainId]) out[chainId] = [];
62660
+ out[chainId].push(...entries);
62661
+ }
62662
+ for (const [chainId, entries] of Object.entries(MELLOW_ENTRIES)) {
62663
+ if (!out[chainId]) out[chainId] = [];
62664
+ out[chainId].push(...entries);
62665
+ }
62666
+ for (const [chainId, entries] of Object.entries(AERA_ENTRIES)) {
62667
+ if (!out[chainId]) out[chainId] = [];
62668
+ out[chainId].push(...entries);
62669
+ }
61312
62670
  return out;
61313
62671
  })();
61314
62672
  var savingsBalanceKind = (chainId, address) => {
@@ -63423,43 +64781,12 @@ var exponentUnderlyingFetcher = {
63423
64781
  }
63424
64782
  };
63425
64783
 
63426
- // src/yields/intrinsic/fetchers/mellow.ts
63427
- var MELLOW_VAULTS_URL = "https://api.mellow.finance/v1/vaults";
63428
- var MELLOW_KEYS = {
63429
- "0x277c6a642564a91ff78b008022d65683cee5ccc5": ["Mellow stRATEGY::strETH"],
63430
- "0x6a37725ca7f4ce81c004c955f7280d5c704a249e": ["Lido Earn ETH::EARNETH"],
63431
- "0x014e6da8f283c4af65b2aa0f201438680a004452": ["Lido EarnUSD::EARNUSD"]
63432
- };
63433
- var mellowLidoEarnFetcher = {
63434
- label: "MELLOW_LIDO_EARN",
63435
- fetch: async () => {
63436
- const res = await fetch(MELLOW_VAULTS_URL, {
63437
- headers: { accept: "application/json" },
63438
- signal: AbortSignal.timeout(1e4)
63439
- });
63440
- if (!res.ok) throw new Error(`mellow HTTP ${res.status}`);
63441
- const vaults = await res.json();
63442
- const out = {};
63443
- for (const v of Array.isArray(vaults) ? vaults : []) {
63444
- if (Number(v?.chain_id) !== 1) continue;
63445
- const keys = MELLOW_KEYS[String(v?.address ?? "").toLowerCase()];
63446
- if (!keys) continue;
63447
- const apy = Number(v?.apy);
63448
- if (!Number.isFinite(apy) || v?.apy === null) continue;
63449
- const apr = apyToAprPercent(apy);
63450
- for (const k of keys) out[k] = apr;
63451
- }
63452
- return out;
63453
- }
63454
- };
63455
-
63456
64784
  // src/yields/intrinsic/fetchers/hyperevmVaults.ts
63457
64785
  var POOLS = [
63458
64786
  {
63459
64787
  pool: "3bdaa03c-63e2-40be-afde-e1ae13c684e9",
63460
64788
  keys: ["Looped Hype::LHYPE"]
63461
- },
63462
- { pool: "84e38fd1-024f-4107-a1fc-0ae8bfc1b195", keys: ["xHYPE::XHYPE"] }
64789
+ }
63463
64790
  ];
63464
64791
  var hyperevmVaultsFetcher = {
63465
64792
  label: "HYPEREVM_VAULTS",
@@ -63572,7 +64899,6 @@ var RTOKENS_URL = "https://yields.reserve.org";
63572
64899
  var hyUSD = "High Yield USD Base::HYUSD";
63573
64900
  var bsdETH = "Based ETH::BSDETH";
63574
64901
  var ethPlus = "ETHPlus::ETH+";
63575
- var woEth = "Wrapped OETH::WOETH";
63576
64902
  var sfrxeth = "Staked Frax Ether::sfrxETH";
63577
64903
  var ceth = "cETH::CETH";
63578
64904
  var sfrax = "Staked FRAX::SFRAX";
@@ -63594,8 +64920,10 @@ var rtokensFetcher = {
63594
64920
  [sfrax]: apyToAprPercent((dataMainnetColalterals?.sfrax ?? 0) / 100) * 100,
63595
64921
  [ceth]: apyToAprPercent((dataMainnetColalterals?.ceth ?? 0) / 100) * 100,
63596
64922
  [ethPlus]: apyToAprPercent((dataMainnet?.["ETH+"] ?? 0) / 100) * 100,
63597
- [usdThree]: apyToAprPercent((dataMainnet?.["USD3"] ?? 0) / 100) * 100,
63598
- [woEth]: apyToAprPercent((dataMainnetColalterals?.woeth ?? 0) / 100) * 100
64923
+ [usdThree]: apyToAprPercent((dataMainnet?.["USD3"] ?? 0) / 100) * 100
64924
+ // wOETH is NOT here: its savings row (`registryLlamaGap.ts`) vault-wires
64925
+ // `llamaGapShareRateFetcher`, which measures the wrapper's own share
64926
+ // rate — one source per key.
63599
64927
  };
63600
64928
  }
63601
64929
  };
@@ -64515,17 +65843,6 @@ var pendleUnderlyingFallbackFetcher = {
64515
65843
  }
64516
65844
  };
64517
65845
 
64518
- // src/yields/intrinsic/fetchers/usdai.ts
64519
- var USDAI_DEFILLAMA_POOL = "712ce948-bd9e-4f4a-8916-b72c447f7578";
64520
- var usdai = "sUSDai::SUSDAI";
64521
- var usdaiFetcher = {
64522
- label: "USDai",
64523
- fetch: async () => {
64524
- const apy = await fetchDefiLlamaApy(USDAI_DEFILLAMA_POOL);
64525
- return { [usdai]: apyToAprPercent(apy) };
64526
- }
64527
- };
64528
-
64529
65846
  // src/yields/intrinsic/fetchers/ondo.ts
64530
65847
  var ONDO_BASE_URL = "https://app.ondo.finance/api/v2/assets";
64531
65848
  var OUSG_KEY = "OUSG";
@@ -64550,6 +65867,9 @@ var ondoFetcher = {
64550
65867
  }
64551
65868
  };
64552
65869
  var ACCOUNTABLE_LIST_URL2 = "https://yield.accountable.capital/api/loan";
65870
+ var ACCOUNTABLE_SYMBOL_JOIN_EXCLUDED = /* @__PURE__ */ new Set([
65871
+ JUSD_CREDIT_LOAN
65872
+ ]);
64553
65873
  async function symbolToAssetGroup(chainId) {
64554
65874
  const list = await fetchTokenList(chainId);
64555
65875
  const bySymbol = /* @__PURE__ */ new Map();
@@ -64591,6 +65911,8 @@ var accountableFetcher = {
64591
65911
  );
64592
65912
  const out = {};
64593
65913
  for (const loan of loans) {
65914
+ if (loan?.loan_address && ACCOUNTABLE_SYMBOL_JOIN_EXCLUDED.has(loan.loan_address.toLowerCase()))
65915
+ continue;
64594
65916
  const chainId = loan?.chain_id != null ? String(loan.chain_id) : void 0;
64595
65917
  const symbol = loan?.shares_symbol?.toLowerCase();
64596
65918
  if (!chainId || !symbol) continue;
@@ -64830,17 +66152,6 @@ var yearnFetcher = {
64830
66152
  }
64831
66153
  };
64832
66154
 
64833
- // src/yields/intrinsic/fetchers/liquidCollective.ts
64834
- var LSETH_POOL_ID = "465d177e-3d0d-42c0-b5f5-31c857567135";
64835
- var KEYS = ["Liquid Staked ETH::LSETH", "LSETH"];
64836
- var lsethFetcher = {
64837
- label: "LSETH",
64838
- fetch: async () => {
64839
- const apr = apyToAprPercent(await fetchDefiLlamaApy(LSETH_POOL_ID));
64840
- return Object.fromEntries(KEYS.map((k) => [k, apr]));
64841
- }
64842
- };
64843
-
64844
66155
  // src/yields/intrinsic/fetchers/anzen.ts
64845
66156
  var SUSDZ_POOL_ID = "46518e93-8197-4539-9861-2340c2ac965a";
64846
66157
  var KEYS2 = ["Anzen Staked USDz::SUSDZ", "Anzen Staked USDz::sUSDz", "Staked USDz::sUSDz"];
@@ -64856,9 +66167,9 @@ var AVKAT = "0x7231dbacdfc968e07656d12389ab20de82fbfceb";
64856
66167
  var AVKAT_YIELD_KEY = "Autocompounding vKAT::avKAT";
64857
66168
  var ONE_E1820 = 10n ** 18n;
64858
66169
  var WINDOW_SECONDS13 = 30 * 86400;
64859
- var BLOCK_TIME_SAMPLE7 = 100000n;
66170
+ var BLOCK_TIME_SAMPLE8 = 100000n;
64860
66171
  var MAX_RPC_TRIES13 = 3;
64861
- var PER_REQUEST_TIMEOUT_MS7 = 6e3;
66172
+ var PER_REQUEST_TIMEOUT_MS8 = 6e3;
64862
66173
  var ABI = [
64863
66174
  {
64864
66175
  name: "convertToAssets",
@@ -64873,13 +66184,13 @@ var computeAvkatApr = async () => {
64873
66184
  for (let rpcId = 0; rpcId < MAX_RPC_TRIES13; rpcId++) {
64874
66185
  try {
64875
66186
  const client = getEvmClient(CHAIN_ID20, rpcId, {
64876
- timeoutMs: PER_REQUEST_TIMEOUT_MS7
66187
+ timeoutMs: PER_REQUEST_TIMEOUT_MS8
64877
66188
  });
64878
66189
  const head = await client.getBlock();
64879
66190
  const sample = await client.getBlock({
64880
- blockNumber: head.number - BLOCK_TIME_SAMPLE7
66191
+ blockNumber: head.number - BLOCK_TIME_SAMPLE8
64881
66192
  });
64882
- const blockTime = Number(head.timestamp - sample.timestamp) / Number(BLOCK_TIME_SAMPLE7);
66193
+ const blockTime = Number(head.timestamp - sample.timestamp) / Number(BLOCK_TIME_SAMPLE8);
64883
66194
  if (!(blockTime > 0)) throw new Error("bad block-time sample");
64884
66195
  const pastBlock = head.number - BigInt(Math.floor(WINDOW_SECONDS13 / blockTime));
64885
66196
  const read = (blockNumber) => client.readContract({
@@ -64949,10 +66260,11 @@ var LENDING_ONLY_FETCHERS = [
64949
66260
  // first-party source (wfragSOL) — the Solana analogue of the Pendle fallback.
64950
66261
  exponentUnderlyingFetcher,
64951
66262
  // Yield tokens under 2026-expired Pendle markets that lenders still list
64952
- // as collateral — on-chain share-rate deltas (vaultShareRates), Lido Earn
64953
- // via Mellow's API, and LHYPE / xHYPE via DefiLlama.
66263
+ // as collateral — on-chain share-rate deltas (vaultShareRates) and LHYPE /
66264
+ // xHYPE via DefiLlama. (Lido Earn's `mellowLidoEarnFetcher` is vault-wired
66265
+ // by the earnETH / earnUSD savings rows since 2026-10-27, so it reaches the
66266
+ // global map through `collectVaultFetchers` — the disjointness rule.)
64954
66267
  vaultShareRatesFetcher,
64955
- mellowLidoEarnFetcher,
64956
66268
  hyperevmVaultsFetcher,
64957
66269
  thbillFetcher,
64958
66270
  // sthusdFetcher / scrvusdFetcher are NOT here (and deliberately not
@@ -64968,7 +66280,8 @@ var LENDING_ONLY_FETCHERS = [
64968
66280
  rlpFetcher,
64969
66281
  gmxFetcher,
64970
66282
  pendleFetcher,
64971
- usdaiFetcher,
66283
+ // usdaiFetcher is NOT here: the sUSDai savings row (registryGapSweep.ts)
66284
+ // vault-wires it, so it reaches the global map via `collectVaultFetchers`.
64972
66285
  ondoFetcher,
64973
66286
  // rwaFundsFetcher is NOT here: cUSDO's savings rows vault-wire it, so
64974
66287
  // it reaches the global map via `collectVaultFetchers` (disjointness rule).
@@ -71190,6 +72503,8 @@ var UNDERLYING_OF = {
71190
72503
  DUSD: { underlying: USDC_1, decimals: 6 },
71191
72504
  // machine accountingToken()
71192
72505
  DETH: { underlying: WETH_1, decimals: 18 },
72506
+ usdSHFmk: { underlying: USDC_1, decimals: 6 },
72507
+ DCM: { underlying: USDC_1, decimals: 6 },
71193
72508
  DBIT: {
71194
72509
  underlying: "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
71195
72510
  // WBTC
@@ -71217,6 +72532,26 @@ var UNDERLYING_OF = {
71217
72532
  underlying: "0x4274cd7277c7bb0806bd5fe84b9adae466a8da0a",
71218
72533
  // Aegis YUSD
71219
72534
  decimals: 18
72535
+ },
72536
+ // `llamaGap.ts` (2026-10-27 DefiLlama gap sweep) — accountant base /
72537
+ // `asset()`, read live 2026-10-27.
72538
+ liquidETH: { underlying: WETH_1, decimals: 18 },
72539
+ liquidUSD: { underlying: USDC_1, decimals: 6 },
72540
+ liquidBTC: {
72541
+ underlying: "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
72542
+ // WBTC
72543
+ decimals: 8
72544
+ },
72545
+ iETHv2: {
72546
+ underlying: "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
72547
+ // stETH
72548
+ decimals: 18
72549
+ },
72550
+ fLiteUSD: { underlying: USDC_1, decimals: 6 },
72551
+ wOETH: {
72552
+ underlying: "0x856c4efb76c1d1ae02e20ceb03a2a6a08b0b8dc3",
72553
+ // OETH
72554
+ decimals: 18
71220
72555
  }
71221
72556
  };
71222
72557
  var NOT_PRICED = {};
@@ -71332,7 +72667,15 @@ var YEARN_V3_SHARE_RATE_PRICE_SPECS = [
71332
72667
  yearnV3("yvWETH-2", "0xac37729b76db6438ce62042ae1270ee574ca7571", WETH_1, 18)
71333
72668
  ];
71334
72669
  var SHARE_RATE_PRICE_SPECS = [
71335
- ...[...VAULT_SHARE_RATE_SPECS, ...EXPIRED_W_SAVINGS_SPECS].filter((s) => !(s.tag in NOT_PRICED)).map(priceSpecFromRateSpec),
72670
+ // Makina machines moved to `gapSweep.ts` with their savings rows — still
72671
+ // priced here off the same machine read.
72672
+ ...[
72673
+ ...VAULT_SHARE_RATE_SPECS,
72674
+ ...EXPIRED_W_SAVINGS_SPECS,
72675
+ ...LLAMA_GAP_SAVINGS_SPECS,
72676
+ ...MAKINA_RATE_SPECS,
72677
+ ...BEDROCK_UNIETH_SPECS
72678
+ ].filter((s) => !(s.tag in NOT_PRICED)).map(priceSpecFromRateSpec),
71336
72679
  ...MELLOW_SHARE_RATE_PRICE_SPECS,
71337
72680
  ...ERC4626_SHARE_RATE_PRICE_SPECS,
71338
72681
  ...YEARN_V3_SHARE_RATE_PRICE_SPECS
@@ -78181,25 +79524,94 @@ var SwellGetRateAbi = [
78181
79524
  outputs: [{ type: "uint256" }]
78182
79525
  }
78183
79526
  ];
79527
+ var SwellAccessControlPauseAbi = [
79528
+ {
79529
+ name: "coreMethodsPaused",
79530
+ type: "function",
79531
+ stateMutability: "view",
79532
+ inputs: [],
79533
+ outputs: [{ type: "bool" }]
79534
+ },
79535
+ {
79536
+ name: "withdrawalsPaused",
79537
+ type: "function",
79538
+ stateMutability: "view",
79539
+ inputs: [],
79540
+ outputs: [{ type: "bool" }]
79541
+ }
79542
+ ];
78184
79543
 
78185
79544
  // src/vaults/lst/readers/swell.ts
78186
- var readerSwellGetRate = (entry2) => ({
79545
+ var readerSwellGetRate = (entry2) => {
79546
+ const acm = entry2.readerExtras?.swellAccessControlManager;
79547
+ return {
79548
+ calls: [
79549
+ { address: entry2.address, name: "totalSupply", params: [] },
79550
+ { address: entry2.address, name: "getRate", params: [] },
79551
+ ...acm ? [
79552
+ { address: acm, name: "coreMethodsPaused", params: [] },
79553
+ { address: acm, name: "withdrawalsPaused", params: [] }
79554
+ ] : []
79555
+ ],
79556
+ abis: [
79557
+ TotalSupplyAbi,
79558
+ SwellGetRateAbi,
79559
+ ...acm ? [SwellAccessControlPauseAbi, SwellAccessControlPauseAbi] : []
79560
+ ],
79561
+ parse: ([supply, rate, corePaused, withdrawalsPaused]) => {
79562
+ const totalSupply = toBigInt14(supply);
79563
+ const exchangeRate = toBigInt14(rate);
79564
+ if (totalSupply === void 0 || exchangeRate === void 0) {
79565
+ return void 0;
79566
+ }
79567
+ return {
79568
+ totalAssets: totalSupply * exchangeRate / ONE_E1821,
79569
+ totalSupply,
79570
+ exchangeRate,
79571
+ ...acm && typeof corePaused === "boolean" ? { depositsPaused: corePaused } : {},
79572
+ ...acm && typeof withdrawalsPaused === "boolean" ? { withdrawalsPaused } : {}
79573
+ };
79574
+ }
79575
+ };
79576
+ };
79577
+
79578
+ // src/vaults/lst/abis/liquidCollective.ts
79579
+ var RiverLsEthAbi = [
79580
+ {
79581
+ name: "totalUnderlyingSupply",
79582
+ type: "function",
79583
+ stateMutability: "view",
79584
+ inputs: [],
79585
+ outputs: [{ type: "uint256" }]
79586
+ },
79587
+ {
79588
+ name: "underlyingBalanceFromShares",
79589
+ type: "function",
79590
+ stateMutability: "view",
79591
+ inputs: [{ name: "shares", type: "uint256" }],
79592
+ outputs: [{ type: "uint256" }]
79593
+ }
79594
+ ];
79595
+
79596
+ // src/vaults/lst/readers/liquidCollective.ts
79597
+ var readerRiverLsEth = (entry2) => ({
78187
79598
  calls: [
78188
79599
  { address: entry2.address, name: "totalSupply", params: [] },
78189
- { address: entry2.address, name: "getRate", params: [] }
79600
+ { address: entry2.address, name: "totalUnderlyingSupply", params: [] },
79601
+ {
79602
+ address: entry2.address,
79603
+ name: "underlyingBalanceFromShares",
79604
+ params: [ONE_E1821]
79605
+ }
78190
79606
  ],
78191
- abis: [TotalSupplyAbi, SwellGetRateAbi],
78192
- parse: ([supply, rate]) => {
79607
+ abis: [TotalSupplyAbi, RiverLsEthAbi, RiverLsEthAbi],
79608
+ parse: ([supply, underlying, rate]) => {
78193
79609
  const totalSupply = toBigInt14(supply);
79610
+ const totalAssets = toBigInt14(underlying);
78194
79611
  const exchangeRate = toBigInt14(rate);
78195
- if (totalSupply === void 0 || exchangeRate === void 0) {
79612
+ if (totalSupply === void 0 || totalAssets === void 0 || exchangeRate === void 0)
78196
79613
  return void 0;
78197
- }
78198
- return {
78199
- totalAssets: totalSupply * exchangeRate / ONE_E1821,
78200
- totalSupply,
78201
- exchangeRate
78202
- };
79614
+ return { totalAssets, totalSupply, exchangeRate };
78203
79615
  }
78204
79616
  });
78205
79617
 
@@ -78633,6 +80045,91 @@ var readerTreehouseTAsset = (entry2) => {
78633
80045
  };
78634
80046
  };
78635
80047
 
80048
+ // src/vaults/lst/abis/bedrock.ts
80049
+ var BedrockStakingReadAbi = [
80050
+ {
80051
+ // ETH per uniETH, 1e18 — `currentReserve() × 1e18 / totalSupply`.
80052
+ name: "exchangeRatio",
80053
+ type: "function",
80054
+ stateMutability: "view",
80055
+ inputs: [],
80056
+ outputs: [{ type: "uint256" }]
80057
+ },
80058
+ {
80059
+ // Unstaked deposits — the ONLY buffer `instantSwap` pays from.
80060
+ name: "getPendingEthers",
80061
+ type: "function",
80062
+ stateMutability: "view",
80063
+ inputs: [],
80064
+ outputs: [{ type: "uint256" }]
80065
+ },
80066
+ {
80067
+ name: "paused",
80068
+ type: "function",
80069
+ stateMutability: "view",
80070
+ inputs: [],
80071
+ outputs: [{ type: "bool" }]
80072
+ }
80073
+ ];
80074
+
80075
+ // src/vaults/lst/readers/bedrock.ts
80076
+ var VALIDATOR_LOT = 32n * ONE_E1821;
80077
+ var readerBedrockUniEth = (entry2) => {
80078
+ const staking = entry2.mintContract ?? entry2.address;
80079
+ return {
80080
+ calls: [
80081
+ { address: entry2.address, name: "totalSupply", params: [] },
80082
+ { address: staking, name: "exchangeRatio", params: [] },
80083
+ { address: staking, name: "getPendingEthers", params: [] },
80084
+ { address: staking, name: "paused", params: [] }
80085
+ ],
80086
+ abis: [
80087
+ TotalSupplyAbi,
80088
+ BedrockStakingReadAbi,
80089
+ BedrockStakingReadAbi,
80090
+ BedrockStakingReadAbi
80091
+ ],
80092
+ parse: ([supply, ratio, pending, paused]) => {
80093
+ const totalSupply = toBigInt14(supply);
80094
+ const exchangeRate = toBigInt14(ratio);
80095
+ if (totalSupply === void 0 || exchangeRate === void 0)
80096
+ return void 0;
80097
+ const isPaused = paused === true;
80098
+ const buffer = isPaused ? 0n : toBigInt14(pending) ?? 0n;
80099
+ const instant = {
80100
+ id: "instant",
80101
+ kind: "instant",
80102
+ label: "Instant (pending deposits)",
80103
+ settlement: "sync",
80104
+ feeBps: 0,
80105
+ waitSeconds: 0,
80106
+ capacity: buffer.toString(),
80107
+ capacityFormatted: Number(buffer) / 1e18,
80108
+ selfOnly: true,
80109
+ description: "Swaps uniETH for ETH at the current ratio out of deposits not yet staked. Only that buffer is paid \u2014 the rest of the request is left untouched \u2014 and it is usually close to empty."
80110
+ };
80111
+ const queued = {
80112
+ id: "queued",
80113
+ kind: "queued",
80114
+ label: "Validator exit (32 ETH lots)",
80115
+ settlement: "async",
80116
+ feeBps: 0,
80117
+ minAmount: VALIDATOR_LOT.toString(),
80118
+ minAmountFormatted: 32,
80119
+ description: "Burns uniETH for whole 32-ETH validator exits; the ETH is paid into Bedrock\u2019s Redeem contract once the validators have exited and is claimed from there. Smaller amounts cannot use this route."
80120
+ };
80121
+ return {
80122
+ totalAssets: totalSupply * exchangeRate / ONE_E1821,
80123
+ totalSupply,
80124
+ exchangeRate,
80125
+ liquidity: buffer,
80126
+ withdrawFeeBps: 0,
80127
+ exitRoutes: [instant, queued]
80128
+ };
80129
+ }
80130
+ };
80131
+ };
80132
+
78636
80133
  // src/vaults/lst/readers/index.ts
78637
80134
  var buildReader = (entry2) => {
78638
80135
  switch (entry2.reader) {
@@ -78660,6 +80157,8 @@ var buildReader = (entry2) => {
78660
80157
  return readerKelpRsEth(entry2);
78661
80158
  case "swellGetRate":
78662
80159
  return readerSwellGetRate(entry2);
80160
+ case "riverLsEth":
80161
+ return readerRiverLsEth(entry2);
78663
80162
  case "binanceWbeth":
78664
80163
  return readerBinanceWbeth(entry2);
78665
80164
  case "stakewiseOsEth":
@@ -78702,6 +80201,8 @@ var buildReader = (entry2) => {
78702
80201
  return readerKintsuSMon(entry2);
78703
80202
  case "treehouseTAsset":
78704
80203
  return readerTreehouseTAsset(entry2);
80204
+ case "bedrockUniEth":
80205
+ return readerBedrockUniEth(entry2);
78705
80206
  }
78706
80207
  };
78707
80208
 
@@ -79288,7 +80789,12 @@ var probeSelfOnly = (chainId, shareToken, route) => {
79288
80789
  receiver: "0x00000000000000000000000000000000000000a1",
79289
80790
  // Neutral protocol-required inputs, so the probe measures the RECEIVER
79290
80791
  // and not a missing argument.
79291
- options: { route, deadline: 9999999999n, minAssetOut: 0n, minHype: 0n }
80792
+ options: {
80793
+ route,
80794
+ deadline: 9999999999n,
80795
+ minAssetOut: 0n,
80796
+ minHype: 0n
80797
+ }
79292
80798
  });
79293
80799
  return self ? true : void 0;
79294
80800
  } catch {
@@ -79396,7 +80902,9 @@ var fetchLstShareTokens = async (chainId, multicallRetry, prices = {}, tokenList
79396
80902
  const convertToAssets = state.exchangeRate * underlyingUnit / ONE_E1822;
79397
80903
  const convertToShares = state.exchangeRate > 0n ? ONE_E1822 * shareUnit / state.exchangeRate : 0n;
79398
80904
  let liquidityRaw;
79399
- if (state.liquidity !== void 0) {
80905
+ if (state.withdrawalsPaused) {
80906
+ liquidityRaw = 0n;
80907
+ } else if (state.liquidity !== void 0) {
79400
80908
  liquidityRaw = state.liquidity;
79401
80909
  } else {
79402
80910
  const idle = idleByAddress.get(addressLc);
@@ -79438,7 +80946,7 @@ var fetchLstShareTokens = async (chainId, multicallRetry, prices = {}, tokenList
79438
80946
  isNativeUnderlying: entry2.isNativeUnderlying,
79439
80947
  mintContract: entry2.mintContract?.toLowerCase(),
79440
80948
  mintInputAsset: entry2.mintInputAsset === void 0 ? void 0 : entry2.mintInputAsset === "native" ? "native" : entry2.mintInputAsset.toLowerCase(),
79441
- acceptedInputs: resolveAcceptedInputs(chainId, addressLc, entry2),
80949
+ acceptedInputs: state.depositsPaused ? [] : resolveAcceptedInputs(chainId, addressLc, entry2),
79442
80950
  delegation: delegationByAddress.get(addressLc),
79443
80951
  validators: validatorsByAddress.get(addressLc),
79444
80952
  withdrawalMode: entry2.withdrawalMode,
@@ -79446,11 +80954,15 @@ var fetchLstShareTokens = async (chainId, multicallRetry, prices = {}, tokenList
79446
80954
  // `LstOnChainState.withdrawalCooldownSeconds`.
79447
80955
  withdrawalCooldownSeconds: cooldownSecs,
79448
80956
  withdrawFeeBps: state.withdrawFeeBps,
79449
- // A reader that reads its protocol's own per-leg dials publishes the
80957
+ isDepositPaused: state.depositsPaused,
80958
+ isWithdrawalPaused: state.withdrawalsPaused,
80959
+ // A paused exit publishes no route — a route here is a promise the
80960
+ // builder would keep with calldata that reverts. Otherwise, a reader
80961
+ // that reads its protocol's own per-leg dials publishes the
79450
80962
  // list itself; everything else gets the coarse derivation, which is
79451
80963
  // still strictly better than making every consumer reassemble the two
79452
80964
  // legs out of `withdrawalMode` + one cooldown + one liquidity number.
79453
- exitRoutes: (state.exitRoutes ?? deriveExitRoutes({
80965
+ exitRoutes: (state.withdrawalsPaused ? [] : state.exitRoutes ?? deriveExitRoutes({
79454
80966
  withdrawalMode: entry2.withdrawalMode,
79455
80967
  withdrawFeeBps: state.withdrawFeeBps,
79456
80968
  withdrawalCooldownSeconds: cooldownSecs,
@@ -79989,6 +81501,66 @@ var readerEmpty = {
79989
81501
  fetch: async () => []
79990
81502
  };
79991
81503
 
81504
+ // src/vaults/lst/withdrawals/readers/bedrock.ts
81505
+ var BedrockReadAbi = [
81506
+ {
81507
+ name: "debtOf",
81508
+ type: "function",
81509
+ stateMutability: "view",
81510
+ inputs: [{ type: "address", name: "account" }],
81511
+ outputs: [{ type: "uint256" }]
81512
+ },
81513
+ {
81514
+ name: "balanceOf",
81515
+ type: "function",
81516
+ stateMutability: "view",
81517
+ inputs: [{ type: "address", name: "account" }],
81518
+ outputs: [{ type: "uint256" }]
81519
+ }
81520
+ ];
81521
+ var readerBedrockUniEth2 = {
81522
+ fetch: async (user, multicallRetry, chainId, entry2) => {
81523
+ if (!entry2.withdrawalContract || !entry2.secondaryWithdrawalContract)
81524
+ return [];
81525
+ const res = await multicallRetry({
81526
+ chain: chainId,
81527
+ calls: [
81528
+ { address: entry2.withdrawalContract, name: "debtOf", params: [user] },
81529
+ {
81530
+ address: entry2.secondaryWithdrawalContract,
81531
+ name: "balanceOf",
81532
+ params: [user]
81533
+ }
81534
+ ],
81535
+ abi: [BedrockReadAbi, BedrockReadAbi]
81536
+ });
81537
+ const debt = toBigInt15(res[0]) ?? 0n;
81538
+ const claimable = toBigInt15(res[1]) ?? 0n;
81539
+ const out = [];
81540
+ if (debt > 0n)
81541
+ out.push({
81542
+ lst: entry2.lst,
81543
+ brand: entry2.brand,
81544
+ symbol: entry2.symbol,
81545
+ requestId: "validator-exit",
81546
+ amountUnderlying: debt.toString(),
81547
+ withdrawQueue: entry2.withdrawalContract,
81548
+ status: "pending"
81549
+ });
81550
+ if (claimable > 0n)
81551
+ out.push({
81552
+ lst: entry2.lst,
81553
+ brand: entry2.brand,
81554
+ symbol: entry2.symbol,
81555
+ requestId: "redeem-balance",
81556
+ amountUnderlying: claimable.toString(),
81557
+ withdrawQueue: entry2.secondaryWithdrawalContract,
81558
+ status: "claimable"
81559
+ });
81560
+ return out;
81561
+ }
81562
+ };
81563
+
79992
81564
  // src/vaults/lst/withdrawals/abis/ibera.ts
79993
81565
  var IBeraWithdraworAbi = [
79994
81566
  {
@@ -82140,6 +83712,8 @@ var readerYieldNest = {
82140
83712
  // src/vaults/lst/withdrawals/readers/index.ts
82141
83713
  var buildWithdrawalReader = (entry2) => {
82142
83714
  switch (entry2.reader) {
83715
+ case "bedrockUniEth":
83716
+ return readerBedrockUniEth2;
82143
83717
  case "binanceWbethQueue":
82144
83718
  return readerBinanceWbeth2;
82145
83719
  case "lidoQueue":
@@ -82582,6 +84156,14 @@ var LST_WITHDRAWAL_REGISTRY = {
82582
84156
  symbol: "cbETH",
82583
84157
  reader: "noQueue"
82584
84158
  },
84159
+ {
84160
+ // RedeemManager 0x080b…3375 serves allowlisted holders only — nothing
84161
+ // a permissionless user can have queued.
84162
+ lst: "0x8c1bed5b9a0928467c9b1341da1d7bd5e10b6549",
84163
+ brand: "Liquid Collective",
84164
+ symbol: "LsETH",
84165
+ reader: "noQueue"
84166
+ },
82585
84167
  {
82586
84168
  lst: "0xfae103dc9cf190ed75350761e95403b7b8afa6c0",
82587
84169
  brand: "Swell",
@@ -82591,6 +84173,26 @@ var LST_WITHDRAWAL_REGISTRY = {
82591
84173
  // supportsInterface(0x780e9d63)). See INDEXING_STRATEGIES.md.
82592
84174
  withdrawalContract: "0x58749c46ffe97e4d79508a2c781c440f4756f064"
82593
84175
  },
84176
+ {
84177
+ lst: "0xf951e335afb289353dc249e82926178eac7ded78",
84178
+ brand: "Swell",
84179
+ symbol: "swETH",
84180
+ reader: "swellNft",
84181
+ // swEXIT — same ERC721Enumerable queue shape as rswEXIT (min 0.005 /
84182
+ // max 500 ETH per request, verified 2026-10-27).
84183
+ withdrawalContract: "0x48c11b86807627af70a34662d4865cf854251663"
84184
+ },
84185
+ {
84186
+ // Bedrock uniETH — per-account running totals, log-free:
84187
+ // Staking.debtOf (queued validator exits) + Redeem.balanceOf (paid in,
84188
+ // claimable). See readers/bedrock.ts.
84189
+ lst: "0xf1376bcef0f78459c0ed0ba5ddce976f1ddf51f4",
84190
+ brand: "Bedrock",
84191
+ symbol: "uniETH",
84192
+ reader: "bedrockUniEth",
84193
+ withdrawalContract: "0x4befa2aa9c305238aa3e0b5d17eb20c045269e9d",
84194
+ secondaryWithdrawalContract: "0x98169228cb99ed26c1043ed8ca53a5cb371d3b8d"
84195
+ },
82594
84196
  {
82595
84197
  // TruFin TruStakeMATICv2 — ERC-4626 vault, withdrawals routed
82596
84198
  // through Polygon validator unbond. Caller supplies
@@ -83025,6 +84627,33 @@ var getLstWithdrawalRequests = async (user, chainId, multicallRetry, options) =>
83025
84627
  };
83026
84628
  var getVaultWithdrawalRequests = getLstWithdrawalRequests;
83027
84629
 
84630
+ // src/vaults/lst/pauseState.ts
84631
+ var hasLivePauseRead = (entry2) => entry2.readerExtras?.swellAccessControlManager !== void 0;
84632
+ async function readLstPauseState(chainId, shareToken, multicallRetry) {
84633
+ const entry2 = getLstRegistry(chainId).find(
84634
+ (e) => e.address.toLowerCase() === shareToken.toLowerCase()
84635
+ );
84636
+ if (!entry2 || !hasLivePauseRead(entry2)) return void 0;
84637
+ const reader = buildReader(entry2);
84638
+ try {
84639
+ const results = await multicallRetry({
84640
+ chain: chainId,
84641
+ calls: reader.calls,
84642
+ abi: reader.abis,
84643
+ allowFailure: true,
84644
+ maxRetries: 2
84645
+ });
84646
+ const state = reader.parse(results);
84647
+ if (!state) return void 0;
84648
+ return {
84649
+ depositsPaused: state.depositsPaused,
84650
+ withdrawalsPaused: state.withdrawalsPaused
84651
+ };
84652
+ } catch {
84653
+ return void 0;
84654
+ }
84655
+ }
84656
+
83028
84657
  // src/vaults/savings/abis/shared.ts
83029
84658
  var TotalSupplyAbi2 = [
83030
84659
  {
@@ -83481,6 +85110,83 @@ var BitwayVaultReadAbi = [
83481
85110
  }
83482
85111
  ];
83483
85112
 
85113
+ // src/vaults/savings/abis/zerobase.ts
85114
+ var ZerobaseVaultReadAbi = [
85115
+ {
85116
+ name: "convertToAssets",
85117
+ type: "function",
85118
+ stateMutability: "view",
85119
+ inputs: [{ type: "uint256" }, { type: "address", name: "_token" }],
85120
+ outputs: [{ type: "uint256" }]
85121
+ },
85122
+ {
85123
+ name: "getTVL",
85124
+ type: "function",
85125
+ stateMutability: "view",
85126
+ inputs: [{ type: "address", name: "_token" }],
85127
+ outputs: [{ type: "uint256" }]
85128
+ },
85129
+ {
85130
+ name: "getContractBalance",
85131
+ type: "function",
85132
+ stateMutability: "view",
85133
+ inputs: [{ type: "address", name: "_token" }],
85134
+ outputs: [{ type: "uint256" }]
85135
+ },
85136
+ {
85137
+ name: "getCurrentRewardRate",
85138
+ type: "function",
85139
+ stateMutability: "view",
85140
+ inputs: [{ type: "address", name: "_token" }],
85141
+ outputs: [{ type: "uint256" }, { type: "uint256" }]
85142
+ },
85143
+ {
85144
+ name: "WAITING_TIME",
85145
+ type: "function",
85146
+ stateMutability: "view",
85147
+ inputs: [],
85148
+ outputs: [{ type: "uint256" }]
85149
+ },
85150
+ {
85151
+ name: "paused",
85152
+ type: "function",
85153
+ stateMutability: "view",
85154
+ inputs: [],
85155
+ outputs: [{ type: "bool" }]
85156
+ },
85157
+ {
85158
+ name: "getClaimQueueIDs",
85159
+ type: "function",
85160
+ stateMutability: "view",
85161
+ inputs: [
85162
+ { type: "address", name: "_user" },
85163
+ { type: "address", name: "_token" }
85164
+ ],
85165
+ outputs: [{ type: "uint256[]" }]
85166
+ },
85167
+ {
85168
+ name: "getClaimQueueInfo",
85169
+ type: "function",
85170
+ stateMutability: "view",
85171
+ inputs: [{ type: "uint256", name: "_index" }],
85172
+ outputs: [
85173
+ {
85174
+ type: "tuple",
85175
+ components: [
85176
+ { type: "bool", name: "isDone" },
85177
+ { type: "address", name: "token" },
85178
+ { type: "address", name: "user" },
85179
+ { type: "uint256", name: "totalAmount" },
85180
+ { type: "uint256", name: "principalAmount" },
85181
+ { type: "uint256", name: "rewardAmount" },
85182
+ { type: "uint256", name: "requestTime" },
85183
+ { type: "uint256", name: "claimTime" }
85184
+ ]
85185
+ }
85186
+ ]
85187
+ }
85188
+ ];
85189
+
83484
85190
  // src/vaults/savings/abis/frankencoin.ts
83485
85191
  var FrankencoinSavingsReadAbi = [
83486
85192
  {
@@ -84075,6 +85781,207 @@ var InverseMaxDelayAbi = uintView("maxDelay");
84075
85781
  var InverseMaxDelayThresholdBpsAbi = uintView("maxDelayThresholdBps");
84076
85782
  var InverseDepositLimitAbi = uintView("depositLimit");
84077
85783
 
85784
+ // src/vaults/savings/abis/gapSweep.ts
85785
+ var UsdaiStakedReadAbi = parseAbi([
85786
+ "function totalSupply() view returns (uint256)",
85787
+ "function bridgedSupply() view returns (uint256)",
85788
+ "function redemptionSharePrice() view returns (uint256)",
85789
+ "function depositSharePrice() view returns (uint256)",
85790
+ "function redemptionQueueInfo() view returns (uint256 index, uint256 head, uint256 tail, uint256 pending, uint256 balance)",
85791
+ "function redemptionTimestamp() view returns (uint64)",
85792
+ "function paused() view returns (bool)"
85793
+ ]);
85794
+ var YuzuIlpReadAbi = parseAbi([
85795
+ "function maxDeposit(address receiver) view returns (uint256)",
85796
+ "function paused() view returns (bool)",
85797
+ "function fillWindow() view returns (uint256)"
85798
+ ]);
85799
+ var MakinaMachineReadAbi = parseAbi([
85800
+ "function convertToAssets(uint256 shares) view returns (uint256)",
85801
+ "function lastTotalAum() view returns (uint256)",
85802
+ "function maxMint() view returns (uint256)"
85803
+ ]);
85804
+
85805
+ // src/vaults/savings/abis/mellow.ts
85806
+ var MellowShareManagerReadAbi = [
85807
+ {
85808
+ // allocatedShares (priced async deposits not yet claimed) + totalSupply.
85809
+ name: "totalShares",
85810
+ type: "function",
85811
+ stateMutability: "view",
85812
+ inputs: [],
85813
+ outputs: [{ type: "uint256" }]
85814
+ },
85815
+ {
85816
+ name: "flags",
85817
+ type: "function",
85818
+ stateMutability: "view",
85819
+ inputs: [],
85820
+ outputs: [
85821
+ {
85822
+ type: "tuple",
85823
+ components: [
85824
+ { type: "bool", name: "hasMintPause" },
85825
+ { type: "bool", name: "hasBurnPause" },
85826
+ { type: "bool", name: "hasTransferPause" },
85827
+ { type: "bool", name: "hasWhitelist" },
85828
+ { type: "bool", name: "hasTransferWhitelist" },
85829
+ { type: "uint32", name: "globalLockup" }
85830
+ ]
85831
+ }
85832
+ ]
85833
+ }
85834
+ ];
85835
+ var MellowOracleReadAbi = [
85836
+ {
85837
+ // priceD18 = SHARES per ASSET (raw/raw, ×1e18): `shares = assets × price`.
85838
+ name: "getReport",
85839
+ type: "function",
85840
+ stateMutability: "view",
85841
+ inputs: [{ type: "address", name: "asset" }],
85842
+ outputs: [
85843
+ {
85844
+ type: "tuple",
85845
+ components: [
85846
+ { type: "uint224", name: "priceD18" },
85847
+ { type: "uint32", name: "timestamp" },
85848
+ { type: "bool", name: "isSuspicious" }
85849
+ ]
85850
+ }
85851
+ ]
85852
+ }
85853
+ ];
85854
+ var MellowSyncRedeemQueueReadAbi = [
85855
+ {
85856
+ // Shares still redeemable today through the sync queue (linear refill).
85857
+ name: "remainingDailyLimit",
85858
+ type: "function",
85859
+ stateMutability: "view",
85860
+ inputs: [],
85861
+ outputs: [
85862
+ { type: "uint256", name: "usage" },
85863
+ { type: "uint256", name: "remainingDailyLimit" }
85864
+ ]
85865
+ },
85866
+ {
85867
+ name: "syncRedeemParams",
85868
+ type: "function",
85869
+ stateMutability: "view",
85870
+ inputs: [],
85871
+ outputs: [
85872
+ { type: "uint256", name: "penaltyD6" },
85873
+ { type: "uint32", name: "maxAge" },
85874
+ { type: "uint256", name: "usage" },
85875
+ { type: "uint256", name: "dailyLimit" },
85876
+ { type: "uint256", name: "latestRequestTimestamp" }
85877
+ ]
85878
+ }
85879
+ ];
85880
+ var MellowVaultReadAbi = [
85881
+ {
85882
+ name: "isPausedQueue",
85883
+ type: "function",
85884
+ stateMutability: "view",
85885
+ inputs: [{ type: "address", name: "queue" }],
85886
+ outputs: [{ type: "bool" }]
85887
+ }
85888
+ ];
85889
+ var MellowFeeManagerReadAbi = [
85890
+ {
85891
+ // Performance fee on share-price growth, 1e6 = 100 %. Taken in shares.
85892
+ name: "performanceFeeD6",
85893
+ type: "function",
85894
+ stateMutability: "view",
85895
+ inputs: [],
85896
+ outputs: [{ type: "uint24" }]
85897
+ }
85898
+ ];
85899
+
85900
+ // src/vaults/savings/abis/aera.ts
85901
+ var AeraPriceFeeCalculatorReadAbi = [
85902
+ {
85903
+ name: "convertUnitsToToken",
85904
+ type: "function",
85905
+ stateMutability: "view",
85906
+ inputs: [
85907
+ { type: "address", name: "vault" },
85908
+ { type: "address", name: "token" },
85909
+ { type: "uint256", name: "unitsAmount" }
85910
+ ],
85911
+ outputs: [{ type: "uint256" }]
85912
+ },
85913
+ {
85914
+ name: "isVaultPaused",
85915
+ type: "function",
85916
+ stateMutability: "view",
85917
+ inputs: [{ type: "address", name: "vault" }],
85918
+ outputs: [{ type: "bool" }]
85919
+ }
85920
+ ];
85921
+ var AeraProvisionerReadAbi = [
85922
+ {
85923
+ // Deposit headroom in numeraire (USDC) units: depositCap − vault value.
85924
+ name: "maxDeposit",
85925
+ type: "function",
85926
+ stateMutability: "view",
85927
+ inputs: [],
85928
+ outputs: [{ type: "uint256" }]
85929
+ },
85930
+ {
85931
+ // ProvisionerV2 `TokenDetailsV2` (V1 provisioners use another layout).
85932
+ name: "tokensDetails",
85933
+ type: "function",
85934
+ stateMutability: "view",
85935
+ inputs: [{ type: "address", name: "token" }],
85936
+ outputs: [
85937
+ { type: "bool", name: "asyncDepositEnabled" },
85938
+ { type: "bool", name: "asyncRedeemEnabled" },
85939
+ { type: "bool", name: "syncDepositEnabled" },
85940
+ { type: "bool", name: "syncRedeemEnabled" },
85941
+ { type: "uint16", name: "asyncDepositMultiplier" },
85942
+ { type: "uint16", name: "asyncRedeemMultiplier" },
85943
+ { type: "uint16", name: "syncDepositMultiplier" },
85944
+ { type: "uint16", name: "syncRedeemMultiplier" },
85945
+ { type: "address", name: "pushFundsSubmitDataPointer" },
85946
+ { type: "address", name: "pullFundsSubmitDataPointer" }
85947
+ ]
85948
+ }
85949
+ ];
85950
+ var AeraProvisionerV1ReadAbi = [
85951
+ AeraProvisionerReadAbi[0],
85952
+ {
85953
+ name: "tokensDetails",
85954
+ type: "function",
85955
+ stateMutability: "view",
85956
+ inputs: [{ type: "address", name: "token" }],
85957
+ outputs: [
85958
+ { type: "bool", name: "asyncDepositEnabled" },
85959
+ { type: "bool", name: "asyncRedeemEnabled" },
85960
+ { type: "bool", name: "syncDepositEnabled" },
85961
+ { type: "uint16", name: "depositMultiplier" },
85962
+ { type: "uint16", name: "redeemMultiplier" }
85963
+ ]
85964
+ }
85965
+ ];
85966
+
85967
+ // src/vaults/savings/abis/origin.ts
85968
+ var OriginVaultQueueReadAbi = [
85969
+ {
85970
+ name: "withdrawalClaimDelay",
85971
+ type: "function",
85972
+ stateMutability: "view",
85973
+ inputs: [],
85974
+ outputs: [{ type: "uint256" }]
85975
+ },
85976
+ {
85977
+ name: "capitalPaused",
85978
+ type: "function",
85979
+ stateMutability: "view",
85980
+ inputs: [],
85981
+ outputs: [{ type: "bool" }]
85982
+ }
85983
+ ];
85984
+
84078
85985
  // src/vaults/savings/readers/shared.ts
84079
85986
  var ONE_E1823 = 10n ** 18n;
84080
85987
  var toBigInt16 = (v) => {
@@ -84543,6 +86450,81 @@ var readerBitwayVault = (entry2) => {
84543
86450
  };
84544
86451
  };
84545
86452
 
86453
+ // src/vaults/savings/readers/zerobaseVault.ts
86454
+ var ZEROBASE_PENALTY_BPS = {
86455
+ "0x9ef52d8953d184840f2c69096b7b3a7da7093685": 50,
86456
+ // Ethereum
86457
+ "0xcc5df5c68d8c991035b6a437d4e00a99875228e4": 50,
86458
+ // BSC/ARB/OP/POL/Base
86459
+ "0xc3e9006559cb209a987e99257986aa5ce324f829": 50
86460
+ // Avalanche
86461
+ };
86462
+ var zerobasePenaltyBps = (vault) => ZEROBASE_PENALTY_BPS[vault.toLowerCase()];
86463
+ var readerZerobaseVault = (entry2) => {
86464
+ const { address, underlying, priceOracle } = entry2;
86465
+ const vault = priceOracle ?? entry2.mintContract ?? address;
86466
+ const shareUnit = 10n ** BigInt(entry2.decimals);
86467
+ const underlyingUnit = 10n ** BigInt(entry2.underlyingDecimals ?? entry2.decimals);
86468
+ const penaltyBps = zerobasePenaltyBps(vault);
86469
+ return {
86470
+ calls: [
86471
+ { address, name: "totalSupply", params: [] },
86472
+ {
86473
+ address: vault,
86474
+ name: "convertToAssets",
86475
+ params: [ONE_E1823, underlying]
86476
+ },
86477
+ { address: vault, name: "getContractBalance", params: [underlying] },
86478
+ { address: vault, name: "WAITING_TIME", params: [] },
86479
+ { address: vault, name: "getCurrentRewardRate", params: [underlying] },
86480
+ { address: vault, name: "paused", params: [] }
86481
+ ],
86482
+ abis: [
86483
+ TotalSupplyAbi2,
86484
+ ZerobaseVaultReadAbi,
86485
+ ZerobaseVaultReadAbi,
86486
+ ZerobaseVaultReadAbi,
86487
+ ZerobaseVaultReadAbi,
86488
+ ZerobaseVaultReadAbi
86489
+ ],
86490
+ parse: ([supply, rate, buffer, waitingTime, rewardRate, paused]) => {
86491
+ const totalSupply = toBigInt16(supply);
86492
+ const exchangeRate = toBigInt16(rate);
86493
+ if (totalSupply === void 0 || exchangeRate === void 0 || exchangeRate === 0n) {
86494
+ return void 0;
86495
+ }
86496
+ const capacity = toBigInt16(buffer);
86497
+ const wait = toBigInt16(waitingTime);
86498
+ let supplyRate;
86499
+ if (Array.isArray(rewardRate) && rewardRate.length === 2) {
86500
+ const num23 = toBigInt16(rewardRate[0]);
86501
+ const base = toBigInt16(rewardRate[1]);
86502
+ if (num23 !== void 0 && base !== void 0 && base > 0n && num23 < base)
86503
+ supplyRate = Number(num23) * 100 / Number(base);
86504
+ }
86505
+ return {
86506
+ // Share and underlying decimals match on every deployment (6/6, or
86507
+ // 18/18 on BSC), and the vault's rate is raw-per-raw × 1e18 — so it
86508
+ // is already the whole-per-whole 1e18 rate the row wants.
86509
+ totalAssets: totalSupply * exchangeRate * underlyingUnit / (shareUnit * ONE_E1823),
86510
+ totalSupply,
86511
+ exchangeRate,
86512
+ withdrawFeeBps: penaltyBps,
86513
+ // `flashNotEnable` has no getter (packed slot 20, enabled live on
86514
+ // every deployment). A drained buffer already zeroes the instant
86515
+ // leg's liquidity, which is the caller-visible outcome of a
86516
+ // disabled flash path too.
86517
+ instantRedeemEnabled: penaltyBps !== void 0 ? true : void 0,
86518
+ instantRedeemCapacity: capacity,
86519
+ withdrawalCooldownSeconds: wait !== void 0 && wait <= 366n * 86400n ? Number(wait) : void 0,
86520
+ withdrawQueue: entry2.withdrawQueue,
86521
+ ...supplyRate !== void 0 ? { supplyRate } : {},
86522
+ ...typeof paused === "boolean" ? { paused } : {}
86523
+ };
86524
+ }
86525
+ };
86526
+ };
86527
+
84546
86528
  // src/vaults/savings/readers/frankencoinSavings.ts
84547
86529
  var readerFrankencoinSavings = (entry2) => ({
84548
86530
  calls: [
@@ -85448,6 +87430,229 @@ var readerEmberVault = (entry2) => {
85448
87430
  };
85449
87431
  };
85450
87432
 
87433
+ // src/vaults/savings/readers/mellowCore.ts
87434
+ var readerMellowCore = (entry2) => {
87435
+ const m = entry2.mellow;
87436
+ if (!m)
87437
+ throw new Error(`mellow-core entry ${entry2.address} has no mellow config`);
87438
+ const shareUnit = 10n ** BigInt(entry2.decimals);
87439
+ const underlyingUnit = 10n ** BigInt(entry2.underlyingDecimals ?? entry2.decimals);
87440
+ return {
87441
+ calls: [
87442
+ { address: entry2.address, name: "totalShares", params: [] },
87443
+ { address: m.oracle, name: "getReport", params: [entry2.underlying] },
87444
+ { address: m.syncRedeemQueue, name: "remainingDailyLimit", params: [] },
87445
+ { address: m.syncRedeemQueue, name: "syncRedeemParams", params: [] },
87446
+ { address: m.vault, name: "isPausedQueue", params: [m.syncDepositQueue] },
87447
+ { address: m.vault, name: "isPausedQueue", params: [m.redeemQueue] },
87448
+ { address: m.vault, name: "isPausedQueue", params: [m.syncRedeemQueue] },
87449
+ { address: entry2.address, name: "flags", params: [] },
87450
+ { address: m.feeManager, name: "performanceFeeD6", params: [] }
87451
+ ],
87452
+ abis: [
87453
+ MellowShareManagerReadAbi,
87454
+ MellowOracleReadAbi,
87455
+ MellowSyncRedeemQueueReadAbi,
87456
+ MellowSyncRedeemQueueReadAbi,
87457
+ MellowVaultReadAbi,
87458
+ MellowVaultReadAbi,
87459
+ MellowVaultReadAbi,
87460
+ MellowShareManagerReadAbi,
87461
+ MellowFeeManagerReadAbi
87462
+ ],
87463
+ parse: ([
87464
+ shares,
87465
+ report,
87466
+ daily,
87467
+ params,
87468
+ depPaused,
87469
+ redPaused,
87470
+ syncRedPaused,
87471
+ flags,
87472
+ perfFee
87473
+ ]) => {
87474
+ const totalShares = toBigInt16(shares);
87475
+ const r = tupleAt3(report);
87476
+ const priceD18 = toBigInt16(r?.[0]);
87477
+ const reportTs = toBigInt16(r?.[1]);
87478
+ const suspicious = r?.[2] === true;
87479
+ if (totalShares === void 0 || priceD18 === void 0 || priceD18 === 0n || suspicious)
87480
+ return void 0;
87481
+ const exchangeRate = ONE_E1823 * ONE_E1823 * shareUnit / (priceD18 * underlyingUnit);
87482
+ const totalAssets = totalShares * ONE_E1823 / priceD18;
87483
+ const p = tupleAt3(params);
87484
+ const penaltyD6 = toBigInt16(p?.[0]);
87485
+ const maxAge = toBigInt16(p?.[1]);
87486
+ const remaining = toBigInt16(tupleAt3(daily)?.[1]);
87487
+ const now = BigInt(Math.floor(Date.now() / 1e3));
87488
+ const stale = reportTs !== void 0 && maxAge !== void 0 ? reportTs + maxAge < now : void 0;
87489
+ const syncRedeemPaused = typeof syncRedPaused === "boolean" ? syncRedPaused : void 0;
87490
+ const redeemPaused = typeof redPaused === "boolean" ? redPaused : void 0;
87491
+ const depositPaused = typeof depPaused === "boolean" ? depPaused : void 0;
87492
+ const f = flagsOf(flags);
87493
+ const instantRedeemCapacity = remaining === void 0 ? void 0 : syncRedeemPaused || stale ? 0n : remaining * ONE_E1823 / priceD18;
87494
+ const perf = toBigInt16(perfFee);
87495
+ const depositsClosed = depositPaused === true || f?.hasMintPause === true || f?.hasWhitelist === true;
87496
+ return {
87497
+ totalAssets,
87498
+ totalSupply: totalShares,
87499
+ exchangeRate,
87500
+ withdrawFeeBps: penaltyD6 !== void 0 ? Number(penaltyD6 / 100n) : void 0,
87501
+ instantRedeemEnabled: syncRedeemPaused !== void 0 ? !syncRedeemPaused : void 0,
87502
+ instantRedeemCapacity,
87503
+ withdrawQueue: m.redeemQueue,
87504
+ ...depositsClosed ? { depositCapacity: 0n } : {},
87505
+ ...perf !== void 0 ? { performanceFeeBps: Number(perf / 100n) } : {},
87506
+ ...redeemPaused !== void 0 && syncRedeemPaused !== void 0 ? { exitPaused: redeemPaused && syncRedeemPaused } : {},
87507
+ ...redeemPaused !== void 0 && syncRedeemPaused !== void 0 && depositPaused !== void 0 ? { paused: redeemPaused && syncRedeemPaused && depositPaused } : {}
87508
+ };
87509
+ }
87510
+ };
87511
+ };
87512
+ var tupleAt3 = (raw) => {
87513
+ if (Array.isArray(raw)) return raw;
87514
+ if (raw && typeof raw === "object") return Object.values(raw);
87515
+ return void 0;
87516
+ };
87517
+ var flagsOf = (raw) => {
87518
+ if (Array.isArray(raw))
87519
+ return { hasMintPause: raw[0] === true, hasWhitelist: raw[3] === true };
87520
+ if (raw && typeof raw === "object") {
87521
+ const o = raw;
87522
+ return {
87523
+ hasMintPause: o.hasMintPause === true,
87524
+ hasWhitelist: o.hasWhitelist === true
87525
+ };
87526
+ }
87527
+ return void 0;
87528
+ };
87529
+
87530
+ // src/vaults/savings/readers/aeraV3.ts
87531
+ var readerAeraV3 = (entry2) => {
87532
+ const a = entry2.aera;
87533
+ if (!a) throw new Error(`aera-v3 entry ${entry2.address} has no aera config`);
87534
+ const underlyingUnit = 10n ** BigInt(entry2.underlyingDecimals ?? entry2.decimals);
87535
+ const shareUnit = 10n ** BigInt(entry2.decimals);
87536
+ const provisionerAbi = a.provisionerVersion === 1 ? AeraProvisionerV1ReadAbi : AeraProvisionerReadAbi;
87537
+ return {
87538
+ calls: [
87539
+ { address: entry2.address, name: "totalSupply", params: [] },
87540
+ {
87541
+ address: a.priceFeeCalculator,
87542
+ name: "convertUnitsToToken",
87543
+ params: [entry2.address, entry2.underlying, shareUnit]
87544
+ },
87545
+ {
87546
+ address: a.priceFeeCalculator,
87547
+ name: "isVaultPaused",
87548
+ params: [entry2.address]
87549
+ },
87550
+ { address: a.provisioner, name: "maxDeposit", params: [] },
87551
+ {
87552
+ address: a.provisioner,
87553
+ name: "tokensDetails",
87554
+ params: [entry2.underlying]
87555
+ }
87556
+ ],
87557
+ abis: [
87558
+ TotalSupplyAbi2,
87559
+ AeraPriceFeeCalculatorReadAbi,
87560
+ AeraPriceFeeCalculatorReadAbi,
87561
+ provisionerAbi,
87562
+ provisionerAbi
87563
+ ],
87564
+ parse: ([supply, price2, paused, maxDeposit, details]) => {
87565
+ const totalSupply = toBigInt16(supply);
87566
+ const perUnit = toBigInt16(price2);
87567
+ if (totalSupply === void 0 || perUnit === void 0 || perUnit === 0n)
87568
+ return void 0;
87569
+ const d = Array.isArray(details) ? details : details && typeof details === "object" ? Object.values(details) : void 0;
87570
+ const asyncDeposit = typeof d?.[0] === "boolean" ? d[0] : void 0;
87571
+ const asyncRedeem = typeof d?.[1] === "boolean" ? d[1] : void 0;
87572
+ const isPaused = typeof paused === "boolean" ? paused : void 0;
87573
+ const headroom = toBigInt16(maxDeposit);
87574
+ const depositsClosed = isPaused === true || asyncDeposit === false;
87575
+ return {
87576
+ totalAssets: totalSupply * perUnit / shareUnit,
87577
+ totalSupply,
87578
+ exchangeRate: perUnit * ONE_E1823 / underlyingUnit,
87579
+ ...depositsClosed ? { depositCapacity: 0n } : headroom !== void 0 ? { depositCapacity: headroom } : {},
87580
+ ...isPaused !== void 0 && asyncRedeem !== void 0 ? { exitPaused: isPaused || !asyncRedeem } : {},
87581
+ ...isPaused !== void 0 ? { paused: isPaused } : {}
87582
+ };
87583
+ }
87584
+ };
87585
+ };
87586
+
87587
+ // src/vaults/savings/readers/originWrapper.ts
87588
+ var readerOriginWrapper = (entry2) => {
87589
+ const o = entry2.origin;
87590
+ if (!o)
87591
+ throw new Error(
87592
+ `origin-wrapper entry ${entry2.address} has no origin config`
87593
+ );
87594
+ const shareUnit = 10n ** BigInt(entry2.decimals);
87595
+ const underlyingUnit = 10n ** BigInt(entry2.underlyingDecimals ?? entry2.decimals);
87596
+ return {
87597
+ calls: [
87598
+ { address: entry2.address, name: "totalAssets", params: [] },
87599
+ { address: entry2.address, name: "totalSupply", params: [] },
87600
+ { address: entry2.address, name: "convertToAssets", params: [shareUnit] },
87601
+ { address: o.vault, name: "withdrawalClaimDelay", params: [] },
87602
+ { address: o.vault, name: "capitalPaused", params: [] }
87603
+ ],
87604
+ abis: [
87605
+ Erc4626ReadAbi2,
87606
+ TotalSupplyAbi2,
87607
+ Erc4626ReadAbi2,
87608
+ OriginVaultQueueReadAbi,
87609
+ OriginVaultQueueReadAbi
87610
+ ],
87611
+ parse: ([assets, supply, rate, delay, paused]) => {
87612
+ const totalAssets = toBigInt16(assets);
87613
+ const totalSupply = toBigInt16(supply);
87614
+ const perShare = toBigInt16(rate);
87615
+ if (totalAssets === void 0 || totalSupply === void 0 || perShare === void 0)
87616
+ return void 0;
87617
+ const delaySeconds = toBigInt16(delay);
87618
+ const capitalPaused = typeof paused === "boolean" ? paused : void 0;
87619
+ const routes2 = [
87620
+ {
87621
+ id: "instant",
87622
+ kind: "instant",
87623
+ label: `Unwrap to ${o.oTokenSymbol}`,
87624
+ settlement: "sync",
87625
+ feeBps: 0,
87626
+ waitSeconds: 0,
87627
+ description: `Pays ${o.oTokenSymbol}, Origin's rebasing token \u2014 not WETH.`
87628
+ }
87629
+ ];
87630
+ if (delaySeconds !== void 0 && delaySeconds > 0n && capitalPaused === false)
87631
+ routes2.push({
87632
+ id: "queued",
87633
+ kind: "queued",
87634
+ label: "Origin vault queue (WETH)",
87635
+ settlement: "async",
87636
+ feeBps: 0,
87637
+ waitSeconds: Number(delaySeconds),
87638
+ selfOnly: true,
87639
+ description: `Unwraps to ${o.oTokenSymbol} and requests WETH from Origin's vault 1:1; claimable by request id once the delay has passed and the queue holds enough WETH (beyond the vault's idle WETH, Origin's strategist has to withdraw from the strategies). Requested and paid to the sender only.`
87640
+ });
87641
+ return {
87642
+ totalAssets,
87643
+ totalSupply,
87644
+ exchangeRate: perShare * ONE_E1823 / underlyingUnit,
87645
+ exitRoutes: routes2,
87646
+ // The unwrap is the instant leg and is uncapped: the wrapper holds
87647
+ // every OToken it owes.
87648
+ instantRedeemEnabled: true,
87649
+ instantRedeemCapacity: totalAssets,
87650
+ ...delaySeconds !== void 0 && delaySeconds > 0n ? { withdrawalCooldownSeconds: Number(delaySeconds) } : {}
87651
+ };
87652
+ }
87653
+ };
87654
+ };
87655
+
85451
87656
  // src/vaults/savings/readers/l2sD.ts
85452
87657
  var NavOracleAbi = [
85453
87658
  {
@@ -85577,6 +87782,28 @@ var LIMINAL_PIPE_CONFIG = {
85577
87782
  redemptionPipe: "0x2e8c1256356e261150120a384d95dc0d0d00ae29",
85578
87783
  depositPipe: "0xe56d115dd2107e1f7199c7accf68d68835a0faa9",
85579
87784
  liquidityProvider: "0x14b1a46c82579506c461f6ae915af1350d2b2d66"
87785
+ },
87786
+ // xHYPE / xBTC / xLEND on HyperEVM — the same ShareManager / NAVOracle /
87787
+ // pipe stack as limUSD, one set per vault (docs.liminal.money/tokenized/
87788
+ // developers/<vault>, each pipe read on-chain 2026-10-27: `fees()`,
87789
+ // `liquidityProvider()`, `paused()`, USDC `asset()` on the DepositPipe).
87790
+ "0xac962fa04bf91b7fd0dc0c5c32414e0ce3c51e03": {
87791
+ navOracle: "0xbf97a22b1229b3ffba65003c01df8ba9e7bff042",
87792
+ redemptionPipe: "0x19f4881cdb479d01ce214f6908c99b4fe76c03e8",
87793
+ depositPipe: "0xe7e0b7d87c4869549a4a47a8f216e362d0efc9f9",
87794
+ liquidityProvider: "0x6a8c4a63b7bfa6ec58736e1667519bf56dcdafb2"
87795
+ },
87796
+ "0x97df58ce4489896f4ec7d16b59b64ad0a56243a8": {
87797
+ navOracle: "0x2a6448fc3a0fade5811bb0087836a090eaa34715",
87798
+ redemptionPipe: "0xfdf08966a8957fafe1ab47488fc97d15217e50fe",
87799
+ depositPipe: "0x629010d62e54cfa49d6ac35e4e3de2240d4ce4bf",
87800
+ liquidityProvider: "0xd265408ed06ee0aabc3598f1014684c77d7e4e8f"
87801
+ },
87802
+ "0x95f6d66c09a22e6f2bb693306b3ed69663066cbb": {
87803
+ navOracle: "0xdbb4da0f1548f6237df6960532563804a901c2ae",
87804
+ redemptionPipe: "0xce12c415019657083a8b985e7cd5cd6fc486f978",
87805
+ depositPipe: "0x309cf12b14decb39852eba8869dca5bdf9a5b754",
87806
+ liquidityProvider: "0x1c22de9fc99c13cd285920a2b9eef4be08e69578"
85580
87807
  }
85581
87808
  };
85582
87809
  var readerLiminalPipe = (entry2) => {
@@ -85663,10 +87890,55 @@ var VEDA_BORING_CONFIG = {
85663
87890
  queue: "0x08a9552688f8dec4835f5396ca3d1fd2713f79a7",
85664
87891
  exitAsset: "0xfd739d4e423301ce9385c1fb8850539d657c296d"
85665
87892
  // kHYPE
87893
+ },
87894
+ // ether.fi Liquid ETH (Ethereum) — teller = `vault.hook()`; accountant and
87895
+ // queue cross-checked (`teller.vault()`, `queue.boringVault()`,
87896
+ // `queue.accountant()`), 2026-10-27. The queue pays weETH only.
87897
+ "0xf0bb20865277abd641a307ece5ee04e79073416c": {
87898
+ accountant: "0x0d05d94a5f1e76c18fbeb7a13d17c8a314088198",
87899
+ teller: "0x9aa79c84b79816ab920bbce20f8f74557b514734",
87900
+ queue: "0x0d2df071207e18ca8638b4f04e98c53155ec2ce0",
87901
+ exitAsset: "0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee",
87902
+ // weETH
87903
+ solveCadenceSeconds: 3 * 86400
87904
+ },
87905
+ // ether.fi Liquid USD (Ethereum) — NB `vault.hook()` (0xdfa4…) is NOT the
87906
+ // teller (it reverts `accountant()`); the teller is 0x4de4…, whose
87907
+ // `vault()` is this share. The queue pays USDC or USDT.
87908
+ "0x08c6f91e2b681faf5e17227f2a44c307b3c1364c": {
87909
+ accountant: "0xc315d6e14ddcdc7407784e2caf815d131bc1d3e7",
87910
+ teller: "0x4de413a26fc24c3fc27cc983be70aa9c5c299387",
87911
+ queue: "0x38fc1ba73b7ed289955a07d9f11a85b6e388064a",
87912
+ exitAsset: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
87913
+ // USDC
87914
+ solveCadenceSeconds: 3 * 86400
87915
+ },
87916
+ // ether.fi Liquid BTC (Ethereum) — teller = `vault.hook()`; the queue
87917
+ // 0x77a2… is ether.fi Cash's `liquidBtcBoringQueue` (etherfi-protocol/
87918
+ // cash-v3 `UpgradeLiquidWithdrawals.s.sol`), verified on-chain 2026-10-27:
87919
+ // `queue.boringVault()` = this share, `queue.accountant()` = 0xea23…, and
87920
+ // `requestOnChainWithdraw` public on the vault's RolesAuthority. The queue
87921
+ // pays eBTC only (`withdrawAssets(eBTC)` allow, 1 h; WBTC / LBTC / cbBTC
87922
+ // disallowed); requests solved p50 24 h over the four weeks to 2026-10-27.
87923
+ "0x5f46d540b6ed704c3c8789105f30e075aa900726": {
87924
+ accountant: "0xea23ac6d7d11f6b181d6b98174d334478adae6b0",
87925
+ teller: "0x8ea0b382d054dbebeb1d0ae47ee4ac433c730353",
87926
+ queue: "0x77a2fd42f8769d8063f2e75061fc200014e41edf",
87927
+ exitAsset: "0x657e8c867d8b37dcc18fa4caead9c45eb088c642",
87928
+ // eBTC
87929
+ solveCadenceSeconds: 3 * 86400
87930
+ },
87931
+ // Veda PlasmaUSD (Plasma 9745) — teller = `vault.hook()`, 2026-10-27.
87932
+ "0xd1074e0ae85610ddba0147e29ebe0d8e5873a000": {
87933
+ accountant: "0x737f2522d09e58a3ea9dccfdb127dd0df5eb3f18",
87934
+ teller: "0x4e7d2186eb8b75fbdca867761636637e05baef1e",
87935
+ queue: "0xffdcc73ac9f8f46a8fcb0b648afdf1cb03345e50",
87936
+ exitAsset: "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb"
87937
+ // USDT0
85666
87938
  }
85667
87939
  };
85668
87940
  var readerVedaBoring = (entry2) => {
85669
- const cfg = VEDA_BORING_CONFIG[entry2.address.toLowerCase()];
87941
+ const cfg = entry2.veda ?? VEDA_BORING_CONFIG[entry2.address.toLowerCase()];
85670
87942
  if (!cfg) throw new Error(`veda-boring: no config for ${entry2.address}`);
85671
87943
  const shareDec = entry2.decimals;
85672
87944
  const underlyingDec = entry2.underlyingDecimals ?? entry2.decimals;
@@ -85693,7 +87965,7 @@ var readerVedaBoring = (entry2) => {
85693
87965
  totalAssets,
85694
87966
  totalSupply,
85695
87967
  exchangeRate,
85696
- withdrawalCooldownSeconds: maturity === void 0 ? void 0 : Number(maturity),
87968
+ withdrawalCooldownSeconds: maturity === void 0 ? cfg.solveCadenceSeconds : Math.max(Number(maturity), cfg.solveCadenceSeconds ?? 0),
85697
87969
  // A queue that refuses the exit asset leaves no way out on-chain.
85698
87970
  instantRedeemEnabled: false,
85699
87971
  depositCapacity: paused ? 0n : void 0,
@@ -86274,6 +88546,121 @@ var readerAccountableVault = (entry2) => {
86274
88546
  };
86275
88547
  };
86276
88548
 
88549
+ // src/vaults/savings/readers/gapSweep.ts
88550
+ var NEUTRAL_PROBE6 = "0x000000000000000000000000000000000000dead";
88551
+ var MAX_UINT256 = 2n ** 256n - 1n;
88552
+ var readerUsdaiStaked = (entry2) => {
88553
+ const a = entry2.address;
88554
+ return {
88555
+ calls: [
88556
+ { address: a, name: "totalSupply", params: [] },
88557
+ { address: a, name: "bridgedSupply", params: [] },
88558
+ { address: a, name: "redemptionSharePrice", params: [] },
88559
+ { address: a, name: "depositSharePrice", params: [] },
88560
+ { address: a, name: "paused", params: [] }
88561
+ ],
88562
+ abis: [
88563
+ UsdaiStakedReadAbi,
88564
+ UsdaiStakedReadAbi,
88565
+ UsdaiStakedReadAbi,
88566
+ UsdaiStakedReadAbi,
88567
+ UsdaiStakedReadAbi
88568
+ ],
88569
+ parse: ([supply, bridged, redemption, deposit, paused]) => {
88570
+ const hubSupply = toBigInt16(supply);
88571
+ const redemptionPrice = toBigInt16(redemption);
88572
+ if (hubSupply === void 0 || redemptionPrice === void 0 || redemptionPrice === 0n)
88573
+ return void 0;
88574
+ const totalSupply = hubSupply + (toBigInt16(bridged) ?? 0n);
88575
+ const depositPrice = toBigInt16(deposit);
88576
+ return {
88577
+ totalSupply,
88578
+ // Both share and USDai are 18-decimal, and both prices are 1e18-scaled
88579
+ // USDai per share, so no decimal juggling.
88580
+ totalAssets: totalSupply * redemptionPrice / ONE_E1823,
88581
+ exchangeRate: redemptionPrice,
88582
+ ...depositPrice !== void 0 && depositPrice > 0n ? {
88583
+ fundamentalExchangeRate: depositPrice,
88584
+ // A deposit mints at the HIGHER price.
88585
+ convertToShares: ONE_E1823 * ONE_E1823 / depositPrice
88586
+ } : {},
88587
+ ...typeof paused === "boolean" ? { paused } : {}
88588
+ };
88589
+ }
88590
+ };
88591
+ };
88592
+ var readerYuzuIlp = (entry2) => {
88593
+ const shareUnit = 10n ** BigInt(entry2.decimals);
88594
+ const underlyingUnit = 10n ** BigInt(entry2.underlyingDecimals ?? entry2.decimals);
88595
+ return {
88596
+ calls: [
88597
+ { address: entry2.address, name: "totalAssets", params: [] },
88598
+ { address: entry2.address, name: "totalSupply", params: [] },
88599
+ { address: entry2.address, name: "convertToAssets", params: [shareUnit] },
88600
+ { address: entry2.address, name: "maxDeposit", params: [NEUTRAL_PROBE6] },
88601
+ { address: entry2.address, name: "paused", params: [] }
88602
+ ],
88603
+ abis: [
88604
+ Erc4626ReadAbi2,
88605
+ TotalSupplyAbi2,
88606
+ Erc4626ReadAbi2,
88607
+ YuzuIlpReadAbi,
88608
+ YuzuIlpReadAbi
88609
+ ],
88610
+ parse: ([assets, supply, rate, maxDeposit, paused]) => {
88611
+ const totalAssets = toBigInt16(assets);
88612
+ const totalSupply = toBigInt16(supply);
88613
+ const convertToAssetsRaw = toBigInt16(rate);
88614
+ if (totalAssets === void 0 || totalSupply === void 0 || convertToAssetsRaw === void 0)
88615
+ return void 0;
88616
+ const cap = toBigInt16(maxDeposit);
88617
+ return {
88618
+ totalAssets,
88619
+ totalSupply,
88620
+ exchangeRate: convertToAssetsRaw * ONE_E1823 / underlyingUnit,
88621
+ ...cap !== void 0 && cap !== MAX_UINT256 ? { depositCapacity: cap } : {},
88622
+ ...typeof paused === "boolean" ? { paused } : {}
88623
+ };
88624
+ }
88625
+ };
88626
+ };
88627
+ var readerMakinaMachine = (entry2) => {
88628
+ const machine = entry2.makinaMachine;
88629
+ if (!machine)
88630
+ throw new Error(`makina-machine reader: ${entry2.symbol} has no machine`);
88631
+ const shareUnit = 10n ** BigInt(entry2.decimals);
88632
+ const underlyingUnit = 10n ** BigInt(entry2.underlyingDecimals ?? entry2.decimals);
88633
+ return {
88634
+ calls: [
88635
+ { address: entry2.address, name: "totalSupply", params: [] },
88636
+ { address: machine, name: "convertToAssets", params: [shareUnit] },
88637
+ { address: machine, name: "lastTotalAum", params: [] },
88638
+ { address: machine, name: "maxMint", params: [] }
88639
+ ],
88640
+ abis: [
88641
+ TotalSupplyAbi2,
88642
+ MakinaMachineReadAbi,
88643
+ MakinaMachineReadAbi,
88644
+ MakinaMachineReadAbi
88645
+ ],
88646
+ parse: ([supply, rate, aum, maxMint]) => {
88647
+ const totalSupply = toBigInt16(supply);
88648
+ const convertToAssetsRaw = toBigInt16(rate);
88649
+ if (totalSupply === void 0 || convertToAssetsRaw === void 0)
88650
+ return void 0;
88651
+ const exchangeRate = convertToAssetsRaw * ONE_E1823 / underlyingUnit;
88652
+ const totalAssets = toBigInt16(aum) ?? totalSupply * convertToAssetsRaw / shareUnit;
88653
+ const headroom = toBigInt16(maxMint);
88654
+ return {
88655
+ totalAssets,
88656
+ totalSupply,
88657
+ exchangeRate,
88658
+ ...headroom !== void 0 && headroom !== MAX_UINT256 ? { depositCapacity: headroom * convertToAssetsRaw / shareUnit } : {}
88659
+ };
88660
+ }
88661
+ };
88662
+ };
88663
+
86277
88664
  // src/vaults/savings/readers/index.ts
86278
88665
  var buildReader2 = (entry2) => {
86279
88666
  switch (entry2.reader) {
@@ -86287,6 +88674,8 @@ var buildReader2 = (entry2) => {
86287
88674
  return readerHyperbeatVault(entry2);
86288
88675
  case "bitway-vault":
86289
88676
  return readerBitwayVault(entry2);
88677
+ case "zerobase-vault":
88678
+ return readerZerobaseVault(entry2);
86290
88679
  case "bitfi-bfbtc":
86291
88680
  return readerBitfiBfbtc(entry2);
86292
88681
  case "bitfi-vault":
@@ -86323,6 +88712,12 @@ var buildReader2 = (entry2) => {
86323
88712
  return readerSuperformVault(entry2);
86324
88713
  case "ember-vault":
86325
88714
  return readerEmberVault(entry2);
88715
+ case "mellow-core":
88716
+ return readerMellowCore(entry2);
88717
+ case "origin-wrapper":
88718
+ return readerOriginWrapper(entry2);
88719
+ case "aera-v3":
88720
+ return readerAeraV3(entry2);
86326
88721
  case "liminal-pipe":
86327
88722
  return readerLiminalPipe(entry2);
86328
88723
  case "veda-boring":
@@ -86337,6 +88732,12 @@ var buildReader2 = (entry2) => {
86337
88732
  return readerMorphoVaultV2(entry2);
86338
88733
  case "inverse-jrdola":
86339
88734
  return readerInverseJrDola(entry2);
88735
+ case "usdai-staked":
88736
+ return readerUsdaiStaked(entry2);
88737
+ case "yuzu-ilp":
88738
+ return readerYuzuIlp(entry2);
88739
+ case "makina-machine":
88740
+ return readerMakinaMachine(entry2);
86340
88741
  case "inverse-sinv":
86341
88742
  return readerInverseSinv(entry2);
86342
88743
  case "erc4626-cooldown":
@@ -86356,11 +88757,11 @@ var resolveYieldApr2 = async (entries) => (await resolveEntryApr(entries)).apr;
86356
88757
 
86357
88758
  // src/vaults/savings/fetchPublic.ts
86358
88759
  var ONE_E1824 = 10n ** 18n;
86359
- var resolveSelfOnly = (chainId, vault) => {
86360
- const entry2 = findSavingsWithdrawEntry(chainId, vault);
86361
- if (!entry2) return void 0;
86362
- return SAVINGS_RECEIVER_CAPABILITY[entry2.kind]?.exit === false ? true : void 0;
86363
- };
88760
+ var resolveSelfOnly = (chainId, vault) => (
88761
+ // The row's own override first (Aera's V1-provisioner rows are self-only
88762
+ // where the kind is not), then the kind table.
88763
+ savingsReceiverCapability(chainId, vault)?.exit === false ? true : void 0
88764
+ );
86364
88765
  var withSelfOnly = (routes2, selfOnly) => selfOnly === void 0 ? routes2 : routes2.map(
86365
88766
  (r) => r.kind === "market" || r.selfOnly !== void 0 ? r : { ...r, selfOnly }
86366
88767
  );
@@ -86609,7 +89010,10 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
86609
89010
  // liquidity adapter) and sBOLD's collateral gate.
86610
89011
  entry2.reader === "sbold" || entry2.reader === "morpho-vault-v2" || // Inverse sINV is 4626 on every leg; jrDOLA is 4626 on views and
86611
89012
  // deposit, its exit is the WithdrawalEscrow the savings kind builds.
86612
- entry2.reader === "inverse-sinv" || entry2.reader === "inverse-jrdola",
89013
+ entry2.reader === "inverse-sinv" || entry2.reader === "inverse-jrdola" || // sUSDai and yzSyrup are 4626 on the views and the deposit; their
89014
+ // exits are the request kinds (`usdai` / `yuzu`). Makina's share is a
89015
+ // bare ERC-20 and stays `false`.
89016
+ entry2.reader === "usdai-staked" || entry2.reader === "yuzu-ilp",
86613
89017
  isRebasing: entry2.isRebasing,
86614
89018
  isMintable: entry2.isMintable,
86615
89019
  mintContract: entry2.mintContract?.toLowerCase() ?? addressLc,
@@ -86620,7 +89024,7 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
86620
89024
  // On-chain wins over the registry's pinned fallback — Native's
86621
89025
  // queue window is per-asset and governance-mutable.
86622
89026
  withdrawalCooldownSeconds: state.withdrawalCooldownSeconds ?? entry2.withdrawalCooldownSeconds,
86623
- withdrawFeeBps: state.withdrawFeeBps,
89027
+ withdrawFeeBps: entry2.withdrawFeeBps ?? state.withdrawFeeBps,
86624
89028
  depositFeeBps: state.depositFeeBps,
86625
89029
  fee: state.performanceFeeBps !== void 0 ? state.performanceFeeBps / 100 : void 0,
86626
89030
  // Bond terms — absent on every perpetual vault. See the type.
@@ -86656,12 +89060,12 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
86656
89060
  // publishes no route at all — `fromVault` reads that as
86657
89061
  // `canWithdraw: false`, the same statement bfBTC's shut legs make.
86658
89062
  exitRoutes: state.exitPaused ? [] : withSelfOnly(
86659
- bitfiExitRoutes(
89063
+ state.exitRoutes ?? bitfiExitRoutes(
86660
89064
  state.bitfiExit,
86661
89065
  state.withdrawalCooldownSeconds ?? entry2.withdrawalCooldownSeconds
86662
89066
  ) ?? deriveExitRoutes({
86663
89067
  withdrawalMode: entry2.withdrawalMode,
86664
- withdrawFeeBps: state.withdrawFeeBps,
89068
+ withdrawFeeBps: entry2.withdrawFeeBps ?? state.withdrawFeeBps,
86665
89069
  queuedFeeBps: state.queuedFeeBps,
86666
89070
  withdrawalCooldownSeconds: state.withdrawalCooldownSeconds ?? entry2.withdrawalCooldownSeconds,
86667
89071
  liquidity: liquidityRaw,
@@ -86687,6 +89091,7 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
86687
89091
  depositCapacityFormatted,
86688
89092
  depositCapacityUsd,
86689
89093
  redemptionDiscountBps,
89094
+ fundamentalExchangeRate: state.fundamentalExchangeRate !== void 0 && state.fundamentalExchangeRate > 0n ? state.fundamentalExchangeRate.toString() : void 0,
86690
89095
  solvency: entry2.solvency,
86691
89096
  // Only the NAV-oracle reader's entries publish their share price from a
86692
89097
  // feed; on every other entry `priceOracle` is unset, so this stays absent
@@ -88324,6 +90729,21 @@ var VOLATILE_VAULT_OVERRIDES = /* @__PURE__ */ new Set([
88324
90729
  // 90 days to 2026-10-16 it grew ~1.1 % APR against kHYPE's own ~1.96 %.
88325
90730
  "999-0x9ba2edc44e0a4632eb4723e81d4142353e1bb160",
88326
90731
  // vkHYPE
90732
+ // ether.fi Liquid BTC — the same Veda accountant-MARK shape: its WBTC rate
90733
+ // fell 1.014252 → 1.013353 (−8.9 bps) between 2025-03-23 and 2025-04-15
90734
+ // and went sideways until 2025-09 (archival `getRate`, 2026-10-27). One
90735
+ // rate on both chains, so both rows. liquidETH / liquidUSD were monotonic
90736
+ // over the past year and stay yield-bearing.
90737
+ "1-0x5f46d540b6ed704c3c8789105f30e075aa900726",
90738
+ // liquidBTC
90739
+ "10-0x5f46d540b6ed704c3c8789105f30e075aa900726",
90740
+ // liquidBTC (Optimism)
90741
+ // Tokemak autoETH — an autopool marked to its LST/LRT pool positions: the
90742
+ // share price fell on 2 of 45 two-day samples to 2026-10-27 (worst
90743
+ // −0.0075 %). Small, but a mark, not a ratchet. autoUSD / baseUSD were
90744
+ // monotonic over the same window and stay yield-bearing.
90745
+ "1-0x0a2b94f6871c1d7a32fe58e1ab5e6dea2f114e56",
90746
+ // autoETH
88327
90747
  // Harmonix haHYPE (HyperEVM) — the share price is set from Harmonix's
88328
90748
  // delta-neutral fund NAV (an operator mark, the vkHYPE shape): it fell
88329
90749
  // 1.0468857 → 1.0468791 between 2026-10-06 and 2026-10-07, and Harmonix's
@@ -88371,6 +90791,19 @@ var VOLATILE_VAULT_OVERRIDES = /* @__PURE__ */ new Set([
88371
90791
  // yield-bearing.
88372
90792
  "10-0x91b8657aea26caa8a0e9d6dd4e24727ccf32f822",
88373
90793
  // mixWETH (Optimism)
90794
+ // Makina machines — the share price follows the AUM the machine's operators
90795
+ // post (caliber accounting over strategy positions), a MARK rather than an
90796
+ // accrual. Monotonic in every archival sample on 2026-10-27, and classified
90797
+ // as a family anyway (the Strata-junior call). `GAP_SWEEP_VOLATILE` in
90798
+ // savings/registryGapSweep.ts is the parity list.
90799
+ "1-0xac499adf00a54044b988a59b19016655c3494b06",
90800
+ // usdSHFmk (Steakhouse)
90801
+ "1-0xbef11279fa6db9fa284cbe7f0fa9799e06b2dcd7",
90802
+ // DCM (Dialectic)
90803
+ "1-0x1e33e98af620f1d563fcd3cfd3c75ace841204ef",
90804
+ // DUSD (Dialectic)
90805
+ "1-0x871ab8e36cae9af35c6a3488b049965233deb7ed",
90806
+ // DETH (Dialectic)
88374
90807
  // Sierra SIERRA — an operator-restated USDC exchange rate over OpenTrade
88375
90808
  // vaults holding marked credit (AAA CLOs, commercial paper) and a SOL basis
88376
90809
  // trade. Small, but a mark: four step-downs between 2026-09-16 and
@@ -90408,6 +92841,10 @@ function buildVaultLookup(data) {
90408
92841
  var push = (set, ...tags) => {
90409
92842
  for (const t of tags) set.add(t);
90410
92843
  };
92844
+ function isMarketPricedOracle(o) {
92845
+ const f = o?.flags ?? [];
92846
+ return f.includes("market-priced-redeemable") && !f.includes("market-price-borrow-only");
92847
+ }
90411
92848
  function marketTags(sheet) {
90412
92849
  const out = /* @__PURE__ */ new Set();
90413
92850
  const { governance: g, oracle: o } = sheet;
@@ -90427,6 +92864,7 @@ function marketTags(sheet) {
90427
92864
  if (o.band === "HIGH" || o.band === "CRITICAL") push(out, "oracle-flagged");
90428
92865
  if (o.flags?.some((f) => f === "wrong-asset" || f === "correlated-proxy"))
90429
92866
  push(out, "oracle-flagged");
92867
+ if (isMarketPricedOracle(o)) push(out, "oracle-market-priced");
90430
92868
  }
90431
92869
  return [...out];
90432
92870
  }
@@ -93374,6 +95812,19 @@ var FALLBACK_TRAITS = {
93374
95812
  hasDecomposableBacking: false,
93375
95813
  hasUtilization: false
93376
95814
  };
95815
+
95816
+ // src/terms/vault/svmCuration.ts
95817
+ var SVM_SAVINGS_CURATION = {
95818
+ // OnRe ONyc — a reinsurance fund's NAV share (margin-fetcher-sol `ONYC_DESCRIPTION`)
95819
+ "5Y8NV33Vv7WbnLfq3zBcKSdYPrk7g2KoiQoe7M2tcxp5": {
95820
+ solvency: "nav-attested",
95821
+ description: "ONyc is a share of OnRe\u2019s Bermuda reinsurance fund: the fund writes reinsurance contracts and holds stablecoin collateral against them, and the premiums plus the collateral\u2019s yield accrue as a rising dollar NAV per ONyc. This is REINSURANCE risk, not a dollar deposit: a catastrophe the contracts cover (a hurricane, an earthquake) is paid out of the fund and writes the NAV down, and the NAV is OnRe\u2019s own published figure over an off-chain book. OnRe keeps a freeze authority over the token. ONyc is minted at OnRe\u2019s offer price on chain; it exits by selling into OnRe\u2019s USDG pool or by a redemption request OnRe fulfils \u2014 neither is built in this API yet."
95822
+ }
95823
+ };
95824
+ var CI = new Map(
95825
+ Object.entries(SVM_SAVINGS_CURATION).map(([m, c]) => [m.toLowerCase(), c])
95826
+ );
95827
+ var svmSavingsCuration = (mint) => SVM_SAVINGS_CURATION[mint] ?? CI.get(mint.toLowerCase());
93377
95828
  var VAULT_VENUE_PREFIX = "vault.";
93378
95829
  function isVaultVenue(uidOrVenue) {
93379
95830
  return uidOrVenue.startsWith(VAULT_VENUE_PREFIX);
@@ -94361,6 +96812,12 @@ function toVaultTermInput(vault, provider, chainId) {
94361
96812
  }
94362
96813
  function savingsCuration(provider, chainId, address) {
94363
96814
  if (provider !== "savings") return {};
96815
+ const svm = svmSavingsCuration(address);
96816
+ if (svm)
96817
+ return {
96818
+ description: svm.description || void 0,
96819
+ solvency: svm.solvency
96820
+ };
94364
96821
  const lc2 = address.toLowerCase();
94365
96822
  const e = getSavingsRegistry(chainId).find((x) => x.address === lc2);
94366
96823
  if (!e) return {};
@@ -95594,6 +98051,14 @@ function marketFindings(sheet) {
95594
98051
  message: `The oracle does not price the intended asset${o.intendedPair ? ` (expected ${o.intendedPair})` : ""}.`
95595
98052
  });
95596
98053
  }
98054
+ if (isMarketPricedOracle(o)) {
98055
+ out.push({
98056
+ severity: "warn",
98057
+ id: "oracle-market-priced",
98058
+ side: "market",
98059
+ message: "The collateral is priced off its trading market, not its redemption value \u2014 a price wick or a manipulated thin market can trigger liquidations although the backing has not moved."
98060
+ });
98061
+ }
95597
98062
  if (o?.mutability?.mutable && !o.mutability.timelockSecs) {
95598
98063
  out.push({
95599
98064
  severity: "warn",
@@ -98062,13 +100527,13 @@ var LOOPSCALE_REFINANCE_TERM_DAYS = 1;
98062
100527
  var LOOPSCALE_MAX_COLLATERALS = 5;
98063
100528
  var LOOPSCALE_MAX_LEDGERS = 5;
98064
100529
  var LS_NO_ACCOUNT = "11111111111111111111111111111111";
98065
- var DAY6 = 86400;
100530
+ var DAY7 = 86400;
98066
100531
  var isNum6 = (v) => typeof v === "number" && Number.isFinite(v);
98067
100532
  function menuOf(input) {
98068
100533
  if (!input.terms?.length) return void 0;
98069
100534
  return input.terms.map((t) => ({
98070
100535
  ...t,
98071
- durationSecs: isNum6(t.durationSecs) ? t.durationSecs : Math.round(t.durationDays * DAY6)
100536
+ durationSecs: isNum6(t.durationSecs) ? t.durationSecs : Math.round(t.durationDays * DAY7)
98072
100537
  }));
98073
100538
  }
98074
100539
  function build4(input) {
@@ -98578,13 +101043,13 @@ var OFFERBOOK_PROGRAM_ID = "offerbkFMvVfpQhL8ZQ5iromnjct5rz3r52B9ewu3ie";
98578
101043
  var ORIGINATION_SHARE_OF_INTEREST = 0.25;
98579
101044
  var REPAY_SHARE_OF_INTEREST = 0.1;
98580
101045
  var CLAIM_FEE_PERCENT_OF_COLLATERAL = 0.1;
98581
- var DAY7 = 86400;
101046
+ var DAY8 = 86400;
98582
101047
  var isNum8 = (v) => typeof v === "number" && Number.isFinite(v);
98583
101048
  function menuOf2(input) {
98584
101049
  if (!input.terms?.length) return void 0;
98585
101050
  return input.terms.map((t) => ({
98586
101051
  ...t,
98587
- durationSecs: isNum8(t.durationSecs) ? t.durationSecs : Math.round(t.durationDays * DAY7)
101052
+ durationSecs: isNum8(t.durationSecs) ? t.durationSecs : Math.round(t.durationDays * DAY8)
98588
101053
  }));
98589
101054
  }
98590
101055
  function build8(input) {
@@ -98596,7 +101061,7 @@ function build8(input) {
98596
101061
  const tenor = durations.length ? {
98597
101062
  minDurationSecs: Math.min(...durations),
98598
101063
  maxDurationSecs: Math.max(...durations)
98599
- } : { minDurationSecs: DAY7, maxDurationSecs: 30 * DAY7 };
101064
+ } : { minDurationSecs: DAY8, maxDurationSecs: 30 * DAY8 };
98600
101065
  const isLoanLeg = cfg?.debtDisabled === false || input.rateModel === "fixedTerm" || !!input.terms?.length;
98601
101066
  const fixedRate = {
98602
101067
  kind: "fixed-term",
@@ -98938,6 +101403,16 @@ function toDigest(sheet) {
98938
101403
  fixedApr: sheet.swap.short.fixedApr
98939
101404
  }
98940
101405
  } : void 0,
101406
+ hedge: sheet.hedge ? {
101407
+ profile: sheet.hedge.profile,
101408
+ fixedApr: sheet.hedge.fixedApr,
101409
+ floatingApr: sheet.hedge.floatingApr,
101410
+ lockSpreadApr: sheet.hedge.lockSpreadApr,
101411
+ costApr: sheet.hedge.costApr,
101412
+ maturity: sheet.hedge.lockedUntil,
101413
+ executable: sheet.hedge.executable,
101414
+ headline: sheet.hedge.info.headline
101415
+ } : void 0,
98941
101416
  oracle: sheet.oracle ? {
98942
101417
  kind: sheet.oracle.kind,
98943
101418
  address: sheet.oracle.address,
@@ -99161,6 +101636,42 @@ function validateTermSheet(sheet) {
99161
101636
  if (sw.fees.some((f) => f.basis !== "notional"))
99162
101637
  fail("swap-fee-basis", "every swap fee is charged on notional");
99163
101638
  }
101639
+ const h = sheet.hedge;
101640
+ if (h) {
101641
+ if (/^PT[-_]/i.test(sheet.asset?.symbol ?? ""))
101642
+ fail(
101643
+ "hedge-principal-token",
101644
+ "a principal token has no floating funding to lock"
101645
+ );
101646
+ if (h.legs.length === 0)
101647
+ fail("hedge-legs", "a hedge needs at least one leg");
101648
+ const w = h.legs.reduce((s, l) => s + l.weight, 0);
101649
+ if (h.executable ? !approx(w, 1) : w > 1 + 1e-6)
101650
+ fail("hedge-weights", `leg weights sum to ${w}`);
101651
+ const now = sheet.asOf || Math.floor(Date.now() / 1e3);
101652
+ for (const l of h.legs)
101653
+ if (!(l.maturity > now))
101654
+ fail("hedge-maturity", `leg ${l.marketId} matured at ${l.maturity}`);
101655
+ if (h.lockedUntil !== Math.min(...h.legs.map((l) => l.maturity)))
101656
+ fail(
101657
+ "hedge-locked-until",
101658
+ "lockedUntil must be the earliest leg maturity"
101659
+ );
101660
+ if (h.fixedApr != null && h.floatingApr != null && (h.lockSpreadApr == null || !approx(h.lockSpreadApr, h.fixedApr - h.floatingApr)))
101661
+ fail(
101662
+ "hedge-spread",
101663
+ `lockSpreadApr ${h.lockSpreadApr} != fixed \u2212 floating ${h.fixedApr - h.floatingApr}`
101664
+ );
101665
+ if (!(h.costApr >= 0)) fail("hedge-cost", `costApr ${h.costApr} < 0`);
101666
+ if (!(h.marginPer1kUsd >= 0))
101667
+ fail("hedge-margin", `marginPer1kUsd ${h.marginPer1kUsd} < 0`);
101668
+ if (h.executable === !!h.blockedBy)
101669
+ fail(
101670
+ "blocked-reason",
101671
+ "hedge.executable must be false exactly when blockedBy is set"
101672
+ );
101673
+ if (!h.info?.headline) fail("headline", "hedge.info.headline is empty");
101674
+ }
99164
101675
  if (sheet.borrow) {
99165
101676
  const l = sheet.borrow.liquidation;
99166
101677
  if (l.seizure === "full-collateral") {
@@ -99725,7 +102236,13 @@ var SPL_STAKE_POOL_OPEN = {
99725
102236
  verbs: ["deposit", "withdraw", "request-withdraw", "claim"],
99726
102237
  nativeDeposit: true,
99727
102238
  nativeWithdraw: true,
99728
- requires: { withdraw: SHARES, "request-withdraw": SHARES }
102239
+ requires: { withdraw: SHARES, "request-withdraw": SHARES },
102240
+ withdrawNeedsInstantRoute: true
102241
+ };
102242
+ var SPL_STAKE_POOL_STAKE_EXIT = {
102243
+ verbs: ["deposit", "request-withdraw", "claim"],
102244
+ nativeDeposit: true,
102245
+ requires: { "request-withdraw": SHARES }
99729
102246
  };
99730
102247
  var SVM_EARN_VAULT_BUILDERS = {
99731
102248
  // jl tokens: a pay-asset conversion on deposit, none on withdraw; the
@@ -99863,10 +102380,11 @@ var SVM_EARN_VAULT_BUILDERS = {
99863
102380
  nativeWithdraw: true,
99864
102381
  requires: { withdraw: SHARES }
99865
102382
  },
99866
- // ezSOL (a Jito Restaking vault, served as `lst`): JitoSOL in (or SOL /
99867
- // wSOL, minted to JitoSOL first), a ticket out (by shares) after a 1–2
99868
- // epoch cooldown, the claim burns it into JitoSOL — no cancel exists
99869
- "lst:Renzo": {
102383
+ // Jito Restaking VRTs (Renzo ezSOL, Kyros kySOL — served as `lst`, both
102384
+ // over JitoSOL): JitoSOL in (or SOL / wSOL, minted to JitoSOL first), a
102385
+ // ticket out (by shares) after a 1–2 epoch cooldown, the claim burns it
102386
+ // into JitoSOL — no cancel exists
102387
+ "lst:jito-restaking": {
99870
102388
  verbs: ["deposit", "request-withdraw", "claim"],
99871
102389
  payAsset: true,
99872
102390
  depositInputs: [
@@ -99881,20 +102399,27 @@ var SVM_EARN_VAULT_BUILDERS = {
99881
102399
  nativeDeposit: true,
99882
102400
  requires: { "request-withdraw": SHARES }
99883
102401
  },
99884
- // SPL stake-pool LSTs (calldata-sdk-sol `ComposerStakePoolActions`): SOL /
99885
- // wSOL in through the pool's own DepositSol, at NAV. Out: the instant
99886
- // WithdrawSol from the reserve (by SHARES, capped by it) where the pool
99887
- // lets holders take it, and on EVERY pool the unstake — WithdrawStake into
99888
- // a wallet-owned stake account, deactivating (`request-withdraw`, by
99889
- // SHARES) — then `claim` once the epoch has turned (pays SOL).
99890
- "lst:Jito": SPL_STAKE_POOL_OPEN,
99891
- "lst:SolBlaze": SPL_STAKE_POOL_OPEN,
99892
- // BNSOL: the pool's SOL withdraw authority is its manager (a Binance key),
99893
- // so the instant leg is closed to holders — the unstake is the pool-side exit
99894
- "lst:Binance": {
99895
- verbs: ["deposit", "request-withdraw", "claim"],
102402
+ // SPL stake-pool LSTs and the Sanctum forks (calldata-sdk-sol
102403
+ // `ComposerStakePoolActions`): SOL / wSOL in through the pool's own
102404
+ // DepositSol, at NAV. Out: the instant WithdrawSol from the reserve (by
102405
+ // SHARES, capped by it) where the pool lets holders take it, and on EVERY
102406
+ // pool the unstake — WithdrawStake into a wallet-owned stake account,
102407
+ // deactivating (`request-withdraw`, by SHARES) — then `claim` once the
102408
+ // epoch has turned (pays SOL). The key per mint follows margin-fetcher-sol
102409
+ // `SPL_STAKE_POOL_LSTS[].solWithdrawOpen`.
102410
+ "lst:stake-pool": SPL_STAKE_POOL_OPEN,
102411
+ "lst:stake-pool-stake-exit": SPL_STAKE_POOL_STAKE_EXIT,
102412
+ // Marinade mSOL (calldata-sdk-sol `ComposerMarinadeActions`): SOL / wSOL in
102413
+ // through `deposit`; out the instant `liquid_unstake` against the SOL/mSOL
102414
+ // pool (by SHARES, capped by the pool's SOL, at its linear fee), or the
102415
+ // delayed `order_unstake` ticket (`request-withdraw`, by SHARES) and
102416
+ // `claim` (SOL) once the next epoch has started. No cancel.
102417
+ "lst:marinade": {
102418
+ verbs: ["deposit", "withdraw", "request-withdraw", "claim"],
99896
102419
  nativeDeposit: true,
99897
- requires: { "request-withdraw": SHARES }
102420
+ nativeWithdraw: true,
102421
+ requires: { withdraw: SHARES, "request-withdraw": SHARES },
102422
+ withdrawNeedsInstantRoute: true
99898
102423
  }
99899
102424
  };
99900
102425
  var SVM_EARN_MINT_BUILDERS = {
@@ -99913,12 +102438,60 @@ var SVM_EARN_MINT_BUILDERS = {
99913
102438
  GNE6oDS6jHrfaV3GQVVCCp37fDnT7PiPuewMKBj2bqNm: "savings:Hastra",
99914
102439
  // Sanctum INF
99915
102440
  "5oVNBeEEQvYi1cX3ir8Dx5n1P7pdxydbGF2X4TxVusJm": "savings:Sanctum",
99916
- // Renzo ezSOL (Jito Restaking VRT)
99917
- ezSoL6fY1PVdJcJsUpe5CM3xkfmy3zoVCABybm5WtiC: "lst:Renzo",
99918
- // SPL stake-pool LSTs (margin-fetcher-sol `SPL_STAKE_POOL_LSTS`)
99919
- J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn: "lst:Jito",
99920
- bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1: "lst:SolBlaze",
99921
- BNso1VUJnh4zcfpZa6986Ea66P6TCp59hvtNJ8b1X85: "lst:Binance"
102441
+ // Jito Restaking VRTs: Renzo ezSOL, Kyros kySOL
102442
+ ezSoL6fY1PVdJcJsUpe5CM3xkfmy3zoVCABybm5WtiC: "lst:jito-restaking",
102443
+ kySo1nETpsZE2NWe5vj2C64mPSciH1SppmHb4XieQ7B: "lst:jito-restaking",
102444
+ // Marinade mSOL
102445
+ mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So: "lst:marinade",
102446
+ // SPL stake-pool LSTs + Sanctum forks (margin-fetcher-sol
102447
+ // `SPL_STAKE_POOL_LSTS`) — WithdrawSol open to holders:
102448
+ J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn: "lst:stake-pool",
102449
+ // JitoSOL
102450
+ bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1: "lst:stake-pool",
102451
+ // bSOL
102452
+ jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v: "lst:stake-pool",
102453
+ // JupSOL
102454
+ sctmB7GPi5L2Q5G9tUSzXvhZ4YiDMEGcRov9KfArQpx: "lst:stake-pool",
102455
+ // dfdvSOL
102456
+ Bybit2vBJGhPF52GBdNaQfUJ6ZpThSgHBobjWZpLPb4B: "lst:stake-pool",
102457
+ // bbSOL
102458
+ he1iusmfkpAdwvxLNGV8Y1iSbj4rUy6yMhEA3fotn9A: "lst:stake-pool",
102459
+ // hSOL
102460
+ rkubjTrZYioRSeXwDnhwGQzvW3qkcin72JSxUt3WMVp: "lst:stake-pool",
102461
+ // rkuSOL
102462
+ BPSoLzmLQn47EP5aa7jmFngRL8KC3TWAeAwXwZD8ip3P: "lst:stake-pool",
102463
+ // bpSOL
102464
+ pSo1f9nQXWgXibFtKf7NWYxb5enAM4qfP6UJSiXRQfL: "lst:stake-pool",
102465
+ // pSOL
102466
+ vSoLxydx6akxyMD9XEcPvGYNGq6Nn66oqVb3UkGkei7: "lst:stake-pool",
102467
+ // vSOL
102468
+ "7Q2afV64in6N6SeZsAAB81TJzwDoD6zpqmHkzi9Dcavn": "lst:stake-pool",
102469
+ // JSOL
102470
+ aeroXvCT6tjGVNyTvZy86tFDwE4sYsKCh7FbNDcrcxF: "lst:stake-pool",
102471
+ // pdSOL
102472
+ jag58eRBC1c88LaAsRPspTMvoKJPbnzw9p9fREzHqyV: "lst:stake-pool",
102473
+ // jagSOL
102474
+ Gekfj7SL2fVpTDxJZmeC46cTYxinjB6gkAnb6EGT6mnn: "lst:stake-pool",
102475
+ // dzSOL
102476
+ stke7uu3fXHsGqKVVjKnkmj65LRPVrqr4bLG2SJg7rh: "lst:stake-pool",
102477
+ // stkeSOL
102478
+ // — WithdrawSol closed (stake exit only):
102479
+ BNso1VUJnh4zcfpZa6986Ea66P6TCp59hvtNJ8b1X85: "lst:stake-pool-stake-exit",
102480
+ // BNSOL (manager)
102481
+ hy1oXYgrBW6PVcJ4s6s2FKavRdwgWTXdfE69AxT7kPT: "lst:stake-pool-stake-exit",
102482
+ // hyloSOL (issuer key)
102483
+ Dso1bDeDjCQxTrWHqUUi63oBvV7Mdm6WaobLbQ7gnPQ: "lst:stake-pool-stake-exit",
102484
+ // dSOL (System Program sentinel)
102485
+ BonK1YhkXEGLZzwtcvRTip3gAL9nCeQD7ppZBLXhtTs: "lst:stake-pool-stake-exit",
102486
+ // bonkSOL (sentinel)
102487
+ strng7mqqc1MBJJV6vMzYbEqnwVGvKKGKedeCvtktWA: "lst:stake-pool-stake-exit"
102488
+ // strongSOL (sentinel)
102489
+ };
102490
+ var SVM_UNBUILT_MINT_REASONS = {
102491
+ // OnRe ONyc: the mint (take_offer_permissionless_v2) and the USDG sell
102492
+ // legs are ported (calldata-sdk-sol `spot/onre.ts`) but need 1delta's own
102493
+ // address lookup tables, which do not exist yet
102494
+ "5Y8NV33Vv7WbnLfq3zBcKSdYPrk7g2KoiQoe7M2tcxp5": "ONyc deposits and exits are not built in this API yet \u2014 the OnRe legs need 1delta address lookup tables that are not deployed; ONyc is served as data only"
99922
102495
  };
99923
102496
  var ROSTER_BRAND_BUILDERS = /* @__PURE__ */ new Set([
99924
102497
  "savings:Nest",
@@ -99962,9 +102535,12 @@ function svmEarnBuildability(venue, brand, ref) {
99962
102535
  const key5 = svmEarnBuilderKey(venue, ref, brand);
99963
102536
  const builder = key5 ? SVM_EARN_VAULT_BUILDERS[key5] : void 0;
99964
102537
  if (key5 && builder) return { ok: true, key: key5, builder };
102538
+ const byMint = ref ? SVM_UNBUILT_MINT_REASONS[ref] ?? Object.entries(SVM_UNBUILT_MINT_REASONS).find(
102539
+ ([m]) => m.toLowerCase() === ref.toLowerCase()
102540
+ )?.[1] : void 0;
99965
102541
  return {
99966
102542
  ok: false,
99967
- reason: UNBUILT_REASONS[provider] ?? "Deposits into this vault are not built in this API yet"
102543
+ reason: byMint ?? UNBUILT_REASONS[provider] ?? "Deposits into this vault are not built in this API yet"
99968
102544
  };
99969
102545
  }
99970
102546
 
@@ -100013,6 +102589,8 @@ function svmCapabilities(row) {
100013
102589
  for (const action of verbs) {
100014
102590
  const open = action === "deposit" ? row.availability.canDeposit : row.availability.canWithdraw;
100015
102591
  if (!open) continue;
102592
+ if (action === "withdraw" && builder.withdrawNeedsInstantRoute && row.exit?.routes?.length && !row.exit.routes.some((r) => r.id === "instant"))
102593
+ continue;
100016
102594
  const cap = { action };
100017
102595
  if (builder.via) cap.via = builder.via;
100018
102596
  if (action === "deposit") {
@@ -100086,9 +102664,16 @@ var NON_4626_DEPOSIT_KINDS = /* @__PURE__ */ new Set([
100086
102664
  "hyperbeat",
100087
102665
  "native-wnlp",
100088
102666
  "bitway",
102667
+ // Zerobase CeDeFi — `stake_66380860(token, amount)` on the multi-token vault,
102668
+ // credits msg.sender only.
102669
+ "zerobase",
100089
102670
  // Nest — the NestVault's own `deposit` is role-gated; entry is the predicate
100090
102671
  // proxy with an attestation bound to the sender, which a composer zap is not.
100091
- "nest"
102672
+ "nest",
102673
+ // Mellow core vaults — the deposit is a queue call minting to msg.sender.
102674
+ "mellow",
102675
+ // Aera V3 — the deposit is a solver-filled REQUEST on the provisioner.
102676
+ "aera"
100092
102677
  ]);
100093
102678
  function acceptsVaultZap(row, provider) {
100094
102679
  if (ZAP_EXCLUDED_PROVIDERS.has(provider)) return false;
@@ -101114,6 +103699,7 @@ var FUNDING_EXPOSURE_PROFILES = {
101114
103699
  assets: { BTC: 0.5, ETH: 0.5 },
101115
103700
  venues: ["Binance", "Bybit", "OKX", "Hyperliquid", "Gate"],
101116
103701
  fundingShare: "most \u2014 the remainder is ETH staking and the USDtb/T-bill leg",
103702
+ yieldBearing: ["SUSDE"],
101117
103703
  notes: [
101118
103704
  "sUSDe yield is Ethena\u2019s perp funding net of costs, blended across venues and assets and smoothed by its reserve fund; a single Boros market tracks one venue\u2019s funding on one asset."
101119
103705
  ]
@@ -101124,6 +103710,7 @@ var FUNDING_EXPOSURE_PROFILES = {
101124
103710
  assets: { ETH: 0.7, BTC: 0.3 },
101125
103711
  venues: ["Binance", "Hyperliquid", "Bybit", "OKX"],
101126
103712
  fundingShare: "part \u2014 the rest is staked-ETH yield, and RLP takes losses first",
103713
+ yieldBearing: ["STUSR", "WSTUSR"],
101127
103714
  notes: [
101128
103715
  "Resolv hedges staked ETH/BTC with short perps; stUSR receives the senior share of that funding, so its sensitivity to funding is below 1."
101129
103716
  ]
@@ -101137,10 +103724,10 @@ var SYMBOL_PROFILE = {
101137
103724
  WSTUSR: "resolv"
101138
103725
  };
101139
103726
  var isPrincipalTokenSymbol = (symbol) => !!symbol && /^PT[-_]/i.test(symbol);
103727
+ var fundingSymbolBase = (symbol) => symbol.toUpperCase().replace(/[-_ ]\d{1,2}[A-Z]{3}\d{2,4}$/, "").replace(/[-_ ](\d{4}-\d{2}-\d{2})$/, "");
101140
103728
  function fundingExposureOf(symbol) {
101141
103729
  if (!symbol || isPrincipalTokenSymbol(symbol)) return void 0;
101142
- const base = symbol.toUpperCase().replace(/[-_ ]\d{1,2}[A-Z]{3}\d{2,4}$/, "").replace(/[-_ ](\d{4}-\d{2}-\d{2})$/, "");
101143
- const id = SYMBOL_PROFILE[base];
103730
+ const id = SYMBOL_PROFILE[fundingSymbolBase(symbol)];
101144
103731
  return id ? FUNDING_EXPOSURE_PROFILES[id] : void 0;
101145
103732
  }
101146
103733
  var normSym = (s) => s.toUpperCase().replace(/₮/g, "T");
@@ -101233,6 +103820,173 @@ function quoteBorosHedgeLeg(p) {
101233
103820
  };
101234
103821
  }
101235
103822
 
101236
- export { ALCHEMIX_BLOCK_SECONDS, ApiBookSource, BOROS_API_BASE, BOROS_GOVERNANCE, BOROS_MIN_CASH_USD, BOROS_PROFILE_ID, BorosApiError, DEFAULT_CONSENSUS_DEMOTION, DEFAULT_MIDNIGHT_API, DEFAULT_OUTLIER_GUARD, DEFAULT_PROFILE_ID, DEFAULT_STALE_REJECT_SECONDS, DEFAULT_TERMMAX_API, DEFAULT_TERM_ORDER_STORE, DOLOMITE_ISO_ID_PREFIX, EARN_DESCRIPTIONS, EARN_LABELS, EARN_RATE_SOURCE_BY_PROVIDER, EMPTY_BALANCE, EXACTLY_LENDER_KEY, EXPONENT_MATURED_REASON, FIXED_YIELD_EARN_VENUE_PREFIXES, FLYING_TULIP_LENDER_KEY, FRACTION_RATE_PROVIDERS, FUNDING_EXPOSURE_PROFILES, GMX_API_HOSTS, GMX_READ_CONTRACTS, GMX_SUPPORTED_CHAINS, HYPERCORE_VAULT_REGISTRY, IDLE_MARKET_ID, INTERFACE_IDS, LAGOON_API_URL, LAGOON_CHAIN_IDS, MORPHO_LENS, MULTICALL_FAILURE, MaxParamThresholds, NON_EVM_VAULT_PROVIDERS, PASSTHROUGH_RATE_EPSILON, PENDLE_ASSETS_URL, PENDLE_CHAIN_IDS, PENDLE_MARKETS_URL2 as PENDLE_MARKETS_URL, PREFIX_LENDERS, RATE_QUEUE_MAX_LEVELS, RATE_QUEUE_STEP, RIPE_LENDER_KEY, SDK_FRACTION_RATE_PROVIDERS, SPECTRA_NETWORKS, SPECTRA_RATE_MAX_PERCENT, SPECTRA_RATE_MIN_PERCENT, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, SVM_EARN_MINT_BUILDERS, SVM_EARN_VAULT_BUILDERS, SVM_VAULT_PROVIDERS, TELLER_CALLS_PER_BID, DECIMAL_BASE as TERMMAX_DECIMAL_BASE, TERMMAX_LIQUIDATION_PENALTY, TERMMAX_LIQUIDATION_WINDOW_SECS, TERMMAX_LIQUIDATOR_BONUS, TERMMAX_MARKETS_PER_CALL, TERMMAX_PARTIAL_CLOSE_FACTOR, TERMMAX_PARTIAL_LIQUIDATION_THRESHOLD_USD, TERM_ADAPTERS, TERM_PROFILES, TERM_SHEET_SCHEMA_VERSION, TermMaxApiSource, TermSubgraphSource, UPSHIFT_CHAIN_IDS, UPSHIFT_VAULTS_URL, USER_REWARD_SOURCES, USER_SET_RATE_PICKS, VAULT_PROVIDERS, VAULT_PROVIDER_PROFILE, VAULT_PROVIDER_TRAITS, VAULT_SHARE_PRICE_PROBE, VAULT_VENUE_PREFIX, VENUS_CORE_POOL_ID, VOLATILE_VAULT_OVERRIDES, VenusEModeAbi, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, __resetResupplyUserCaches, accountDepositListKey, accountWithdrawalListKey, alchemixLenderKey, alchemixMytRate, alchemixRedemptionPace, appendSnapshot, applyEarnSanity, applyPositionDelta, attachImplications, attachPricesToFlashLiquidity, blockNumberFromTag, borosApi, borosInitialMargin, borosMaintenanceMargin, borosRateMoveToLiquidation, borosSideTerms, borosTakerFee, borrowDescription, borrowFindings, borrowHeadline, buildBorosTermSheet, buildExposures2 as buildExposures, buildFluidFTokensCall, buildLendingPositionUid, buildLiquityUserCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildQueriesFromMeta, buildRateQueue, buildSumerAccumulators, buildSummaries, buildTellerUserCall, buildTermMaxUserCall, buildTermSheet, buildTermSheetsForGroup, buildVaultEarnUid, buildVaultLookup, buildVaultTermSheet, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyFreshness, classifyReliability, classifyVault, clearPendleMarketsCache, clearSpectraMarketsCache, collateralSymbolsByVenue, collectFeedObservations, computeBorrowDelta2 as computeBorrowDelta, computeCloseTradeDeltas, computeCollateralSwapDeltas, computeDebtSwapDeltas, computeDepositDelta2 as computeDepositDelta, computeEModeAnalysis, computeOpenTradeDeltas, computePostTradeMetrics, computeRepayDelta2 as computeRepayDelta, computeSumerBorrowDelta, computeSumerDepositDelta, computeSumerRepayDelta, computeSumerWaterfall, computeSumerWithdrawDelta, computeVaultApr, computeWithdrawDelta2 as computeWithdrawDelta, computeZapTradeDeltas, consensusReference, convertAlchemixMarketsToResponse, convertBorosCandle, convertBorosMarket, convertCoolerMarketsToResponse, convertDssMarketsToResponse, convertExactlyMarketsToResponse, convertFlexMarketsToResponse, convertFlyingTulipMarketsToResponse, convertFrankencoinMarketsToResponse, convertFraxlendPairsToResponse, convertInverseMarketsToResponse, convertLenderUserDataResult, convertLiquityMarketsToResponse, convertLlamaLendMarketsToResponse, convertResupplyMarketsToResponse, convertRipeMarketsToResponse, convertRiverMarketsToResponse, convertTellerMarketsToResponse, convertTermMarketsToResponse, convertTermMaxMarketsToResponse, convertUsddMarketsToResponse, createMarketUid, createMidnightBookSource, createMultiAccountTypeUserState, createMulticallRpcCall, createRawRpcCalls, createTermBookSource, createTermMaxDataSource, debtAheadOf, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, deriveBorrowTags, deriveSupplyTags, deriveSwapTags, detectInterfaceKinds, dexResolverFor, disambiguateEarnNames, disambiguateOrderBookNames, discoverFlexTroves, dolomiteVaultAddress, dssIlkBytes32, dssKeyParts, dssLenderKey, duration, earnDescription, earnLabel, earnMarketFromPool, earnMarketFromVault, earnMarketLabel, earnPositionFromLenderEntry, earnPositionFromVaultBalance, earnPositionTotals, earnRateAtMaturity, earnRowSubtitle, earnUidFromMarketUid, earnVaultTerms, earnVenueKind, emitterCoverage, encodeBalanceFetcherCalldata, enrichTermSheet, enrichmentIndexFromRows, enumerateEmitters, exactlyPairLtv, exactlyPenaltyRateToAprPercent, exactlyWadRateToPercent, feePhrase, feedKeyOf, feedStatKey, fetchAaveIncentivesUserRewards, fetchAlchemixMarkets, fetchBorosAccount, fetchBorosCollaterals, fetchBorosMarket, fetchBorosMarketById, fetchBorosMarkets, fetchBorosOrderBook, fetchBorosRateHistory, fetchCoolerMarkets, fetchDolomiteAccountNumbers, fetchDolomiteSubAccounts, fetchDssMarkets, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchExactlyMarkets, fetchFlashLiquidityForChain, fetchFlexMarkets, fetchFluidDexState, fetchFluidFTokens, fetchFlyingTulipMarkets, fetchFlyingTulipUserRewards, fetchFrankencoinMarkets, fetchFraxlendPairs, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchInverseMarkets, fetchLagoonApiVaults, fetchLagoonVaults, fetchLenderRewards, fetchLenderRewardsByMarketUid, fetchLiquityMarkets, fetchListaMarketEmissions, fetchListaUserRewards, fetchListaVaultEmissions, fetchListaVaultsFromChain, fetchLlamaLendMarkets, fetchMerklUserRewards, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendleApiAssets, fetchPendleApiMarkets, fetchPendlePrices, fetchPendlePtMarkets, fetchResupplyMarkets, fetchRipeMarkets, fetchRiverMarkets, fetchSiloVaults, fetchSpectraApiMarkets, fetchSpectraPtMarkets, fetchTellerMarkets, fetchTermMarkets, fetchTermMaxMarkets, fetchTermStoreOrders, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchUsddMarkets, fetchUserRewards, fetchUsualRewardsClaimData, fetchYearnApiVaults, fetchYearnVaults, fillableRemaining, filterActiveLenders, filterLenderMeta, filterLendersByProtocol, finalizeInfo, findingsFor, flexAverageRate, flexLenderApr, flexLenderKey, flexMarketIndex, formatRaw, frankencoinKeyParts, frankencoinLenderKey, fraxlendAssetPerCollateral, fraxlendKeyParts, fraxlendLenderKey, fundingExposureOf, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, getCachedFluidDexState, getCachedLiquityTroves, getCachedTellerBids, getCachedTermMaxDiscovery, getCachedTermMaxMarket, getCachedTermMaxMarkets, getCoreValidators, getFluidFTokensConverter, getGmxApiHost, getGmxReadContracts, getGmxUserPositions, getHealthFactor, getHypercoreUserPositions, getHypercoreVaultRegistry, getLenderAssets, getLenderPublicData, getLenderPublicDataAll, getLenderPublicDataViaApi, getLenderUserDataMulti, getLenderUserDataResult, getLendersForChain, getLstDelegation, getLstValidators, getLstWithdrawalRegistry, getLstWithdrawalRequests, getMaxAmountClose, getMaxAmountCollateralSwap, getMaxAmountDebtSwap, getMaxAmountOpen, getMergedUserData, getMidnightChainBooks, getMorphoTypeMarketConverter, getReadFailurePolicy, getResolvedDolomiteAccountNumbers, getResolvedDolomiteSubAccounts, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getTermProfile, getVaultPublicDataAll, getVaultWithdrawalRequests, getVenusEModeSetup, hasCritical, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasPendleMarkets, hasSpectraMarkets, hasUpshiftVaults, hasYearnVaults, ilkToKeySegment, implausibleRatePercent, injectLenderInfoIntoEntries, inverseKeyParts, inverseLenderKey, isBoundNeed, isFailedCall, isFixedYieldEarnRow, isIlliquid, isLenderVenueKey, isLendingPosition, isLiveMarket as isLivePendleMarket, isLiveSpectraMarket, isMaturedTerm, isOrderBookCollateralLeg, isOrderBookLendRow, isPrincipalTokenSymbol, isRollingBookLendRow, isSecondaryMarketOnly, isStablecoinSymbol, isSyntheticQuoteUnit, isUnearnableEarnRate, isUnrealizableEarnRate, isVaultPosition, isVaultVenue, isYearnV3, keySegmentToIlk, keysFromMaps, lenderApiOnly, lenderFamily, lenderLiquidityPressure, liquityCandidateTroveIds, liquityKeyParts, liquityLenderKey, listaEmissionRewardFetcher, listaLoginMessage, llamaLendKeyParts, llamaLendLenderKey, marketKeysOf, meetsLiquidityFloor, mergeDeep, multicall3Abi2 as multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, organizeUserQueries, parseBalanceFetcherResult, parseDolomiteSubAccountId, parseEarnUid, parseLenderKey, parseMergedResult, parseMulticallRpcResponses, parseExpirySeconds as parsePendleExpirySeconds, parseRawRpcBatchResponses, parseRawRpcResponses, parseCurveFee as parseSpectraCurveFee, parsePtRate as parseSpectraPtRate, parseTermMaxLtv, parseTokenBalanceResult, pct, pegPressure, assetKey as pendleAssetKey, pickPool as pickSpectraPool, positivePart2 as positivePart, predictInverseEscrow, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, probeAaveFeedTimestamps, protocolConsensus, protocolOf, pruneFeedStats, quoteBorosHedgeLeg, rankBorosHedgeMarkets, rankFindings, ratePercent, readUserPositions, readVaultSharePrices, rejectOutliers as rejectPriceOutliers, repairImpossibleTvl, resolveAdapter, resolveDerivation, resolveDolomiteRowIdentity, resolveEarnIdentity, resolveMerklOpportunityMarkets, resolveModeConfig, resolveStCeloDepositGroup, resolveVaultProfileId, resupplyKeyParts, resupplyLenderKey, resupplyMarketLabel, riverKeyParts, riverLenderKey, sanePercent as saneSpectraPercent, savingsAddresses, savingsBalanceKind, secondaryMarketVault, selectAssetGroupPrices, selectUsualRewardEntry, setMysticApiKey, shortDate, spectraAddress, spectraNetwork, spectraPoolsUrl, splitChainScopedAddress as splitPendleChainScopedAddress, stampCapabilities, stampEarnSubtitles, stampOrderBookLendRow, stampRollingBookLendRow, stampVaultClassification, stampVaultTermSheets, stripLeadingBrand, subAccountsOf, supplyDescription, supplyFindings, supplyHeadline, svmEarnBuildability, svmEarnBuilderKey, swapRoutedProvidersArePriceConsistent, swapSideDescription, swapSideHeadline, swapSideImplications, tellerBpsToPercent, tellerImpliedLtv, tellerLenderKey, tellerPoolFromLenderKey, termApiBaseUrl, termLenderKey, termMaxApiBase, borrowNif as termMaxBorrowNif, curveApr as termMaxCurveApr, curveAprNumber as termMaxCurveAprNumber, daysToMaturity as termMaxDaysToMaturity, lendNif as termMaxLendNif, mintGtFeeRatio as termMaxMintGtFeeRatio, ratioToNumber as termMaxRatioToNumber, ratioToPercent as termMaxRatioToPercent, termOfferRateToAprPct, termOrderStoreBaseUrl, tickToAprNumber, tickToPrice, toDigest, toDolomiteSubAccountId, toTermFillNow, toTermSheetInput, toVaultTermInput, trancheFromCounterparty, tryParseEarnUid, unflattenLenderData, updateFeedStats, usdValue, usddIlkBytes32, usddKeyParts, usddLenderKey, validateTermSheet, validateTermSheets, validateUserData, vaultSharesToAssets, vaultTermInputFromEarnMarket, vaultTermInputFromSourceRow, vaultTraits, vaultVenue, venueBrand, venueBrandKey, walkBorosBook, withMaturityLabel, withTrancheLabel };
103823
+ // src/boros/hedgeTerms.ts
103824
+ var FUNDING_HEDGE_REFERENCE_USD = 1e4;
103825
+ var BOROS_CHAIN = "42161";
103826
+ function earnRowFundingProfile(row) {
103827
+ if (row.venueKind !== "lending" && row.venueKind !== "vault") return void 0;
103828
+ if (row.maturity != null) return void 0;
103829
+ const symbols = [
103830
+ row.venueKind === "vault" ? row.shareToken?.symbol : void 0,
103831
+ row.asset?.symbol
103832
+ ].filter((s) => !!s);
103833
+ if (symbols.some(isPrincipalTokenSymbol) || isPrincipalTokenSymbol(row.name))
103834
+ return void 0;
103835
+ for (const s of symbols) {
103836
+ const p = fundingExposureOf(s);
103837
+ if (p && p.yieldBearing.includes(fundingSymbolBase(s))) return p;
103838
+ }
103839
+ return void 0;
103840
+ }
103841
+ var MIN_FILL = 0.95;
103842
+ function buildFundingHedgeTerms(i) {
103843
+ const ref = i.referenceNotionalUsd ?? FUNDING_HEDGE_REFERENCE_USD;
103844
+ const quoted = i.legs.filter(
103845
+ (l) => !!l.quote
103846
+ );
103847
+ if (quoted.length === 0) return void 0;
103848
+ const legs = quoted.map(({ weight, quote: q }) => ({
103849
+ weight,
103850
+ marketId: q.marketId,
103851
+ venue: q.venue,
103852
+ asset: q.asset,
103853
+ maturity: q.maturity,
103854
+ marginToken: q.collateral.symbol,
103855
+ ...q.fixedAprPct != null ? { fixedApr: q.fixedAprPct } : {},
103856
+ ...q.floatingAprPct != null ? { floatingApr: q.floatingAprPct } : {},
103857
+ fillRatio: q.fillRatio
103858
+ }));
103859
+ const wavg = (f) => {
103860
+ let s = 0;
103861
+ let w = 0;
103862
+ for (const l of quoted) {
103863
+ const v = f(l.quote);
103864
+ if (v == null) return void 0;
103865
+ s += v * l.weight;
103866
+ w += l.weight;
103867
+ }
103868
+ return w > 0 ? s / w : void 0;
103869
+ };
103870
+ const fixedApr = wavg((q) => q.fixedAprPct);
103871
+ const floatingApr = wavg((q) => q.floatingAprPct);
103872
+ const lockSpreadApr = fixedApr != null && floatingApr != null ? fixedApr - floatingApr : void 0;
103873
+ const costApr = Math.max(0, wavg((q) => q.costs.allInAprPct ?? 0) ?? 0);
103874
+ const pricedNotional = quoted.reduce((s, l) => s + l.quote.notionalUsd, 0);
103875
+ const marginUsd = quoted.reduce(
103876
+ (s, l) => s + l.quote.margin.initialUsd * i.marginBuffer + l.quote.costs.takerFeeUsd,
103877
+ 0
103878
+ );
103879
+ const marginPer1kUsd = pricedNotional > 0 ? marginUsd / pricedNotional * 1e3 : 0;
103880
+ const moves = quoted.map((l) => l.quote.margin.rateMoveToLiquidationPct).filter((x) => x != null && Number.isFinite(x));
103881
+ const adverseMoveApr = moves.length ? Math.min(...moves) : void 0;
103882
+ const lockedUntil = Math.min(...legs.map((l) => l.maturity));
103883
+ const blockedBy = quoted.length < i.legs.length ? "no-market" : quoted.some(
103884
+ (l) => l.quote.fixedAprPct == null || l.quote.fillRatio < MIN_FILL
103885
+ ) ? "no-liquidity" : void 0;
103886
+ const basis = i.basis && i.basis.days > 0 ? basisBlock(i.basis) : void 0;
103887
+ const block = {
103888
+ kind: "boros-funding-lock",
103889
+ profile: i.profile.id,
103890
+ chainId: BOROS_CHAIN,
103891
+ referenceNotionalUsd: ref,
103892
+ legs,
103893
+ ...fixedApr != null ? { fixedApr } : {},
103894
+ ...floatingApr != null ? { floatingApr } : {},
103895
+ ...lockSpreadApr != null ? { lockSpreadApr } : {},
103896
+ costApr,
103897
+ marginPer1kUsd,
103898
+ marginBuffer: i.marginBuffer,
103899
+ minCashUsd: BOROS_MIN_CASH_USD,
103900
+ ...adverseMoveApr != null ? { adverseMoveApr } : {},
103901
+ lockedUntil,
103902
+ ...basis ? { basis } : {},
103903
+ executable: !blockedBy,
103904
+ ...blockedBy ? { blockedBy } : {},
103905
+ action: {
103906
+ route: "/v1/actions/boros/hedge",
103907
+ params: { exposure: i.profile.id, tenor: "longest" }
103908
+ }
103909
+ };
103910
+ return {
103911
+ ...block,
103912
+ info: {
103913
+ headline: hedgeHeadline(block),
103914
+ description: hedgeDescription(block, i.profile),
103915
+ implications: hedgeImplications(block, i.profile),
103916
+ tags: ["rate-swap", "margined", "rate-liquidation"]
103917
+ }
103918
+ };
103919
+ }
103920
+ function basisBlock(b) {
103921
+ const num23 = (x) => x != null && Number.isFinite(x) ? x : void 0;
103922
+ const meanGapApr = num23(b.meanGap);
103923
+ const trackingErrorApr = num23(b.trackingError);
103924
+ const correlation = num23(b.correlation);
103925
+ const beta = num23(b.beta);
103926
+ const parts = [];
103927
+ if (meanGapApr != null)
103928
+ parts.push(
103929
+ `the published yield ran ${pct(Math.abs(meanGapApr))} ${meanGapApr >= 0 ? "above" : "below"} the funding a lock fixes on average`
103930
+ );
103931
+ if (trackingErrorApr != null)
103932
+ parts.push(`tracking error ${pct(trackingErrorApr)}`);
103933
+ if (correlation != null) parts.push(`correlation ${correlation.toFixed(2)}`);
103934
+ const trackingNote = `Over ${b.days} days ${parts.length ? parts.join(", ") : "no overlapping readings were recorded"} \u2014 the lock fixes the funding, not the yield.`;
103935
+ return {
103936
+ days: b.days,
103937
+ ...meanGapApr != null ? { meanGapApr } : {},
103938
+ ...trackingErrorApr != null ? { trackingErrorApr } : {},
103939
+ ...correlation != null ? { correlation } : {},
103940
+ ...beta != null ? { beta } : {},
103941
+ trackingNote
103942
+ };
103943
+ }
103944
+ function hedgeHeadline(h) {
103945
+ if (h.blockedBy === "no-market")
103946
+ return `Boros funding lock: no tradable market for every leg (to ${shortDate(h.lockedUntil)})`;
103947
+ if (h.fixedApr == null)
103948
+ return `Boros funding lock: no bids on the book now (to ${shortDate(h.lockedUntil)})`;
103949
+ return `Lock fixed ${pct(h.fixedApr)}` + (h.floatingApr != null ? ` (funding now ${pct(h.floatingApr)})` : "") + ` until ${shortDate(h.lockedUntil)} \xB7 cost ${pct(h.costApr)}/yr \xB7 $${Math.round(h.marginPer1kUsd)} margin per $1k`;
103950
+ }
103951
+ function hedgeDescription(h, p) {
103952
+ const legs = h.legs.map(
103953
+ (l) => `${Math.round(l.weight * 100)} % ${l.venue} ${l.asset} funding (market ${l.marketId}, ${l.marginToken} margin)`
103954
+ ).join(" and ");
103955
+ const [share, rest] = p.fundingShare.split(" \u2014 ");
103956
+ return `Perp funding is ${share} of the ${p.label} yield${rest ? ` (${rest})` : ""}. A SHORT YU on Pendle Boros (Arbitrum) pays that floating funding and receives a fixed rate on a USD notional until ${shortDate(h.lockedUntil)}: ${legs}. It is a separate, margined position next to this one \u2014 nothing here changes this row\u2019s own terms.`;
103957
+ }
103958
+ function hedgeImplications(h, p) {
103959
+ const out = [];
103960
+ if (h.lockSpreadApr != null)
103961
+ out.push(
103962
+ `At today\u2019s rates the lock ${h.lockSpreadApr >= 0 ? "gains" : "gives up"} ${pct(Math.abs(h.lockSpreadApr))}/yr against current funding, before ${pct(h.costApr)}/yr of Boros fees.`
103963
+ );
103964
+ out.push(
103965
+ "One Boros market tracks ONE venue\u2019s funding on ONE asset; the issuer\u2019s yield blends venues and assets and is smoothed \u2014 the lock fixes the funding, not the yield."
103966
+ );
103967
+ if (h.basis) out.push(h.basis.trackingNote);
103968
+ out.push(
103969
+ `The lock ends at ${shortDate(h.lockedUntil)} and must then be re-hedged at the rate of that day.`
103970
+ );
103971
+ out.push(
103972
+ `Margin sits on Arbitrum: a funding spike costs margin there while this position earns more on its own chain, and nothing nets the two` + (h.adverseMoveApr != null ? ` \u2014 at ${h.marginBuffer}\xD7 initial margin a rise of ~${pct(h.adverseMoveApr)} takes it to liquidation.` : ".")
103973
+ );
103974
+ if (h.legs.some((l) => /ETH/i.test(l.marginToken)))
103975
+ out.push(
103976
+ "A WETH-margined leg carries ETH price exposure on the margin itself."
103977
+ );
103978
+ out.push(...p.notes);
103979
+ if (h.blockedBy === "no-liquidity")
103980
+ out.push(
103981
+ `The book cannot fill a $${h.referenceNotionalUsd.toLocaleString("en-US")} lock on every leg right now.`
103982
+ );
103983
+ if (h.blockedBy === "no-market")
103984
+ out.push(
103985
+ "At least one asset of the funding book has no tradable Boros market; that share stays unhedged."
103986
+ );
103987
+ return out;
103988
+ }
103989
+
103990
+ export { ALCHEMIX_BLOCK_SECONDS, ApiBookSource, BOROS_API_BASE, BOROS_GOVERNANCE, BOROS_MIN_CASH_USD, BOROS_PROFILE_ID, BorosApiError, DEFAULT_CONSENSUS_DEMOTION, DEFAULT_MIDNIGHT_API, DEFAULT_OUTLIER_GUARD, DEFAULT_PROFILE_ID, DEFAULT_STALE_REJECT_SECONDS, DEFAULT_TERMMAX_API, DEFAULT_TERM_ORDER_STORE, DOLOMITE_ISO_ID_PREFIX, EARN_DESCRIPTIONS, EARN_LABELS, EARN_RATE_SOURCE_BY_PROVIDER, EMPTY_BALANCE, EXACTLY_LENDER_KEY, EXPONENT_MATURED_REASON, FIXED_YIELD_EARN_VENUE_PREFIXES, FLYING_TULIP_LENDER_KEY, FRACTION_RATE_PROVIDERS, FUNDING_EXPOSURE_PROFILES, FUNDING_HEDGE_REFERENCE_USD, GMX_API_HOSTS, GMX_READ_CONTRACTS, GMX_SUPPORTED_CHAINS, HYPERCORE_VAULT_REGISTRY, IDLE_MARKET_ID, INTERFACE_IDS, LAGOON_API_URL, LAGOON_CHAIN_IDS, MORPHO_LENS, MULTICALL_FAILURE, MaxParamThresholds, NON_EVM_VAULT_PROVIDERS, PASSTHROUGH_RATE_EPSILON, PENDLE_ASSETS_URL, PENDLE_CHAIN_IDS, PENDLE_MARKETS_URL2 as PENDLE_MARKETS_URL, PREFIX_LENDERS, RATE_QUEUE_MAX_LEVELS, RATE_QUEUE_STEP, RIPE_LENDER_KEY, SDK_FRACTION_RATE_PROVIDERS, SPECTRA_NETWORKS, SPECTRA_RATE_MAX_PERCENT, SPECTRA_RATE_MIN_PERCENT, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, SVM_EARN_MINT_BUILDERS, SVM_EARN_VAULT_BUILDERS, SVM_SAVINGS_CURATION, SVM_VAULT_PROVIDERS, TELLER_CALLS_PER_BID, DECIMAL_BASE as TERMMAX_DECIMAL_BASE, TERMMAX_LIQUIDATION_PENALTY, TERMMAX_LIQUIDATION_WINDOW_SECS, TERMMAX_LIQUIDATOR_BONUS, TERMMAX_MARKETS_PER_CALL, TERMMAX_PARTIAL_CLOSE_FACTOR, TERMMAX_PARTIAL_LIQUIDATION_THRESHOLD_USD, TERM_ADAPTERS, TERM_PROFILES, TERM_SHEET_SCHEMA_VERSION, TermMaxApiSource, TermSubgraphSource, UPSHIFT_CHAIN_IDS, UPSHIFT_VAULTS_URL, USER_REWARD_SOURCES, USER_SET_RATE_PICKS, VAULT_PROVIDERS, VAULT_PROVIDER_PROFILE, VAULT_PROVIDER_TRAITS, VAULT_SHARE_PRICE_PROBE, VAULT_VENUE_PREFIX, VENUS_CORE_POOL_ID, VOLATILE_VAULT_OVERRIDES, VenusEModeAbi, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, __resetResupplyUserCaches, accountDepositListKey, accountWithdrawalListKey, alchemixLenderKey, alchemixMytRate, alchemixRedemptionPace, appendSnapshot, applyEarnSanity, applyPositionDelta, attachImplications, attachPricesToFlashLiquidity, blockNumberFromTag, borosApi, borosInitialMargin, borosMaintenanceMargin, borosRateMoveToLiquidation, borosSideTerms, borosTakerFee, borrowDescription, borrowFindings, borrowHeadline, buildBorosTermSheet, buildExposures2 as buildExposures, buildFluidFTokensCall, buildFundingHedgeTerms, buildLendingPositionUid, buildLiquityUserCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildQueriesFromMeta, buildRateQueue, buildSumerAccumulators, buildSummaries, buildTellerUserCall, buildTermMaxUserCall, buildTermSheet, buildTermSheetsForGroup, buildVaultEarnUid, buildVaultLookup, buildVaultTermSheet, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyFreshness, classifyReliability, classifyVault, clearPendleMarketsCache, clearSpectraMarketsCache, collateralSymbolsByVenue, collectFeedObservations, computeBorrowDelta2 as computeBorrowDelta, computeCloseTradeDeltas, computeCollateralSwapDeltas, computeDebtSwapDeltas, computeDepositDelta2 as computeDepositDelta, computeEModeAnalysis, computeOpenTradeDeltas, computePostTradeMetrics, computeRepayDelta2 as computeRepayDelta, computeSumerBorrowDelta, computeSumerDepositDelta, computeSumerRepayDelta, computeSumerWaterfall, computeSumerWithdrawDelta, computeVaultApr, computeWithdrawDelta2 as computeWithdrawDelta, computeZapTradeDeltas, consensusReference, convertAlchemixMarketsToResponse, convertBorosCandle, convertBorosMarket, convertCoolerMarketsToResponse, convertDssMarketsToResponse, convertExactlyMarketsToResponse, convertFlexMarketsToResponse, convertFlyingTulipMarketsToResponse, convertFrankencoinMarketsToResponse, convertFraxlendPairsToResponse, convertInverseMarketsToResponse, convertLenderUserDataResult, convertLiquityMarketsToResponse, convertLlamaLendMarketsToResponse, convertResupplyMarketsToResponse, convertRipeMarketsToResponse, convertRiverMarketsToResponse, convertTellerMarketsToResponse, convertTermMarketsToResponse, convertTermMaxMarketsToResponse, convertUsddMarketsToResponse, createMarketUid, createMidnightBookSource, createMultiAccountTypeUserState, createMulticallRpcCall, createRawRpcCalls, createTermBookSource, createTermMaxDataSource, debtAheadOf, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, deriveBorrowTags, deriveSupplyTags, deriveSwapTags, detectInterfaceKinds, dexResolverFor, disambiguateEarnNames, disambiguateOrderBookNames, discoverFlexTroves, dolomiteVaultAddress, dssIlkBytes32, dssKeyParts, dssLenderKey, duration, earnDescription, earnLabel, earnMarketFromPool, earnMarketFromVault, earnMarketLabel, earnPositionFromLenderEntry, earnPositionFromVaultBalance, earnPositionTotals, earnRateAtMaturity, earnRowFundingProfile, earnRowSubtitle, earnUidFromMarketUid, earnVaultTerms, earnVenueKind, emitterCoverage, encodeBalanceFetcherCalldata, enrichTermSheet, enrichmentIndexFromRows, enumerateEmitters, exactlyPairLtv, exactlyPenaltyRateToAprPercent, exactlyWadRateToPercent, feePhrase, feedKeyOf, feedStatKey, fetchAaveIncentivesUserRewards, fetchAlchemixMarkets, fetchBorosAccount, fetchBorosCollaterals, fetchBorosMarket, fetchBorosMarketById, fetchBorosMarkets, fetchBorosOrderBook, fetchBorosRateHistory, fetchCoolerMarkets, fetchDolomiteAccountNumbers, fetchDolomiteSubAccounts, fetchDssMarkets, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchExactlyMarkets, fetchFlashLiquidityForChain, fetchFlexMarkets, fetchFluidDexState, fetchFluidFTokens, fetchFlyingTulipMarkets, fetchFlyingTulipUserRewards, fetchFrankencoinMarkets, fetchFraxlendPairs, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchInverseMarkets, fetchLagoonApiVaults, fetchLagoonVaults, fetchLenderRewards, fetchLenderRewardsByMarketUid, fetchLiquityMarkets, fetchListaMarketEmissions, fetchListaUserRewards, fetchListaVaultEmissions, fetchListaVaultsFromChain, fetchLlamaLendMarkets, fetchMerklUserRewards, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendleApiAssets, fetchPendleApiMarkets, fetchPendlePrices, fetchPendlePtMarkets, fetchResupplyMarkets, fetchRipeMarkets, fetchRiverMarkets, fetchSiloVaults, fetchSpectraApiMarkets, fetchSpectraPtMarkets, fetchTellerMarkets, fetchTermMarkets, fetchTermMaxMarkets, fetchTermStoreOrders, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchUsddMarkets, fetchUserRewards, fetchUsualRewardsClaimData, fetchYearnApiVaults, fetchYearnVaults, fillableRemaining, filterActiveLenders, filterLenderMeta, filterLendersByProtocol, finalizeInfo, findingsFor, flexAverageRate, flexLenderApr, flexLenderKey, flexMarketIndex, formatRaw, frankencoinKeyParts, frankencoinLenderKey, fraxlendAssetPerCollateral, fraxlendKeyParts, fraxlendLenderKey, fundingExposureOf, fundingSymbolBase, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, getCachedFluidDexState, getCachedLiquityTroves, getCachedTellerBids, getCachedTermMaxDiscovery, getCachedTermMaxMarket, getCachedTermMaxMarkets, getCoreValidators, getFluidFTokensConverter, getGmxApiHost, getGmxReadContracts, getGmxUserPositions, getHealthFactor, getHypercoreUserPositions, getHypercoreVaultRegistry, getLenderAssets, getLenderPublicData, getLenderPublicDataAll, getLenderPublicDataViaApi, getLenderUserDataMulti, getLenderUserDataResult, getLendersForChain, getLstDelegation, getLstValidators, getLstWithdrawalRegistry, getLstWithdrawalRequests, getMaxAmountClose, getMaxAmountCollateralSwap, getMaxAmountDebtSwap, getMaxAmountOpen, getMergedUserData, getMidnightChainBooks, getMorphoTypeMarketConverter, getReadFailurePolicy, getResolvedDolomiteAccountNumbers, getResolvedDolomiteSubAccounts, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getTermProfile, getVaultPublicDataAll, getVaultWithdrawalRequests, getVenusEModeSetup, hasCritical, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasPendleMarkets, hasSpectraMarkets, hasUpshiftVaults, hasYearnVaults, ilkToKeySegment, implausibleRatePercent, injectLenderInfoIntoEntries, inverseKeyParts, inverseLenderKey, isBoundNeed, isFailedCall, isFixedYieldEarnRow, isIlliquid, isLenderVenueKey, isLendingPosition, isLiveMarket as isLivePendleMarket, isLiveSpectraMarket, isMaturedTerm, isOrderBookCollateralLeg, isOrderBookLendRow, isPrincipalTokenSymbol, isRollingBookLendRow, isSecondaryMarketOnly, isStablecoinSymbol, isSyntheticQuoteUnit, isUnearnableEarnRate, isUnrealizableEarnRate, isVaultPosition, isVaultVenue, isYearnV3, keySegmentToIlk, keysFromMaps, lenderApiOnly, lenderFamily, lenderLiquidityPressure, liquityCandidateTroveIds, liquityKeyParts, liquityLenderKey, listaEmissionRewardFetcher, listaLoginMessage, llamaLendKeyParts, llamaLendLenderKey, marketKeysOf, meetsLiquidityFloor, mergeDeep, multicall3Abi2 as multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, organizeUserQueries, parseBalanceFetcherResult, parseDolomiteSubAccountId, parseEarnUid, parseLenderKey, parseMergedResult, parseMulticallRpcResponses, parseExpirySeconds as parsePendleExpirySeconds, parseRawRpcBatchResponses, parseRawRpcResponses, parseCurveFee as parseSpectraCurveFee, parsePtRate as parseSpectraPtRate, parseTermMaxLtv, parseTokenBalanceResult, pct, pegPressure, assetKey as pendleAssetKey, pickPool as pickSpectraPool, positivePart2 as positivePart, predictInverseEscrow, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, probeAaveFeedTimestamps, protocolConsensus, protocolOf, pruneFeedStats, quoteBorosHedgeLeg, rankBorosHedgeMarkets, rankFindings, ratePercent, readLstPauseState, readUserPositions, readVaultSharePrices, rejectOutliers as rejectPriceOutliers, repairImpossibleTvl, resolveAdapter, resolveDerivation, resolveDolomiteRowIdentity, resolveEarnIdentity, resolveMerklOpportunityMarkets, resolveModeConfig, resolveStCeloDepositGroup, resolveVaultProfileId, resupplyKeyParts, resupplyLenderKey, resupplyMarketLabel, riverKeyParts, riverLenderKey, sanePercent as saneSpectraPercent, savingsAddresses, savingsBalanceKind, secondaryMarketVault, selectAssetGroupPrices, selectUsualRewardEntry, setMysticApiKey, shortDate, spectraAddress, spectraNetwork, spectraPoolsUrl, splitChainScopedAddress as splitPendleChainScopedAddress, stampCapabilities, stampEarnSubtitles, stampOrderBookLendRow, stampRollingBookLendRow, stampVaultClassification, stampVaultTermSheets, stripLeadingBrand, subAccountsOf, supplyDescription, supplyFindings, supplyHeadline, svmEarnBuildability, svmEarnBuilderKey, svmSavingsCuration, swapRoutedProvidersArePriceConsistent, swapSideDescription, swapSideHeadline, swapSideImplications, tellerBpsToPercent, tellerImpliedLtv, tellerLenderKey, tellerPoolFromLenderKey, termApiBaseUrl, termLenderKey, termMaxApiBase, borrowNif as termMaxBorrowNif, curveApr as termMaxCurveApr, curveAprNumber as termMaxCurveAprNumber, daysToMaturity as termMaxDaysToMaturity, lendNif as termMaxLendNif, mintGtFeeRatio as termMaxMintGtFeeRatio, ratioToNumber as termMaxRatioToNumber, ratioToPercent as termMaxRatioToPercent, termOfferRateToAprPct, termOrderStoreBaseUrl, tickToAprNumber, tickToPrice, toDigest, toDolomiteSubAccountId, toTermFillNow, toTermSheetInput, toVaultTermInput, trancheFromCounterparty, tryParseEarnUid, unflattenLenderData, updateFeedStats, usdValue, usddIlkBytes32, usddKeyParts, usddLenderKey, validateTermSheet, validateTermSheets, validateUserData, vaultSharesToAssets, vaultTermInputFromEarnMarket, vaultTermInputFromSourceRow, vaultTraits, vaultVenue, venueBrand, venueBrandKey, walkBorosBook, withMaturityLabel, withTrancheLabel };
101237
103991
  //# sourceMappingURL=index.js.map
101238
103992
  //# sourceMappingURL=index.js.map