@strkfarm/sdk 1.1.4 → 1.1.6

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
@@ -305,7 +305,7 @@ var defaultTokens = [{
305
305
  name: "WBTC",
306
306
  symbol: "WBTC",
307
307
  logo: "https://assets.troves.fi/integrations/tokens/wbtc.svg",
308
- address: ContractAddr.from("0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac"),
308
+ address: ContractAddr.from("0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac"),
309
309
  decimals: 8,
310
310
  coingeckId: void 0,
311
311
  displayDecimals: 6,
@@ -321,6 +321,61 @@ var defaultTokens = [{
321
321
  displayDecimals: 6,
322
322
  priceCheckAmount: 1e-4
323
323
  // 112000 * 0.0001 = $11.2
324
+ }, {
325
+ name: "solvBTC",
326
+ symbol: "solvBTC",
327
+ logo: "https://assets.strkfarm.com/integrations/tokens/solvbtc.svg",
328
+ address: ContractAddr.from("0x0593e034dda23eea82d2ba9a30960ed42cf4a01502cc2351dc9b9881f9931a68"),
329
+ decimals: 18,
330
+ coingeckId: void 0,
331
+ priceProxySymbol: "WBTC",
332
+ displayDecimals: 6,
333
+ priceCheckAmount: 1e-4
334
+ // 112000 * 0.0001 = $11.2
335
+ }, {
336
+ name: "LBTC",
337
+ symbol: "LBTC",
338
+ logo: "https://assets.strkfarm.com/integrations/tokens/lbtc.svg",
339
+ address: ContractAddr.from("0x036834a40984312f7f7de8d31e3f6305b325389eaeea5b1c0664b2fb936461a4"),
340
+ decimals: 8,
341
+ coingeckId: void 0,
342
+ displayDecimals: 6,
343
+ priceProxySymbol: "WBTC",
344
+ priceCheckAmount: 1e-4
345
+ // 112000 * 0.0001 = $11.2
346
+ }, {
347
+ name: "xWBTC",
348
+ symbol: "xWBTC",
349
+ logo: "https://assets.strkfarm.com/integrations/tokens/xwbtc.svg",
350
+ address: ContractAddr.from("0x6a567e68c805323525fe1649adb80b03cddf92c23d2629a6779f54192dffc13"),
351
+ decimals: 8,
352
+ coingeckId: void 0,
353
+ displayDecimals: 6,
354
+ priceProxySymbol: "WBTC",
355
+ priceCheckAmount: 1e-4
356
+ // 112000 * 0.0001 = $11.2
357
+ }, {
358
+ name: "xsBTC",
359
+ symbol: "xsBTC",
360
+ logo: "https://assets.strkfarm.com/integrations/tokens/xsbtc_solv.svg",
361
+ address: ContractAddr.from("0x580f3dc564a7b82f21d40d404b3842d490ae7205e6ac07b1b7af2b4a5183dc9"),
362
+ decimals: 18,
363
+ coingeckId: void 0,
364
+ displayDecimals: 6,
365
+ priceProxySymbol: "WBTC",
366
+ priceCheckAmount: 1e-4
367
+ // 112000 * 0.0001 = $11.2
368
+ }, {
369
+ name: "xtBTC",
370
+ symbol: "xtBTC",
371
+ logo: "https://assets.strkfarm.com/integrations/tokens/xtbtc.svg",
372
+ address: ContractAddr.from("0x43a35c1425a0125ef8c171f1a75c6f31ef8648edcc8324b55ce1917db3f9b91"),
373
+ decimals: 8,
374
+ coingeckId: void 0,
375
+ displayDecimals: 6,
376
+ priceProxySymbol: "WBTC",
377
+ priceCheckAmount: 1e-4
378
+ // 112000 * 0.0001 = $11.2
324
379
  }];
325
380
  var tokens = defaultTokens;
326
381
  var _Global = class _Global {
@@ -408,9 +463,11 @@ var PricerBase = class {
408
463
  // src/modules/pricer.ts
409
464
  var Pricer = class extends PricerBase {
410
465
  // e.g. ETH/USDC
411
- constructor(config, tokens2) {
466
+ constructor(config, tokens2, refreshInterval = 3e4, staleTime = 6e4) {
412
467
  super(config, tokens2);
413
468
  this.prices = {};
469
+ this.refreshInterval = 3e4;
470
+ this.staleTime = 6e4;
414
471
  // code populates this map during runtime to determine which method to use for a given token
415
472
  // The method set will be the first one to try after first attempt
416
473
  this.methodToUse = {};
@@ -419,6 +476,8 @@ var Pricer = class extends PricerBase {
419
476
  */
420
477
  this.PRICE_API = `https://api.coinbase.com/v2/prices/{{PRICER_KEY}}/buy`;
421
478
  this.EKUBO_API = "https://quoter-mainnet-api.ekubo.org/{{AMOUNT}}/{{TOKEN_ADDRESS}}/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8";
479
+ this.refreshInterval = refreshInterval;
480
+ this.staleTime = staleTime;
422
481
  }
423
482
  isReady() {
424
483
  const allPricesExist = Object.keys(this.prices).length === this.tokens.length;
@@ -451,10 +510,10 @@ var Pricer = class extends PricerBase {
451
510
  this._loadPrices();
452
511
  setInterval(() => {
453
512
  this._loadPrices();
454
- }, 3e4);
513
+ }, this.refreshInterval);
455
514
  }
456
515
  isStale(timestamp, tokenName) {
457
- const STALE_TIME = 6e4;
516
+ const STALE_TIME = this.staleTime;
458
517
  return (/* @__PURE__ */ new Date()).getTime() - timestamp.getTime() > STALE_TIME;
459
518
  }
460
519
  assertNotStale(timestamp, tokenName) {
@@ -480,13 +539,25 @@ var Pricer = class extends PricerBase {
480
539
  onUpdate(token.symbol);
481
540
  return;
482
541
  }
483
- const price = await this._getPrice(token);
484
- this.prices[token.symbol] = {
485
- price,
486
- timestamp: /* @__PURE__ */ new Date()
487
- };
542
+ if (token.priceProxySymbol) {
543
+ const proxyToken = this.tokens.find((t) => t.symbol === token.priceProxySymbol);
544
+ if (!proxyToken) {
545
+ throw new FatalError(`Price proxy token ${token.priceProxySymbol} not found`);
546
+ }
547
+ const price = await this._getPrice(proxyToken);
548
+ this.prices[token.symbol] = {
549
+ price,
550
+ timestamp: /* @__PURE__ */ new Date()
551
+ };
552
+ } else {
553
+ const price = await this._getPrice(token);
554
+ this.prices[token.symbol] = {
555
+ price,
556
+ timestamp: /* @__PURE__ */ new Date()
557
+ };
558
+ }
488
559
  onUpdate(token.symbol);
489
- logger.verbose(`Fetched price of ${token.name} as ${price}`);
560
+ logger.verbose(`Fetched price of ${token.name} as ${this.prices[token.symbol].price}`);
490
561
  break;
491
562
  } catch (error) {
492
563
  if (retry < MAX_RETRIES) {
@@ -3926,6 +3997,18 @@ async function getAPIUsingHeadlessBrowser(url) {
3926
3997
 
3927
3998
  // src/modules/harvests.ts
3928
3999
  var import_starknet9 = require("starknet");
4000
+
4001
+ // src/strategies/constants.ts
4002
+ var COMMON_CONTRACTS = [{
4003
+ address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
4004
+ name: "Access Controller",
4005
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
4006
+ }];
4007
+ var ENDPOINTS = {
4008
+ VESU_BASE: "https://cache-server-t2me.onrender.com/vesu"
4009
+ };
4010
+
4011
+ // src/modules/harvests.ts
3929
4012
  var Harvests = class _Harvests {
3930
4013
  constructor(config) {
3931
4014
  this.config = config;
@@ -3985,7 +4068,7 @@ var EkuboHarvests = class extends Harvests {
3985
4068
  var VESU_REWARDS_CONTRACT = ContractAddr.from("0x0387f3eb1d98632fbe3440a9f1385Aec9d87b6172491d3Dd81f1c35A7c61048F");
3986
4069
  var VesuHarvests = class _VesuHarvests extends Harvests {
3987
4070
  async getHarvests(addr) {
3988
- const result = await fetch(`https://api.vesu.xyz/users/${addr.address}/strk-rewards/calldata`);
4071
+ const result = await fetch(`${ENDPOINTS.VESU_BASE}/users/${addr.address}/strk-rewards/calldata`);
3989
4072
  const data = await result.json();
3990
4073
  const rewardsContract = VESU_REWARDS_CONTRACT;
3991
4074
  const cls = await this.config.provider.getClassAt(rewardsContract.address);
@@ -9463,13 +9546,6 @@ var vesu_pools_default = {
9463
9546
  ]
9464
9547
  };
9465
9548
 
9466
- // src/strategies/constants.ts
9467
- var COMMON_CONTRACTS = [{
9468
- address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
9469
- name: "Access Controller",
9470
- sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
9471
- }];
9472
-
9473
9549
  // src/strategies/vesu-rebalance.tsx
9474
9550
  var import_jsx_runtime2 = require("react/jsx-runtime");
9475
9551
  var VesuRebalance = class _VesuRebalance extends BaseStrategy {
@@ -9598,7 +9674,7 @@ var VesuRebalance = class _VesuRebalance extends BaseStrategy {
9598
9674
  };
9599
9675
  }
9600
9676
  static async getAllPossibleVerifiedPools(asset) {
9601
- const data = await getAPIUsingHeadlessBrowser("https://api.vesu.xyz/pools");
9677
+ const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.VESU_BASE}/pools`);
9602
9678
  const verifiedPools = data.data.filter((d) => d.isVerified);
9603
9679
  const pools = verifiedPools.map((p) => {
9604
9680
  const hasMyAsset = p.assets.find((a) => asset.eqString(a.address));
@@ -9775,7 +9851,7 @@ var VesuRebalance = class _VesuRebalance extends BaseStrategy {
9775
9851
  let pools = [];
9776
9852
  try {
9777
9853
  const data = await getAPIUsingHeadlessBrowser(
9778
- "https://api.vesu.xyz/pools"
9854
+ `${ENDPOINTS.VESU_BASE}/pools`
9779
9855
  );
9780
9856
  pools = data.data;
9781
9857
  for (const pool of vesu_pools_default.data) {
@@ -16348,14 +16424,31 @@ var _protocol2 = {
16348
16424
  name: "Ekubo",
16349
16425
  logo: "https://app.ekubo.org/favicon.ico"
16350
16426
  };
16351
- var _riskFactor2 = [
16352
- { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 34, reason: "Audited smart contracts" },
16353
- { type: "Impermanent Loss Risk" /* IMPERMANENT_LOSS */, value: 0.75, weight: 33, reason: "Low risk due to co-related assets" },
16354
- { type: "Market Risk" /* MARKET_RISK */, value: 0.75, weight: 33, reason: "Low risk due to co-related assets" }
16427
+ var _corelatedPoolRiskFactors = [
16428
+ { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 2 /* WELL_AUDITED */, weight: 34, reason: "Audited smart contracts" },
16429
+ { type: "Impermanent Loss Risk" /* IMPERMANENT_LOSS */, value: 1 /* HIGHLY_CORRELATED */, weight: 33, reason: "Low risk due to co-related assets" },
16430
+ { type: "Market Risk" /* MARKET_RISK */, value: 1 /* VERY_LOW_VOLATILITY */, weight: 33, reason: "Low risk due to co-related assets" }
16431
+ ];
16432
+ var mediumVolatilityPoolRiskFactors = [
16433
+ { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 2 /* WELL_AUDITED */, weight: 34, reason: "Audited smart contracts" },
16434
+ { type: "Impermanent Loss Risk" /* IMPERMANENT_LOSS */, value: 3 /* NON_CORRELATED */, weight: 33, reason: "Low risk due to co-related assets" },
16435
+ { type: "Market Risk" /* MARKET_RISK */, value: 3 /* MODERATE_VOLATILITY */, weight: 33, reason: "Low risk due to co-related assets" }
16355
16436
  ];
16356
- var _riskFactorStable = [
16357
- { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 }
16437
+ var highVolatilityPoolRiskFactors = [
16438
+ { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 2 /* WELL_AUDITED */, weight: 34, reason: "Audited smart contracts" },
16439
+ { type: "Impermanent Loss Risk" /* IMPERMANENT_LOSS */, value: 3 /* NON_CORRELATED */, weight: 33, reason: "Low risk due to co-related assets" },
16440
+ { type: "Market Risk" /* MARKET_RISK */, value: 4 /* HIGH_VOLATILITY */, weight: 33, reason: "Low risk due to co-related assets" }
16358
16441
  ];
16442
+ var mediumRisk = {
16443
+ riskFactor: mediumVolatilityPoolRiskFactors,
16444
+ netRisk: mediumVolatilityPoolRiskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / mediumVolatilityPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
16445
+ notARisks: getNoRiskTags(mediumVolatilityPoolRiskFactors)
16446
+ };
16447
+ var highRisk = {
16448
+ riskFactor: highVolatilityPoolRiskFactors,
16449
+ netRisk: highVolatilityPoolRiskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / highVolatilityPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
16450
+ notARisks: getNoRiskTags(highVolatilityPoolRiskFactors)
16451
+ };
16359
16452
  var AUDIT_URL2 = "https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
16360
16453
  var faqs2 = [
16361
16454
  {
@@ -16370,6 +16463,10 @@ var faqs2 = [
16370
16463
  question: "What happens during withdrawal?",
16371
16464
  answer: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices."
16372
16465
  },
16466
+ {
16467
+ question: "Are there any deposit/withdrawal fees?",
16468
+ answer: "No, there are no deposit/withdrawal fees. However, there is a performance fee varying between 10-20% of the fees and rewards generated. The exact fee is determined by the strategy and the APY shown is net of this fee."
16469
+ },
16373
16470
  {
16374
16471
  question: "Is the strategy audited?",
16375
16472
  answer: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
@@ -16387,6 +16484,15 @@ var faqs2 = [
16387
16484
  ] })
16388
16485
  }
16389
16486
  ];
16487
+ function getLSTFAQs(lstSymbol) {
16488
+ return [
16489
+ ...faqs2,
16490
+ {
16491
+ question: "Why might I see a negative APY?",
16492
+ answer: `A negative APY can occur when ${lstSymbol}'s price drops on DEXes. This is usually temporary and tends to recover within a few days or a week.`
16493
+ }
16494
+ ];
16495
+ }
16390
16496
  var xSTRKSTRK = {
16391
16497
  name: "Ekubo xSTRK/STRK",
16392
16498
  description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
@@ -16404,9 +16510,9 @@ var xSTRKSTRK = {
16404
16510
  auditUrl: AUDIT_URL2,
16405
16511
  maxTVL: Web3Number.fromWei("0", 18),
16406
16512
  risk: {
16407
- riskFactor: _riskFactor2,
16408
- netRisk: _riskFactor2.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor2.reduce((acc, curr) => acc + curr.weight, 0),
16409
- notARisks: getNoRiskTags(_riskFactor2)
16513
+ riskFactor: _corelatedPoolRiskFactors,
16514
+ netRisk: _corelatedPoolRiskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _corelatedPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
16515
+ notARisks: getNoRiskTags(_corelatedPoolRiskFactors)
16410
16516
  },
16411
16517
  apyMethodology: "APY based on 7-day historical performance, including fees and rewards.",
16412
16518
  additionalInfo: {
@@ -16422,15 +16528,10 @@ var xSTRKSTRK = {
16422
16528
  customShouldRebalance: async (currentPrice) => true,
16423
16529
  minWaitHours: 24,
16424
16530
  direction: "uponly"
16425
- }
16531
+ },
16532
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "STRK")
16426
16533
  },
16427
- faqs: [
16428
- ...faqs2,
16429
- {
16430
- question: "Why might I see a negative APY?",
16431
- answer: "A negative APY can occur when xSTRK's price drops on DEXes. This is usually temporary and tends to recover within a few days or a week."
16432
- }
16433
- ],
16534
+ faqs: getLSTFAQs("xSTRK"),
16434
16535
  points: [{
16435
16536
  multiplier: 1,
16436
16537
  logo: "https://endur.fi/favicon.ico",
@@ -16439,68 +16540,237 @@ var xSTRKSTRK = {
16439
16540
  contractDetails: [],
16440
16541
  investmentSteps: []
16441
16542
  };
16442
- var EkuboCLVaultStrategies = [
16543
+ var lstStrategies = [
16443
16544
  xSTRKSTRK,
16444
16545
  {
16445
16546
  ...xSTRKSTRK,
16547
+ name: "Ekubo xWBTC/WBTC",
16548
+ description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
16549
+ address: ContractAddr.from(
16550
+ "0x2ea99b4971d3c277fa4a9b4beb7d4d7d169e683393a29eef263d5d57b4380a"
16551
+ ),
16552
+ launchBlock: 2338309,
16553
+ // must be same order as poolKey token0 and token1
16554
+ depositTokens: [
16555
+ Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
16556
+ Global.getDefaultTokens().find((t) => t.symbol === "xWBTC")
16557
+ ],
16558
+ additionalInfo: {
16559
+ ...xSTRKSTRK.additionalInfo,
16560
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
16561
+ lstContract: Global.getDefaultTokens().find((t) => t.symbol === "xWBTC").address
16562
+ },
16563
+ faqs: getLSTFAQs("xWBTC"),
16564
+ points: [],
16565
+ contractDetails: [],
16566
+ investmentSteps: []
16567
+ },
16568
+ {
16569
+ ...xSTRKSTRK,
16570
+ name: "Ekubo xtBTC/tBTC",
16571
+ description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
16572
+ address: ContractAddr.from(
16573
+ "0x785dc3dfc4e80ef2690a99512481e3ed3a5266180adda5a47e856245d68a4af"
16574
+ ),
16575
+ launchBlock: 2344809,
16576
+ // must be same order as poolKey token0 and token1
16577
+ depositTokens: [
16578
+ Global.getDefaultTokens().find((t) => t.symbol === "xtBTC"),
16579
+ Global.getDefaultTokens().find((t) => t.symbol === "tBTC")
16580
+ ],
16581
+ additionalInfo: {
16582
+ ...xSTRKSTRK.additionalInfo,
16583
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "tBTC"),
16584
+ lstContract: Global.getDefaultTokens().find((t) => t.symbol === "xtBTC").address
16585
+ },
16586
+ faqs: getLSTFAQs("xtBTC"),
16587
+ points: [],
16588
+ contractDetails: [],
16589
+ investmentSteps: []
16590
+ },
16591
+ {
16592
+ ...xSTRKSTRK,
16593
+ name: "Ekubo xsBTC/solvBTC",
16594
+ description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
16595
+ address: ContractAddr.from(
16596
+ "0x3af1c7faa7c464cf2c494e988972ad1939f1103dbfb6e47e9bf0c47e49b14ef"
16597
+ ),
16598
+ launchBlock: 2344809,
16599
+ // must be same order as poolKey token0 and token1
16600
+ depositTokens: [
16601
+ Global.getDefaultTokens().find((t) => t.symbol === "xsBTC"),
16602
+ Global.getDefaultTokens().find((t) => t.symbol === "solvBTC")
16603
+ ],
16604
+ additionalInfo: {
16605
+ ...xSTRKSTRK.additionalInfo,
16606
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "solvBTC"),
16607
+ lstContract: Global.getDefaultTokens().find((t) => t.symbol === "xsBTC").address
16608
+ },
16609
+ faqs: getLSTFAQs("xsBTC"),
16610
+ points: [],
16611
+ contractDetails: [],
16612
+ investmentSteps: []
16613
+ }
16614
+ ];
16615
+ var ETHUSDCRe7Strategy = {
16616
+ ...xSTRKSTRK,
16617
+ name: "Ekubo ETH/USDC",
16618
+ description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
16619
+ address: ContractAddr.from(
16620
+ "0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
16621
+ ),
16622
+ launchBlock: 1504232,
16623
+ // must be same order as poolKey token0 and token1
16624
+ depositTokens: [
16625
+ Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
16626
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC")
16627
+ ],
16628
+ additionalInfo: {
16629
+ newBounds: "Managed by Re7",
16630
+ truePrice: 1,
16631
+ feeBps: 1e3,
16632
+ rebalanceConditions: {
16633
+ customShouldRebalance: async (currentPrice) => currentPrice > 0.99 && currentPrice < 1.01,
16634
+ minWaitHours: 6,
16635
+ direction: "any"
16636
+ },
16637
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
16638
+ },
16639
+ faqs: [
16640
+ ...faqs2,
16641
+ {
16642
+ question: "Who is the curator of this strategy?",
16643
+ answer: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
16644
+ "Re7 Labs is the curator of this strategy. Re7 Labs is a well-known Web3 asset management firm. This strategy is completely managed by them, including ownership of the vault. Troves is developer of the smart contracts and maintains infrastructure to help users access these strategies. You can find more information about them on their website ",
16645
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: "https://www.re7labs.xyz", style: { textDecoration: "underline", marginLeft: "2px" }, target: "_blank", children: "here" }),
16646
+ "."
16647
+ ] })
16648
+ }
16649
+ ],
16650
+ risk: highRisk,
16651
+ points: [],
16652
+ curator: { name: "Re7 Labs", logo: "https://www.re7labs.xyz/favicon.ico" }
16653
+ };
16654
+ var RE7Strategies = [
16655
+ ETHUSDCRe7Strategy,
16656
+ {
16657
+ ...ETHUSDCRe7Strategy,
16446
16658
  name: "Ekubo USDC/USDT",
16447
16659
  description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
16448
16660
  address: ContractAddr.from(
16449
- "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
16661
+ "0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
16450
16662
  ),
16451
- launchBlock: 1385576,
16663
+ launchBlock: 1506139,
16452
16664
  // must be same order as poolKey token0 and token1
16453
16665
  depositTokens: [
16454
16666
  Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
16455
16667
  Global.getDefaultTokens().find((t) => t.symbol === "USDT")
16456
16668
  ],
16457
- additionalInfo: {
16458
- newBounds: {
16459
- lower: -1,
16460
- upper: 1
16461
- },
16462
- truePrice: 1,
16463
- feeBps: 1e3,
16464
- rebalanceConditions: {
16465
- customShouldRebalance: async (currentPrice) => currentPrice > 0.99 && currentPrice < 1.01,
16466
- minWaitHours: 6,
16467
- direction: "any"
16468
- }
16469
- }
16669
+ risk: xSTRKSTRK.risk
16470
16670
  },
16471
16671
  {
16472
- ...xSTRKSTRK,
16672
+ ...ETHUSDCRe7Strategy,
16473
16673
  name: "Ekubo STRK/USDC",
16474
16674
  description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
16475
16675
  address: ContractAddr.from(
16476
- "0xb7bd37121041261446d8eedec618955a4490641034942da688e8cbddea7b23"
16676
+ "0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
16477
16677
  ),
16478
- launchBlock: 1492136,
16678
+ launchBlock: 1504079,
16479
16679
  // must be same order as poolKey token0 and token1
16480
16680
  depositTokens: [
16481
16681
  Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
16482
16682
  Global.getDefaultTokens().find((t) => t.symbol === "USDC")
16483
16683
  ],
16484
- maxTVL: Web3Number.fromWei("0", 6),
16485
- additionalInfo: {
16486
- newBounds: "Managed by Re7",
16487
- feeBps: 1e3,
16488
- rebalanceConditions: {
16489
- customShouldRebalance: async (currentPrice) => true,
16490
- minWaitHours: 6,
16491
- direction: "any"
16492
- }
16493
- }
16684
+ risk: highRisk
16685
+ },
16686
+ {
16687
+ ...ETHUSDCRe7Strategy,
16688
+ name: "Ekubo STRK/ETH",
16689
+ description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
16690
+ address: ContractAddr.from(
16691
+ "0x4ce3024b0ee879009112d7b0e073f8a87153dd35b029347d4247ffe48d28f51"
16692
+ ),
16693
+ launchBlock: 1504149,
16694
+ // must be same order as poolKey token0 and token1
16695
+ depositTokens: [
16696
+ Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
16697
+ Global.getDefaultTokens().find((t) => t.symbol === "ETH")
16698
+ ],
16699
+ risk: highRisk
16700
+ },
16701
+ {
16702
+ ...ETHUSDCRe7Strategy,
16703
+ name: "Ekubo WBTC/USDC",
16704
+ description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
16705
+ address: ContractAddr.from(
16706
+ "0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
16707
+ ),
16708
+ launchBlock: 1506144,
16709
+ // must be same order as poolKey token0 and token1
16710
+ depositTokens: [
16711
+ Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
16712
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC")
16713
+ ],
16714
+ risk: mediumRisk
16715
+ },
16716
+ {
16717
+ ...ETHUSDCRe7Strategy,
16718
+ name: "Ekubo tBTC/USDC",
16719
+ description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
16720
+ address: ContractAddr.from(
16721
+ "0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
16722
+ ),
16723
+ launchBlock: 1501764,
16724
+ // must be same order as poolKey token0 and token1
16725
+ depositTokens: [
16726
+ Global.getDefaultTokens().find((t) => t.symbol === "tBTC"),
16727
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC")
16728
+ ],
16729
+ risk: mediumRisk
16730
+ },
16731
+ {
16732
+ ...ETHUSDCRe7Strategy,
16733
+ name: "Ekubo WBTC/ETH",
16734
+ description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
16735
+ address: ContractAddr.from(
16736
+ "0x1c9232b8186d9317652f05055615f18a120c2ad9e5ee96c39e031c257fb945b"
16737
+ ),
16738
+ launchBlock: 1506145,
16739
+ // must be same order as poolKey token0 and token1
16740
+ depositTokens: [
16741
+ Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
16742
+ Global.getDefaultTokens().find((t) => t.symbol === "ETH")
16743
+ ],
16744
+ risk: mediumRisk
16745
+ },
16746
+ {
16747
+ ...ETHUSDCRe7Strategy,
16748
+ name: "Ekubo WBTC/STRK",
16749
+ description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
16750
+ address: ContractAddr.from(
16751
+ "0x1248e385c23a929a015ec298a26560fa7745bbd6e41a886550e337b02714b1b"
16752
+ ),
16753
+ launchBlock: 1506147,
16754
+ // must be same order as poolKey token0 and token1
16755
+ depositTokens: [
16756
+ Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
16757
+ Global.getDefaultTokens().find((t) => t.symbol === "STRK")
16758
+ ],
16759
+ risk: highRisk
16494
16760
  }
16495
16761
  ];
16762
+ var EkuboCLVaultStrategies = [
16763
+ ...[lstStrategies[0]],
16764
+ ...RE7Strategies
16765
+ ];
16496
16766
  EkuboCLVaultStrategies.forEach((s) => {
16497
16767
  s.contractDetails = [
16498
16768
  {
16499
16769
  address: s.address,
16500
16770
  name: "Vault",
16501
16771
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/cl_vault"
16502
- },
16503
- ...COMMON_CONTRACTS
16772
+ }
16773
+ // ...COMMON_CONTRACTS
16504
16774
  ];
16505
16775
  s.docs = "https://docs.troves.fi/p/ekubo-cl-vaults";
16506
16776
  s.description = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
@@ -16521,7 +16791,11 @@ EkuboCLVaultStrategies.forEach((s) => {
16521
16791
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h4", { style: { fontWeight: "bold" }, children: "Key points to note:" }),
16522
16792
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "10px", color: "var(--chakra-colors-text_secondary)" }, children: [
16523
16793
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: {}, children: "1. During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." }),
16524
- s.name.includes("xSTRK/STRK") && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: {}, children: "2. Sometimes you might see a negative APY \u2014 this is usually not a big deal. It happens when xSTRK's price drops on DEXes, but things typically bounce back within a few days or a week." })
16794
+ s.additionalInfo.lstContract && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { style: {}, children: [
16795
+ "2. Sometimes you might see a negative APY \u2014 this is usually not a big deal. It happens when ",
16796
+ s.name.split(" ")[1].split("/")[0],
16797
+ "'s price drops on DEXes, but things typically bounce back within a few days or a week."
16798
+ ] })
16525
16799
  ] })
16526
16800
  ] })
16527
16801
  ] });
@@ -18471,7 +18745,7 @@ var endurProtocol = {
18471
18745
  name: "Endur",
18472
18746
  logo: "https://app.endur.fi/logo.png"
18473
18747
  };
18474
- var _riskFactor3 = [
18748
+ var _riskFactor2 = [
18475
18749
  { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25, reason: "Audited by CSC" },
18476
18750
  { type: "Depeg Risk" /* DEPEG_RISK */, value: 0.25, weight: 25, reason: "Depending on prevailing market conditions and trading activity, xSTRK may lose its peg to the underlying asset." },
18477
18751
  { type: "Liquidation Risk" /* LIQUIDATION_RISK */, value: 0.1, weight: 10, reason: "Liquidation risk is low due to the nature of the Re7 Pool on Vesu" },
@@ -18546,9 +18820,9 @@ var SenseiStrategies = [
18546
18820
  protocols: [endurProtocol, vesuProtocol],
18547
18821
  maxTVL: new Web3Number("1500000", 18),
18548
18822
  risk: {
18549
- riskFactor: _riskFactor3,
18550
- netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
18551
- notARisks: getNoRiskTags(_riskFactor3)
18823
+ riskFactor: _riskFactor2,
18824
+ netRisk: _riskFactor2.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor2.reduce((acc, curr) => acc + curr.weight, 0),
18825
+ notARisks: getNoRiskTags(_riskFactor2)
18552
18826
  },
18553
18827
  additionalInfo: {
18554
18828
  mainToken: Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
@@ -21303,7 +21577,7 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
21303
21577
  let pools = [];
21304
21578
  try {
21305
21579
  const data = await getAPIUsingHeadlessBrowser(
21306
- "https://api.vesu.xyz/pools"
21580
+ `${ENDPOINTS.VESU_BASE}/pools`
21307
21581
  );
21308
21582
  pools = data.data;
21309
21583
  for (const pool of vesu_pools_default.data) {
@@ -24162,7 +24436,7 @@ function getLooperSettings(token1Symbol, token2Symbol, vaultSettings, pool1, poo
24162
24436
  vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(STRKToken.address, USDCToken.address, "avnu_swap_rewards" /* AVNU_SWAP_REWARDS */).bind(commonAdapter));
24163
24437
  return vaultSettings;
24164
24438
  }
24165
- var _riskFactor4 = [
24439
+ var _riskFactor3 = [
24166
24440
  { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25, reason: "Audited by Zellic" },
24167
24441
  { type: "Liquidation Risk" /* LIQUIDATION_RISK */, value: 1.5, weight: 50, reason: "Liquidation risk is mitigated by stable price feed on Starknet" },
24168
24442
  { type: "Technical Risk" /* TECHNICAL_RISK */, value: 1, weight: 50, reason: "Technical failures like risk monitoring failures" }
@@ -24366,9 +24640,9 @@ var UniversalStrategies = [
24366
24640
  depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC")],
24367
24641
  additionalInfo: getLooperSettings("USDC", "ETH", usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
24368
24642
  risk: {
24369
- riskFactor: _riskFactor4,
24370
- netRisk: _riskFactor4.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor4.reduce((acc, curr) => acc + curr.weight, 0),
24371
- notARisks: getNoRiskTags(_riskFactor4)
24643
+ riskFactor: _riskFactor3,
24644
+ netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
24645
+ notARisks: getNoRiskTags(_riskFactor3)
24372
24646
  },
24373
24647
  protocols: [Protocols.VESU],
24374
24648
  maxTVL: Web3Number.fromWei(0, 6),
@@ -24385,9 +24659,9 @@ var UniversalStrategies = [
24385
24659
  depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "WBTC")],
24386
24660
  additionalInfo: getLooperSettings("WBTC", "ETH", wbtcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
24387
24661
  risk: {
24388
- riskFactor: _riskFactor4,
24389
- netRisk: _riskFactor4.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor4.reduce((acc, curr) => acc + curr.weight, 0),
24390
- notARisks: getNoRiskTags(_riskFactor4)
24662
+ riskFactor: _riskFactor3,
24663
+ netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
24664
+ notARisks: getNoRiskTags(_riskFactor3)
24391
24665
  },
24392
24666
  protocols: [Protocols.VESU],
24393
24667
  maxTVL: Web3Number.fromWei(0, 8),
@@ -24404,9 +24678,9 @@ var UniversalStrategies = [
24404
24678
  depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "ETH")],
24405
24679
  additionalInfo: getLooperSettings("ETH", "WBTC", ethVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
24406
24680
  risk: {
24407
- riskFactor: _riskFactor4,
24408
- netRisk: _riskFactor4.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor4.reduce((acc, curr) => acc + curr.weight, 0),
24409
- notARisks: getNoRiskTags(_riskFactor4)
24681
+ riskFactor: _riskFactor3,
24682
+ netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
24683
+ notARisks: getNoRiskTags(_riskFactor3)
24410
24684
  },
24411
24685
  protocols: [Protocols.VESU],
24412
24686
  maxTVL: Web3Number.fromWei(0, 18),
@@ -24423,9 +24697,9 @@ var UniversalStrategies = [
24423
24697
  depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "STRK")],
24424
24698
  additionalInfo: getLooperSettings("STRK", "ETH", strkVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
24425
24699
  risk: {
24426
- riskFactor: _riskFactor4,
24427
- netRisk: _riskFactor4.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor4.reduce((acc, curr) => acc + curr.weight, 0),
24428
- notARisks: getNoRiskTags(_riskFactor4)
24700
+ riskFactor: _riskFactor3,
24701
+ netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
24702
+ notARisks: getNoRiskTags(_riskFactor3)
24429
24703
  },
24430
24704
  protocols: [Protocols.VESU],
24431
24705
  maxTVL: Web3Number.fromWei(0, 18),
@@ -24442,9 +24716,9 @@ var UniversalStrategies = [
24442
24716
  depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDT")],
24443
24717
  additionalInfo: getLooperSettings("USDT", "ETH", usdtVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
24444
24718
  risk: {
24445
- riskFactor: _riskFactor4,
24446
- netRisk: _riskFactor4.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor4.reduce((acc, curr) => acc + curr.weight, 0),
24447
- notARisks: getNoRiskTags(_riskFactor4)
24719
+ riskFactor: _riskFactor3,
24720
+ netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
24721
+ notARisks: getNoRiskTags(_riskFactor3)
24448
24722
  },
24449
24723
  protocols: [Protocols.VESU],
24450
24724
  maxTVL: Web3Number.fromWei(0, 6),
@@ -24460,11 +24734,9 @@ var TelegramNotif = class {
24460
24734
  constructor(token, shouldPoll) {
24461
24735
  this.subscribers = [
24462
24736
  // '6820228303',
24463
- "1505578076",
24464
- "1356705582",
24465
- // langs
24466
- "1388729514",
24467
- // hwashere
24737
+ // '1505578076',
24738
+ // '1356705582', // langs
24739
+ // '1388729514', // hwashere
24468
24740
  "985902592"
24469
24741
  ];
24470
24742
  this.bot = new import_node_telegram_bot_api.default(token, { polling: shouldPoll });