@strkfarm/sdk 2.0.0-staging.6 → 2.0.0-staging.61

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,
@@ -18,7 +17,9 @@ import {
18
17
  SourceCodeType,
19
18
  AccessControlType,
20
19
  InstantWithdrawalVault,
20
+ VaultType,
21
21
  StrategyLiveStatus,
22
+ UnwrapLabsCurator,
22
23
  } from "@/interfaces";
23
24
  import { PricerBase } from "@/modules/pricerBase";
24
25
  import { assert } from "@/utils";
@@ -36,18 +37,23 @@ import EkuboMathAbi from "@/data/ekubo-math.abi.json";
36
37
  import ERC4626Abi from "@/data/erc4626.abi.json";
37
38
  import { Global } from "@/global";
38
39
  import { AvnuWrapper, ERC20, SwapInfo } from "@/modules";
39
- import { BaseStrategy } from "./base-strategy";
40
+ import {
41
+ BaseStrategy,
42
+ SingleTokenInfo,
43
+ UserPositionCard,
44
+ UserPositionCardsInput,
45
+ } from "./base-strategy";
40
46
  import { DualActionAmount } from "./base-strategy";
41
47
  import { DualTokenInfo } from "./base-strategy";
42
48
  import { log } from "winston";
43
49
  import { EkuboHarvests, HarvestInfo } from "@/modules/harvests";
44
50
  import { logger } from "@/utils/logger";
45
- import { COMMON_CONTRACTS } from "./constants";
46
51
  import { DepegRiskLevel, ImpermanentLossLevel, MarketRiskLevel, SmartContractRiskLevel } from "@/interfaces/risks";
47
52
  import { from, gql } from "@apollo/client";
48
53
  import apolloClient from "@/modules/apollo-client";
49
54
  import { binarySearch } from "@/utils/math-utils";
50
55
  import { Quote } from "@avnu/avnu-sdk";
56
+ import { MY_ACCESS_CONTROL } from "./constants";
51
57
 
52
58
  export interface EkuboPoolKey {
53
59
  token0: ContractAddr;
@@ -124,7 +130,10 @@ export class EkuboCLVault extends BaseStrategy<
124
130
  pricer: PricerBase,
125
131
  metadata: IStrategyMetadata<CLVaultStrategySettings>
126
132
  ) {
127
- super(config);
133
+ super(config, {
134
+ depositInputMode: "dual",
135
+ withdrawInputMode: "dual"
136
+ });
128
137
  this.pricer = pricer;
129
138
 
130
139
  assert(
@@ -302,7 +311,10 @@ export class EkuboCLVault extends BaseStrategy<
302
311
  return [this.contract.populate("handle_fees", [])];
303
312
  }
304
313
 
305
- 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<{
306
318
  summary: DualTokenInfo,
307
319
  history: FeeHistory[]
308
320
  }> {
@@ -311,8 +323,15 @@ export class EkuboCLVault extends BaseStrategy<
311
323
  query ContractFeeEarnings(
312
324
  $timeframe: String!
313
325
  $contract: String!
326
+ $startTimestamp: Float
327
+ $endTimestamp: Float
314
328
  ) {
315
- contractFeeEarnings(timeframe: $timeframe, contract: $contract) {
329
+ contractFeeEarnings(
330
+ timeframe: $timeframe
331
+ contract: $contract
332
+ startTimestamp: $startTimestamp
333
+ endTimestamp: $endTimestamp
334
+ ) {
316
335
  contract
317
336
  dailyEarnings {
318
337
  date
@@ -325,7 +344,9 @@ export class EkuboCLVault extends BaseStrategy<
325
344
  `,
326
345
  variables: {
327
346
  timeframe: timePeriod,
328
- contract: this.address.address
347
+ contract: this.address.address,
348
+ startTimestamp: range?.startTimestamp,
349
+ endTimestamp: range?.endTimestamp
329
350
  },
330
351
  fetchPolicy: 'no-cache',
331
352
  });
@@ -476,6 +497,17 @@ export class EkuboCLVault extends BaseStrategy<
476
497
  return (apyForGivenBlocks * (365 * 24 * 3600)) / timeDiffSeconds;
477
498
  }
478
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
+
479
511
  /**
480
512
  * Calculates realized APY based on TVL per share growth, always valued in USDC.
481
513
  * This is a vault-level metric (same for all users) and works for all strategies,
@@ -614,6 +646,55 @@ export class EkuboCLVault extends BaseStrategy<
614
646
  */
615
647
  }
616
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
+
617
698
  async feeBasedAPY(
618
699
  timeperiod: '24h' | '7d' | '30d' | '3m' = '24h'
619
700
  ): Promise<number> {
@@ -2146,7 +2227,12 @@ export class EkuboCLVault extends BaseStrategy<
2146
2227
  }
2147
2228
 
2148
2229
  async getInvestmentFlows() {
2149
- const netYield = await this.netAPY();
2230
+ // for LSTs, we use 30d, else 7d for the yield calculation
2231
+ // TODO Make the block compute more dynamic
2232
+ const blocksDiff = this.metadata.additionalInfo.lstContract
2233
+ ? 600000
2234
+ : 600000 / 4;
2235
+ const netYield = await this.netAPY("latest", blocksDiff, "7d" as any);
2150
2236
  const poolKey = await this.getPoolKey();
2151
2237
 
2152
2238
  const linkedFlow: IInvestmentFlow = {
@@ -2305,6 +2391,9 @@ function getLSTFAQs(lstSymbol: string): FAQ[] {
2305
2391
  ]
2306
2392
  }
2307
2393
 
2394
+ const vaultTypeDescription = 'Automatically collects fees and rebalances positions on Ekubo to optimize yield';
2395
+ const vaultType = VaultType.AUTOMATED_LP;
2396
+
2308
2397
  const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2309
2398
  id: "ekubo_cl_xstrkstrk",
2310
2399
  name: "Ekubo xSTRK/STRK",
@@ -2314,6 +2403,10 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2314
2403
  ),
2315
2404
  launchBlock: 1209881,
2316
2405
  type: "Other",
2406
+ vaultType: {
2407
+ type: vaultType,
2408
+ description: vaultTypeDescription
2409
+ },
2317
2410
  // must be same order as poolKey token0 and token1
2318
2411
  depositTokens: [
2319
2412
  Global.getDefaultTokens().find((t) => t.symbol === "xSTRK")!,
@@ -2321,6 +2414,7 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2321
2414
  ],
2322
2415
  protocols: [_protocol],
2323
2416
  auditUrl: AUDIT_URL,
2417
+ curator: UnwrapLabsCurator,
2324
2418
  risk: {
2325
2419
  riskFactor: _lstPoolRiskFactors,
2326
2420
  netRisk:
@@ -2330,6 +2424,7 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2330
2424
  },
2331
2425
  apyMethodology:
2332
2426
  "APY based on 30-day historical performance, including fees and rewards.",
2427
+ realizedApyMethodology: "The realizedAPY is based on past 14 days performance by the vault",
2333
2428
  additionalInfo: {
2334
2429
  newBounds: {
2335
2430
  lower: -1,
@@ -2347,7 +2442,6 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2347
2442
  quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
2348
2443
  },
2349
2444
  settings: {
2350
- maxTVL: Web3Number.fromWei("0", 18),
2351
2445
  isAudited: true,
2352
2446
  isPaused: false,
2353
2447
  liveStatus: StrategyLiveStatus.ACTIVE,
@@ -2387,18 +2481,17 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2387
2481
  tab: "withdraw"
2388
2482
  }
2389
2483
  ],
2390
- tags: [StrategyTag.EKUBO]
2484
+ tags: [StrategyTag.AUTOMATED_LP]
2391
2485
  },
2392
2486
  faqs: getLSTFAQs("xSTRK"),
2393
2487
  points: [{
2394
- multiplier: 1,
2488
+ multiplier: 15,
2395
2489
  logo: 'https://endur.fi/favicon.ico',
2396
2490
  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.",
2397
2491
  }],
2398
2492
  contractDetails: [],
2399
2493
  investmentSteps: [],
2400
- category: StrategyCategory.ALL,
2401
- tags: [StrategyTag.EKUBO],
2494
+ tags: [StrategyTag.AUTOMATED_LP],
2402
2495
  security: {
2403
2496
  auditStatus: AuditStatus.AUDITED,
2404
2497
  sourceCode: {
@@ -2406,14 +2499,17 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2406
2499
  contractLink: "https://github.com/trovesfi/troves-contracts",
2407
2500
  },
2408
2501
  accessControl: {
2409
- type: AccessControlType.STANDARD_ACCOUNT,
2410
- addresses: [ContractAddr.from("0x0")],
2411
- timeLock: "2 Days",
2502
+ type: AccessControlType.ROLE_BASED_ACCESS,
2503
+ addresses: [MY_ACCESS_CONTROL.address],
2412
2504
  },
2413
2505
  },
2414
2506
  redemptionInfo: {
2415
2507
  instantWithdrawalVault: InstantWithdrawalVault.YES,
2508
+ redemptionsInfo: [],
2509
+ alerts: [],
2416
2510
  },
2511
+ usualTimeToEarnings: null,
2512
+ usualTimeToEarningsDescription: null,
2417
2513
  };
2418
2514
 
2419
2515
  // Helper to create common LST alerts
@@ -2467,7 +2563,7 @@ const getLSTAlerts = () => [
2467
2563
  ];
2468
2564
 
2469
2565
  // Helper to create LST strategy settings
2470
- const createLSTSettings = (quoteTokenSymbol: string, category: StrategyCategory) => ({
2566
+ const createLSTSettings = (quoteTokenSymbol: string) => ({
2471
2567
  ...xSTRKSTRK.settings,
2472
2568
  isAudited: true,
2473
2569
  liveStatus: StrategyLiveStatus.ACTIVE,
@@ -2478,8 +2574,7 @@ const createLSTSettings = (quoteTokenSymbol: string, category: StrategyCategory)
2478
2574
  (t) => t.symbol === quoteTokenSymbol
2479
2575
  )!,
2480
2576
  alerts: getLSTAlerts(),
2481
- tags: [StrategyTag.EKUBO, StrategyTag.ENDUR] as StrategyTag[],
2482
- category: category
2577
+ tags: [StrategyTag.AUTOMATED_LP] as StrategyTag[],
2483
2578
  });
2484
2579
 
2485
2580
  // Helper to create an LST strategy
@@ -2492,7 +2587,6 @@ const createLSTStrategy = (params: {
2492
2587
  depositToken1Symbol: string;
2493
2588
  quoteTokenSymbol: string;
2494
2589
  lstSymbol: string;
2495
- category: StrategyCategory;
2496
2590
  lstContractAddress?: string;
2497
2591
  }): IStrategyMetadata<CLVaultStrategySettings> => ({
2498
2592
  ...xSTRKSTRK,
@@ -2502,12 +2596,17 @@ const createLSTStrategy = (params: {
2502
2596
  // must be same order as poolKey token0 and token1
2503
2597
  address: ContractAddr.from(params.address),
2504
2598
  launchBlock: params.launchBlock,
2599
+ vaultType: {
2600
+ type: vaultType,
2601
+ description: vaultTypeDescription
2602
+ },
2505
2603
  depositTokens: [
2506
2604
  Global.getDefaultTokens().find(
2507
2605
  (t) => t.symbol === params.depositToken0Symbol
2508
2606
  )!,
2509
2607
  Global.getDefaultTokens().find((t) => t.symbol === params.depositToken1Symbol)!
2510
2608
  ],
2609
+ realizedApyMethodology: "The realizedAPY is based on past 14 days performance by the vault",
2511
2610
  additionalInfo: {
2512
2611
  ...xSTRKSTRK.additionalInfo,
2513
2612
  quoteAsset: Global.getDefaultTokens().find(
@@ -2518,17 +2617,26 @@ const createLSTStrategy = (params: {
2518
2617
  : Global.getDefaultTokens().find((t) => t.symbol === params.lstSymbol)!
2519
2618
  .address
2520
2619
  },
2521
- settings: createLSTSettings(params.quoteTokenSymbol, params.category),
2620
+ settings: createLSTSettings(params.quoteTokenSymbol),
2522
2621
  faqs: getLSTFAQs(params.lstSymbol),
2523
2622
  points: [],
2524
2623
  contractDetails: [],
2525
2624
  investmentSteps: [],
2526
- category: params.category,
2527
- tags: [StrategyTag.EKUBO]
2625
+ tags: params.id.toLowerCase().includes('btc') ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP]
2528
2626
  });
2529
2627
 
2530
2628
  const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2531
2629
  xSTRKSTRK,
2630
+ createLSTStrategy({
2631
+ id: "ekubo_cl_xstrkbtcstrkbtc",
2632
+ name: "Ekubo xstrkBTC/strkBTC",
2633
+ address: "0x0129Cd37Ca0027b44c4e0A3A6E8F0e144977C9b8D83bc5F7ee1Ce8985F5B8CbF",
2634
+ launchBlock: 9578786,
2635
+ depositToken0Symbol: "xstrkBTC",
2636
+ depositToken1Symbol: "strkBTC",
2637
+ quoteTokenSymbol: "strkBTC",
2638
+ lstSymbol: "xstrkBTC",
2639
+ }),
2532
2640
  createLSTStrategy({
2533
2641
  id: "ekubo_cl_xwbtcwbtc",
2534
2642
  name: "Ekubo xWBTC/WBTC",
@@ -2538,10 +2646,9 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2538
2646
  depositToken1Symbol: "xWBTC",
2539
2647
  quoteTokenSymbol: "WBTC",
2540
2648
  lstSymbol: "xWBTC",
2541
- category: StrategyCategory.BTC
2542
2649
  }),
2543
2650
  createLSTStrategy({
2544
- id: "ekubo_cl_xtbtcbtc",
2651
+ id: "ekubo_cl_xtbtctbtc",
2545
2652
  name: "Ekubo xtBTC/tBTC",
2546
2653
  address: "0x785dc3dfc4e80ef2690a99512481e3ed3a5266180adda5a47e856245d68a4af",
2547
2654
  launchBlock: 2415667,
@@ -2549,7 +2656,6 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2549
2656
  depositToken1Symbol: "tBTC",
2550
2657
  quoteTokenSymbol: "tBTC",
2551
2658
  lstSymbol: "xtBTC",
2552
- category: StrategyCategory.BTC
2553
2659
  }),
2554
2660
  createLSTStrategy({
2555
2661
  id: "ekubo_cl_xsbtcsolvbtc",
@@ -2560,10 +2666,9 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2560
2666
  depositToken1Symbol: "solvBTC",
2561
2667
  quoteTokenSymbol: "solvBTC",
2562
2668
  lstSymbol: "xsBTC",
2563
- category: StrategyCategory.BTC
2564
2669
  }),
2565
2670
  createLSTStrategy({
2566
- id: "ekubo_cl_xlbtcbtc",
2671
+ id: "ekubo_cl_xlbtclbtc",
2567
2672
  name: "Ekubo xLBTC/LBTC",
2568
2673
  address: "0x314c4653ab1aa01f5465773cb879f525d7e369a137bc3ae084761aee99a1712",
2569
2674
  launchBlock: 2412442,
@@ -2571,7 +2676,6 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2571
2676
  depositToken1Symbol: "xLBTC",
2572
2677
  quoteTokenSymbol: "LBTC",
2573
2678
  lstSymbol: "xLBTC",
2574
- category: StrategyCategory.BTC
2575
2679
  })
2576
2680
  ];
2577
2681
 
@@ -2609,10 +2713,10 @@ const getRe7Alerts = () => [
2609
2713
  ];
2610
2714
 
2611
2715
  // Helper to create Re7 strategy settings
2612
- const createRe7Settings = (quoteTokenSymbol: string, category: StrategyCategory) => ({
2716
+ const createRe7Settings = (quoteTokenSymbol: string, isBTC: boolean, isDeprecated: boolean) => ({
2613
2717
  ...xSTRKSTRK.settings,
2614
2718
  isAudited: true,
2615
- liveStatus: StrategyLiveStatus.NEW,
2719
+ liveStatus: isDeprecated ? StrategyLiveStatus.DEPRECATED : StrategyLiveStatus.ACTIVE,
2616
2720
  isInstantWithdrawal: true,
2617
2721
  hideNetEarnings: true,
2618
2722
  isTransactionHistDisabled: false,
@@ -2620,8 +2724,7 @@ const createRe7Settings = (quoteTokenSymbol: string, category: StrategyCategory)
2620
2724
  (t) => t.symbol === quoteTokenSymbol
2621
2725
  )!,
2622
2726
  alerts: getRe7Alerts(),
2623
- tags: [StrategyTag.EKUBO] as StrategyTag[],
2624
- category: category
2727
+ tags: isBTC ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP] as StrategyTag[]
2625
2728
  });
2626
2729
 
2627
2730
  // Helper to create Re7 FAQs
@@ -2676,44 +2779,60 @@ const createRe7Strategy = (
2676
2779
  | typeof highRisk
2677
2780
  | typeof mediumRisk
2678
2781
  | { riskFactor: RiskFactor[]; netRisk: number; notARisks: RiskType[] },
2679
- category: StrategyCategory
2680
- ): IStrategyMetadata<CLVaultStrategySettings> => ({
2681
- ...xSTRKSTRK,
2682
- id,
2683
- name,
2684
- description: <></>,
2685
- address: ContractAddr.from(address),
2686
- launchBlock,
2687
- depositTokens: [
2688
- Global.getDefaultTokens().find(
2689
- (t) => t.symbol === depositToken0Symbol
2690
- )!,
2691
- Global.getDefaultTokens().find((t) => t.symbol === depositToken1Symbol)!
2692
- ],
2693
- apyMethodology:
2694
- "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
2695
- additionalInfo: {
2696
- newBounds: "Managed by Re7",
2697
- truePrice: 1,
2698
- feeBps: 1000,
2699
- rebalanceConditions: {
2700
- customShouldRebalance: async (currentPrice: number) =>
2701
- currentPrice > 0.99 && currentPrice < 1.01,
2702
- minWaitHours: 6,
2703
- direction: "any" as const
2782
+ isBTC: boolean
2783
+ ): IStrategyMetadata<CLVaultStrategySettings> => {
2784
+ const isDeprecated = name.toLowerCase().includes('usdc.e');
2785
+ return {
2786
+ ...xSTRKSTRK,
2787
+ id,
2788
+ name,
2789
+ description: <></>,
2790
+ address: ContractAddr.from(address),
2791
+ launchBlock,
2792
+ vaultType: {
2793
+ type: vaultType,
2794
+ description: vaultTypeDescription
2704
2795
  },
2705
- quoteAsset: Global.getDefaultTokens().find(
2706
- (t) => t.symbol === quoteTokenSymbol
2707
- )!
2708
- },
2709
- settings: createRe7Settings(quoteTokenSymbol, category),
2710
- faqs: getRe7FAQs(),
2711
- risk,
2712
- points: [],
2713
- curator: { name: "Re7 Labs", logo: "https://www.re7labs.xyz/favicon.ico" },
2714
- tags: [StrategyTag.EKUBO],
2715
- category: category
2716
- });
2796
+ depositTokens: [
2797
+ Global.getDefaultTokens().find(
2798
+ (t) => t.symbol === depositToken0Symbol
2799
+ )!,
2800
+ Global.getDefaultTokens().find((t) => t.symbol === depositToken1Symbol)!
2801
+ ],
2802
+ apyMethodology:
2803
+ "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
2804
+ additionalInfo: {
2805
+ newBounds: "Managed by Re7",
2806
+ truePrice: 1,
2807
+ feeBps: 1000,
2808
+ rebalanceConditions: {
2809
+ customShouldRebalance: async (currentPrice: number) =>
2810
+ currentPrice > 0.99 && currentPrice < 1.01,
2811
+ minWaitHours: 6,
2812
+ direction: "any" as const
2813
+ },
2814
+ quoteAsset: Global.getDefaultTokens().find(
2815
+ (t) => t.symbol === quoteTokenSymbol
2816
+ )!
2817
+ },
2818
+ settings: createRe7Settings(quoteTokenSymbol, isBTC, isDeprecated),
2819
+ faqs: getRe7FAQs(),
2820
+ risk,
2821
+ points: [],
2822
+ curator: { name: "Re7 Labs", logo: "https://www.re7labs.xyz/favicon.ico" },
2823
+ tags: isBTC ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP] as StrategyTag[],
2824
+ discontinuationInfo: isDeprecated ? {
2825
+ info: "This strategy has been deprecated and is no longer accepting new deposits."
2826
+ } : undefined,
2827
+ security: {
2828
+ ...xSTRKSTRK.security,
2829
+ accessControl: {
2830
+ ...xSTRKSTRK.security.accessControl,
2831
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")],
2832
+ },
2833
+ },
2834
+ };
2835
+ };
2717
2836
 
2718
2837
  const ETHUSDCRe7Strategy = createRe7Strategy(
2719
2838
  "ekubo_cl_ethusdc",
@@ -2724,7 +2843,7 @@ const ETHUSDCRe7Strategy = createRe7Strategy(
2724
2843
  "USDC.e",
2725
2844
  "USDC.e",
2726
2845
  highRisk,
2727
- StrategyCategory.ALL
2846
+ false // isBTC
2728
2847
  );
2729
2848
 
2730
2849
  const stableCoinRisk = {
@@ -2741,18 +2860,18 @@ const stableCoinRisk = {
2741
2860
  const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2742
2861
  ETHUSDCRe7Strategy,
2743
2862
  createRe7Strategy(
2744
- "ekubo_cl_usdceusdt",
2863
+ "ekubo_cl_usdcusdt",
2745
2864
  "Ekubo USDC.e/USDT",
2746
2865
  "0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2",
2747
2866
  1506139,
2748
2867
  "USDC.e",
2749
2868
  "USDT",
2750
- "USDT",
2869
+ "USDC.e",
2751
2870
  stableCoinRisk,
2752
- StrategyCategory.ALL
2871
+ false // isBTC
2753
2872
  ),
2754
2873
  createRe7Strategy(
2755
- "ekubo_cl_strkusdce",
2874
+ "ekubo_cl_strkusdc",
2756
2875
  "Ekubo STRK/USDC.e",
2757
2876
  "0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30",
2758
2877
  1504079,
@@ -2760,7 +2879,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2760
2879
  "USDC.e",
2761
2880
  "USDC.e",
2762
2881
  highRisk,
2763
- StrategyCategory.ALL
2882
+ false // isBTC
2764
2883
  ),
2765
2884
  createRe7Strategy(
2766
2885
  "ekubo_cl_strketh",
@@ -2769,12 +2888,12 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2769
2888
  1504149,
2770
2889
  "STRK",
2771
2890
  "ETH",
2772
- "ETH",
2891
+ "USDC",
2773
2892
  highRisk,
2774
- StrategyCategory.ALL
2893
+ false // isBTC
2775
2894
  ),
2776
2895
  createRe7Strategy(
2777
- "ekubo_cl_wbtcusdce",
2896
+ "ekubo_cl_wbtcusdc",
2778
2897
  "Ekubo WBTC/USDC.e",
2779
2898
  "0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1",
2780
2899
  1506144,
@@ -2782,19 +2901,18 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2782
2901
  "USDC.e",
2783
2902
  "USDC.e",
2784
2903
  mediumRisk,
2785
- StrategyCategory.BTC
2786
- ),
2787
- createRe7Strategy(
2788
- "ekubo_cl_tbtcusdce",
2789
- "Ekubo tBTC/USDC.e",
2790
- "0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456",
2791
- 1501764,
2792
- "tBTC",
2793
- "USDC.e",
2794
- "USDC.e",
2795
- mediumRisk,
2796
- StrategyCategory.BTC
2904
+ true // isBTC
2797
2905
  ),
2906
+ // createRe7Strategy(
2907
+ // "ekubo_cl_tbtcusdce",
2908
+ // "Ekubo tBTC/USDC.e",
2909
+ // "0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456",
2910
+ // 1501764,
2911
+ // "tBTC",
2912
+ // "USDC.e",
2913
+ // "USDC.e",
2914
+ // mediumRisk,
2915
+ // ),
2798
2916
  createRe7Strategy(
2799
2917
  "ekubo_cl_wbtceth",
2800
2918
  "Ekubo WBTC/ETH",
@@ -2802,9 +2920,9 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2802
2920
  1506145,
2803
2921
  "WBTC",
2804
2922
  "ETH",
2805
- "ETH",
2923
+ "USDC",
2806
2924
  mediumRisk,
2807
- StrategyCategory.ALL
2925
+ true // isBTC
2808
2926
  ),
2809
2927
  createRe7Strategy(
2810
2928
  "ekubo_cl_wbtcstrk",
@@ -2813,12 +2931,12 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2813
2931
  1506147,
2814
2932
  "WBTC",
2815
2933
  "STRK",
2816
- "STRK",
2934
+ "USDC",
2817
2935
  highRisk,
2818
- StrategyCategory.ALL
2936
+ true // isBTC
2819
2937
  ),
2820
2938
  createRe7Strategy(
2821
- "ekubo_cl_usdcusdt",
2939
+ "ekubo_cl_usdc_v2usdt",
2822
2940
  "Ekubo USDC/USDT",
2823
2941
  "0x5203a08b471e46bf33990ac83aff577bbe5a5d789e61de2c6531e3c4773d1c9",
2824
2942
  3998018,
@@ -2826,7 +2944,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2826
2944
  "USDT",
2827
2945
  "USDC",
2828
2946
  stableCoinRisk,
2829
- StrategyCategory.ALL
2947
+ false // isBTC
2830
2948
  ),
2831
2949
  createRe7Strategy(
2832
2950
  "ekubo_cl_ethusdc_v2",
@@ -2837,10 +2955,10 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2837
2955
  "ETH",
2838
2956
  "USDC",
2839
2957
  highRisk,
2840
- StrategyCategory.ALL
2958
+ false // isBTC
2841
2959
  ),
2842
2960
  createRe7Strategy(
2843
- "ekubo_cl_strkusdc",
2961
+ "ekubo_cl_strkusdc_v2",
2844
2962
  "Ekubo STRK/USDC",
2845
2963
  "0x4de22bd0a8eb4d0a18736e66dd36d20ba50bc106346bbfac3dbeaac1ab37ce1",
2846
2964
  3998030,
@@ -2848,10 +2966,10 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2848
2966
  "STRK",
2849
2967
  "USDC",
2850
2968
  highRisk,
2851
- StrategyCategory.ALL
2969
+ false // isBTC
2852
2970
  ),
2853
2971
  createRe7Strategy(
2854
- "ekubo_cl_wbtcusdc",
2972
+ "ekubo_cl_wbtcusdc_v2",
2855
2973
  "Ekubo WBTC/USDC",
2856
2974
  "0x76101c3b80af1103c9c6d541ca627f61b5ae7ae79d7fce96ccdf7bdb648450d",
2857
2975
  3998034,
@@ -2859,8 +2977,53 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2859
2977
  "WBTC",
2860
2978
  "USDC",
2861
2979
  mediumRisk,
2862
- StrategyCategory.BTC
2863
- )
2980
+ true // isBTC
2981
+ ),
2982
+ createRe7Strategy(
2983
+ "ekubo_cl_strkbtcusdc",
2984
+ "Ekubo strkBTC/USDC",
2985
+ "0x049c1ff7d8d4c60584df57b4f545e36dfc8b99d650fcc12eb7c9bb8f3b1be18f",
2986
+ 9578610,
2987
+ "USDC",
2988
+ "strkBTC",
2989
+ "USDC",
2990
+ mediumRisk,
2991
+ true // isBTC
2992
+ ),
2993
+ createRe7Strategy(
2994
+ "ekubo_cl_strkbtcstrk",
2995
+ "Ekubo strkBTC/STRK",
2996
+ "0x016a429ac5ff52f4b33edbefd85b7c457e55d63a92c1cb0ddf18f9830daa70e0",
2997
+ 9578610,
2998
+ "STRK",
2999
+ "strkBTC",
3000
+ "USDC",
3001
+ mediumRisk,
3002
+ true // isBTC
3003
+ ),
3004
+ createRe7Strategy(
3005
+ "ekubo_cl_strkbtceth",
3006
+ "Ekubo strkBTC/ETH",
3007
+ "0x02eb2ad36fca2ddb9e28f32f7bbbe24194bac4a60324918c2499f9b41ef53dd8",
3008
+ 9578610,
3009
+ "ETH",
3010
+ "strkBTC",
3011
+ "USDC",
3012
+ mediumRisk,
3013
+ true // isBTC
3014
+ ),
3015
+ // wbtc/strkBTC
3016
+ createRe7Strategy(
3017
+ "ekubo_cl_wbtcstrkbtc",
3018
+ "Ekubo WBTC/strkBTC",
3019
+ "0x022656b2135f82ac83e651062f94b4f01a788bd949659b9c26570618d20de8cc",
3020
+ 9578610,
3021
+ "WBTC",
3022
+ "strkBTC",
3023
+ "strkBTC",
3024
+ stableCoinRisk,
3025
+ true // isBTC
3026
+ ),
2864
3027
  ];
2865
3028
 
2866
3029
  /**