@1delta/margin-fetcher 5.0.85 → 5.0.87

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
@@ -10328,13 +10328,13 @@ var REPAIR_BACKOFF_JITTER_MS = 60;
10328
10328
  var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
10329
10329
  var backoffForRound = (round) => REPAIR_BACKOFF_BASE_MS * 2 ** round + Math.random() * REPAIR_BACKOFF_JITTER_MS;
10330
10330
  var endpointUrl = (client, rpcId) => client?.transport?.url ?? `rpc#${rpcId}`;
10331
- var resolveEndpoint = (chainId, getEvmClient20, startRpcId, tried, maxProbe = 12, timeoutMs) => {
10331
+ var resolveEndpoint = (chainId, getEvmClient21, startRpcId, tried, maxProbe = 12, timeoutMs) => {
10332
10332
  let fallback = null;
10333
10333
  for (let probe = 0; probe < maxProbe; probe++) {
10334
10334
  const rpcId = startRpcId + probe;
10335
10335
  let client;
10336
10336
  try {
10337
- client = getEvmClient20(chainId, rpcId, { timeoutMs });
10337
+ client = getEvmClient21(chainId, rpcId, { timeoutMs });
10338
10338
  } catch {
10339
10339
  break;
10340
10340
  }
@@ -10363,7 +10363,7 @@ var recordPermanentFailures = (slots, offset, collector) => {
10363
10363
  if (slots[i].permanent) collector.add(offset + i);
10364
10364
  }
10365
10365
  };
10366
- var repairFailedSlots = async (chainId, contracts, slots, getEvmClient20, nextRpcId, batchSize, logs, rounds = MULTICALL_REPAIR_ROUNDS, options) => {
10366
+ var repairFailedSlots = async (chainId, contracts, slots, getEvmClient21, nextRpcId, batchSize, logs, rounds = MULTICALL_REPAIR_ROUNDS, options) => {
10367
10367
  let searchFrom = nextRpcId;
10368
10368
  for (let round = 0; round < rounds; round++) {
10369
10369
  const failedIdx = [];
@@ -10373,7 +10373,7 @@ var repairFailedSlots = async (chainId, contracts, slots, getEvmClient20, nextRp
10373
10373
  if (failedIdx.length === 0) return slots;
10374
10374
  const endpoint = resolveEndpoint(
10375
10375
  chainId,
10376
- getEvmClient20,
10376
+ getEvmClient21,
10377
10377
  searchFrom,
10378
10378
  options?.tried
10379
10379
  );
@@ -10425,7 +10425,7 @@ var repairFailedSlots = async (chainId, contracts, slots, getEvmClient20, nextRp
10425
10425
  }
10426
10426
  return slots;
10427
10427
  };
10428
- var multicallShardedAbiArray = async (chainId, abi, calls, getEvmClient20, poolSize, retries = maxRetries, allowFailure = true, batchSize = MULTICALL_DEFAULT_BATCH_SIZE, logs = false, retryFailed = false, permanentFailures, options) => {
10428
+ var multicallShardedAbiArray = async (chainId, abi, calls, getEvmClient21, poolSize, retries = maxRetries, allowFailure = true, batchSize = MULTICALL_DEFAULT_BATCH_SIZE, logs = false, retryFailed = false, permanentFailures, options) => {
10429
10429
  const abiIsArray = isArray(abi[0]);
10430
10430
  const contracts = calls.map(({ address, name, params }, i) => ({
10431
10431
  abi: abiIsArray ? abi?.[i] : abi,
@@ -10499,7 +10499,7 @@ var multicallShardedAbiArray = async (chainId, abi, calls, getEvmClient20, poolS
10499
10499
  const attemptHedged = async (items, startRpcId, tried) => {
10500
10500
  const primary = resolveEndpoint(
10501
10501
  chainId,
10502
- getEvmClient20,
10502
+ getEvmClient21,
10503
10503
  startRpcId,
10504
10504
  tried,
10505
10505
  12,
@@ -10523,7 +10523,7 @@ var multicallShardedAbiArray = async (chainId, abi, calls, getEvmClient20, poolS
10523
10523
  clearTimeout(timer);
10524
10524
  const alt = resolveEndpoint(
10525
10525
  chainId,
10526
- getEvmClient20,
10526
+ getEvmClient21,
10527
10527
  primary.rpcId + 1,
10528
10528
  tried,
10529
10529
  12,
@@ -10575,7 +10575,7 @@ var multicallShardedAbiArray = async (chainId, abi, calls, getEvmClient20, poolS
10575
10575
  chainId,
10576
10576
  batch.items,
10577
10577
  slots,
10578
- getEvmClient20,
10578
+ getEvmClient21,
10579
10579
  won.rpcId + 1,
10580
10580
  requestBytes,
10581
10581
  logs,
@@ -10597,7 +10597,7 @@ var multicallShardedAbiArray = async (chainId, abi, calls, getEvmClient20, poolS
10597
10597
  const tried = /* @__PURE__ */ new Set();
10598
10598
  const start = resolveEndpoint(
10599
10599
  chainId,
10600
- getEvmClient20,
10600
+ getEvmClient21,
10601
10601
  workerId,
10602
10602
  void 0,
10603
10603
  12,
@@ -16364,6 +16364,16 @@ function getKineticRates(info, chainId) {
16364
16364
  // src/lending/public-data/compound-v2/convert/types.ts
16365
16365
  var PRICE_DECIMALS = 18;
16366
16366
  var RESERVE_MANTISSA_DECIMALS = 18;
16367
+ var resolveMarketPrice = (prices, asset, chainId) => {
16368
+ const group = asset?.assetGroup;
16369
+ if (group != null && prices[group] != null) return prices[group];
16370
+ const address = asset?.address?.toLowerCase();
16371
+ if (address != null) {
16372
+ const fallback = prices[`${chainId}-${address}`];
16373
+ if (fallback != null) return fallback;
16374
+ }
16375
+ return 0;
16376
+ };
16367
16377
 
16368
16378
  // src/lending/public-data/compound-v2/convert/risk.ts
16369
16379
  var DEFAULT_CLOSE_FACTOR = 0.5;
@@ -16429,7 +16439,7 @@ function convertSingleEntry(opts) {
16429
16439
  parseRawAmount(currentEntry?.totalBorrows?.toString(), decs)
16430
16440
  );
16431
16441
  const liquidity = cashLiquidity(currentEntry?.totalCash ?? currentEntry?.cash, decs) ?? totalSupplyUnderlying - totalDebt;
16432
- const price2 = prices[asset.assetGroup] ?? 0;
16442
+ const price2 = resolveMarketPrice(prices, asset, chainId);
16433
16443
  const pausedActions = { ...currentEntry.pausedActions };
16434
16444
  if (opts.pause?.mintPaused !== void 0)
16435
16445
  pausedActions[0 /* MINT */] = opts.pause.mintPaused;
@@ -16519,7 +16529,7 @@ function convertSumerEntry(opts) {
16519
16529
  parseRawAmount(currentEntry.totalBorrows?.toString(), decs)
16520
16530
  );
16521
16531
  const liquidity = cashLiquidity(currentEntry?.totalCash, decs) ?? totalSupplyUnderlying - totalDebt;
16522
- const price2 = prices[asset.assetGroup] ?? 0;
16532
+ const price2 = resolveMarketPrice(prices, asset, chainId);
16523
16533
  const poolId = asset.address;
16524
16534
  const collateralActive = Boolean(currentEntry.isListed);
16525
16535
  const borrowingEnabled = Boolean(currentEntry.isBorrowAllowed);
@@ -16611,7 +16621,7 @@ function convertTakaraEntry(opts) {
16611
16621
  const { entryRaw, asset, chainId, lender, prices, additionalYields, cToken } = opts;
16612
16622
  const info = parseTakaraMarketsInfo(entryRaw);
16613
16623
  const rates = getTakaraRates(info);
16614
- const price2 = prices[asset.assetGroup] ?? 0;
16624
+ const price2 = resolveMarketPrice(prices, asset, chainId);
16615
16625
  const collateralFactor = Number(
16616
16626
  parseRawAmount(info.ltv.toString(), RESERVE_MANTISSA_DECIMALS)
16617
16627
  );
@@ -16690,7 +16700,7 @@ function convertTectonicEntry(opts) {
16690
16700
  const { entryRaw, asset, chainId, lender, prices, additionalYields, cToken } = opts;
16691
16701
  const info = parseTectonicMarketData(entryRaw);
16692
16702
  const rates = getTectonicRates(info, chainId);
16693
- const price2 = prices[asset.assetGroup] ?? 0;
16703
+ const price2 = resolveMarketPrice(prices, asset, chainId);
16694
16704
  const decs = asset.decimals;
16695
16705
  const collateralFactor = Number(
16696
16706
  parseRawAmount(info.collateralFactor.toString(), RESERVE_MANTISSA_DECIMALS)
@@ -16859,7 +16869,7 @@ function getBenqiRates(info, chainId, unitSeconds) {
16859
16869
  function convertBenqiEntry(opts) {
16860
16870
  const { parsed, asset, chainId, lender, prices, additionalYields, cToken } = opts;
16861
16871
  const rates = getBenqiRates(parsed, chainId);
16862
- const price2 = prices[asset.assetGroup] ?? 0;
16872
+ const price2 = resolveMarketPrice(prices, asset, chainId);
16863
16873
  const decs = asset.decimals;
16864
16874
  const collateralFactor = Number(
16865
16875
  parseRawAmount(
@@ -16932,7 +16942,7 @@ function convertBenqiEntry(opts) {
16932
16942
  function convertKineticEntry(opts) {
16933
16943
  const { parsed, asset, chainId, lender, prices, additionalYields, cToken } = opts;
16934
16944
  const rates = getKineticRates(parsed, chainId);
16935
- const price2 = prices[asset.assetGroup] ?? 0;
16945
+ const price2 = resolveMarketPrice(prices, asset, chainId);
16936
16946
  const decs = asset.decimals;
16937
16947
  const collateralFactor = Number(
16938
16948
  parseRawAmount(
@@ -42620,7 +42630,7 @@ function unflattenLenderData(pools) {
42620
42630
  }
42621
42631
  return result;
42622
42632
  }
42623
- var getLenderUserDataResult = async (chainId, queriesRaw, getEvmClient20, allowFailure = true, batchSize = MULTICALL_DEFAULT_BATCH_SIZE, retries = 3, logs = false, concurrency = 1, permanentFailures, onEndpointFailure) => {
42633
+ var getLenderUserDataResult = async (chainId, queriesRaw, getEvmClient21, allowFailure = true, batchSize = MULTICALL_DEFAULT_BATCH_SIZE, retries = 3, logs = false, concurrency = 1, permanentFailures, onEndpointFailure) => {
42624
42634
  const queries = organizeUserQueries(queriesRaw);
42625
42635
  const builtCalls = await Promise.all(
42626
42636
  queries.map(async (query3) => {
@@ -42630,7 +42640,7 @@ var getLenderUserDataResult = async (chainId, queriesRaw, getEvmClient20, allowF
42630
42640
  query3.lender,
42631
42641
  query3.account,
42632
42642
  query3.params,
42633
- getEvmClient20
42643
+ getEvmClient21
42634
42644
  );
42635
42645
  return callData.map((call) => ({ call, abi: call.abi ?? abi }));
42636
42646
  })
@@ -42640,7 +42650,7 @@ var getLenderUserDataResult = async (chainId, queriesRaw, getEvmClient20, allowF
42640
42650
  chainId,
42641
42651
  calls.map((call) => call.abi),
42642
42652
  calls.map((call) => call.call),
42643
- getEvmClient20,
42653
+ getEvmClient21,
42644
42654
  concurrency,
42645
42655
  retries,
42646
42656
  allowFailure,
@@ -45903,6 +45913,73 @@ var tavaxFetcher = {
45903
45913
  )
45904
45914
  })
45905
45915
  };
45916
+ var CHAIN_ID7 = "14";
45917
+ var VAULT2 = "0x4c18ff3c89632c3dd62e796c0afa5c07c4c1b2b3";
45918
+ var ONE_E187 = 10n ** 18n;
45919
+ var WINDOW_SECONDS6 = 7 * 24 * 60 * 60;
45920
+ var VAULT_ABI = [
45921
+ {
45922
+ name: "convertToAssets",
45923
+ type: "function",
45924
+ stateMutability: "view",
45925
+ inputs: [{ type: "uint256", name: "shares" }],
45926
+ outputs: [{ type: "uint256" }]
45927
+ },
45928
+ {
45929
+ name: "totalAssetsAt",
45930
+ type: "function",
45931
+ stateMutability: "view",
45932
+ inputs: [{ type: "uint48", name: "timestamp" }],
45933
+ outputs: [{ type: "uint256" }]
45934
+ },
45935
+ {
45936
+ name: "totalSupplyAt",
45937
+ type: "function",
45938
+ stateMutability: "view",
45939
+ inputs: [{ type: "uint48", name: "timestamp" }],
45940
+ outputs: [{ type: "uint256" }]
45941
+ }
45942
+ ];
45943
+ var computeApr6 = async () => {
45944
+ const client = getEvmClient(CHAIN_ID7);
45945
+ const head = await client.getBlockNumber();
45946
+ const headBlock = await client.getBlock({ blockNumber: head });
45947
+ const then = Number(headBlock.timestamp) - WINDOW_SECONDS6;
45948
+ const [rateNow, assetsThen, supplyThen] = await Promise.all([
45949
+ client.readContract({
45950
+ address: VAULT2,
45951
+ abi: VAULT_ABI,
45952
+ functionName: "convertToAssets",
45953
+ args: [ONE_E187]
45954
+ }),
45955
+ client.readContract({
45956
+ address: VAULT2,
45957
+ abi: VAULT_ABI,
45958
+ functionName: "totalAssetsAt",
45959
+ args: [then]
45960
+ }),
45961
+ client.readContract({
45962
+ address: VAULT2,
45963
+ abi: VAULT_ABI,
45964
+ functionName: "totalSupplyAt",
45965
+ args: [then]
45966
+ })
45967
+ ]);
45968
+ if (supplyThen === 0n) throw new Error("stXRP: zero historical totalSupply");
45969
+ const rateThen = assetsThen * ONE_E187 / supplyThen;
45970
+ if (rateNow < ONE_E187 || rateThen < ONE_E187 || rateNow < rateThen) {
45971
+ throw new Error(`stXRP: invalid rates (now=${rateNow}, then=${rateThen})`);
45972
+ }
45973
+ const apr = annualizeRateDeltaPercent(rateNow, rateThen, WINDOW_SECONDS6);
45974
+ if (!Number.isFinite(apr) || apr < 0) {
45975
+ throw new Error(`stXRP: bad apr ${apr}`);
45976
+ }
45977
+ return apr;
45978
+ };
45979
+ var stxrpFetcher = {
45980
+ label: "STXRP",
45981
+ fetch: async () => ({ "Firelight stXRP::stXRP": await computeApr6() })
45982
+ };
45906
45983
 
45907
45984
  // src/vaults/lst/registry.ts
45908
45985
  var LST_REGISTRY = {
@@ -47415,6 +47492,81 @@ var LST_REGISTRY = {
47415
47492
  isNativeUnderlying: false,
47416
47493
  withdrawalMode: "dex-only"
47417
47494
  }
47495
+ ],
47496
+ // Flare (14) — Firelight stXRP, the XRP cover-vault share token.
47497
+ "14": [
47498
+ {
47499
+ // Firelight stXRP — ERC-4626 vault share over FXRP (6-dec / 6-dec).
47500
+ // Non-rebasing: coverage premiums stream into the vault and compound
47501
+ // into `convertToAssets`; supply does not expand. Withdrawal is
47502
+ // period-based and delayed — `withdraw`/`redeem` create a
47503
+ // `WithdrawRequest` (shares burned immediately), `claimWithdraw` pays
47504
+ // out after the period ends (1–2 days with 1-day periods, 30–60 days
47505
+ // at feature-complete). No same-block redemption, so instant
47506
+ // `liquidity` is 0. Principal is slashable pro-rata after the
47507
+ // protocol's First-Loss Buffer.
47508
+ address: "0x4c18ff3c89632c3dd62e796c0afa5c07c4c1b2b3",
47509
+ underlying: "0xad552a648c74d49e10027ab8a618a3ad4901c5be",
47510
+ // FXRP
47511
+ symbol: "stXRP",
47512
+ brand: "Firelight",
47513
+ decimals: 6,
47514
+ underlyingDecimals: 6,
47515
+ reader: "erc4626",
47516
+ isErc4626: true,
47517
+ isRebasing: false,
47518
+ isMintable: true,
47519
+ isNativeUnderlying: false,
47520
+ mintContract: "0x4c18ff3c89632c3dd62e796c0afa5c07c4c1b2b3",
47521
+ mintInputAsset: "0xad552a648c74d49e10027ab8a618a3ad4901c5be",
47522
+ // FXRP
47523
+ withdrawalMode: "queued",
47524
+ // APR from the on-chain rate delta (no public APY API yet). Key is the
47525
+ // canonical token-list assetGroup — stXRP carries its own group.
47526
+ yieldFetcher: stxrpFetcher,
47527
+ yieldKey: "Firelight stXRP::stXRP"
47528
+ },
47529
+ {
47530
+ // SparkDEX stFLR — Lido-style rebasing share token over native FLR.
47531
+ // Deposit via `submit()` (native FLR) or `submitWrapped()` (WFLR);
47532
+ // withdrawal via `requestWithdrawal()`/`claimWithdrawal()` (queued) or
47533
+ // `instantWithdrawal()` (fee). `brand` is the disambiguator against
47534
+ // Sceptre's sFLR — both wrap FLR.
47535
+ address: "0x0988c6ba244a90c07a917ebe609eb3264be716ff",
47536
+ underlying: "0x0000000000000000000000000000000000000000",
47537
+ // native FLR
47538
+ symbol: "stFLR",
47539
+ brand: "SparkDEX",
47540
+ decimals: 18,
47541
+ reader: "flarePooledFlr",
47542
+ isErc4626: false,
47543
+ isRebasing: true,
47544
+ isMintable: true,
47545
+ isNativeUnderlying: true,
47546
+ mintContract: "0x0988c6ba244a90c07a917ebe609eb3264be716ff",
47547
+ mintInputAsset: "native",
47548
+ withdrawalMode: "queued"
47549
+ },
47550
+ {
47551
+ // Sceptre sFLR — Lido-style rebasing share token over native FLR
47552
+ // (native Flare staking). Deposit via `deposit()` (native FLR);
47553
+ // withdrawal via unlock requests (`cooldownPeriod()`) or
47554
+ // `instantRedeem()` (fee). Distinct `brand` from SparkDEX stFLR.
47555
+ address: "0x12e605bc104e93b45e1ad99f9e555f659051c2bb",
47556
+ underlying: "0x0000000000000000000000000000000000000000",
47557
+ // native FLR
47558
+ symbol: "sFLR",
47559
+ brand: "Sceptre",
47560
+ decimals: 18,
47561
+ reader: "flarePooledFlr",
47562
+ isErc4626: false,
47563
+ isRebasing: true,
47564
+ isMintable: true,
47565
+ isNativeUnderlying: true,
47566
+ mintContract: "0x12e605bc104e93b45e1ad99f9e555f659051c2bb",
47567
+ mintInputAsset: "native",
47568
+ withdrawalMode: "queued"
47569
+ }
47418
47570
  ]
47419
47571
  };
47420
47572
  var getLstRegistry = (chainId) => LST_REGISTRY[chainId] ?? [];
@@ -47800,7 +47952,7 @@ var sparkSavingsFetcher = {
47800
47952
  return out;
47801
47953
  }
47802
47954
  };
47803
- var CHAIN_ID7 = Chain.ETHEREUM_MAINNET;
47955
+ var CHAIN_ID8 = Chain.ETHEREUM_MAINNET;
47804
47956
  var SREUSD = "0x557ab1e003951a73c12d16f0fea8490e39c33c35";
47805
47957
  var SREUSD_KEY = "SREUSD";
47806
47958
  var SREUSD_GROUP_KEY = "Savings reUSD::sreUSD";
@@ -47808,7 +47960,7 @@ var sreusdSavingsFetcher = {
47808
47960
  label: "SREUSD",
47809
47961
  fetch: async () => {
47810
47962
  const results = await multicallRetryUniversal({
47811
- chain: CHAIN_ID7,
47963
+ chain: CHAIN_ID8,
47812
47964
  abi: LINEAR_REWARDS_APR_ABI,
47813
47965
  calls: linearRewardsCalls(SREUSD),
47814
47966
  allowFailure: false
@@ -48092,10 +48244,10 @@ var toriFetcher = {
48092
48244
  return { [STRUSD_KEY]: apr, [STRUSD_GROUP_KEY]: apr };
48093
48245
  }
48094
48246
  };
48095
- var CHAIN_ID8 = Chain.ETHEREUM_MAINNET;
48247
+ var CHAIN_ID9 = Chain.ETHEREUM_MAINNET;
48096
48248
  var SNUSD = "0x08efcc2f3e61185d0ea7f8830b3fec9bfa2ee313";
48097
48249
  var YEAR_SECONDS8 = 31536000n;
48098
- var ONE_E187 = 10n ** 18n;
48250
+ var ONE_E188 = 10n ** 18n;
48099
48251
  var SNUSD_KEY = "SNUSD";
48100
48252
  var SNUSD_GROUP_KEY = "Staked NUSD::sNUSD";
48101
48253
  var SNUSD_LEGACY_GROUP_KEY = "sNUSD::Staked NUSD";
@@ -48131,7 +48283,7 @@ var STAKED_NUSD_ABI = [
48131
48283
  ];
48132
48284
  var fetchSnusdAprOnChain = async () => {
48133
48285
  const [vestingAmount, lastDistribution, vestingPeriod, totalAssets] = await multicallRetryUniversal({
48134
- chain: CHAIN_ID8,
48286
+ chain: CHAIN_ID9,
48135
48287
  abi: STAKED_NUSD_ABI,
48136
48288
  calls: [
48137
48289
  { address: SNUSD, name: "vestingAmount", params: [] },
@@ -48146,7 +48298,7 @@ var fetchSnusdAprOnChain = async () => {
48146
48298
  const window = elapsed > vestingPeriod ? elapsed : vestingPeriod;
48147
48299
  if (window <= 0n) return 0;
48148
48300
  const perSecond = vestingAmount / window;
48149
- return Number(perSecond * YEAR_SECONDS8 * ONE_E187 / totalAssets) / 1e16;
48301
+ return Number(perSecond * YEAR_SECONDS8 * ONE_E188 / totalAssets) / 1e16;
48150
48302
  };
48151
48303
  var snusdFetcher = {
48152
48304
  label: "SNUSD",
@@ -48159,13 +48311,13 @@ var snusdFetcher = {
48159
48311
  };
48160
48312
  }
48161
48313
  };
48162
- var CHAIN_ID9 = Chain.ETHEREUM_MAINNET;
48314
+ var CHAIN_ID10 = Chain.ETHEREUM_MAINNET;
48163
48315
  var WITRY = "0xe346c29b5b60ef870b9724c57ccfbbc631e47dee";
48164
48316
  var BRIX_APY_URL = "https://brix.money/api/witry/apy-snapshot?windowDays=30&method=realized";
48165
48317
  var BRIX_DEFILLAMA_POOL = "da8c4ac9-733d-4a98-85a5-83b76b7e84d1";
48166
48318
  var VESTING_PERIOD = 248400n;
48167
48319
  var YEAR_SECONDS9 = 31536000n;
48168
- var ONE_E188 = 10n ** 18n;
48320
+ var ONE_E189 = 10n ** 18n;
48169
48321
  var WITRY_KEY = "WITRY";
48170
48322
  var WITRY_GROUP_KEY = "Wrapped iTRY::WITRY";
48171
48323
  var STAKED_ITRY_ABI = [
@@ -48203,7 +48355,7 @@ var fetchBrixAprPercent = async () => {
48203
48355
  };
48204
48356
  var fetchWitryAprOnChain = async () => {
48205
48357
  const [vestingAmount, lastDistribution, totalAssets] = await multicallRetryUniversal({
48206
- chain: CHAIN_ID9,
48358
+ chain: CHAIN_ID10,
48207
48359
  abi: STAKED_ITRY_ABI,
48208
48360
  calls: [
48209
48361
  { address: WITRY, name: "vestingAmount", params: [] },
@@ -48217,7 +48369,7 @@ var fetchWitryAprOnChain = async () => {
48217
48369
  const window = elapsed > VESTING_PERIOD ? elapsed : VESTING_PERIOD;
48218
48370
  if (window <= 0n) throw new Error("wiTRY: bad vesting window");
48219
48371
  const perSecond = vestingAmount / window;
48220
- const apr = Number(perSecond * YEAR_SECONDS9 * ONE_E188 / totalAssets) / 1e16;
48372
+ const apr = Number(perSecond * YEAR_SECONDS9 * ONE_E189 / totalAssets) / 1e16;
48221
48373
  if (!Number.isFinite(apr) || apr <= 0) throw new Error("wiTRY: no yield");
48222
48374
  return apr;
48223
48375
  };
@@ -48245,13 +48397,13 @@ var capFetcher = {
48245
48397
  return { [STCUSD_KEY]: apr, [STCUSD_BRIDGED_GROUP_KEY]: apr };
48246
48398
  }
48247
48399
  };
48248
- var CHAIN_ID10 = "1";
48400
+ var CHAIN_ID11 = "1";
48249
48401
  var WSTGBP = "0x57c3571f10767e49c9d7b60feb6c67804783b7ae";
48250
48402
  var WREN_NAV_GROWTH_URL = "https://wstgbp.com/api/nav-growth";
48251
- var ONE_E189 = 10n ** 18n;
48252
- var WINDOW_SECONDS6 = 90 * 24 * 60 * 60;
48403
+ var ONE_E1810 = 10n ** 18n;
48404
+ var WINDOW_SECONDS7 = 90 * 24 * 60 * 60;
48253
48405
  var BLOCK_TIME_SECONDS5 = 12;
48254
- var WINDOW_BLOCKS5 = BigInt(Math.floor(WINDOW_SECONDS6 / BLOCK_TIME_SECONDS5));
48406
+ var WINDOW_BLOCKS5 = BigInt(Math.floor(WINDOW_SECONDS7 / BLOCK_TIME_SECONDS5));
48255
48407
  var MAX_RPC_TRIES5 = 2;
48256
48408
  var ONCHAIN_DEADLINE_MS = 12e3;
48257
48409
  var WSTGBP_KEY = "WSTGBP";
@@ -48288,7 +48440,7 @@ var computeAprOnChain = async () => {
48288
48440
  for (let rpcId = 0; rpcId < MAX_RPC_TRIES5; rpcId++) {
48289
48441
  if (Date.now() > deadline) break;
48290
48442
  try {
48291
- const client = getEvmClient(CHAIN_ID10, rpcId);
48443
+ const client = getEvmClient(CHAIN_ID11, rpcId);
48292
48444
  const head = await client.getBlockNumber();
48293
48445
  const pastBlock = head > WINDOW_BLOCKS5 ? head - WINDOW_BLOCKS5 : 0n;
48294
48446
  const [navNow, navThen, headBlock, thenBlock] = await Promise.all([
@@ -48297,7 +48449,7 @@ var computeAprOnChain = async () => {
48297
48449
  client.getBlock({ blockNumber: head }),
48298
48450
  client.getBlock({ blockNumber: pastBlock })
48299
48451
  ]);
48300
- if (navNow < ONE_E189 || navThen < ONE_E189) {
48452
+ if (navNow < ONE_E1810 || navThen < ONE_E1810) {
48301
48453
  throw new Error("wstGBP: navprice below par \u2014 pruned or bad read");
48302
48454
  }
48303
48455
  if (navNow < navThen) {
@@ -48319,13 +48471,13 @@ var wrenFetcher = {
48319
48471
  return { [WSTGBP_KEY]: apr, [WSTGBP_GROUP_KEY]: apr };
48320
48472
  }
48321
48473
  };
48322
- var CHAIN_ID11 = Chain.ETHEREUM_MAINNET;
48474
+ var CHAIN_ID12 = Chain.ETHEREUM_MAINNET;
48323
48475
  var APYUSD = "0x38eeb52f0771140d10c4e9a9a72349a329fe8a6a";
48324
48476
  var APYX_LINEAR_VEST = "0x0d62b4cc02b4b51ed19ddf41d7a7979cf394c99f";
48325
48477
  var APYX_DISCOVER_URL = "https://api.apyx.fi/v1/rewards/seasons/2/discover";
48326
48478
  var APYX_DEFILLAMA_POOL = "cb6139f9-4a68-4efd-8245-0312a92aee55";
48327
48479
  var YEAR_SECONDS10 = 31536000n;
48328
- var ONE_E1810 = 10n ** 18n;
48480
+ var ONE_E1811 = 10n ** 18n;
48329
48481
  var APYUSD_KEY = "APYUSD";
48330
48482
  var APYUSD_GROUP_KEY = "apyUSD::APYUSD";
48331
48483
  var APYUSD_LEGACY_GROUP_KEY = "apyUSD::apyUSD";
@@ -48354,7 +48506,7 @@ var APYX_READ_ABI = [
48354
48506
  ];
48355
48507
  var fetchApyusdAprOnChain = async () => {
48356
48508
  const [totalAssets, unvested, periodRemaining] = await multicallRetryUniversal({
48357
- chain: CHAIN_ID11,
48509
+ chain: CHAIN_ID12,
48358
48510
  abi: APYX_READ_ABI,
48359
48511
  calls: [
48360
48512
  { address: APYUSD, name: "totalAssets", params: [] },
@@ -48371,7 +48523,7 @@ var fetchApyusdAprOnChain = async () => {
48371
48523
  throw new Error("apyx vesting state empty");
48372
48524
  }
48373
48525
  const perSecond = unvested / periodRemaining;
48374
- return Number(perSecond * YEAR_SECONDS10 * ONE_E1810 / totalAssets) / 1e16;
48526
+ return Number(perSecond * YEAR_SECONDS10 * ONE_E1811 / totalAssets) / 1e16;
48375
48527
  };
48376
48528
  var fetchApyusdApyFromApi = async () => {
48377
48529
  const res = await fetch(APYX_DISCOVER_URL, {
@@ -48490,12 +48642,12 @@ var strataFetcher = {
48490
48642
  return out;
48491
48643
  }
48492
48644
  };
48493
- var CHAIN_ID12 = "1";
48645
+ var CHAIN_ID13 = "1";
48494
48646
  var SCRVUSD = "0x0655977feb2f289a4ab78af67bab0d17aab84367";
48495
- var ONE_E1811 = 10n ** 18n;
48496
- var WINDOW_SECONDS7 = 30 * 24 * 60 * 60;
48647
+ var ONE_E1812 = 10n ** 18n;
48648
+ var WINDOW_SECONDS8 = 30 * 24 * 60 * 60;
48497
48649
  var BLOCK_TIME_SECONDS6 = 12;
48498
- var WINDOW_BLOCKS6 = BigInt(Math.floor(WINDOW_SECONDS7 / BLOCK_TIME_SECONDS6));
48650
+ var WINDOW_BLOCKS6 = BigInt(Math.floor(WINDOW_SECONDS8 / BLOCK_TIME_SECONDS6));
48499
48651
  var SERIES_SPAN_SECONDS = 45 * 24 * 60 * 60;
48500
48652
  var MAX_RPC_TRIES6 = 2;
48501
48653
  var ONCHAIN_DEADLINE_MS2 = 12e3;
@@ -48530,7 +48682,7 @@ var fetchCurveSeriesAprPercent = async (nowSeconds) => {
48530
48682
  ).sort((a, b) => a.timestamp - b.timestamp);
48531
48683
  if (points.length < 2) throw new Error("scrvUSD: series too short");
48532
48684
  const last = points[points.length - 1];
48533
- const base = [...points].reverse().find((p) => p.timestamp <= last.timestamp - WINDOW_SECONDS7);
48685
+ const base = [...points].reverse().find((p) => p.timestamp <= last.timestamp - WINDOW_SECONDS8);
48534
48686
  if (!base) throw new Error("scrvUSD: series does not span the window");
48535
48687
  const elapsed = last.timestamp - base.timestamp;
48536
48688
  if (elapsed <= 0) throw new Error("scrvUSD: non-positive window");
@@ -48540,7 +48692,7 @@ var readRateAt5 = (client, blockNumber) => client.readContract({
48540
48692
  address: SCRVUSD,
48541
48693
  abi: CONVERT_TO_ASSETS_ABI4,
48542
48694
  functionName: "convertToAssets",
48543
- args: [ONE_E1811],
48695
+ args: [ONE_E1812],
48544
48696
  ...blockNumber !== void 0 ? { blockNumber } : {}
48545
48697
  });
48546
48698
  var computeAprOnChain2 = async () => {
@@ -48549,7 +48701,7 @@ var computeAprOnChain2 = async () => {
48549
48701
  for (let rpcId = 0; rpcId < MAX_RPC_TRIES6; rpcId++) {
48550
48702
  if (Date.now() > deadline) break;
48551
48703
  try {
48552
- const client = getEvmClient(CHAIN_ID12, rpcId);
48704
+ const client = getEvmClient(CHAIN_ID13, rpcId);
48553
48705
  const head = await client.getBlockNumber();
48554
48706
  const pastBlock = head > WINDOW_BLOCKS6 ? head - WINDOW_BLOCKS6 : 0n;
48555
48707
  const [rateNow, rateThen, headBlock, thenBlock] = await Promise.all([
@@ -48558,7 +48710,7 @@ var computeAprOnChain2 = async () => {
48558
48710
  client.getBlock({ blockNumber: head }),
48559
48711
  client.getBlock({ blockNumber: pastBlock })
48560
48712
  ]);
48561
- if (rateNow < ONE_E1811 || rateThen < ONE_E1811) {
48713
+ if (rateNow < ONE_E1812 || rateThen < ONE_E1812) {
48562
48714
  throw new Error("scrvUSD: share price below par \u2014 pruned or bad read");
48563
48715
  }
48564
48716
  const elapsed = Number(headBlock.timestamp - thenBlock.timestamp);
@@ -48588,7 +48740,7 @@ var YEAR_SECONDS11 = 31536e3;
48588
48740
  var STRC_UNIT = 1e6;
48589
48741
  var SUSDAT_KEY = "Saturn sUSDat::SUSDAT";
48590
48742
  var SUSDAT_BRIDGED_KEY = "Staked Saturn USD::sUSDat";
48591
- var VAULT_ABI = [
48743
+ var VAULT_ABI2 = [
48592
48744
  {
48593
48745
  name: "vestingAmount",
48594
48746
  type: "function",
@@ -48648,7 +48800,7 @@ var decodeStrcPrice = (cell) => {
48648
48800
  var computeIncomeApr = async () => {
48649
48801
  const [vestingAmount, vestingPeriod, totalAssets, oracle] = await multicallRetryUniversal({
48650
48802
  chain: Chain.ETHEREUM_MAINNET,
48651
- abi: VAULT_ABI,
48803
+ abi: VAULT_ABI2,
48652
48804
  calls: [
48653
48805
  { address: SUSDAT, name: "vestingAmount", params: [] },
48654
48806
  { address: SUSDAT, name: "vestingPeriod", params: [] },
@@ -48765,7 +48917,7 @@ var sthusdFetcher = {
48765
48917
  };
48766
48918
  }
48767
48919
  };
48768
- var CHAIN_ID13 = Chain.ETHEREUM_MAINNET;
48920
+ var CHAIN_ID14 = Chain.ETHEREUM_MAINNET;
48769
48921
  var HUMA_PST_FEED = "0x4be50be32db1510240d542f77c5b36ca0d0965e6";
48770
48922
  var HUMA_PST_KEY = "HUMA::PST";
48771
48923
  var HUMA_PST_GROUP_KEY = "PayFi Strategy Token::PST";
@@ -48842,7 +48994,7 @@ var windowAprFromRounds = (latest, candidates, nowSeconds, windowSeconds = HUMA_
48842
48994
  };
48843
48995
  var fetchPstAprOnChain = async () => {
48844
48996
  const [latestRaw] = await multicallRetryUniversal({
48845
- chain: CHAIN_ID13,
48997
+ chain: CHAIN_ID14,
48846
48998
  abi: FEED_ABI,
48847
48999
  calls: [{ address: HUMA_PST_FEED, name: "latestRoundData", params: [] }],
48848
49000
  allowFailure: false
@@ -48864,7 +49016,7 @@ var fetchPstAprOnChain = async () => {
48864
49016
  )
48865
49017
  ];
48866
49018
  const results = await multicallRetryUniversal({
48867
- chain: CHAIN_ID13,
49019
+ chain: CHAIN_ID14,
48868
49020
  abi: FEED_ABI,
48869
49021
  calls: probeRounds.map((r) => ({
48870
49022
  address: HUMA_PST_FEED,
@@ -58395,7 +58547,8 @@ function safeGetCalls(fetcherName, fn, errors) {
58395
58547
  return [];
58396
58548
  }
58397
58549
  }
58398
- function buildGroup(fetcherName, results, parse, abi, derivation) {
58550
+ var isCallTarget = (a) => typeof a === "string" && /^0x[0-9a-fA-F]{40}$/.test(a);
58551
+ function buildGroup(fetcherName, results, parse, abi, derivation, getCallsErrors) {
58399
58552
  const group = {
58400
58553
  fetcherName,
58401
58554
  calls: [],
@@ -58404,6 +58557,14 @@ function buildGroup(fetcherName, results, parse, abi, derivation) {
58404
58557
  trackers: []
58405
58558
  };
58406
58559
  for (const fr of results) {
58560
+ const bad = fr.calls.filter((c) => !isCallTarget(c?.address));
58561
+ if (bad.length > 0) {
58562
+ const sample = bad[0];
58563
+ const msg = `${bad.length}/${fr.calls.length} calls target an invalid address (${JSON.stringify(sample?.address)} ${sample?.name ?? "?"}) \u2014 lender dropped from the batch; fix the registry entry (lender-metadata), this is not an RPC failure`;
58564
+ if (getCallsErrors) getCallsErrors[`${fetcherName}:${fr.lender}`] = msg;
58565
+ console.warn(`[oracle-prices] ${fetcherName} ${fr.lender}: ${msg}`);
58566
+ continue;
58567
+ }
58407
58568
  group.trackers.push({
58408
58569
  lender: fr.lender,
58409
58570
  meta: fr.meta,
@@ -58648,140 +58809,160 @@ async function fetchOraclePrices(chainIds, rpcOverrides, lists = {}, retries = 3
58648
58809
  aaveResults,
58649
58810
  aaveFetcher.parse,
58650
58811
  AaveOracleAbi,
58651
- "direct"
58812
+ "direct",
58813
+ getCallsErrors
58652
58814
  );
58653
58815
  const compoundV2Group = buildGroup(
58654
58816
  "compoundV2",
58655
58817
  compoundV2Results,
58656
58818
  compoundV2Fetcher.parse,
58657
58819
  CompoundV2OracleAbi,
58658
- "direct"
58820
+ "direct",
58821
+ getCallsErrors
58659
58822
  );
58660
58823
  const compoundV3Group = buildGroup(
58661
58824
  "compoundV3",
58662
58825
  compoundV3Results,
58663
58826
  compoundV3Fetcher.parse,
58664
58827
  ChainlinkAggregatorAbi,
58665
- "direct"
58828
+ "direct",
58829
+ getCallsErrors
58666
58830
  );
58667
58831
  const listaGroup = buildGroup(
58668
58832
  "lista",
58669
58833
  listaResults,
58670
58834
  listaFetcher.parse,
58671
58835
  ProxyOracleAbi,
58672
- "direct"
58836
+ "direct",
58837
+ getCallsErrors
58673
58838
  );
58674
58839
  const llamaLendGroup = buildGroup(
58675
58840
  "llamaLend",
58676
58841
  llamaLendResults,
58677
58842
  llamaLendFetcher.parse,
58678
58843
  getLlamaLendAbi(),
58679
- "derived"
58844
+ "derived",
58845
+ getCallsErrors
58680
58846
  );
58681
58847
  const eulerGroup = buildGroup(
58682
58848
  "eulerV2",
58683
58849
  eulerResults,
58684
58850
  eulerV2Fetcher.parse,
58685
58851
  getEulerV2Abi(),
58686
- "direct"
58852
+ "direct",
58853
+ getCallsErrors
58687
58854
  );
58688
58855
  const aaveV4Group = buildGroup(
58689
58856
  "aaveV4",
58690
58857
  aaveV4Results,
58691
58858
  aaveV4Fetcher.parse,
58692
58859
  getAaveV4Abi(),
58693
- "direct"
58860
+ "direct",
58861
+ getCallsErrors
58694
58862
  );
58695
58863
  const morphoGroup = buildGroup(
58696
58864
  "morpho",
58697
58865
  morphoResults,
58698
58866
  morphoFetcher.parse,
58699
58867
  ProxyOracleAbi,
58700
- "derived"
58868
+ "derived",
58869
+ getCallsErrors
58701
58870
  );
58702
58871
  const midnightGroup = buildGroup(
58703
58872
  "midnight",
58704
58873
  midnightResults,
58705
58874
  midnightFetcher.parse,
58706
58875
  ProxyOracleAbi,
58707
- "derived"
58876
+ "derived",
58877
+ getCallsErrors
58708
58878
  );
58709
58879
  const exactlyGroup = buildGroup(
58710
58880
  "exactly",
58711
58881
  exactlyResults,
58712
58882
  exactlyFetcher.parse,
58713
58883
  getExactlyAbi(),
58714
- "direct"
58884
+ "direct",
58885
+ getCallsErrors
58715
58886
  );
58716
58887
  const flyingTulipGroup = buildGroup(
58717
58888
  "flyingTulip",
58718
58889
  flyingTulipResults,
58719
58890
  flyingTulipFetcher.parse,
58720
58891
  getFlyingTulipAbi(),
58721
- "direct"
58892
+ "direct",
58893
+ getCallsErrors
58722
58894
  );
58723
58895
  const termGroup = buildGroup(
58724
58896
  "term",
58725
58897
  termResults,
58726
58898
  termFetcher.parse,
58727
58899
  getTermAbi(),
58728
- "direct"
58900
+ "direct",
58901
+ getCallsErrors
58729
58902
  );
58730
58903
  const liquityGroup = buildGroup(
58731
58904
  "liquity",
58732
58905
  liquityResults,
58733
58906
  liquityFetcher.parse,
58734
58907
  getLiquityAbi(),
58735
- "direct"
58908
+ "direct",
58909
+ getCallsErrors
58736
58910
  );
58737
58911
  const riverGroup = buildGroup(
58738
58912
  "river",
58739
58913
  riverResults,
58740
58914
  riverFetcher.parse,
58741
58915
  getRiverAbi(),
58742
- "direct"
58916
+ "direct",
58917
+ getCallsErrors
58743
58918
  );
58744
58919
  const dssGroup = buildGroup(
58745
58920
  "dss",
58746
58921
  dssResults,
58747
58922
  dssFetcher.parse,
58748
58923
  dssFetcher.getAbi(),
58749
- "direct"
58924
+ "direct",
58925
+ getCallsErrors
58750
58926
  );
58751
58927
  const curvanceGroup = buildGroup(
58752
58928
  "curvance",
58753
58929
  curvanceResults,
58754
58930
  curvanceFetcher.parse,
58755
58931
  curvanceFetcher.getAbi(),
58756
- "direct"
58932
+ "direct",
58933
+ getCallsErrors
58757
58934
  );
58758
58935
  const resupplyGroup = buildGroup(
58759
58936
  "resupply",
58760
58937
  resupplyResults,
58761
58938
  resupplyFetcher.parse,
58762
58939
  resupplyFetcher.getAbi(),
58763
- "direct"
58940
+ "direct",
58941
+ getCallsErrors
58764
58942
  );
58765
58943
  const inverseGroup = buildGroup(
58766
58944
  "inverse",
58767
58945
  inverseResults,
58768
58946
  inverseFetcher.parse,
58769
58947
  getInverseAbi(),
58770
- "direct"
58948
+ "direct",
58949
+ getCallsErrors
58771
58950
  );
58772
58951
  const tellerGroup = buildGroup(
58773
58952
  "teller",
58774
58953
  tellerResults,
58775
58954
  tellerFetcher.parse,
58776
58955
  getTellerAbi(),
58777
- "derived"
58956
+ "derived",
58957
+ getCallsErrors
58778
58958
  );
58779
58959
  const fraxlendGroup = buildGroup(
58780
58960
  "fraxlend",
58781
58961
  fraxlendResults,
58782
58962
  fraxlendFetcher.parse,
58783
58963
  getFraxlendAbi(),
58784
- "derived"
58964
+ "derived",
58965
+ getCallsErrors
58785
58966
  );
58786
58967
  const termMaxGroup = buildGroup(
58787
58968
  "termmax",
@@ -58790,42 +58971,48 @@ async function fetchOraclePrices(chainIds, rpcOverrides, lists = {}, retries = 3
58790
58971
  getTermMaxAbi(),
58791
58972
  // DIRECT: `OracleAggregatorV2.getPrice` returns a USD price outright —
58792
58973
  // nothing is derived from another asset's price.
58793
- "direct"
58974
+ "direct",
58975
+ getCallsErrors
58794
58976
  );
58795
58977
  const siloV2Group = buildGroup(
58796
58978
  "siloV2",
58797
58979
  siloV2Results,
58798
58980
  siloV2Fetcher.parse,
58799
58981
  getSiloV2Abi(),
58800
- "derived"
58982
+ "derived",
58983
+ getCallsErrors
58801
58984
  );
58802
58985
  const siloV3Group = buildGroup(
58803
58986
  "siloV3",
58804
58987
  siloV3Results,
58805
58988
  siloV3Fetcher.parse,
58806
58989
  getSiloV3Abi(),
58807
- "derived"
58990
+ "derived",
58991
+ getCallsErrors
58808
58992
  );
58809
58993
  const fluidGroup = buildGroup(
58810
58994
  "fluid",
58811
58995
  fluidResults,
58812
58996
  fluidFetcher.parse,
58813
58997
  getFluidAbi(),
58814
- "derived"
58998
+ "derived",
58999
+ getCallsErrors
58815
59000
  );
58816
59001
  const gearboxV3Group = buildGroup(
58817
59002
  "gearboxV3",
58818
59003
  gearboxV3Results,
58819
59004
  gearboxV3Fetcher.parse,
58820
59005
  getGearboxV3Abi(),
58821
- "derived"
59006
+ "derived",
59007
+ getCallsErrors
58822
59008
  );
58823
59009
  const dolomiteGroup = buildGroup(
58824
59010
  "dolomite",
58825
59011
  dolomiteResults,
58826
59012
  dolomiteFetcher.parse,
58827
59013
  getDolomiteAbi(),
58828
- "direct"
59014
+ "direct",
59015
+ getCallsErrors
58829
59016
  );
58830
59017
  const allGroups = [
58831
59018
  aaveGroup,
@@ -59641,6 +59828,20 @@ function pruneFeedStats(stats, maxAgeSeconds = 30 * 24 * 3600, nowSeconds = Math
59641
59828
  // src/prices/oracle-prices/selectAssetGroupPrices.ts
59642
59829
  var DEFAULT_STALE_REJECT_SECONDS = 172800;
59643
59830
  var AAVE_V4_PREFIX = "AAVE_V4";
59831
+ var PLACEHOLDER_GROUP_SEGMENTS = {
59832
+ undefined: true,
59833
+ "0x": true,
59834
+ unknown: true,
59835
+ "unknown token": true,
59836
+ unk: true,
59837
+ "n/a": true,
59838
+ na: true,
59839
+ none: true,
59840
+ "?": true,
59841
+ "-": true
59842
+ };
59843
+ var isPlaceholderSegment = (segment) => PLACEHOLDER_GROUP_SEGMENTS[segment.trim().toLowerCase()] === true;
59844
+ var isPlaceholderGroup = (group) => group.split("::").some(isPlaceholderSegment);
59644
59845
  var DEFAULT_PRIORITY = {
59645
59846
  chainPriority: [
59646
59847
  Chain.ETHEREUM_MAINNET,
@@ -59747,7 +59948,9 @@ function selectAssetGroupPrices(structuredPrices, lists = {}, depthOrTvl = {}, p
59747
59948
  staleRejectSeconds,
59748
59949
  nowSeconds
59749
59950
  ) : "unknown";
59750
- const oracleKey = tokenList[entry.asset]?.assetGroup ?? `${chainId}-${entry.asset.toLowerCase()}`;
59951
+ const group = tokenList[entry.asset]?.assetGroup;
59952
+ if (group != null && isPlaceholderGroup(group)) continue;
59953
+ const oracleKey = group ?? `${chainId}-${entry.asset.toLowerCase()}`;
59751
59954
  const candidate = {
59752
59955
  oracleKey,
59753
59956
  priceUSD: entry.priceUSD,
@@ -63117,7 +63320,7 @@ var Erc4626PreviewRedeemAbi = [
63117
63320
  ];
63118
63321
 
63119
63322
  // src/vaults/lst/readers/shared.ts
63120
- var ONE_E1812 = 10n ** 18n;
63323
+ var ONE_E1813 = 10n ** 18n;
63121
63324
  var rescaleDecimals = (v, fromDec, toDec) => toDec >= fromDec ? v * 10n ** BigInt(toDec - fromDec) : v / 10n ** BigInt(fromDec - toDec);
63122
63325
  var MULTICALL3_ADDRESS = "0xcA11bde05977b3631167028862bE2a173976CA11";
63123
63326
  var Multicall3BalanceAbi = [
@@ -63160,7 +63363,7 @@ var readerBeetsStS = (entry) => ({
63160
63363
  }
63161
63364
  const liquidity = toBigInt14(pool);
63162
63365
  return {
63163
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
63366
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
63164
63367
  totalSupply,
63165
63368
  exchangeRate,
63166
63369
  liquidity
@@ -63193,7 +63396,7 @@ var readerBenqiSavax = (entry) => ({
63193
63396
  {
63194
63397
  address: entry.address,
63195
63398
  name: "getPooledAvaxByShares",
63196
- params: [ONE_E1812]
63399
+ params: [ONE_E1813]
63197
63400
  },
63198
63401
  { address: entry.address, name: "totalPooledAvax", params: [] }
63199
63402
  ],
@@ -63204,7 +63407,7 @@ var readerBenqiSavax = (entry) => ({
63204
63407
  if (totalSupply === void 0 || exchangeRate === void 0) {
63205
63408
  return void 0;
63206
63409
  }
63207
- const totalAssets = toBigInt14(totalPooled) ?? totalSupply * exchangeRate / ONE_E1812;
63410
+ const totalAssets = toBigInt14(totalPooled) ?? totalSupply * exchangeRate / ONE_E1813;
63208
63411
  return {
63209
63412
  totalAssets,
63210
63413
  totalSupply,
@@ -63223,7 +63426,7 @@ var readerBgtWrapper1to1 = (entry) => ({
63223
63426
  return {
63224
63427
  totalAssets: totalSupply,
63225
63428
  totalSupply,
63226
- exchangeRate: ONE_E1812
63429
+ exchangeRate: ONE_E1813
63227
63430
  };
63228
63431
  }
63229
63432
  });
@@ -63253,7 +63456,7 @@ var readerDineroBeraEth = (entry) => ({
63253
63456
  return void 0;
63254
63457
  }
63255
63458
  return {
63256
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
63459
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
63257
63460
  totalSupply,
63258
63461
  exchangeRate
63259
63462
  };
@@ -63265,7 +63468,7 @@ var readerErc4626 = (entry) => ({
63265
63468
  calls: [
63266
63469
  { address: entry.address, name: "totalAssets", params: [] },
63267
63470
  { address: entry.address, name: "totalSupply", params: [] },
63268
- { address: entry.address, name: "convertToAssets", params: [ONE_E1812] }
63471
+ { address: entry.address, name: "convertToAssets", params: [ONE_E1813] }
63269
63472
  ],
63270
63473
  abis: [Erc4626ReadAbi, TotalSupplyAbi, Erc4626ReadAbi],
63271
63474
  parse: ([assets, supply, rate]) => {
@@ -63282,7 +63485,7 @@ var readerErc4626PreviewRedeem = (entry) => ({
63282
63485
  calls: [
63283
63486
  { address: entry.address, name: "totalAssets", params: [] },
63284
63487
  { address: entry.address, name: "totalSupply", params: [] },
63285
- { address: entry.address, name: "previewRedeem", params: [ONE_E1812] }
63488
+ { address: entry.address, name: "previewRedeem", params: [ONE_E1813] }
63286
63489
  ],
63287
63490
  abis: [Erc4626PreviewRedeemAbi, TotalSupplyAbi, Erc4626PreviewRedeemAbi],
63288
63491
  parse: ([assets, supply, rate]) => {
@@ -63362,7 +63565,7 @@ var readerEtherFiWeEth = (entry) => {
63362
63565
  }
63363
63566
  }
63364
63567
  return {
63365
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
63568
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
63366
63569
  totalSupply,
63367
63570
  exchangeRate,
63368
63571
  liquidity
@@ -63371,6 +63574,50 @@ var readerEtherFiWeEth = (entry) => {
63371
63574
  };
63372
63575
  };
63373
63576
 
63577
+ // src/vaults/lst/abis/flarePooled.ts
63578
+ var FlarePooledFlrAbi = [
63579
+ {
63580
+ name: "totalPooledFlr",
63581
+ type: "function",
63582
+ stateMutability: "view",
63583
+ inputs: [],
63584
+ outputs: [{ type: "uint256" }]
63585
+ },
63586
+ {
63587
+ name: "totalShares",
63588
+ type: "function",
63589
+ stateMutability: "view",
63590
+ inputs: [],
63591
+ outputs: [{ type: "uint256" }]
63592
+ },
63593
+ {
63594
+ name: "getPooledFlrByShares",
63595
+ type: "function",
63596
+ stateMutability: "view",
63597
+ inputs: [{ name: "shares", type: "uint256" }],
63598
+ outputs: [{ type: "uint256" }]
63599
+ }
63600
+ ];
63601
+
63602
+ // src/vaults/lst/readers/flarePooled.ts
63603
+ var readerFlarePooledFlr = (entry) => ({
63604
+ calls: [
63605
+ { address: entry.address, name: "totalPooledFlr", params: [] },
63606
+ { address: entry.address, name: "totalShares", params: [] },
63607
+ { address: entry.address, name: "getPooledFlrByShares", params: [ONE_E1813] }
63608
+ ],
63609
+ abis: [FlarePooledFlrAbi, FlarePooledFlrAbi, FlarePooledFlrAbi],
63610
+ parse: ([pooledFlr, shares, rate]) => {
63611
+ const totalAssets = toBigInt14(pooledFlr);
63612
+ const totalSupply = toBigInt14(shares);
63613
+ const exchangeRate = toBigInt14(rate);
63614
+ if (totalAssets === void 0 || totalSupply === void 0 || exchangeRate === void 0) {
63615
+ return void 0;
63616
+ }
63617
+ return { totalAssets, totalSupply, exchangeRate };
63618
+ }
63619
+ });
63620
+
63374
63621
  // src/vaults/lst/abis/hyperbeat.ts
63375
63622
  var HyperbeatStakingCoreAbi = [
63376
63623
  {
@@ -63395,7 +63642,7 @@ var readerHyperbeatBeHype = (entry) => {
63395
63642
  return {
63396
63643
  totalAssets: totalSupply,
63397
63644
  totalSupply,
63398
- exchangeRate: ONE_E1812
63645
+ exchangeRate: ONE_E1813
63399
63646
  };
63400
63647
  }
63401
63648
  };
@@ -63403,7 +63650,7 @@ var readerHyperbeatBeHype = (entry) => {
63403
63650
  return {
63404
63651
  calls: [
63405
63652
  { address: entry.address, name: "totalSupply", params: [] },
63406
- { address: stakingCore, name: "BeHYPEToHYPE", params: [ONE_E1812] }
63653
+ { address: stakingCore, name: "BeHYPEToHYPE", params: [ONE_E1813] }
63407
63654
  ],
63408
63655
  abis: [TotalSupplyAbi, HyperbeatStakingCoreAbi],
63409
63656
  parse: ([supply, rate]) => {
@@ -63413,7 +63660,7 @@ var readerHyperbeatBeHype = (entry) => {
63413
63660
  return void 0;
63414
63661
  }
63415
63662
  return {
63416
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
63663
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
63417
63664
  totalSupply,
63418
63665
  exchangeRate
63419
63666
  };
@@ -63445,7 +63692,7 @@ var readerKelpRsEth = (entry) => {
63445
63692
  return {
63446
63693
  totalAssets: totalSupply,
63447
63694
  totalSupply,
63448
- exchangeRate: ONE_E1812
63695
+ exchangeRate: ONE_E1813
63449
63696
  };
63450
63697
  }
63451
63698
  };
@@ -63463,7 +63710,7 @@ var readerKelpRsEth = (entry) => {
63463
63710
  return void 0;
63464
63711
  }
63465
63712
  return {
63466
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
63713
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
63467
63714
  totalSupply,
63468
63715
  exchangeRate
63469
63716
  };
@@ -63495,7 +63742,7 @@ var readerKinetiqKHype = (entry) => {
63495
63742
  return {
63496
63743
  totalAssets: totalSupply,
63497
63744
  totalSupply,
63498
- exchangeRate: ONE_E1812
63745
+ exchangeRate: ONE_E1813
63499
63746
  };
63500
63747
  }
63501
63748
  };
@@ -63503,7 +63750,7 @@ var readerKinetiqKHype = (entry) => {
63503
63750
  return {
63504
63751
  calls: [
63505
63752
  { address: entry.address, name: "totalSupply", params: [] },
63506
- { address: accountant, name: "kHYPEToHYPE", params: [ONE_E1812] }
63753
+ { address: accountant, name: "kHYPEToHYPE", params: [ONE_E1813] }
63507
63754
  ],
63508
63755
  abis: [TotalSupplyAbi, KinetiqStakingAccountantAbi],
63509
63756
  parse: ([supply, rate]) => {
@@ -63513,7 +63760,7 @@ var readerKinetiqKHype = (entry) => {
63513
63760
  return void 0;
63514
63761
  }
63515
63762
  return {
63516
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
63763
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
63517
63764
  totalSupply,
63518
63765
  exchangeRate
63519
63766
  };
@@ -63553,7 +63800,7 @@ var readerLairStKaia = (entry) => ({
63553
63800
  if (totalSupply === void 0 || exchangeRate === void 0) {
63554
63801
  return void 0;
63555
63802
  }
63556
- const totalAssets = toBigInt14(totalStaking) ?? totalSupply * exchangeRate / ONE_E1812;
63803
+ const totalAssets = toBigInt14(totalStaking) ?? totalSupply * exchangeRate / ONE_E1813;
63557
63804
  return {
63558
63805
  totalAssets,
63559
63806
  totalSupply,
@@ -63587,7 +63834,7 @@ var readerLidoWstEth = (entry) => ({
63587
63834
  return void 0;
63588
63835
  }
63589
63836
  return {
63590
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
63837
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
63591
63838
  totalSupply,
63592
63839
  exchangeRate
63593
63840
  };
@@ -63625,7 +63872,7 @@ var readerListaSlisBnb = (entry) => {
63625
63872
  return {
63626
63873
  totalAssets: totalSupply,
63627
63874
  totalSupply,
63628
- exchangeRate: ONE_E1812
63875
+ exchangeRate: ONE_E1813
63629
63876
  };
63630
63877
  }
63631
63878
  };
@@ -63633,7 +63880,7 @@ var readerListaSlisBnb = (entry) => {
63633
63880
  return {
63634
63881
  calls: [
63635
63882
  { address: entry.address, name: "totalSupply", params: [] },
63636
- { address: manager, name: "convertSnBnbToBnb", params: [ONE_E1812] },
63883
+ { address: manager, name: "convertSnBnbToBnb", params: [ONE_E1813] },
63637
63884
  { address: manager, name: "getTotalPooledBnb", params: [] }
63638
63885
  ],
63639
63886
  abis: [TotalSupplyAbi, ListaStakeManagerReadAbi, ListaStakeManagerReadAbi],
@@ -63644,7 +63891,7 @@ var readerListaSlisBnb = (entry) => {
63644
63891
  return void 0;
63645
63892
  }
63646
63893
  const pooledBnb = toBigInt14(pooled);
63647
- const totalAssets = pooledBnb ?? totalSupply * exchangeRate / ONE_E1812;
63894
+ const totalAssets = pooledBnb ?? totalSupply * exchangeRate / ONE_E1813;
63648
63895
  return { totalAssets, totalSupply, exchangeRate };
63649
63896
  }
63650
63897
  };
@@ -63674,7 +63921,7 @@ var readerMantleMEth = (entry) => {
63674
63921
  return {
63675
63922
  totalAssets: totalSupply,
63676
63923
  totalSupply,
63677
- exchangeRate: ONE_E1812
63924
+ exchangeRate: ONE_E1813
63678
63925
  };
63679
63926
  }
63680
63927
  };
@@ -63682,7 +63929,7 @@ var readerMantleMEth = (entry) => {
63682
63929
  return {
63683
63930
  calls: [
63684
63931
  { address: entry.address, name: "totalSupply", params: [] },
63685
- { address: staking, name: "mETHToETH", params: [ONE_E1812] }
63932
+ { address: staking, name: "mETHToETH", params: [ONE_E1813] }
63686
63933
  ],
63687
63934
  abis: [TotalSupplyAbi, MantleStakingAbi],
63688
63935
  parse: ([supply, rate]) => {
@@ -63692,7 +63939,7 @@ var readerMantleMEth = (entry) => {
63692
63939
  return void 0;
63693
63940
  }
63694
63941
  return {
63695
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
63942
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
63696
63943
  totalSupply,
63697
63944
  exchangeRate
63698
63945
  };
@@ -63713,7 +63960,7 @@ var readerOffChain = (entry) => {
63713
63960
  return {
63714
63961
  totalAssets: rescaleDecimals(totalSupply, shareDec, underlyingDec),
63715
63962
  totalSupply,
63716
- exchangeRate: ONE_E1812
63963
+ exchangeRate: ONE_E1813
63717
63964
  };
63718
63965
  }
63719
63966
  };
@@ -63747,7 +63994,7 @@ var readerRenzoEzEth = (entry) => {
63747
63994
  return {
63748
63995
  totalAssets: totalSupply,
63749
63996
  totalSupply,
63750
- exchangeRate: ONE_E1812
63997
+ exchangeRate: ONE_E1813
63751
63998
  };
63752
63999
  }
63753
64000
  };
@@ -63766,7 +64013,7 @@ var readerRenzoEzEth = (entry) => {
63766
64013
  return {
63767
64014
  totalAssets: totalTvl,
63768
64015
  totalSupply,
63769
- exchangeRate: totalTvl * ONE_E1812 / totalSupply
64016
+ exchangeRate: totalTvl * ONE_E1813 / totalSupply
63770
64017
  };
63771
64018
  }
63772
64019
  };
@@ -63822,7 +64069,7 @@ var readerRocketReth = (entry) => {
63822
64069
  }
63823
64070
  const liquidity = depositPool ? toBigInt14(slice2[2]) : void 0;
63824
64071
  return {
63825
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
64072
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
63826
64073
  totalSupply,
63827
64074
  exchangeRate,
63828
64075
  liquidity
@@ -63864,7 +64111,7 @@ var readerStaderEthx = (entry) => {
63864
64111
  return {
63865
64112
  totalAssets: totalSupply,
63866
64113
  totalSupply,
63867
- exchangeRate: ONE_E1812
64114
+ exchangeRate: ONE_E1813
63868
64115
  };
63869
64116
  }
63870
64117
  };
@@ -63882,7 +64129,7 @@ var readerStaderEthx = (entry) => {
63882
64129
  return void 0;
63883
64130
  }
63884
64131
  return {
63885
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
64132
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
63886
64133
  totalSupply,
63887
64134
  exchangeRate
63888
64135
  };
@@ -63899,7 +64146,7 @@ var readerStaderMaticX = (entry) => {
63899
64146
  {
63900
64147
  address: rateAddress,
63901
64148
  name: "convertMaticXToMatic",
63902
- params: [ONE_E1812],
64149
+ params: [ONE_E1813],
63903
64150
  chainId: homeChainId
63904
64151
  }
63905
64152
  ],
@@ -63914,7 +64161,7 @@ var readerStaderMaticX = (entry) => {
63914
64161
  }
63915
64162
  const isCrossChain = homeContract !== void 0;
63916
64163
  return {
63917
- totalAssets: isCrossChain ? totalSupply * amountInMatic / ONE_E1812 : totalPooledMatic ?? totalSupply * amountInMatic / ONE_E1812,
64164
+ totalAssets: isCrossChain ? totalSupply * amountInMatic / ONE_E1813 : totalPooledMatic ?? totalSupply * amountInMatic / ONE_E1813,
63918
64165
  totalSupply,
63919
64166
  exchangeRate: amountInMatic
63920
64167
  };
@@ -63946,7 +64193,7 @@ var readerStakeWiseOsEth = (entry) => {
63946
64193
  return {
63947
64194
  totalAssets: totalSupply,
63948
64195
  totalSupply,
63949
- exchangeRate: ONE_E1812
64196
+ exchangeRate: ONE_E1813
63950
64197
  };
63951
64198
  }
63952
64199
  };
@@ -63954,7 +64201,7 @@ var readerStakeWiseOsEth = (entry) => {
63954
64201
  return {
63955
64202
  calls: [
63956
64203
  { address: entry.address, name: "totalSupply", params: [] },
63957
- { address: controller, name: "convertToAssets", params: [ONE_E1812] }
64204
+ { address: controller, name: "convertToAssets", params: [ONE_E1813] }
63958
64205
  ],
63959
64206
  abis: [TotalSupplyAbi, StakeWiseOsTokenAbi],
63960
64207
  parse: ([supply, rate]) => {
@@ -63964,7 +64211,7 @@ var readerStakeWiseOsEth = (entry) => {
63964
64211
  return void 0;
63965
64212
  }
63966
64213
  return {
63967
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
64214
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
63968
64215
  totalSupply,
63969
64216
  exchangeRate
63970
64217
  };
@@ -63996,7 +64243,7 @@ var readerStCelo = (entry) => {
63996
64243
  return {
63997
64244
  totalAssets: totalSupply,
63998
64245
  totalSupply,
63999
- exchangeRate: ONE_E1812
64246
+ exchangeRate: ONE_E1813
64000
64247
  };
64001
64248
  }
64002
64249
  };
@@ -64004,7 +64251,7 @@ var readerStCelo = (entry) => {
64004
64251
  return {
64005
64252
  calls: [
64006
64253
  { address: entry.address, name: "totalSupply", params: [] },
64007
- { address: manager, name: "toCelo", params: [ONE_E1812] }
64254
+ { address: manager, name: "toCelo", params: [ONE_E1813] }
64008
64255
  ],
64009
64256
  abis: [TotalSupplyAbi, StCeloManagerAbi],
64010
64257
  parse: ([supply, rate]) => {
@@ -64014,7 +64261,7 @@ var readerStCelo = (entry) => {
64014
64261
  return void 0;
64015
64262
  }
64016
64263
  return {
64017
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
64264
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
64018
64265
  totalSupply,
64019
64266
  exchangeRate
64020
64267
  };
@@ -64047,7 +64294,7 @@ var readerSwellGetRate = (entry) => ({
64047
64294
  return void 0;
64048
64295
  }
64049
64296
  return {
64050
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
64297
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
64051
64298
  totalSupply,
64052
64299
  exchangeRate
64053
64300
  };
@@ -64078,7 +64325,7 @@ var readerValantisWstHype = (entry) => {
64078
64325
  return {
64079
64326
  totalAssets: totalSupply,
64080
64327
  totalSupply,
64081
- exchangeRate: ONE_E1812
64328
+ exchangeRate: ONE_E1813
64082
64329
  };
64083
64330
  }
64084
64331
  };
@@ -64096,7 +64343,7 @@ var readerValantisWstHype = (entry) => {
64096
64343
  return void 0;
64097
64344
  }
64098
64345
  return {
64099
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
64346
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
64100
64347
  totalSupply,
64101
64348
  exchangeRate
64102
64349
  };
@@ -64130,7 +64377,7 @@ var readerVedaAccountant = (entry) => {
64130
64377
  return {
64131
64378
  totalAssets: rescaleDecimals(totalSupply, shareDec, underlyingDec),
64132
64379
  totalSupply,
64133
- exchangeRate: ONE_E1812
64380
+ exchangeRate: ONE_E1813
64134
64381
  };
64135
64382
  }
64136
64383
  };
@@ -64149,7 +64396,7 @@ var readerVedaAccountant = (entry) => {
64149
64396
  const exchangeRate = rawRate * scale3;
64150
64397
  return {
64151
64398
  totalAssets: rescaleDecimals(
64152
- totalSupply * exchangeRate / ONE_E1812,
64399
+ totalSupply * exchangeRate / ONE_E1813,
64153
64400
  shareDec,
64154
64401
  underlyingDec
64155
64402
  ),
@@ -64185,9 +64432,9 @@ var readerAnkrRatio = (entry) => ({
64185
64432
  return void 0;
64186
64433
  }
64187
64434
  return {
64188
- totalAssets: totalSupply * ONE_E1812 / r,
64435
+ totalAssets: totalSupply * ONE_E1813 / r,
64189
64436
  totalSupply,
64190
- exchangeRate: ONE_E1812 * ONE_E1812 / r
64437
+ exchangeRate: ONE_E1813 * ONE_E1813 / r
64191
64438
  };
64192
64439
  }
64193
64440
  });
@@ -64217,7 +64464,7 @@ var readerBinanceWbeth = (entry) => ({
64217
64464
  return void 0;
64218
64465
  }
64219
64466
  return {
64220
- totalAssets: totalSupply * exchangeRate / ONE_E1812,
64467
+ totalAssets: totalSupply * exchangeRate / ONE_E1813,
64221
64468
  totalSupply,
64222
64469
  exchangeRate
64223
64470
  };
@@ -64263,7 +64510,7 @@ var readerCoreEarnRate = (entry) => {
64263
64510
  return {
64264
64511
  totalAssets: totalSupply * r / CORE_RATE_DENOM,
64265
64512
  totalSupply,
64266
- exchangeRate: r * ONE_E1812 / CORE_RATE_DENOM
64513
+ exchangeRate: r * ONE_E1813 / CORE_RATE_DENOM
64267
64514
  };
64268
64515
  }
64269
64516
  };
@@ -64285,7 +64532,7 @@ var readerCoreStakedRatio = (entry) => {
64285
64532
  return {
64286
64533
  totalAssets: totalStaked,
64287
64534
  totalSupply,
64288
- exchangeRate: totalStaked * ONE_E1812 / totalSupply
64535
+ exchangeRate: totalStaked * ONE_E1813 / totalSupply
64289
64536
  };
64290
64537
  }
64291
64538
  };
@@ -64320,7 +64567,7 @@ var readerKintsuSMon = (entry) => ({
64320
64567
  const totalAssets = toBigInt14(pooled);
64321
64568
  const totalSupply = toBigInt14(shares);
64322
64569
  if (totalAssets === void 0 || totalSupply === void 0) return void 0;
64323
- const exchangeRate = totalSupply > 0n ? totalAssets * ONE_E1812 / totalSupply : ONE_E1812;
64570
+ const exchangeRate = totalSupply > 0n ? totalAssets * ONE_E1813 / totalSupply : ONE_E1813;
64324
64571
  return { totalAssets, totalSupply, exchangeRate };
64325
64572
  }
64326
64573
  });
@@ -64395,7 +64642,7 @@ var readerTreehouseTAsset = (entry) => {
64395
64642
  calls: [
64396
64643
  { address: entry.address, name: "totalAssets", params: [] },
64397
64644
  { address: entry.address, name: "totalSupply", params: [] },
64398
- { address: entry.address, name: "convertToAssets", params: [ONE_E1812] },
64645
+ { address: entry.address, name: "convertToAssets", params: [ONE_E1813] },
64399
64646
  { address: fl, name: "getRedeemableAmount", params: [] },
64400
64647
  { address: fl, name: "redemptionFee", params: [] },
64401
64648
  { address: fl, name: "minRedeemInUnderlying", params: [] },
@@ -64493,6 +64740,8 @@ var buildReader = (entry) => {
64493
64740
  return readerErc4626PreviewRedeem(entry);
64494
64741
  case "lidoWstEth":
64495
64742
  return readerLidoWstEth(entry);
64743
+ case "flarePooledFlr":
64744
+ return readerFlarePooledFlr(entry);
64496
64745
  case "listaSlisBnb":
64497
64746
  return readerListaSlisBnb(entry);
64498
64747
  case "rocketReth":
@@ -65024,7 +65273,7 @@ var deriveProtocolExitRoutes = (i) => {
65024
65273
  };
65025
65274
 
65026
65275
  // src/vaults/lst/fetchPublic.ts
65027
- var ONE_E1813 = 10n ** 18n;
65276
+ var ONE_E1814 = 10n ** 18n;
65028
65277
  var ERC20_BALANCE_ABI = parseAbi([
65029
65278
  "function balanceOf(address) view returns (uint256)"
65030
65279
  ]);
@@ -65155,8 +65404,8 @@ var fetchLstShareTokens = async (chainId, multicallRetry, prices = {}, tokenList
65155
65404
  const underlyingUnit = 10n ** BigInt(underlyingDec);
65156
65405
  const totalAssetsFormatted = Number(state.totalAssets) / 10 ** underlyingDec;
65157
65406
  const totalAssetsUsd = priceUsd !== void 0 ? totalAssetsFormatted * priceUsd : 0;
65158
- const convertToAssets = state.exchangeRate * underlyingUnit / ONE_E1813;
65159
- const convertToShares = state.exchangeRate > 0n ? ONE_E1813 * shareUnit / state.exchangeRate : 0n;
65407
+ const convertToAssets = state.exchangeRate * underlyingUnit / ONE_E1814;
65408
+ const convertToShares = state.exchangeRate > 0n ? ONE_E1814 * shareUnit / state.exchangeRate : 0n;
65160
65409
  let liquidityRaw;
65161
65410
  if (state.liquidity !== void 0) {
65162
65411
  liquidityRaw = state.liquidity;
@@ -68660,6 +68909,38 @@ var LST_WITHDRAWAL_REGISTRY = {
68660
68909
  symbol: "pumpBTC",
68661
68910
  reader: "noQueue"
68662
68911
  }
68912
+ ],
68913
+ // Flare (14) — Firelight stXRP. Period-based queue: `withdraw`/`redeem`
68914
+ // create a `WithdrawRequest` for `currentPeriod() + 1`; `claimWithdraw(period)`
68915
+ // pays out after the period ends. The surface (`withdrawSharesOf(period, account)`,
68916
+ // `withdrawalsOf(period, account)`, `isWithdrawClaimed(period, account)`) is
68917
+ // verified on-chain, but the period-window enumeration reader is not yet
68918
+ // built — placeholder so the orchestrator surfaces the asset (returns []).
68919
+ "14": [
68920
+ {
68921
+ lst: "0x4c18ff3c89632c3dd62e796c0afa5c07c4c1b2b3",
68922
+ brand: "Firelight",
68923
+ symbol: "stXRP",
68924
+ reader: "unverified"
68925
+ },
68926
+ {
68927
+ // SparkDEX stFLR — `requestWithdrawal()` / `claimWithdrawal()` queue +
68928
+ // `instantWithdrawal()` fee leg. Reader not built yet; placeholder so
68929
+ // the orchestrator surfaces the asset.
68930
+ lst: "0x0988c6ba244a90c07a917ebe609eb3264be716ff",
68931
+ brand: "SparkDEX",
68932
+ symbol: "stFLR",
68933
+ reader: "unverified"
68934
+ },
68935
+ {
68936
+ // Sceptre sFLR — unlock-request queue (`cooldownPeriod()`) +
68937
+ // `instantRedeem()` fee leg. Reader not built yet; placeholder so the
68938
+ // orchestrator surfaces the asset.
68939
+ lst: "0x12e605bc104e93b45e1ad99f9e555f659051c2bb",
68940
+ brand: "Sceptre",
68941
+ symbol: "sFLR",
68942
+ reader: "unverified"
68943
+ }
68663
68944
  ]
68664
68945
  };
68665
68946
  var getLstWithdrawalRegistry = (chainId, extraEntries) => {
@@ -68793,7 +69074,7 @@ var NavOracleReadAbi = [
68793
69074
  ];
68794
69075
 
68795
69076
  // src/vaults/savings/readers/shared.ts
68796
- var ONE_E1814 = 10n ** 18n;
69077
+ var ONE_E1815 = 10n ** 18n;
68797
69078
  var toBigInt16 = (v) => {
68798
69079
  if (v === void 0 || v === null) return void 0;
68799
69080
  if (typeof v === "bigint") return v;
@@ -68834,7 +69115,7 @@ var readerErc46262 = (entry) => {
68834
69115
  return {
68835
69116
  totalAssets,
68836
69117
  totalSupply,
68837
- exchangeRate: convertToAssetsRaw * ONE_E1814 / underlyingUnit
69118
+ exchangeRate: convertToAssetsRaw * ONE_E1815 / underlyingUnit
68838
69119
  };
68839
69120
  }
68840
69121
  };
@@ -68865,7 +69146,7 @@ var readerErc4626Cooldown = (entry) => {
68865
69146
  return {
68866
69147
  totalAssets,
68867
69148
  totalSupply,
68868
- exchangeRate: convertToAssetsRaw * ONE_E1814 / underlyingUnit,
69149
+ exchangeRate: convertToAssetsRaw * ONE_E1815 / underlyingUnit,
68869
69150
  withdrawalCooldownSeconds: cooldownSecs === void 0 ? void 0 : Number(cooldownSecs)
68870
69151
  };
68871
69152
  }
@@ -69550,7 +69831,7 @@ var readerErc4626Idle = (entry) => {
69550
69831
  return {
69551
69832
  totalAssets,
69552
69833
  totalSupply,
69553
- exchangeRate: convertToAssetsRaw * ONE_E1814 / underlyingUnit,
69834
+ exchangeRate: convertToAssetsRaw * ONE_E1815 / underlyingUnit,
69554
69835
  ...capacity !== void 0 ? {
69555
69836
  instantRedeemCapacity: capacity,
69556
69837
  instantRedeemEnabled: true,
@@ -69599,7 +69880,7 @@ var readerErc4626WithdrawLimit = (entry) => {
69599
69880
  return {
69600
69881
  totalAssets,
69601
69882
  totalSupply,
69602
- exchangeRate: convertToAssetsRaw * ONE_E1814 / underlyingUnit,
69883
+ exchangeRate: convertToAssetsRaw * ONE_E1815 / underlyingUnit,
69603
69884
  ...capacity !== void 0 ? {
69604
69885
  instantRedeemCapacity: capacity,
69605
69886
  instantRedeemEnabled: true,
@@ -69639,8 +69920,8 @@ var readerBitfiBfbtc = (entry) => {
69639
69920
  const currentRatio = toBigInt16(ratio);
69640
69921
  if (totalSupply === void 0) return void 0;
69641
69922
  if (currentRatio === void 0 || currentRatio <= 0n) return void 0;
69642
- const exchangeRate = ONE_E1814 * BITFI_RATIO_SCALE / currentRatio;
69643
- const totalAssets = totalSupply * exchangeRate * underlyingUnit / (ONE_E1814 * shareUnit);
69923
+ const exchangeRate = ONE_E1815 * BITFI_RATIO_SCALE / currentRatio;
69924
+ const totalAssets = totalSupply * exchangeRate * underlyingUnit / (ONE_E1815 * shareUnit);
69644
69925
  const feeOf = (cell) => {
69645
69926
  if (!Array.isArray(cell)) return void 0;
69646
69927
  const pct3 = toBigInt16(cell[0]);
@@ -69708,9 +69989,9 @@ var readerBitfiVault = (entry) => {
69708
69989
  if (totalAssets === void 0 || totalSupply === void 0)
69709
69990
  return void 0;
69710
69991
  if (currentRatio === void 0 || currentRatio <= 0n) return void 0;
69711
- const exchangeRate = currentRatio * ONE_E1814 / BITFI_RATIO_SCALE;
69992
+ const exchangeRate = currentRatio * ONE_E1815 / BITFI_RATIO_SCALE;
69712
69993
  const depRatio = toBigInt16(depositRatio);
69713
- const fundamentalExchangeRate = depRatio !== void 0 && depRatio > 0n ? depRatio * ONE_E1814 / BITFI_RATIO_SCALE : void 0;
69994
+ const fundamentalExchangeRate = depRatio !== void 0 && depRatio > 0n ? depRatio * ONE_E1815 / BITFI_RATIO_SCALE : void 0;
69714
69995
  const supplyCap = toBigInt16(cap);
69715
69996
  const isPaused = paused === true;
69716
69997
  let depositCapacity;
@@ -69753,7 +70034,7 @@ var readerBitwayVault = (entry) => {
69753
70034
  {
69754
70035
  address: vault,
69755
70036
  name: "convertToAssets",
69756
- params: [ONE_E1814, underlying]
70037
+ params: [ONE_E1815, underlying]
69757
70038
  },
69758
70039
  { address: vault, name: "getContractBalance", params: [underlying] },
69759
70040
  { address: vault, name: "WAITING_TIME", params: [] }
@@ -69776,7 +70057,7 @@ var readerBitwayVault = (entry) => {
69776
70057
  // totalSupply is in raw share units; convert to raw underlying.
69777
70058
  // (Every live leg is 18/18-dec — BSC stables are 18-dec — but the
69778
70059
  // rescale keeps a future 6-dec listing honest.)
69779
- totalAssets: totalSupply * exchangeRate * underlyingUnit / (shareUnit * ONE_E1814),
70060
+ totalAssets: totalSupply * exchangeRate * underlyingUnit / (shareUnit * ONE_E1815),
69780
70061
  totalSupply,
69781
70062
  exchangeRate,
69782
70063
  withdrawFeeBps: penaltyBps,
@@ -69811,7 +70092,7 @@ var readerFrankencoinSavings = (entry) => ({
69811
70092
  // `fetchPublic` derives `convertToAssets` / `convertToShares` from
69812
70093
  // `exchangeRate`, and 1e18 makes them the identity.
69813
70094
  totalSupply: deposits,
69814
- exchangeRate: ONE_E1814
70095
+ exchangeRate: ONE_E1815
69815
70096
  };
69816
70097
  }
69817
70098
  });
@@ -69858,7 +70139,7 @@ var readerHyperbeatVault = (entry) => {
69858
70139
  const feeRaw = toBigInt16(fee);
69859
70140
  return {
69860
70141
  // totalSupply is in raw share units; convert to raw underlying.
69861
- totalAssets: totalSupply * exchangeRate * underlyingUnit / (shareUnit * ONE_E1814),
70142
+ totalAssets: totalSupply * exchangeRate * underlyingUnit / (shareUnit * ONE_E1815),
69862
70143
  totalSupply,
69863
70144
  exchangeRate,
69864
70145
  // `instantWithdrawalFee` is over a base of 10 000, so the raw
@@ -69895,9 +70176,9 @@ var readerNavOracle = (entry) => {
69895
70176
  const raw = Array.isArray(round) ? round[1] : round?.answer;
69896
70177
  const answer = toBigInt16(raw);
69897
70178
  if (answer === void 0 || answer <= 0n) return void 0;
69898
- const exchangeRate = answer * ONE_E1814 / oracleScale;
70179
+ const exchangeRate = answer * ONE_E1815 / oracleScale;
69899
70180
  return {
69900
- totalAssets: totalSupply * exchangeRate * underlyingUnit / (ONE_E1814 * shareUnit),
70181
+ totalAssets: totalSupply * exchangeRate * underlyingUnit / (ONE_E1815 * shareUnit),
69901
70182
  totalSupply,
69902
70183
  exchangeRate
69903
70184
  };
@@ -69911,7 +70192,7 @@ var readerNativeWnlp = (entry) => {
69911
70192
  return {
69912
70193
  calls: [
69913
70194
  { address, name: "totalSupply", params: [] },
69914
- { address, name: "getNlpByWnlp", params: [ONE_E1814] },
70195
+ { address, name: "getNlpByWnlp", params: [ONE_E1815] },
69915
70196
  { address, name: "instantRedeemFeeBips", params: [] },
69916
70197
  { address, name: "instantRedeemEnabled", params: [] },
69917
70198
  // Falls back to the vault itself when no CreditVault is pinned —
@@ -69945,7 +70226,7 @@ var readerNativeWnlp = (entry) => {
69945
70226
  const windowSeconds = toBigInt16(window);
69946
70227
  const bips = toBigInt16(feeBips);
69947
70228
  return {
69948
- totalAssets: totalSupply * exchangeRate / ONE_E1814,
70229
+ totalAssets: totalSupply * exchangeRate / ONE_E1815,
69949
70230
  totalSupply,
69950
70231
  exchangeRate,
69951
70232
  // `instantRedeemFeeBips` on-chain is already basis points, so it
@@ -70000,7 +70281,7 @@ var readerSaturnVault = (entry) => {
70000
70281
  return {
70001
70282
  totalAssets,
70002
70283
  totalSupply,
70003
- exchangeRate: convertToAssetsRaw * ONE_E1814 / underlyingUnit,
70284
+ exchangeRate: convertToAssetsRaw * ONE_E1815 / underlyingUnit,
70004
70285
  // Shares minted for ONE underlying unit, net of the fee. Equals the
70005
70286
  // derived `1/exchangeRate` while the dial is 0, and diverges the
70006
70287
  // moment it is not.
@@ -70120,7 +70401,7 @@ var readerVenusHub = (entry) => {
70120
70401
  return {
70121
70402
  totalAssets,
70122
70403
  totalSupply,
70123
- exchangeRate: convertToAssetsRaw * ONE_E1814 / underlyingUnit,
70404
+ exchangeRate: convertToAssetsRaw * ONE_E1815 / underlyingUnit,
70124
70405
  ...supplyRate !== void 0 ? { supplyRate } : {},
70125
70406
  ...instantRedeemCapacity !== void 0 ? {
70126
70407
  instantRedeemCapacity: paused ? 0n : instantRedeemCapacity,
@@ -70155,7 +70436,7 @@ var parseStrandedRewards = (slice2, base, coreGroupAssets, hubTotalAssets) => {
70155
70436
  }
70156
70437
  if (supplySpeed === 0n) return 0;
70157
70438
  const rewardsPerYearUsd = supplySpeed * blocksPerYear * rewardPrice;
70158
- const suppliedRaw = vTokenSupply * exchangeRateStored / ONE_E1814;
70439
+ const suppliedRaw = vTokenSupply * exchangeRateStored / ONE_E1815;
70159
70440
  const suppliedUsd = suppliedRaw * underlyingPrice;
70160
70441
  if (suppliedUsd === 0n || hubTotalAssets === 0n) return void 0;
70161
70442
  const marketAprPct = Number(rewardsPerYearUsd * 1000000000n / suppliedUsd) / 1e9;
@@ -70182,7 +70463,7 @@ var readerVesperPool = (entry) => {
70182
70463
  return void 0;
70183
70464
  }
70184
70465
  if (pricePerShare === void 0 || pricePerShare <= 0n) return void 0;
70185
- const exchangeRate = pricePerShare * ONE_E1814 / underlyingUnit;
70466
+ const exchangeRate = pricePerShare * ONE_E1815 / underlyingUnit;
70186
70467
  return {
70187
70468
  totalAssets,
70188
70469
  totalSupply,
@@ -70212,7 +70493,7 @@ var readerWrenNav = (entry) => {
70212
70493
  const burncost = toBigInt16(burn);
70213
70494
  const hasBurncost = burncost !== void 0 && burncost > 0n;
70214
70495
  const exchangeRate = hasBurncost ? burncost : navPrice;
70215
- const totalAssets = totalSupply * exchangeRate * underlyingUnit / (ONE_E1814 * shareUnit);
70496
+ const totalAssets = totalSupply * exchangeRate * underlyingUnit / (ONE_E1815 * shareUnit);
70216
70497
  const burnFlag = toBigInt16(burnable);
70217
70498
  const instantRedeemEnabled = burnFlag === void 0 ? true : burnFlag > 0n;
70218
70499
  return {
@@ -70227,7 +70508,7 @@ var readerWrenNav = (entry) => {
70227
70508
  };
70228
70509
 
70229
70510
  // src/vaults/savings/readers/yieldBasisLt.ts
70230
- var ONE_SHARE = ONE_E1814;
70511
+ var ONE_SHARE = ONE_E1815;
70231
70512
  var readerYieldBasisLt = (entry) => {
70232
70513
  const underlyingUnit = 10n ** BigInt(entry.underlyingDecimals ?? entry.decimals);
70233
70514
  const amm = entry.capacityContract ?? entry.address;
@@ -70255,7 +70536,7 @@ var readerYieldBasisLt = (entry) => {
70255
70536
  }
70256
70537
  if (totalSupply === 0n || redeemRaw === 0n) return void 0;
70257
70538
  const totalAssets = totalSupply * redeemRaw / ONE_SHARE;
70258
- const exchangeRate = redeemRaw * ONE_E1814 / underlyingUnit;
70539
+ const exchangeRate = redeemRaw * ONE_E1815 / underlyingUnit;
70259
70540
  const equity = Array.isArray(valueOracle) ? toBigInt16(valueOracle[1]) : toBigInt16(valueOracle?.value);
70260
70541
  const cap = toBigInt16(maxDebt);
70261
70542
  let depositCapacity;
@@ -70317,7 +70598,7 @@ var buildReader2 = (entry) => {
70317
70598
  var resolveYieldApr2 = async (entries) => (await resolveEntryApr(entries)).apr;
70318
70599
 
70319
70600
  // src/vaults/savings/fetchPublic.ts
70320
- var ONE_E1815 = 10n ** 18n;
70601
+ var ONE_E1816 = 10n ** 18n;
70321
70602
  var resolveSelfOnly = (chainId, vault) => {
70322
70603
  const entry = findSavingsWithdrawEntry(chainId, vault);
70323
70604
  if (!entry) return void 0;
@@ -70404,8 +70685,8 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
70404
70685
  1,
70405
70686
  Number(liquidityAmount * 1000000n / state.totalAssets) / 1e6
70406
70687
  ) : 1;
70407
- const convertToAssets = state.exchangeRate * underlyingUnit / ONE_E1815;
70408
- const convertToShares = state.convertToShares ?? (state.exchangeRate > 0n ? ONE_E1815 * shareUnit / state.exchangeRate : 0n);
70688
+ const convertToAssets = state.exchangeRate * underlyingUnit / ONE_E1816;
70689
+ const convertToShares = state.convertToShares ?? (state.exchangeRate > 0n ? ONE_E1816 * shareUnit / state.exchangeRate : 0n);
70409
70690
  const depositCapacity = state.depositCapacity?.toString();
70410
70691
  const depositCapacityFormatted = state.depositCapacity !== void 0 ? Number(state.depositCapacity) / 10 ** underlyingDec : void 0;
70411
70692
  const depositCapacityUsd = depositCapacityFormatted !== void 0 && priceUsd !== void 0 ? depositCapacityFormatted * priceUsd : void 0;