@1delta/margin-fetcher 0.0.402 → 0.0.403

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
@@ -11288,8 +11288,10 @@ var MORPHO_LENS = {
11288
11288
  [Chain.ETHEREUM_MAINNET]: "0xFc107f469A92c0de7B3105B802584CD6c7D710C2",
11289
11289
  [Chain.PLASMA_MAINNET]: "0xcB6Eb8df68153cebF60E1872273Ef52075a5C297",
11290
11290
  [Chain.BERACHAIN]: "0x7a59ddbB76521E8982Fa3A08598C9a83b14A6C07",
11291
- [Chain.BNB_SMART_CHAIN_MAINNET]: "0x79f4061BF049c5c6CAC6bfe2415c2460815F4ac7",
11292
- // lista lens
11291
+ // Serves BOTH Morpho Blue and Lista on 56 — one lens exposes
11292
+ // `get{,Lista,Moolah}{Market,User}DataCompact`. Byte-identical to the
11293
+ // previous entry 0x79f4061B… (same keccak), so Lista is unaffected.
11294
+ [Chain.BNB_SMART_CHAIN_MAINNET]: "0x7812227c90D55Cc1620C425980141e60b7635824",
11293
11295
  [Chain.UNICHAIN]: "0xA453ba397c61B0c292EA3959A858821145B2707F",
11294
11296
  [Chain.SEI_NETWORK]: "0xcB6Eb8df68153cebF60E1872273Ef52075a5C297",
11295
11297
  [Chain.MONAD_MAINNET]: "0x0bd7473CbBf81d9dD936c61117eD230d95006CA2",
@@ -11304,13 +11306,24 @@ var MORPHO_LENS = {
11304
11306
  [Chain.ABSTRACT]: "0x8e24cfc19c6c00c524353cb8816f5f1c2f33c201",
11305
11307
  [Chain.INK]: "0x0bd7473CbBf81d9dD936c61117eD230d95006CA2",
11306
11308
  [Chain.KAIA_MAINNET]: "0x925716D57c842B50806884EDb295bA3E3A8EBdFE",
11307
- // blue-api does not index these three, so the lens is the ONLY way to read
11309
+ // blue-api does not index these four, so the lens is the ONLY way to read
11308
11310
  // their Morpho markets — see `lenderApiOnly` in fetchLenderAll.ts.
11309
11311
  [Chain.GNOSIS]: "0x98542B95B44a4732EffB1F4F01A696F1546236d3",
11312
+ // Same address as Gnosis — same deployer + nonce.
11313
+ [Chain.XDC_NETWORK]: "0x98542B95B44a4732EffB1F4F01A696F1546236d3",
11310
11314
  [Chain.AVALANCHE_C_CHAIN]: "0x2eA75bBBc5615651efc9401FBc9Db4d03B055CA6",
11311
11315
  // Same address as HyperEVM — same deployer + nonce, so CREATE lands
11312
11316
  // identically on both chains.
11313
- [Chain.MEGAETH_MAINNET]: "0x6Bc6aCB905c1216B0119C87Bf9E178ce298310FA"
11317
+ [Chain.MEGAETH_MAINNET]: "0x6Bc6aCB905c1216B0119C87Bf9E178ce298310FA",
11318
+ // Deployed 2026-08-03. Same reason as the block above — blue-api indexes
11319
+ // none of these, so the lens is the only read path. Sonic and Morph already
11320
+ // had markets in the registry (9 and 1) that were silently unreadable.
11321
+ [Chain.SONIC_MAINNET]: "0xd184c5315B728c1C990f59dDD275c8155f8e255c",
11322
+ [Chain.CRONOS_MAINNET]: "0x79f4061BF049c5c6CAC6bfe2415c2460815F4ac7",
11323
+ [Chain.MORPH]: "0x79f4061BF049c5c6CAC6bfe2415c2460815F4ac7",
11324
+ [Chain.MODE]: "0x2eA75bBBc5615651efc9401FBc9Db4d03B055CA6",
11325
+ [Chain.LINEA]: "0x2eA75bBBc5615651efc9401FBc9Db4d03B055CA6",
11326
+ [Chain.SCROLL]: "0x4aEA1CE479BF7E036bBB6826A2bF084bce6560a0"
11314
11327
  };
11315
11328
  var buildMorphoUserCallWithLens = (chainId, account, lender, marketsToQuery) => {
11316
11329
  const marketSlices = chunk(marketsToQuery, 100);
@@ -11326,7 +11339,13 @@ var buildMorphoUserCallWithLens = (chainId, account, lender, marketsToQuery) =>
11326
11339
  }));
11327
11340
  };
11328
11341
  var buildMorphoTypeUserCallWithLens = (chainId, account, lender, marketsToQuery, getClient) => {
11329
- return lender === Lender.MORPHO_BLUE ? buildMorphoUserCallWithLens(chainId, account, lender, marketsToQuery) : buildListaUserCallWithLens(chainId, account, lender, marketsToQuery, getClient);
11342
+ return lender === Lender.MORPHO_BLUE ? buildMorphoUserCallWithLens(chainId, account, lender, marketsToQuery) : buildListaUserCallWithLens(
11343
+ chainId,
11344
+ account,
11345
+ lender,
11346
+ marketsToQuery,
11347
+ getClient
11348
+ );
11330
11349
  };
11331
11350
  var buildListaUserCallWithLens = async (chainId, account, lender, marketsToQuery, getClient) => {
11332
11351
  await fetchListaBrokerUserData(
@@ -23966,6 +23985,13 @@ function lenderApiOnly(lender, chainId) {
23966
23985
  if (chainId === Chain.GNOSIS) return false;
23967
23986
  if (chainId === Chain.AVALANCHE_C_CHAIN) return false;
23968
23987
  if (chainId === Chain.MEGAETH_MAINNET) return false;
23988
+ if (chainId === Chain.XDC_NETWORK) return false;
23989
+ if (chainId === Chain.SONIC_MAINNET) return false;
23990
+ if (chainId === Chain.CRONOS_MAINNET) return false;
23991
+ if (chainId === Chain.MORPH) return false;
23992
+ if (chainId === Chain.MODE) return false;
23993
+ if (chainId === Chain.LINEA) return false;
23994
+ if (chainId === Chain.SCROLL) return false;
23969
23995
  return true;
23970
23996
  }
23971
23997
  if (isMidnight(lender)) return true;
@@ -38064,6 +38090,127 @@ var sparkSavingsFetcher = {
38064
38090
  return out;
38065
38091
  }
38066
38092
  };
38093
+ var RATE_ABI = [
38094
+ {
38095
+ name: "rate",
38096
+ type: "function",
38097
+ stateMutability: "view",
38098
+ inputs: [],
38099
+ outputs: [{ type: "uint256" }]
38100
+ }
38101
+ ];
38102
+ var SUSDP_VAULTS = [
38103
+ {
38104
+ chain: Chain.AVALANCHE_C_CHAIN,
38105
+ address: "0x9d92c21205383651610f90722131655a5b8ed3e0"
38106
+ },
38107
+ {
38108
+ chain: Chain.HYPEREVM,
38109
+ address: "0x9b3a8f7cec208e247d97dee13313690977e24459"
38110
+ },
38111
+ {
38112
+ chain: Chain.ETHEREUM_MAINNET,
38113
+ address: "0x0d45b129dc868963025db79a9074ea9c9e32cae4"
38114
+ },
38115
+ {
38116
+ chain: Chain.BASE,
38117
+ address: "0x472ed57b376fe400259fb28e5c46eb53f0e3e7e7"
38118
+ }
38119
+ ];
38120
+ var YEAR_SECONDS5 = 31536e3;
38121
+ var BASE_27 = 1e27;
38122
+ var aprFromRate = (rate) => Number(rate) / BASE_27 * YEAR_SECONDS5 * 100;
38123
+ var SUSDP_KEY = "SUSDP";
38124
+ var SUSDP_GROUP_KEY = "Staked USDp::sUSDp";
38125
+ var parallelFetcher = {
38126
+ label: "PARALLEL_SUSDP",
38127
+ fetch: async () => {
38128
+ let apr = 0;
38129
+ for (const { chain, address } of SUSDP_VAULTS) {
38130
+ try {
38131
+ const [rate] = await multicallRetryUniversal({
38132
+ chain,
38133
+ abi: RATE_ABI,
38134
+ calls: [{ address, name: "rate", params: [] }],
38135
+ allowFailure: false
38136
+ });
38137
+ apr = aprFromRate(rate);
38138
+ break;
38139
+ } catch {
38140
+ }
38141
+ }
38142
+ return { [SUSDP_KEY]: apr, [SUSDP_GROUP_KEY]: apr };
38143
+ }
38144
+ };
38145
+
38146
+ // src/yields/intrinsic/fetchers/rwaFunds.ts
38147
+ var RWA_FUNDS = {
38148
+ // Circle (ex-Hashnote) USYC — $3.0B, the largest tokenized MMF.
38149
+ // Base's `US Yield Coin::USYC` (0xeee7af83…) is unverified → skipped.
38150
+ USYC: {
38151
+ pool: "7c0a89c7-70cf-460c-b62e-cb278bf97e8f",
38152
+ keys: ["Hashnote USYC::USYC", "Circle USYC::USYC"]
38153
+ },
38154
+ // BlackRock BUIDL — $2.0B. Rebasing (NAV $1, monthly dividend
38155
+ // distributions); the percent is still the holder's carry. Chain-1
38156
+ // group is the truncated variant.
38157
+ BUIDL: {
38158
+ pool: "b663ca59-c7e6-4435-ae4a-28d339ce6a15",
38159
+ keys: [
38160
+ "BlackRock USD Institutional Digital Liquidity Fund::BUIDL",
38161
+ "BlackRock USD Institutional Digital Liq::BUIDL"
38162
+ ]
38163
+ },
38164
+ // Superstate USTB — $740M short-duration govt securities.
38165
+ USTB: {
38166
+ pool: "1910847a-f8b5-40ce-a1ab-1dafdded5fbb",
38167
+ keys: ["Superstate Short Duration US Government Securities Fund::USTB"]
38168
+ },
38169
+ // Superstate USCC — crypto-carry fund (basis, not T-bills).
38170
+ USCC: {
38171
+ pool: "aff74ce8-4fe3-462b-af11-542cc16d24b2",
38172
+ keys: ["Superstate USCC::USCC", "Superstate Crypto Carry Fund::USCC"]
38173
+ },
38174
+ // VanEck VBILL (via Securitize) — $179M.
38175
+ VBILL: {
38176
+ pool: "5663e2ef-7e9c-4755-9701-9b59b90dbba3",
38177
+ keys: ["VanEck Treasury Fund::VBILL"]
38178
+ },
38179
+ // OpenEden TBILL — bare group on 1/42161. (THBILL is Theo's fund —
38180
+ // a different asset with its own fetcher.)
38181
+ TBILL: {
38182
+ pool: "e140f3b2-0327-46ea-93f5-88b17b0a0a16",
38183
+ keys: ["TBILL"]
38184
+ },
38185
+ // OpenEden cUSDO — compounding ERC-4626 wrapper over USDO; accrues
38186
+ // USDO's T-bill yield. The sweep's one full-vault graduate: it also
38187
+ // has savings-registry rows on 1/56/8453 (permissionless wrap —
38188
+ // `maxDeposit = uint256.max` verified) binding these same keys.
38189
+ CUSDO: {
38190
+ pool: "f083596e-032d-4d6b-a7a8-1836d3f99bcd",
38191
+ keys: [
38192
+ "Compounding Open Dollar::CUSDO",
38193
+ "Compounding Open Dollar::cUSDO",
38194
+ "Compounding OpenDollar::CUSDO"
38195
+ ]
38196
+ }
38197
+ };
38198
+ var rwaFundsFetcher = {
38199
+ label: "RWA_FUNDS",
38200
+ fetch: async () => {
38201
+ const out = {};
38202
+ await Promise.all(
38203
+ Object.entries(RWA_FUNDS).map(async ([label, fund]) => {
38204
+ try {
38205
+ const apr = apyToAprPercent(await fetchDefiLlamaApy(fund.pool));
38206
+ for (const key of fund.keys) out[key] = apr;
38207
+ } catch {
38208
+ }
38209
+ })
38210
+ );
38211
+ return out;
38212
+ }
38213
+ };
38067
38214
 
38068
38215
  // src/yields/intrinsic/fetchers/reProtocol.ts
38069
38216
  var REUSD_KEY = "RE::reUSD";
@@ -39402,12 +39549,74 @@ var reUsdGroup = {
39402
39549
  // is no price source and they are deliberately NOT registered.
39403
39550
  }
39404
39551
  };
39552
+ var sUsdpGroup = {
39553
+ base: {
39554
+ symbol: "sUSDp",
39555
+ brand: "Parallel",
39556
+ decimals: 18,
39557
+ isRebasing: false,
39558
+ isMintable: true,
39559
+ withdrawalMode: "instant",
39560
+ yieldFetcher: parallelFetcher,
39561
+ yieldKey: SUSDP_KEY
39562
+ },
39563
+ chains: {
39564
+ "43114": {
39565
+ address: "0x9d92c21205383651610f90722131655a5b8ed3e0",
39566
+ underlying: "0x9ee1963f05553ef838604dd39403be21cef26aa4"
39567
+ // USDp
39568
+ },
39569
+ "999": {
39570
+ address: "0x9b3a8f7cec208e247d97dee13313690977e24459",
39571
+ underlying: "0xbe65f0f410a72bec163dc65d46c83699e957d588"
39572
+ },
39573
+ "1": {
39574
+ address: "0x0d45b129dc868963025db79a9074ea9c9e32cae4",
39575
+ // Yes, the HyperEVM sUSDp address — see the address-reuse trap
39576
+ // in the group comment.
39577
+ underlying: "0x9b3a8f7cec208e247d97dee13313690977e24459"
39578
+ },
39579
+ "8453": {
39580
+ address: "0x472ed57b376fe400259fb28e5c46eb53f0e3e7e7",
39581
+ underlying: "0x76a9a0062ec6712b99b4f63bd2b4270185759dd5"
39582
+ }
39583
+ }
39584
+ };
39585
+ var cUsdoGroup = {
39586
+ base: {
39587
+ symbol: "cUSDO",
39588
+ brand: "OpenEden",
39589
+ decimals: 18,
39590
+ isRebasing: false,
39591
+ isMintable: true,
39592
+ withdrawalMode: "instant",
39593
+ yieldFetcher: rwaFundsFetcher,
39594
+ yieldKey: "Compounding Open Dollar::CUSDO"
39595
+ },
39596
+ chains: {
39597
+ "1": {
39598
+ address: "0xad55aebc9b8c03fc43cd9f62260391c13c23e7c0",
39599
+ underlying: "0x8238884ec9668ef77b90c6dff4d1a9f4f4823bfe"
39600
+ // USDO
39601
+ },
39602
+ "56": {
39603
+ address: "0x64748ea3e31d0b7916f0ff91b017b9f404ded8ef",
39604
+ underlying: "0x302e52aff9815b9d1682473dbfb9c74f9b750aa8"
39605
+ },
39606
+ "8453": {
39607
+ address: "0x83db73ef5192de4b6a4c92bd0141ba1a0dc87c65",
39608
+ underlying: "0xad55aebc9b8c03fc43cd9f62260391c13c23e7c0"
39609
+ }
39610
+ }
39611
+ };
39405
39612
  var MULTI_CHAIN_GROUPS = [
39406
39613
  stUsdGroup,
39407
39614
  stEurGroup,
39408
39615
  yUsdGroup,
39409
39616
  sUsdcGroup,
39410
- reUsdGroup
39617
+ reUsdGroup,
39618
+ sUsdpGroup,
39619
+ cUsdoGroup
39411
39620
  ];
39412
39621
  var sparkV2Base = (symbol, decimals) => ({
39413
39622
  reader: "erc4626-idle",
@@ -40209,6 +40418,10 @@ var usdaiFetcher = {
40209
40418
 
40210
40419
  // src/yields/intrinsic/fetchers/ondo.ts
40211
40420
  var ONDO_BASE_URL = "https://app.ondo.finance/api/v2/assets";
40421
+ var OUSG_KEY = "OUSG";
40422
+ var OUSG_GROUP_KEY = "Ondo Short-Term US Government Treasuries::OUSG";
40423
+ var USDY_KEY = "USDY";
40424
+ var USDY_GROUP_KEY = "Ondo US Dollar Yield::USDY";
40212
40425
  var ondoFetcher = {
40213
40426
  label: "ONDO",
40214
40427
  fetch: async () => {
@@ -40216,9 +40429,13 @@ var ondoFetcher = {
40216
40429
  fetch(`${ONDO_BASE_URL}/ousg/info`).then((r) => r.json()),
40217
40430
  fetch(`${ONDO_BASE_URL}/usdy/info`).then((r) => r.json())
40218
40431
  ]);
40432
+ const ousg = apyToAprPercent(Number(ousgRes?.primaryMarket?.apy ?? 0));
40433
+ const usdy = apyToAprPercent(Number(usdyRes?.primaryMarket?.apy ?? 0));
40219
40434
  return {
40220
- OUSG: apyToAprPercent(Number(ousgRes?.primaryMarket?.apy ?? 0)),
40221
- USDY: apyToAprPercent(Number(usdyRes?.primaryMarket?.apy ?? 0))
40435
+ [OUSG_KEY]: ousg,
40436
+ [OUSG_GROUP_KEY]: ousg,
40437
+ [USDY_KEY]: usdy,
40438
+ [USDY_GROUP_KEY]: usdy
40222
40439
  };
40223
40440
  }
40224
40441
  };
@@ -40237,38 +40454,78 @@ var syzusdFetcher = {
40237
40454
  // src/yields/intrinsic/fetchers/midas.ts
40238
40455
  var MIDAS_APY_URL = "https://api-prod.midas.app/api/data/apys";
40239
40456
  var MIDAS_TOKENS = [
40240
- { apyKey: "mtbill", assetGroup: "Midas mTBILL::MTBILL" },
40241
- { apyKey: "mbasis", assetGroup: "Midas mBASIS::MBASIS" },
40242
- { apyKey: "mbtc", assetGroup: "Midas mBTC::MBTC" },
40243
- { apyKey: "medge", assetGroup: "Midas mEDGE::MEDGE" },
40244
- { apyKey: "mre7", assetGroup: "Midas mRe7YIELD::MRE7YIELD" },
40245
- { apyKey: "mre7sol", assetGroup: "Midas mRe7SOL::MRE7SOL" },
40246
- { apyKey: "mmev", assetGroup: "Midas mMEV::MMEV" },
40247
- { apyKey: "mfone", assetGroup: "Midas Fasanara ONE::mF-ONE" },
40248
- { apyKey: "mhyper", assetGroup: "Midas Hyperithm::mHYPER" },
40249
- { apyKey: "mapollo", assetGroup: "Midas mAPOLLO::MAPOLLO" },
40250
- { apyKey: "mevbtc", assetGroup: "Midas mevBTC::MEVBTC" },
40251
- { apyKey: "mfarm", assetGroup: "Midas mFARM::MFARM" },
40252
- { apyKey: "msyrupusd", assetGroup: "Midas msyrupUSD::MSYRUPUSD" },
40253
- { apyKey: "msyrupusdp", assetGroup: "Midas msyrupUSDp::MSYRUPUSDP" },
40254
- { apyKey: "mre7btc", assetGroup: "Midas mRe7BTC::MRE7BTC" },
40255
- { apyKey: "mxrp", assetGroup: "Midas XRP::mXRP" },
40256
- { apyKey: "mevusd", assetGroup: "Midas Everstake USD::MEVUSD" },
40257
- { apyKey: "mhypereth", assetGroup: "Midas Hyperithm ETH::mHyperETH" },
40258
- { apyKey: "mhyperbtc", assetGroup: "Midas Hyperithm BTC::mHyperBTC" },
40259
- { apyKey: "mm1usd", assetGroup: "Midas M1 USD Market Neutral::mM1-USD" }
40457
+ { apyKey: "mtbill", keys: ["Midas mTBILL::MTBILL"] },
40458
+ {
40459
+ apyKey: "mbasis",
40460
+ keys: ["Midas mBASIS::MBASIS", "Midas mBASIS::mBASIS"]
40461
+ },
40462
+ {
40463
+ apyKey: "mbtc",
40464
+ keys: ["Midas mBTC::MBTC", "Midas BTC Yield Token::mBTC"]
40465
+ },
40466
+ { apyKey: "medge", keys: ["Midas mEDGE::MEDGE", "Midas mEDGE::mEDGE"] },
40467
+ {
40468
+ apyKey: "mre7",
40469
+ keys: ["Midas mRe7YIELD::MRE7YIELD", "Midas Re7 Yield::mRe7YIELD"]
40470
+ },
40471
+ { apyKey: "mre7sol", keys: ["Midas mRe7SOL::MRE7SOL"] },
40472
+ { apyKey: "mre7eth", keys: ["Midas Re7 Ethereum::mRe7ETH"] },
40473
+ { apyKey: "mmev", keys: ["Midas mMEV::MMEV"] },
40474
+ { apyKey: "mfone", keys: ["Midas Fasanara ONE::mF-ONE"] },
40475
+ {
40476
+ apyKey: "mhyper",
40477
+ keys: ["Midas Hyperithm::mHYPER", "mHYPER::Midas Hyperithm"]
40478
+ },
40479
+ { apyKey: "mapollo", keys: ["Midas mAPOLLO::MAPOLLO"] },
40480
+ // NB Avalanche carries a `MEV BTC::mevBTC` row (0x1f8e769b…) that MAY be
40481
+ // this asset, but the issuer is unverifiable (Midas's docs/API are
40482
+ // Cloudflare-walled) — deliberately not keyed, same rule as bondusd.
40483
+ { apyKey: "mevbtc", keys: ["Midas mevBTC::MEVBTC"] },
40484
+ { apyKey: "mfarm", keys: ["Midas mFARM::MFARM"] },
40485
+ { apyKey: "msyrupusd", keys: ["Midas msyrupUSD::MSYRUPUSD"] },
40486
+ { apyKey: "msyrupusdp", keys: ["Midas msyrupUSDp::MSYRUPUSDP"] },
40487
+ { apyKey: "mre7btc", keys: ["Midas mRe7BTC::MRE7BTC"] },
40488
+ { apyKey: "mxrp", keys: ["Midas XRP::mXRP"] },
40489
+ { apyKey: "mevusd", keys: ["Midas Everstake USD::MEVUSD"] },
40490
+ { apyKey: "mhypereth", keys: ["Midas Hyperithm ETH::mHyperETH"] },
40491
+ {
40492
+ apyKey: "mhyperbtc",
40493
+ keys: ["Midas Hyperithm BTC::mHyperBTC", "Midas Hyperithm BTC::MHYPERBTC"]
40494
+ },
40495
+ { apyKey: "mm1usd", keys: ["Midas M1 USD Market Neutral::mM1-USD"] },
40496
+ // 2026-08 sweep additions
40497
+ { apyKey: "mrox", keys: ["Midas Rockaway Market Neutral::MROX"] },
40498
+ { apyKey: "mglobal", keys: ["Midas Fasanara Global::MGLOBAL"] },
40499
+ { apyKey: "mglo", keys: ["Midas Fasanara Global Open::MGLO"] },
40500
+ { apyKey: "weeur", keys: ["Liquid Euro::weEUR"] },
40501
+ { apyKey: "plusd", keys: ["Plasma USD::plUSD"] },
40502
+ { apyKey: "splusd", keys: ["Staked Plasma USD::splUSD"] }
40260
40503
  ];
40504
+ var MAX_DECIMAL_APY = 5;
40261
40505
  var midasFetcher = {
40262
40506
  label: "MIDAS",
40263
40507
  fetch: async () => {
40264
- const apys = await fetch(MIDAS_APY_URL).then(
40265
- (r) => r.json()
40266
- );
40508
+ const res = await fetch(MIDAS_APY_URL, {
40509
+ headers: {
40510
+ accept: "application/json",
40511
+ // WAF: bare fetches get 403 + `{}` — see header note.
40512
+ "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0 Safari/537.36",
40513
+ origin: "https://midas.app",
40514
+ referer: "https://midas.app/"
40515
+ },
40516
+ signal: AbortSignal.timeout(8e3)
40517
+ });
40518
+ if (!res.ok) throw new Error(`Midas APY HTTP ${res.status}`);
40519
+ const apys = await res.json();
40520
+ if (!apys || Object.keys(apys).length === 0) {
40521
+ throw new Error("Midas APY payload empty (WAF block?)");
40522
+ }
40267
40523
  const result = {};
40268
- for (const { apyKey, assetGroup } of MIDAS_TOKENS) {
40524
+ for (const { apyKey, keys } of MIDAS_TOKENS) {
40269
40525
  const apy = apys[apyKey];
40270
- if (apy && apy > 0) {
40271
- result[assetGroup] = apyToAprPercent(apy * 100);
40526
+ if (typeof apy === "number" && apy > 0 && apy <= MAX_DECIMAL_APY) {
40527
+ const apr = apyToAprPercent(apy * 100);
40528
+ for (const key of keys) result[key] = apr;
40272
40529
  }
40273
40530
  }
40274
40531
  return result;
@@ -40563,6 +40820,8 @@ var LENDING_ONLY_FETCHERS = [
40563
40820
  pendleFetcher,
40564
40821
  usdaiFetcher,
40565
40822
  ondoFetcher,
40823
+ // rwaFundsFetcher is NOT here: cUSDO's savings rows vault-wire it, so
40824
+ // it reaches the global map via `collectVaultFetchers` (disjointness rule).
40566
40825
  syzusdFetcher,
40567
40826
  midasFetcher,
40568
40827
  capFetcher,
@@ -54653,7 +54912,7 @@ var readVaultSharePrices = async (chainId, addresses, multicallRetry) => {
54653
54912
  };
54654
54913
 
54655
54914
  // src/vaults/yield/annualize.ts
54656
- var YEAR_SECONDS5 = 365 * 24 * 60 * 60;
54915
+ var YEAR_SECONDS6 = 365 * 24 * 60 * 60;
54657
54916
  var SCALE = 10n ** 18n;
54658
54917
  var appendSnapshot = (points, snap, options) => {
54659
54918
  const maxPoints = options?.maxPoints ?? 90;
@@ -54682,7 +54941,7 @@ var computeVaultApr = (points, options) => {
54682
54941
  if (pThen === 0n) return void 0;
54683
54942
  const ratioScaled = BigInt(now.p) * SCALE / pThen;
54684
54943
  const ratio = Number(ratioScaled) / 1e18;
54685
- const apr = (ratio - 1) * (YEAR_SECONDS5 / windowSeconds);
54944
+ const apr = (ratio - 1) * (YEAR_SECONDS6 / windowSeconds);
54686
54945
  return {
54687
54946
  apr,
54688
54947
  sharePriceNow: now.p,