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

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,10 @@ 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",
2446
+ feeBps: {
2447
+ performanceFeeBps: 1000,
2448
+ },
2343
2449
  additionalInfo: {
2344
2450
  newBounds: {
2345
2451
  lower: -1,
@@ -2357,7 +2463,6 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2357
2463
  quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
2358
2464
  },
2359
2465
  settings: {
2360
- maxTVL: Web3Number.fromWei("0", 18),
2361
2466
  isAudited: true,
2362
2467
  isPaused: false,
2363
2468
  liveStatus: StrategyLiveStatus.ACTIVE,
@@ -2397,18 +2502,17 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2397
2502
  tab: "withdraw"
2398
2503
  }
2399
2504
  ],
2400
- tags: [StrategyTag.EKUBO]
2505
+ tags: [StrategyTag.AUTOMATED_LP]
2401
2506
  },
2402
2507
  faqs: getLSTFAQs("xSTRK"),
2403
2508
  points: [{
2404
- multiplier: 1,
2509
+ multiplier: 15,
2405
2510
  logo: 'https://endur.fi/favicon.ico',
2406
2511
  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
2512
  }],
2408
2513
  contractDetails: [],
2409
2514
  investmentSteps: [],
2410
- category: StrategyCategory.ALL,
2411
- tags: [StrategyTag.EKUBO],
2515
+ tags: [StrategyTag.AUTOMATED_LP],
2412
2516
  security: {
2413
2517
  auditStatus: AuditStatus.AUDITED,
2414
2518
  sourceCode: {
@@ -2416,14 +2520,17 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2416
2520
  contractLink: "https://github.com/trovesfi/troves-contracts",
2417
2521
  },
2418
2522
  accessControl: {
2419
- type: AccessControlType.STANDARD_ACCOUNT,
2420
- addresses: [ContractAddr.from("0x0")],
2421
- timeLock: "2 Days",
2523
+ type: AccessControlType.ROLE_BASED_ACCESS,
2524
+ addresses: [MY_ACCESS_CONTROL.address],
2422
2525
  },
2423
2526
  },
2424
2527
  redemptionInfo: {
2425
2528
  instantWithdrawalVault: InstantWithdrawalVault.YES,
2529
+ redemptionsInfo: [],
2530
+ alerts: [],
2426
2531
  },
2532
+ usualTimeToEarnings: null,
2533
+ usualTimeToEarningsDescription: null,
2427
2534
  };
2428
2535
 
2429
2536
  // Helper to create common LST alerts
@@ -2477,7 +2584,7 @@ const getLSTAlerts = () => [
2477
2584
  ];
2478
2585
 
2479
2586
  // Helper to create LST strategy settings
2480
- const createLSTSettings = (quoteTokenSymbol: string, category: StrategyCategory) => ({
2587
+ const createLSTSettings = (quoteTokenSymbol: string) => ({
2481
2588
  ...xSTRKSTRK.settings,
2482
2589
  isAudited: true,
2483
2590
  liveStatus: StrategyLiveStatus.ACTIVE,
@@ -2488,8 +2595,7 @@ const createLSTSettings = (quoteTokenSymbol: string, category: StrategyCategory)
2488
2595
  (t) => t.symbol === quoteTokenSymbol
2489
2596
  )!,
2490
2597
  alerts: getLSTAlerts(),
2491
- tags: [StrategyTag.EKUBO, StrategyTag.ENDUR] as StrategyTag[],
2492
- category: category
2598
+ tags: [StrategyTag.AUTOMATED_LP] as StrategyTag[],
2493
2599
  });
2494
2600
 
2495
2601
  // Helper to create an LST strategy
@@ -2502,7 +2608,6 @@ const createLSTStrategy = (params: {
2502
2608
  depositToken1Symbol: string;
2503
2609
  quoteTokenSymbol: string;
2504
2610
  lstSymbol: string;
2505
- category: StrategyCategory;
2506
2611
  lstContractAddress?: string;
2507
2612
  }): IStrategyMetadata<CLVaultStrategySettings> => ({
2508
2613
  ...xSTRKSTRK,
@@ -2513,8 +2618,8 @@ const createLSTStrategy = (params: {
2513
2618
  address: ContractAddr.from(params.address),
2514
2619
  launchBlock: params.launchBlock,
2515
2620
  vaultType: {
2516
- type: VaultType.FARMING,
2517
- description: "this is a yield farming vault"
2621
+ type: vaultType,
2622
+ description: vaultTypeDescription
2518
2623
  },
2519
2624
  depositTokens: [
2520
2625
  Global.getDefaultTokens().find(
@@ -2522,6 +2627,7 @@ const createLSTStrategy = (params: {
2522
2627
  )!,
2523
2628
  Global.getDefaultTokens().find((t) => t.symbol === params.depositToken1Symbol)!
2524
2629
  ],
2630
+ realizedApyMethodology: "The realizedAPY is based on past 14 days performance by the vault",
2525
2631
  additionalInfo: {
2526
2632
  ...xSTRKSTRK.additionalInfo,
2527
2633
  quoteAsset: Global.getDefaultTokens().find(
@@ -2532,17 +2638,26 @@ const createLSTStrategy = (params: {
2532
2638
  : Global.getDefaultTokens().find((t) => t.symbol === params.lstSymbol)!
2533
2639
  .address
2534
2640
  },
2535
- settings: createLSTSettings(params.quoteTokenSymbol, params.category),
2641
+ settings: createLSTSettings(params.quoteTokenSymbol),
2536
2642
  faqs: getLSTFAQs(params.lstSymbol),
2537
2643
  points: [],
2538
2644
  contractDetails: [],
2539
2645
  investmentSteps: [],
2540
- category: params.category,
2541
- tags: [StrategyTag.EKUBO]
2646
+ tags: params.id.toLowerCase().includes('btc') ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP]
2542
2647
  });
2543
2648
 
2544
2649
  const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2545
2650
  xSTRKSTRK,
2651
+ createLSTStrategy({
2652
+ id: "ekubo_cl_xstrkbtcstrkbtc",
2653
+ name: "Ekubo xstrkBTC/strkBTC",
2654
+ address: "0x03d1d1932ef6882d4acf763dd0430f4abed3e2a9da28e028f1e2e8dd934b8bf7",
2655
+ launchBlock: 9651140,
2656
+ depositToken0Symbol: "xstrkBTC",
2657
+ depositToken1Symbol: "strkBTC",
2658
+ quoteTokenSymbol: "strkBTC",
2659
+ lstSymbol: "xstrkBTC",
2660
+ }),
2546
2661
  createLSTStrategy({
2547
2662
  id: "ekubo_cl_xwbtcwbtc",
2548
2663
  name: "Ekubo xWBTC/WBTC",
@@ -2552,10 +2667,9 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2552
2667
  depositToken1Symbol: "xWBTC",
2553
2668
  quoteTokenSymbol: "WBTC",
2554
2669
  lstSymbol: "xWBTC",
2555
- category: StrategyCategory.BTC
2556
2670
  }),
2557
2671
  createLSTStrategy({
2558
- id: "ekubo_cl_xtbtcbtc",
2672
+ id: "ekubo_cl_xtbtctbtc",
2559
2673
  name: "Ekubo xtBTC/tBTC",
2560
2674
  address: "0x785dc3dfc4e80ef2690a99512481e3ed3a5266180adda5a47e856245d68a4af",
2561
2675
  launchBlock: 2415667,
@@ -2563,7 +2677,6 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2563
2677
  depositToken1Symbol: "tBTC",
2564
2678
  quoteTokenSymbol: "tBTC",
2565
2679
  lstSymbol: "xtBTC",
2566
- category: StrategyCategory.BTC
2567
2680
  }),
2568
2681
  createLSTStrategy({
2569
2682
  id: "ekubo_cl_xsbtcsolvbtc",
@@ -2574,10 +2687,9 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2574
2687
  depositToken1Symbol: "solvBTC",
2575
2688
  quoteTokenSymbol: "solvBTC",
2576
2689
  lstSymbol: "xsBTC",
2577
- category: StrategyCategory.BTC
2578
2690
  }),
2579
2691
  createLSTStrategy({
2580
- id: "ekubo_cl_xlbtcbtc",
2692
+ id: "ekubo_cl_xlbtclbtc",
2581
2693
  name: "Ekubo xLBTC/LBTC",
2582
2694
  address: "0x314c4653ab1aa01f5465773cb879f525d7e369a137bc3ae084761aee99a1712",
2583
2695
  launchBlock: 2412442,
@@ -2585,7 +2697,6 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2585
2697
  depositToken1Symbol: "xLBTC",
2586
2698
  quoteTokenSymbol: "LBTC",
2587
2699
  lstSymbol: "xLBTC",
2588
- category: StrategyCategory.BTC
2589
2700
  })
2590
2701
  ];
2591
2702
 
@@ -2623,10 +2734,10 @@ const getRe7Alerts = () => [
2623
2734
  ];
2624
2735
 
2625
2736
  // Helper to create Re7 strategy settings
2626
- const createRe7Settings = (quoteTokenSymbol: string, category: StrategyCategory) => ({
2737
+ const createRe7Settings = (quoteTokenSymbol: string, isBTC: boolean, isDeprecated: boolean) => ({
2627
2738
  ...xSTRKSTRK.settings,
2628
2739
  isAudited: true,
2629
- liveStatus: StrategyLiveStatus.NEW,
2740
+ liveStatus: isDeprecated ? StrategyLiveStatus.DEPRECATED : StrategyLiveStatus.ACTIVE,
2630
2741
  isInstantWithdrawal: true,
2631
2742
  hideNetEarnings: true,
2632
2743
  isTransactionHistDisabled: false,
@@ -2634,8 +2745,7 @@ const createRe7Settings = (quoteTokenSymbol: string, category: StrategyCategory)
2634
2745
  (t) => t.symbol === quoteTokenSymbol
2635
2746
  )!,
2636
2747
  alerts: getRe7Alerts(),
2637
- tags: [StrategyTag.EKUBO] as StrategyTag[],
2638
- category: category
2748
+ tags: isBTC ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP] as StrategyTag[]
2639
2749
  });
2640
2750
 
2641
2751
  // Helper to create Re7 FAQs
@@ -2690,48 +2800,60 @@ const createRe7Strategy = (
2690
2800
  | typeof highRisk
2691
2801
  | typeof mediumRisk
2692
2802
  | { 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
2803
+ isBTC: boolean
2804
+ ): IStrategyMetadata<CLVaultStrategySettings> => {
2805
+ const isDeprecated = name.toLowerCase().includes('usdc.e');
2806
+ return {
2807
+ ...xSTRKSTRK,
2808
+ id,
2809
+ name,
2810
+ description: <></>,
2811
+ address: ContractAddr.from(address),
2812
+ launchBlock,
2813
+ vaultType: {
2814
+ type: vaultType,
2815
+ description: vaultTypeDescription
2722
2816
  },
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
- });
2817
+ depositTokens: [
2818
+ Global.getDefaultTokens().find(
2819
+ (t) => t.symbol === depositToken0Symbol
2820
+ )!,
2821
+ Global.getDefaultTokens().find((t) => t.symbol === depositToken1Symbol)!
2822
+ ],
2823
+ apyMethodology:
2824
+ "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
2825
+ additionalInfo: {
2826
+ newBounds: "Managed by Re7",
2827
+ truePrice: 1,
2828
+ feeBps: 1000,
2829
+ rebalanceConditions: {
2830
+ customShouldRebalance: async (currentPrice: number) =>
2831
+ currentPrice > 0.99 && currentPrice < 1.01,
2832
+ minWaitHours: 6,
2833
+ direction: "any" as const
2834
+ },
2835
+ quoteAsset: Global.getDefaultTokens().find(
2836
+ (t) => t.symbol === quoteTokenSymbol
2837
+ )!
2838
+ },
2839
+ settings: createRe7Settings(quoteTokenSymbol, isBTC, isDeprecated),
2840
+ faqs: getRe7FAQs(),
2841
+ risk,
2842
+ points: [],
2843
+ curator: { name: "Re7 Labs", logo: "https://www.re7labs.xyz/favicon.ico" },
2844
+ tags: isBTC ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP] as StrategyTag[],
2845
+ discontinuationInfo: isDeprecated ? {
2846
+ info: "This strategy has been deprecated and is no longer accepting new deposits."
2847
+ } : undefined,
2848
+ security: {
2849
+ ...xSTRKSTRK.security,
2850
+ accessControl: {
2851
+ ...xSTRKSTRK.security.accessControl,
2852
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")],
2853
+ },
2854
+ },
2855
+ };
2856
+ };
2735
2857
 
2736
2858
  const ETHUSDCRe7Strategy = createRe7Strategy(
2737
2859
  "ekubo_cl_ethusdc",
@@ -2742,7 +2864,7 @@ const ETHUSDCRe7Strategy = createRe7Strategy(
2742
2864
  "USDC.e",
2743
2865
  "USDC.e",
2744
2866
  highRisk,
2745
- StrategyCategory.ALL
2867
+ false // isBTC
2746
2868
  );
2747
2869
 
2748
2870
  const stableCoinRisk = {
@@ -2767,7 +2889,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2767
2889
  "USDT",
2768
2890
  "USDC.e",
2769
2891
  stableCoinRisk,
2770
- StrategyCategory.ALL
2892
+ false // isBTC
2771
2893
  ),
2772
2894
  createRe7Strategy(
2773
2895
  "ekubo_cl_strkusdc",
@@ -2778,7 +2900,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2778
2900
  "USDC.e",
2779
2901
  "USDC.e",
2780
2902
  highRisk,
2781
- StrategyCategory.ALL
2903
+ false // isBTC
2782
2904
  ),
2783
2905
  createRe7Strategy(
2784
2906
  "ekubo_cl_strketh",
@@ -2789,7 +2911,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2789
2911
  "ETH",
2790
2912
  "USDC",
2791
2913
  highRisk,
2792
- StrategyCategory.ALL
2914
+ false // isBTC
2793
2915
  ),
2794
2916
  createRe7Strategy(
2795
2917
  "ekubo_cl_wbtcusdc",
@@ -2800,7 +2922,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2800
2922
  "USDC.e",
2801
2923
  "USDC.e",
2802
2924
  mediumRisk,
2803
- StrategyCategory.BTC
2925
+ true // isBTC
2804
2926
  ),
2805
2927
  // createRe7Strategy(
2806
2928
  // "ekubo_cl_tbtcusdce",
@@ -2811,7 +2933,6 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2811
2933
  // "USDC.e",
2812
2934
  // "USDC.e",
2813
2935
  // mediumRisk,
2814
- // StrategyCategory.BTC
2815
2936
  // ),
2816
2937
  createRe7Strategy(
2817
2938
  "ekubo_cl_wbtceth",
@@ -2822,7 +2943,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2822
2943
  "ETH",
2823
2944
  "USDC",
2824
2945
  mediumRisk,
2825
- StrategyCategory.ALL
2946
+ true // isBTC
2826
2947
  ),
2827
2948
  createRe7Strategy(
2828
2949
  "ekubo_cl_wbtcstrk",
@@ -2833,7 +2954,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2833
2954
  "STRK",
2834
2955
  "USDC",
2835
2956
  highRisk,
2836
- StrategyCategory.ALL
2957
+ true // isBTC
2837
2958
  ),
2838
2959
  createRe7Strategy(
2839
2960
  "ekubo_cl_usdc_v2usdt",
@@ -2844,7 +2965,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2844
2965
  "USDT",
2845
2966
  "USDC",
2846
2967
  stableCoinRisk,
2847
- StrategyCategory.ALL
2968
+ false // isBTC
2848
2969
  ),
2849
2970
  createRe7Strategy(
2850
2971
  "ekubo_cl_ethusdc_v2",
@@ -2855,7 +2976,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2855
2976
  "ETH",
2856
2977
  "USDC",
2857
2978
  highRisk,
2858
- StrategyCategory.ALL
2979
+ false // isBTC
2859
2980
  ),
2860
2981
  createRe7Strategy(
2861
2982
  "ekubo_cl_strkusdc_v2",
@@ -2866,7 +2987,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2866
2987
  "STRK",
2867
2988
  "USDC",
2868
2989
  highRisk,
2869
- StrategyCategory.ALL
2990
+ false // isBTC
2870
2991
  ),
2871
2992
  createRe7Strategy(
2872
2993
  "ekubo_cl_wbtcusdc_v2",
@@ -2877,8 +2998,53 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2877
2998
  "WBTC",
2878
2999
  "USDC",
2879
3000
  mediumRisk,
2880
- StrategyCategory.BTC
2881
- )
3001
+ true // isBTC
3002
+ ),
3003
+ createRe7Strategy(
3004
+ "ekubo_cl_strkbtcusdc",
3005
+ "Ekubo strkBTC/USDC",
3006
+ "0x02dfe5af1665a7adf549008161c818eb18dcf89fc9518ab812294f2b691b2845",
3007
+ 9650986,
3008
+ "USDC",
3009
+ "strkBTC",
3010
+ "USDC",
3011
+ mediumRisk,
3012
+ true // isBTC
3013
+ ),
3014
+ createRe7Strategy(
3015
+ "ekubo_cl_strkbtcstrk",
3016
+ "Ekubo strkBTC/STRK",
3017
+ "0x04784e62a4847484528ba65f500b37a9347e88632e90d866e213f2c2651be828",
3018
+ 9650592,
3019
+ "STRK",
3020
+ "strkBTC",
3021
+ "USDC",
3022
+ mediumRisk,
3023
+ true // isBTC
3024
+ ),
3025
+ createRe7Strategy(
3026
+ "ekubo_cl_strkbtceth",
3027
+ "Ekubo strkBTC/ETH",
3028
+ "0x07118ecd7dece83462b0ac8302c682fb17c7e18b0be13d81867c5bf3f80933ef",
3029
+ 9650986,
3030
+ "ETH",
3031
+ "strkBTC",
3032
+ "USDC",
3033
+ mediumRisk,
3034
+ true // isBTC
3035
+ ),
3036
+ // wbtc/strkBTC
3037
+ createRe7Strategy(
3038
+ "ekubo_cl_wbtcstrkbtc",
3039
+ "Ekubo WBTC/strkBTC",
3040
+ "0x07e927222730899442b2438bfd6218ff8ac44bd7a3420646fca359b8392e42c1",
3041
+ 9650986,
3042
+ "WBTC",
3043
+ "strkBTC",
3044
+ "strkBTC",
3045
+ stableCoinRisk,
3046
+ true // isBTC
3047
+ ),
2882
3048
  ];
2883
3049
 
2884
3050
  /**