@strkfarm/sdk 2.0.0-staging.7 → 2.0.0-staging.70

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.
@@ -10,7 +10,6 @@ import {
10
10
  IStrategyMetadata,
11
11
  RiskFactor,
12
12
  RiskType,
13
- StrategyCategory,
14
13
  StrategyTag,
15
14
  TokenInfo,
16
15
  VaultPosition,
@@ -20,6 +19,7 @@ import {
20
19
  InstantWithdrawalVault,
21
20
  VaultType,
22
21
  StrategyLiveStatus,
22
+ UnwrapLabsCurator,
23
23
  } from "@/interfaces";
24
24
  import { PricerBase } from "@/modules/pricerBase";
25
25
  import { assert } from "@/utils";
@@ -37,18 +37,23 @@ import EkuboMathAbi from "@/data/ekubo-math.abi.json";
37
37
  import ERC4626Abi from "@/data/erc4626.abi.json";
38
38
  import { Global } from "@/global";
39
39
  import { AvnuWrapper, ERC20, SwapInfo } from "@/modules";
40
- import { BaseStrategy } from "./base-strategy";
40
+ import {
41
+ BaseStrategy,
42
+ SingleTokenInfo,
43
+ UserPositionCard,
44
+ UserPositionCardsInput,
45
+ } from "./base-strategy";
41
46
  import { DualActionAmount } from "./base-strategy";
42
47
  import { DualTokenInfo } from "./base-strategy";
43
48
  import { log } from "winston";
44
49
  import { EkuboHarvests, HarvestInfo } from "@/modules/harvests";
45
50
  import { logger } from "@/utils/logger";
46
- import { COMMON_CONTRACTS } from "./constants";
47
51
  import { DepegRiskLevel, ImpermanentLossLevel, MarketRiskLevel, SmartContractRiskLevel } from "@/interfaces/risks";
48
52
  import { from, gql } from "@apollo/client";
49
53
  import apolloClient from "@/modules/apollo-client";
50
54
  import { binarySearch } from "@/utils/math-utils";
51
55
  import { Quote } from "@avnu/avnu-sdk";
56
+ import { MY_ACCESS_CONTROL } from "./constants";
52
57
 
53
58
  export interface EkuboPoolKey {
54
59
  token0: ContractAddr;
@@ -125,7 +130,10 @@ export class EkuboCLVault extends BaseStrategy<
125
130
  pricer: PricerBase,
126
131
  metadata: IStrategyMetadata<CLVaultStrategySettings>
127
132
  ) {
128
- super(config);
133
+ super(config, {
134
+ depositInputMode: "dual",
135
+ withdrawInputMode: "dual"
136
+ });
129
137
  this.pricer = pricer;
130
138
 
131
139
  assert(
@@ -303,7 +311,10 @@ export class EkuboCLVault extends BaseStrategy<
303
311
  return [this.contract.populate("handle_fees", [])];
304
312
  }
305
313
 
306
- async getFeeHistory(timePeriod: '24h' | '7d' | '30d' | '3m' = '24h'): Promise<{
314
+ async getFeeHistory(
315
+ timePeriod: '24h' | '7d' | '30d' | '3m' | '6m' = '24h',
316
+ range?: { startTimestamp?: number; endTimestamp?: number }
317
+ ): Promise<{
307
318
  summary: DualTokenInfo,
308
319
  history: FeeHistory[]
309
320
  }> {
@@ -312,8 +323,15 @@ export class EkuboCLVault extends BaseStrategy<
312
323
  query ContractFeeEarnings(
313
324
  $timeframe: String!
314
325
  $contract: String!
326
+ $startTimestamp: Float
327
+ $endTimestamp: Float
315
328
  ) {
316
- contractFeeEarnings(timeframe: $timeframe, contract: $contract) {
329
+ contractFeeEarnings(
330
+ timeframe: $timeframe
331
+ contract: $contract
332
+ startTimestamp: $startTimestamp
333
+ endTimestamp: $endTimestamp
334
+ ) {
317
335
  contract
318
336
  dailyEarnings {
319
337
  date
@@ -326,7 +344,9 @@ export class EkuboCLVault extends BaseStrategy<
326
344
  `,
327
345
  variables: {
328
346
  timeframe: timePeriod,
329
- contract: this.address.address
347
+ contract: this.address.address,
348
+ startTimestamp: range?.startTimestamp,
349
+ endTimestamp: range?.endTimestamp
330
350
  },
331
351
  fetchPolicy: 'no-cache',
332
352
  });
@@ -477,6 +497,17 @@ export class EkuboCLVault extends BaseStrategy<
477
497
  return (apyForGivenBlocks * (365 * 24 * 3600)) / timeDiffSeconds;
478
498
  }
479
499
 
500
+ /**
501
+ * Calculate lifetime earnings for a user
502
+ * Not yet implemented for Ekubo CL Vault strategy
503
+ */
504
+ getLifetimeEarnings(
505
+ userTVL: SingleTokenInfo,
506
+ investmentFlows: Array<{ amount: string; type: string; timestamp: number; tx_hash: string }>
507
+ ): any {
508
+ throw new Error("getLifetimeEarnings is not implemented yet for this strategy");
509
+ }
510
+
480
511
  /**
481
512
  * Calculates realized APY based on TVL per share growth, always valued in USDC.
482
513
  * This is a vault-level metric (same for all users) and works for all strategies,
@@ -615,6 +646,55 @@ export class EkuboCLVault extends BaseStrategy<
615
646
  */
616
647
  }
617
648
 
649
+ async getMaxTVL(): Promise<Web3Number> {
650
+ // This strategy doesn't have a maxTVL so returning 0 simply
651
+ return new Web3Number('0', 18);
652
+ }
653
+
654
+ async getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]> {
655
+ const quoteToken = this.metadata.additionalInfo.quoteAsset;
656
+ const [userTVL, quotePrice] = await Promise.all([
657
+ this.getUserTVL(input.user),
658
+ this.pricer.getPrice(quoteToken.symbol),
659
+ ]);
660
+
661
+ const token0IsQuote = userTVL.token0.tokenInfo.address.eq(quoteToken.address);
662
+ const token1IsQuote = userTVL.token1.tokenInfo.address.eq(quoteToken.address);
663
+ const token0QuoteAmount = token0IsQuote
664
+ ? userTVL.token0.amount.toNumber()
665
+ : userTVL.token0.usdValue / (quotePrice.price || 1);
666
+ const token1QuoteAmount = token1IsQuote
667
+ ? userTVL.token1.amount.toNumber()
668
+ : userTVL.token1.usdValue / (quotePrice.price || 1);
669
+ const totalQuoteAmount = token0QuoteAmount + token1QuoteAmount;
670
+ const quoteAmountDisplay = Number.isFinite(totalQuoteAmount)
671
+ ? totalQuoteAmount.toLocaleString("en-US", {
672
+ maximumFractionDigits: quoteToken.displayDecimals ?? 2,
673
+ minimumFractionDigits: 0,
674
+ })
675
+ : "0";
676
+ const allocationValue = `${this.formatTokenAmountForCard(userTVL.token0.amount, userTVL.token0.tokenInfo)} / ${this.formatTokenAmountForCard(userTVL.token1.amount, userTVL.token1.tokenInfo)}`;
677
+ const allocationSubValue = `${this.formatUSDForCard(userTVL.token0.usdValue)} / ${this.formatUSDForCard(userTVL.token1.usdValue)}`;
678
+
679
+ const cards: UserPositionCard[] = [
680
+ {
681
+ title: "Your Holdings",
682
+ tooltip: `${quoteToken.symbol} equivalent value of your Ekubo position`,
683
+ value: `${quoteAmountDisplay} ${quoteToken.symbol}`,
684
+ subValue: `≈ ${this.formatUSDForCard(userTVL.usdValue)}`,
685
+ subValueColor: "positive",
686
+ },
687
+ {
688
+ title: "Holding Allocation",
689
+ tooltip: "Split of your position between token0 and token1",
690
+ value: allocationValue,
691
+ subValue: `≈ ${allocationSubValue}`,
692
+ subValueColor: "default",
693
+ },
694
+ ];
695
+ return cards;
696
+ }
697
+
618
698
  async feeBasedAPY(
619
699
  timeperiod: '24h' | '7d' | '30d' | '3m' = '24h'
620
700
  ): Promise<number> {
@@ -792,8 +872,26 @@ export class EkuboCLVault extends BaseStrategy<
792
872
  const P1 = await this.pricer.getPrice(token1Info.symbol);
793
873
  const token0Usd = Number(amount0.toFixed(13)) * P0.price;
794
874
  const token1Usd = Number(amount1.toFixed(13)) * P1.price;
875
+ const totalUsdValue = token0Usd + token1Usd;
876
+
877
+ if (
878
+ (totalUsdValue === 0 || token0Usd === 0 || token1Usd === 0 || amount0.eq(0) || amount1.eq(0)) &&
879
+ this.metadata.settings?.liveStatus === StrategyLiveStatus.ACTIVE
880
+ ) {
881
+ logger.warn(
882
+ `${this.metadata.name}:getTVL - Zero value detected: ` +
883
+ `usdValue=${totalUsdValue}, ` +
884
+ `amount0=${amount0.toString()}, ` +
885
+ `amount1=${amount1.toString()}, ` +
886
+ `token0Price=${P0.price}, ` +
887
+ `token1Price=${P1.price}, ` +
888
+ `token0Usd=${token0Usd}, ` +
889
+ `token1Usd=${token1Usd}`
890
+ );
891
+ }
892
+
795
893
  return {
796
- usdValue: token0Usd + token1Usd,
894
+ usdValue: totalUsdValue,
797
895
  token0: {
798
896
  tokenInfo: token0Info,
799
897
  amount: amount0,
@@ -2311,6 +2409,9 @@ function getLSTFAQs(lstSymbol: string): FAQ[] {
2311
2409
  ]
2312
2410
  }
2313
2411
 
2412
+ const vaultTypeDescription = 'Automatically collects fees and rebalances positions on Ekubo to optimize yield';
2413
+ const vaultType = VaultType.AUTOMATED_LP;
2414
+
2314
2415
  const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2315
2416
  id: "ekubo_cl_xstrkstrk",
2316
2417
  name: "Ekubo xSTRK/STRK",
@@ -2321,8 +2422,8 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2321
2422
  launchBlock: 1209881,
2322
2423
  type: "Other",
2323
2424
  vaultType: {
2324
- type: VaultType.FARMING,
2325
- description: "this is a yield farming vault"
2425
+ type: vaultType,
2426
+ description: vaultTypeDescription
2326
2427
  },
2327
2428
  // must be same order as poolKey token0 and token1
2328
2429
  depositTokens: [
@@ -2331,6 +2432,7 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2331
2432
  ],
2332
2433
  protocols: [_protocol],
2333
2434
  auditUrl: AUDIT_URL,
2435
+ curator: UnwrapLabsCurator,
2334
2436
  risk: {
2335
2437
  riskFactor: _lstPoolRiskFactors,
2336
2438
  netRisk:
@@ -2340,6 +2442,7 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2340
2442
  },
2341
2443
  apyMethodology:
2342
2444
  "APY based on 30-day historical performance, including fees and rewards.",
2445
+ realizedApyMethodology: "The realizedAPY is based on past 14 days performance by the vault",
2343
2446
  additionalInfo: {
2344
2447
  newBounds: {
2345
2448
  lower: -1,
@@ -2357,7 +2460,6 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2357
2460
  quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
2358
2461
  },
2359
2462
  settings: {
2360
- maxTVL: Web3Number.fromWei("0", 18),
2361
2463
  isAudited: true,
2362
2464
  isPaused: false,
2363
2465
  liveStatus: StrategyLiveStatus.ACTIVE,
@@ -2397,18 +2499,17 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2397
2499
  tab: "withdraw"
2398
2500
  }
2399
2501
  ],
2400
- tags: [StrategyTag.EKUBO]
2502
+ tags: [StrategyTag.AUTOMATED_LP]
2401
2503
  },
2402
2504
  faqs: getLSTFAQs("xSTRK"),
2403
2505
  points: [{
2404
- multiplier: 1,
2506
+ multiplier: 15,
2405
2507
  logo: 'https://endur.fi/favicon.ico',
2406
2508
  toolTip: "This strategy holds xSTRK and STRK tokens. Earn 1x Endur points on your xSTRK portion of Liquidity. STRK portion will earn Endur's DEX Bonus points. Points can be found on endur.fi.",
2407
2509
  }],
2408
2510
  contractDetails: [],
2409
2511
  investmentSteps: [],
2410
- category: StrategyCategory.ALL,
2411
- tags: [StrategyTag.EKUBO],
2512
+ tags: [StrategyTag.AUTOMATED_LP],
2412
2513
  security: {
2413
2514
  auditStatus: AuditStatus.AUDITED,
2414
2515
  sourceCode: {
@@ -2416,14 +2517,17 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2416
2517
  contractLink: "https://github.com/trovesfi/troves-contracts",
2417
2518
  },
2418
2519
  accessControl: {
2419
- type: AccessControlType.STANDARD_ACCOUNT,
2420
- addresses: [ContractAddr.from("0x0")],
2421
- timeLock: "2 Days",
2520
+ type: AccessControlType.ROLE_BASED_ACCESS,
2521
+ addresses: [MY_ACCESS_CONTROL.address],
2422
2522
  },
2423
2523
  },
2424
2524
  redemptionInfo: {
2425
2525
  instantWithdrawalVault: InstantWithdrawalVault.YES,
2526
+ redemptionsInfo: [],
2527
+ alerts: [],
2426
2528
  },
2529
+ usualTimeToEarnings: null,
2530
+ usualTimeToEarningsDescription: null,
2427
2531
  };
2428
2532
 
2429
2533
  // Helper to create common LST alerts
@@ -2477,7 +2581,7 @@ const getLSTAlerts = () => [
2477
2581
  ];
2478
2582
 
2479
2583
  // Helper to create LST strategy settings
2480
- const createLSTSettings = (quoteTokenSymbol: string, category: StrategyCategory) => ({
2584
+ const createLSTSettings = (quoteTokenSymbol: string) => ({
2481
2585
  ...xSTRKSTRK.settings,
2482
2586
  isAudited: true,
2483
2587
  liveStatus: StrategyLiveStatus.ACTIVE,
@@ -2488,8 +2592,7 @@ const createLSTSettings = (quoteTokenSymbol: string, category: StrategyCategory)
2488
2592
  (t) => t.symbol === quoteTokenSymbol
2489
2593
  )!,
2490
2594
  alerts: getLSTAlerts(),
2491
- tags: [StrategyTag.EKUBO, StrategyTag.ENDUR] as StrategyTag[],
2492
- category: category
2595
+ tags: [StrategyTag.AUTOMATED_LP] as StrategyTag[],
2493
2596
  });
2494
2597
 
2495
2598
  // Helper to create an LST strategy
@@ -2502,7 +2605,6 @@ const createLSTStrategy = (params: {
2502
2605
  depositToken1Symbol: string;
2503
2606
  quoteTokenSymbol: string;
2504
2607
  lstSymbol: string;
2505
- category: StrategyCategory;
2506
2608
  lstContractAddress?: string;
2507
2609
  }): IStrategyMetadata<CLVaultStrategySettings> => ({
2508
2610
  ...xSTRKSTRK,
@@ -2513,8 +2615,8 @@ const createLSTStrategy = (params: {
2513
2615
  address: ContractAddr.from(params.address),
2514
2616
  launchBlock: params.launchBlock,
2515
2617
  vaultType: {
2516
- type: VaultType.FARMING,
2517
- description: "this is a yield farming vault"
2618
+ type: vaultType,
2619
+ description: vaultTypeDescription
2518
2620
  },
2519
2621
  depositTokens: [
2520
2622
  Global.getDefaultTokens().find(
@@ -2522,6 +2624,7 @@ const createLSTStrategy = (params: {
2522
2624
  )!,
2523
2625
  Global.getDefaultTokens().find((t) => t.symbol === params.depositToken1Symbol)!
2524
2626
  ],
2627
+ realizedApyMethodology: "The realizedAPY is based on past 14 days performance by the vault",
2525
2628
  additionalInfo: {
2526
2629
  ...xSTRKSTRK.additionalInfo,
2527
2630
  quoteAsset: Global.getDefaultTokens().find(
@@ -2532,17 +2635,26 @@ const createLSTStrategy = (params: {
2532
2635
  : Global.getDefaultTokens().find((t) => t.symbol === params.lstSymbol)!
2533
2636
  .address
2534
2637
  },
2535
- settings: createLSTSettings(params.quoteTokenSymbol, params.category),
2638
+ settings: createLSTSettings(params.quoteTokenSymbol),
2536
2639
  faqs: getLSTFAQs(params.lstSymbol),
2537
2640
  points: [],
2538
2641
  contractDetails: [],
2539
2642
  investmentSteps: [],
2540
- category: params.category,
2541
- tags: [StrategyTag.EKUBO]
2643
+ tags: params.id.toLowerCase().includes('btc') ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP]
2542
2644
  });
2543
2645
 
2544
2646
  const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2545
2647
  xSTRKSTRK,
2648
+ createLSTStrategy({
2649
+ id: "ekubo_cl_xstrkbtcstrkbtc",
2650
+ name: "Ekubo xstrkBTC/strkBTC",
2651
+ address: "0x03d1d1932ef6882d4acf763dd0430f4abed3e2a9da28e028f1e2e8dd934b8bf7",
2652
+ launchBlock: 9651140,
2653
+ depositToken0Symbol: "xstrkBTC",
2654
+ depositToken1Symbol: "strkBTC",
2655
+ quoteTokenSymbol: "strkBTC",
2656
+ lstSymbol: "xstrkBTC",
2657
+ }),
2546
2658
  createLSTStrategy({
2547
2659
  id: "ekubo_cl_xwbtcwbtc",
2548
2660
  name: "Ekubo xWBTC/WBTC",
@@ -2552,10 +2664,9 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2552
2664
  depositToken1Symbol: "xWBTC",
2553
2665
  quoteTokenSymbol: "WBTC",
2554
2666
  lstSymbol: "xWBTC",
2555
- category: StrategyCategory.BTC
2556
2667
  }),
2557
2668
  createLSTStrategy({
2558
- id: "ekubo_cl_xtbtcbtc",
2669
+ id: "ekubo_cl_xtbtctbtc",
2559
2670
  name: "Ekubo xtBTC/tBTC",
2560
2671
  address: "0x785dc3dfc4e80ef2690a99512481e3ed3a5266180adda5a47e856245d68a4af",
2561
2672
  launchBlock: 2415667,
@@ -2563,7 +2674,6 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2563
2674
  depositToken1Symbol: "tBTC",
2564
2675
  quoteTokenSymbol: "tBTC",
2565
2676
  lstSymbol: "xtBTC",
2566
- category: StrategyCategory.BTC
2567
2677
  }),
2568
2678
  createLSTStrategy({
2569
2679
  id: "ekubo_cl_xsbtcsolvbtc",
@@ -2574,10 +2684,9 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2574
2684
  depositToken1Symbol: "solvBTC",
2575
2685
  quoteTokenSymbol: "solvBTC",
2576
2686
  lstSymbol: "xsBTC",
2577
- category: StrategyCategory.BTC
2578
2687
  }),
2579
2688
  createLSTStrategy({
2580
- id: "ekubo_cl_xlbtcbtc",
2689
+ id: "ekubo_cl_xlbtclbtc",
2581
2690
  name: "Ekubo xLBTC/LBTC",
2582
2691
  address: "0x314c4653ab1aa01f5465773cb879f525d7e369a137bc3ae084761aee99a1712",
2583
2692
  launchBlock: 2412442,
@@ -2585,7 +2694,6 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2585
2694
  depositToken1Symbol: "xLBTC",
2586
2695
  quoteTokenSymbol: "LBTC",
2587
2696
  lstSymbol: "xLBTC",
2588
- category: StrategyCategory.BTC
2589
2697
  })
2590
2698
  ];
2591
2699
 
@@ -2623,10 +2731,10 @@ const getRe7Alerts = () => [
2623
2731
  ];
2624
2732
 
2625
2733
  // Helper to create Re7 strategy settings
2626
- const createRe7Settings = (quoteTokenSymbol: string, category: StrategyCategory) => ({
2734
+ const createRe7Settings = (quoteTokenSymbol: string, isBTC: boolean, isDeprecated: boolean) => ({
2627
2735
  ...xSTRKSTRK.settings,
2628
2736
  isAudited: true,
2629
- liveStatus: StrategyLiveStatus.NEW,
2737
+ liveStatus: isDeprecated ? StrategyLiveStatus.DEPRECATED : StrategyLiveStatus.ACTIVE,
2630
2738
  isInstantWithdrawal: true,
2631
2739
  hideNetEarnings: true,
2632
2740
  isTransactionHistDisabled: false,
@@ -2634,8 +2742,7 @@ const createRe7Settings = (quoteTokenSymbol: string, category: StrategyCategory)
2634
2742
  (t) => t.symbol === quoteTokenSymbol
2635
2743
  )!,
2636
2744
  alerts: getRe7Alerts(),
2637
- tags: [StrategyTag.EKUBO] as StrategyTag[],
2638
- category: category
2745
+ tags: isBTC ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP] as StrategyTag[]
2639
2746
  });
2640
2747
 
2641
2748
  // Helper to create Re7 FAQs
@@ -2690,48 +2797,60 @@ const createRe7Strategy = (
2690
2797
  | typeof highRisk
2691
2798
  | typeof mediumRisk
2692
2799
  | { riskFactor: RiskFactor[]; netRisk: number; notARisks: RiskType[] },
2693
- category: StrategyCategory
2694
- ): IStrategyMetadata<CLVaultStrategySettings> => ({
2695
- ...xSTRKSTRK,
2696
- id,
2697
- name,
2698
- description: <></>,
2699
- address: ContractAddr.from(address),
2700
- launchBlock,
2701
- vaultType: {
2702
- type: VaultType.FARMING,
2703
- description: "this is a yield farming vault"
2704
- },
2705
- depositTokens: [
2706
- Global.getDefaultTokens().find(
2707
- (t) => t.symbol === depositToken0Symbol
2708
- )!,
2709
- Global.getDefaultTokens().find((t) => t.symbol === depositToken1Symbol)!
2710
- ],
2711
- apyMethodology:
2712
- "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
2713
- additionalInfo: {
2714
- newBounds: "Managed by Re7",
2715
- truePrice: 1,
2716
- feeBps: 1000,
2717
- rebalanceConditions: {
2718
- customShouldRebalance: async (currentPrice: number) =>
2719
- currentPrice > 0.99 && currentPrice < 1.01,
2720
- minWaitHours: 6,
2721
- direction: "any" as const
2800
+ isBTC: boolean
2801
+ ): IStrategyMetadata<CLVaultStrategySettings> => {
2802
+ const isDeprecated = name.toLowerCase().includes('usdc.e');
2803
+ return {
2804
+ ...xSTRKSTRK,
2805
+ id,
2806
+ name,
2807
+ description: <></>,
2808
+ address: ContractAddr.from(address),
2809
+ launchBlock,
2810
+ vaultType: {
2811
+ type: vaultType,
2812
+ description: vaultTypeDescription
2722
2813
  },
2723
- quoteAsset: Global.getDefaultTokens().find(
2724
- (t) => t.symbol === quoteTokenSymbol
2725
- )!
2726
- },
2727
- settings: createRe7Settings(quoteTokenSymbol, category),
2728
- faqs: getRe7FAQs(),
2729
- risk,
2730
- points: [],
2731
- curator: { name: "Re7 Labs", logo: "https://www.re7labs.xyz/favicon.ico" },
2732
- tags: [StrategyTag.EKUBO],
2733
- category: category
2734
- });
2814
+ depositTokens: [
2815
+ Global.getDefaultTokens().find(
2816
+ (t) => t.symbol === depositToken0Symbol
2817
+ )!,
2818
+ Global.getDefaultTokens().find((t) => t.symbol === depositToken1Symbol)!
2819
+ ],
2820
+ apyMethodology:
2821
+ "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
2822
+ additionalInfo: {
2823
+ newBounds: "Managed by Re7",
2824
+ truePrice: 1,
2825
+ feeBps: 1000,
2826
+ rebalanceConditions: {
2827
+ customShouldRebalance: async (currentPrice: number) =>
2828
+ currentPrice > 0.99 && currentPrice < 1.01,
2829
+ minWaitHours: 6,
2830
+ direction: "any" as const
2831
+ },
2832
+ quoteAsset: Global.getDefaultTokens().find(
2833
+ (t) => t.symbol === quoteTokenSymbol
2834
+ )!
2835
+ },
2836
+ settings: createRe7Settings(quoteTokenSymbol, isBTC, isDeprecated),
2837
+ faqs: getRe7FAQs(),
2838
+ risk,
2839
+ points: [],
2840
+ curator: { name: "Re7 Labs", logo: "https://www.re7labs.xyz/favicon.ico" },
2841
+ tags: isBTC ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP] as StrategyTag[],
2842
+ discontinuationInfo: isDeprecated ? {
2843
+ info: "This strategy has been deprecated and is no longer accepting new deposits."
2844
+ } : undefined,
2845
+ security: {
2846
+ ...xSTRKSTRK.security,
2847
+ accessControl: {
2848
+ ...xSTRKSTRK.security.accessControl,
2849
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")],
2850
+ },
2851
+ },
2852
+ };
2853
+ };
2735
2854
 
2736
2855
  const ETHUSDCRe7Strategy = createRe7Strategy(
2737
2856
  "ekubo_cl_ethusdc",
@@ -2742,7 +2861,7 @@ const ETHUSDCRe7Strategy = createRe7Strategy(
2742
2861
  "USDC.e",
2743
2862
  "USDC.e",
2744
2863
  highRisk,
2745
- StrategyCategory.ALL
2864
+ false // isBTC
2746
2865
  );
2747
2866
 
2748
2867
  const stableCoinRisk = {
@@ -2767,7 +2886,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2767
2886
  "USDT",
2768
2887
  "USDC.e",
2769
2888
  stableCoinRisk,
2770
- StrategyCategory.ALL
2889
+ false // isBTC
2771
2890
  ),
2772
2891
  createRe7Strategy(
2773
2892
  "ekubo_cl_strkusdc",
@@ -2778,7 +2897,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2778
2897
  "USDC.e",
2779
2898
  "USDC.e",
2780
2899
  highRisk,
2781
- StrategyCategory.ALL
2900
+ false // isBTC
2782
2901
  ),
2783
2902
  createRe7Strategy(
2784
2903
  "ekubo_cl_strketh",
@@ -2789,7 +2908,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2789
2908
  "ETH",
2790
2909
  "USDC",
2791
2910
  highRisk,
2792
- StrategyCategory.ALL
2911
+ false // isBTC
2793
2912
  ),
2794
2913
  createRe7Strategy(
2795
2914
  "ekubo_cl_wbtcusdc",
@@ -2800,7 +2919,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2800
2919
  "USDC.e",
2801
2920
  "USDC.e",
2802
2921
  mediumRisk,
2803
- StrategyCategory.BTC
2922
+ true // isBTC
2804
2923
  ),
2805
2924
  // createRe7Strategy(
2806
2925
  // "ekubo_cl_tbtcusdce",
@@ -2811,7 +2930,6 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2811
2930
  // "USDC.e",
2812
2931
  // "USDC.e",
2813
2932
  // mediumRisk,
2814
- // StrategyCategory.BTC
2815
2933
  // ),
2816
2934
  createRe7Strategy(
2817
2935
  "ekubo_cl_wbtceth",
@@ -2822,7 +2940,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2822
2940
  "ETH",
2823
2941
  "USDC",
2824
2942
  mediumRisk,
2825
- StrategyCategory.ALL
2943
+ true // isBTC
2826
2944
  ),
2827
2945
  createRe7Strategy(
2828
2946
  "ekubo_cl_wbtcstrk",
@@ -2833,7 +2951,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2833
2951
  "STRK",
2834
2952
  "USDC",
2835
2953
  highRisk,
2836
- StrategyCategory.ALL
2954
+ true // isBTC
2837
2955
  ),
2838
2956
  createRe7Strategy(
2839
2957
  "ekubo_cl_usdc_v2usdt",
@@ -2844,7 +2962,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2844
2962
  "USDT",
2845
2963
  "USDC",
2846
2964
  stableCoinRisk,
2847
- StrategyCategory.ALL
2965
+ false // isBTC
2848
2966
  ),
2849
2967
  createRe7Strategy(
2850
2968
  "ekubo_cl_ethusdc_v2",
@@ -2855,7 +2973,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2855
2973
  "ETH",
2856
2974
  "USDC",
2857
2975
  highRisk,
2858
- StrategyCategory.ALL
2976
+ false // isBTC
2859
2977
  ),
2860
2978
  createRe7Strategy(
2861
2979
  "ekubo_cl_strkusdc_v2",
@@ -2866,7 +2984,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2866
2984
  "STRK",
2867
2985
  "USDC",
2868
2986
  highRisk,
2869
- StrategyCategory.ALL
2987
+ false // isBTC
2870
2988
  ),
2871
2989
  createRe7Strategy(
2872
2990
  "ekubo_cl_wbtcusdc_v2",
@@ -2877,8 +2995,53 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2877
2995
  "WBTC",
2878
2996
  "USDC",
2879
2997
  mediumRisk,
2880
- StrategyCategory.BTC
2881
- )
2998
+ true // isBTC
2999
+ ),
3000
+ createRe7Strategy(
3001
+ "ekubo_cl_strkbtcusdc",
3002
+ "Ekubo strkBTC/USDC",
3003
+ "0x02dfe5af1665a7adf549008161c818eb18dcf89fc9518ab812294f2b691b2845",
3004
+ 9650986,
3005
+ "USDC",
3006
+ "strkBTC",
3007
+ "USDC",
3008
+ mediumRisk,
3009
+ true // isBTC
3010
+ ),
3011
+ createRe7Strategy(
3012
+ "ekubo_cl_strkbtcstrk",
3013
+ "Ekubo strkBTC/STRK",
3014
+ "0x04784e62a4847484528ba65f500b37a9347e88632e90d866e213f2c2651be828",
3015
+ 9650592,
3016
+ "STRK",
3017
+ "strkBTC",
3018
+ "USDC",
3019
+ mediumRisk,
3020
+ true // isBTC
3021
+ ),
3022
+ createRe7Strategy(
3023
+ "ekubo_cl_strkbtceth",
3024
+ "Ekubo strkBTC/ETH",
3025
+ "0x07118ecd7dece83462b0ac8302c682fb17c7e18b0be13d81867c5bf3f80933ef",
3026
+ 9650986,
3027
+ "ETH",
3028
+ "strkBTC",
3029
+ "USDC",
3030
+ mediumRisk,
3031
+ true // isBTC
3032
+ ),
3033
+ // wbtc/strkBTC
3034
+ createRe7Strategy(
3035
+ "ekubo_cl_wbtcstrkbtc",
3036
+ "Ekubo WBTC/strkBTC",
3037
+ "0x07e927222730899442b2438bfd6218ff8ac44bd7a3420646fca359b8392e42c1",
3038
+ 9650986,
3039
+ "WBTC",
3040
+ "strkBTC",
3041
+ "strkBTC",
3042
+ stableCoinRisk,
3043
+ true // isBTC
3044
+ ),
2882
3045
  ];
2883
3046
 
2884
3047
  /**