@1delta/margin-fetcher 5.0.43 → 5.0.45

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
@@ -6566,7 +6566,7 @@ var AAVE_V3_EMODES = (chain, lender) => {
6566
6566
  if (chain === Chain.PLASMA_MAINNET) {
6567
6567
  if (lender === Lender.AAVE_V3) return range(25);
6568
6568
  }
6569
- return [0, 1, 2, 3, 4, 5, 6];
6569
+ return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
6570
6570
  };
6571
6571
  function yldrBaseline(assetsToQuery, providerAddress, aaveTokenMap) {
6572
6572
  return assetsToQuery.flatMap((tk) => [
@@ -44103,6 +44103,21 @@ var brixFetcher = {
44103
44103
  return { [WITRY_KEY]: apr, [WITRY_GROUP_KEY]: apr };
44104
44104
  }
44105
44105
  };
44106
+
44107
+ // src/yields/intrinsic/fetchers/cap.ts
44108
+ var CAP_CUSD_TIMESERIES_URL = "https://api.cap.app/v1/vaults/1/0xcCcc62962d17b8914c62D74FfB843d73B2a3cccC/timeseries/1d_1M";
44109
+ var STCUSD_KEY = "Staked cap USD::stcUSD";
44110
+ var STCUSD_BRIDGED_GROUP_KEY = "Staked Cap USD::stcUSD";
44111
+ var capFetcher = {
44112
+ label: "CAP",
44113
+ fetch: async () => {
44114
+ const res = await fetch(CAP_CUSD_TIMESERIES_URL).then((r) => r.json());
44115
+ const ts = res?.timeseries ?? [];
44116
+ const last7 = ts.slice(-7);
44117
+ const apr = last7.length === 0 ? 0 : last7.reduce((sum3, e) => sum3 + Number(e.stakingApr), 0) / last7.length * 100;
44118
+ return { [STCUSD_KEY]: apr, [STCUSD_BRIDGED_GROUP_KEY]: apr };
44119
+ }
44120
+ };
44106
44121
  var CHAIN_ID10 = Chain.ETHEREUM_MAINNET;
44107
44122
  var APYUSD = "0x38eeb52f0771140d10c4e9a9a72349a329fe8a6a";
44108
44123
  var APYX_LINEAR_VEST = "0x0d62b4cc02b4b51ed19ddf41d7a7979cf394c99f";
@@ -46212,6 +46227,45 @@ var SINGLE_CHAIN_ENTRIES = {
46212
46227
  yieldFetcher: brixFetcher,
46213
46228
  yieldKey: WITRY_KEY
46214
46229
  },
46230
+ {
46231
+ // Cap stcUSD — a plain instant ERC-4626 over cUSD, Cap's stablecoin.
46232
+ // 98.1M cUSD held / 91.3M shares, price 1.0751 (2026-08-14). Yield is
46233
+ // what Cap's whitelisted operators pay to borrow the backing (56 % drawn
46234
+ // at integration) plus its reserve strategies.
46235
+ //
46236
+ // `lockDuration()` = 86400 is NOT a user lock — it is the window over
46237
+ // which a notified reward batch vests, the Ethena `VESTING_PERIOD` shape
46238
+ // under different names (`totalLocked` = unvested, `lastNotify` = the
46239
+ // batch stamp). Fork-verified 2026-08-14: deposit 1,000 cUSD and redeem
46240
+ // in the SAME transaction sequence returns 999.999999999999999999 cUSD —
46241
+ // instant, permissionless, no cooldown, no fee. `maxDeposit` is uint.max
46242
+ // and `maxRedeem` tracks the balance.
46243
+ //
46244
+ // No `solvency`: 56 % of the backing is lent to operators covered by
46245
+ // third-party restaker delegation rather than by borrower collateral,
46246
+ // and that mechanism is not assessed here. Absent is the honest answer —
46247
+ // the builder marks `coverage.pending.counterparty` rather than
46248
+ // defaulting to `overcollateralized`.
46249
+ //
46250
+ // Ethereum only. The same vanity address on MegaETH (4326, 25.2M — 21.6 %
46251
+ // of supply) and Katana (747474, 0.92M) is a bridged ERC-20 whose
46252
+ // `asset()` / `totalAssets()` / `convertToAssets()` all revert, and whose
46253
+ // `name()` differs by one character ("Staked Cap USD" vs mainnet's
46254
+ // "Staked cap USD") — the split that cost those chains their intrinsic
46255
+ // yield until `capFetcher` began emitting both group keys.
46256
+ address: "0x88887be419578051ff9f4eb6c858a951921d8888",
46257
+ underlying: "0xcccc62962d17b8914c62d74ffb843d73b2a3cccc",
46258
+ // cUSD
46259
+ symbol: "stcUSD",
46260
+ brand: "Cap",
46261
+ description: "cUSD is Cap's stablecoin, minted against stablecoin deposits. stcUSD stakes it with an appreciating share price: the yield is the interest Cap's whitelisted operators pay to borrow the backing, plus its reserve strategies, notified in batches that vest into the share price over 24 hours. Stake and unstake are instant, permissionless and free \u2014 a redeem in the same block as the deposit settles at par.",
46262
+ decimals: 18,
46263
+ isRebasing: false,
46264
+ isMintable: true,
46265
+ withdrawalMode: "instant",
46266
+ yieldFetcher: capFetcher,
46267
+ yieldKey: STCUSD_KEY
46268
+ },
46215
46269
  {
46216
46270
  // Apyx apyUSD — ERC-4626 over apxUSD, the "Dividend-Backed
46217
46271
  // Dollar" (variable-rate perpetual preferred stock of DAT
@@ -47623,21 +47677,6 @@ var midasFetcher = {
47623
47677
  }
47624
47678
  };
47625
47679
 
47626
- // src/yields/intrinsic/fetchers/cap.ts
47627
- var CAP_CUSD_TIMESERIES_URL = "https://api.cap.app/v1/vaults/1/0xcCcc62962d17b8914c62D74FfB843d73B2a3cccC/timeseries/1d_1M";
47628
- var stcUSD = "Staked cap USD::stcUSD";
47629
- var capFetcher = {
47630
- label: "CAP",
47631
- fetch: async () => {
47632
- const res = await fetch(CAP_CUSD_TIMESERIES_URL).then((r) => r.json());
47633
- const ts = res?.timeseries ?? [];
47634
- const last7 = ts.slice(-7);
47635
- if (last7.length === 0) return { [stcUSD]: 0 };
47636
- const avg = last7.reduce((sum3, e) => sum3 + Number(e.stakingApr), 0) / last7.length;
47637
- return { [stcUSD]: avg * 100 };
47638
- }
47639
- };
47640
-
47641
47680
  // src/yields/intrinsic/fetchers/nest.ts
47642
47681
  var NEST_API_URL = "https://api.nest.credit/v1";
47643
47682
  var NEST_VAULT_GROUPS = {