@strkfarm/sdk 1.2.0 → 2.0.0-dca.0.3

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.
Files changed (42) hide show
  1. package/dist/cli.js +9 -5
  2. package/dist/cli.mjs +9 -5
  3. package/dist/index.browser.global.js +67052 -40450
  4. package/dist/index.browser.mjs +5241 -1906
  5. package/dist/index.d.ts +483 -33
  6. package/dist/index.js +5523 -2154
  7. package/dist/index.mjs +5460 -2123
  8. package/package.json +4 -1
  9. package/src/data/ekubo-price-fethcer.abi.json +265 -0
  10. package/src/data/yoloVault.abi.json +777 -0
  11. package/src/dataTypes/_bignumber.ts +5 -0
  12. package/src/dataTypes/bignumber.browser.ts +5 -0
  13. package/src/dataTypes/bignumber.node.ts +5 -0
  14. package/src/dataTypes/index.ts +3 -2
  15. package/src/dataTypes/mynumber.ts +141 -0
  16. package/src/global.ts +42 -0
  17. package/src/index.browser.ts +2 -1
  18. package/src/interfaces/common.tsx +168 -2
  19. package/src/modules/apollo-client-config.ts +28 -0
  20. package/src/modules/avnu.ts +1 -1
  21. package/src/modules/ekubo-pricer.ts +79 -0
  22. package/src/modules/erc20.ts +18 -2
  23. package/src/modules/pragma.ts +23 -8
  24. package/src/modules/pricer-from-api.ts +150 -14
  25. package/src/modules/pricer.ts +2 -1
  26. package/src/modules/pricerBase.ts +2 -1
  27. package/src/node/pricer-redis.ts +2 -1
  28. package/src/strategies/base-strategy.ts +81 -2
  29. package/src/strategies/ekubo-cl-vault.tsx +684 -316
  30. package/src/strategies/factory.ts +179 -0
  31. package/src/strategies/index.ts +5 -1
  32. package/src/strategies/registry.ts +240 -0
  33. package/src/strategies/sensei.ts +335 -7
  34. package/src/strategies/types.ts +4 -0
  35. package/src/strategies/universal-adapters/vesu-adapter.ts +48 -27
  36. package/src/strategies/universal-lst-muliplier-strategy.tsx +1405 -462
  37. package/src/strategies/universal-strategy.tsx +287 -129
  38. package/src/strategies/vesu-rebalance.tsx +242 -146
  39. package/src/strategies/yoloVault.ts +499 -0
  40. package/src/utils/index.ts +1 -1
  41. package/src/utils/logger.node.ts +11 -4
  42. package/src/utils/strategy-utils.ts +61 -0
@@ -10,8 +10,15 @@ import {
10
10
  IStrategyMetadata,
11
11
  RiskFactor,
12
12
  RiskType,
13
+ StrategyTag,
13
14
  TokenInfo,
14
15
  VaultPosition,
16
+ AuditStatus,
17
+ SourceCodeType,
18
+ AccessControlType,
19
+ InstantWithdrawalVault,
20
+ VaultType,
21
+ StrategyLiveStatus,
15
22
  } from "@/interfaces";
16
23
  import { PricerBase } from "@/modules/pricerBase";
17
24
  import { assert } from "@/utils";
@@ -29,7 +36,7 @@ import EkuboMathAbi from "@/data/ekubo-math.abi.json";
29
36
  import ERC4626Abi from "@/data/erc4626.abi.json";
30
37
  import { Global } from "@/global";
31
38
  import { AvnuWrapper, ERC20, SwapInfo } from "@/modules";
32
- import { BaseStrategy } from "./base-strategy";
39
+ import { BaseStrategy, SingleTokenInfo } from "./base-strategy";
33
40
  import { DualActionAmount } from "./base-strategy";
34
41
  import { DualTokenInfo } from "./base-strategy";
35
42
  import { log } from "winston";
@@ -295,7 +302,10 @@ export class EkuboCLVault extends BaseStrategy<
295
302
  return [this.contract.populate("handle_fees", [])];
296
303
  }
297
304
 
298
- async getFeeHistory(timePeriod: '24h' | '7d' | '30d' | '3m' = '24h'): Promise<{
305
+ async getFeeHistory(
306
+ timePeriod: '24h' | '7d' | '30d' | '3m' | '6m' = '24h',
307
+ range?: { startTimestamp?: number; endTimestamp?: number }
308
+ ): Promise<{
299
309
  summary: DualTokenInfo,
300
310
  history: FeeHistory[]
301
311
  }> {
@@ -304,8 +314,15 @@ export class EkuboCLVault extends BaseStrategy<
304
314
  query ContractFeeEarnings(
305
315
  $timeframe: String!
306
316
  $contract: String!
317
+ $startTimestamp: Float
318
+ $endTimestamp: Float
307
319
  ) {
308
- contractFeeEarnings(timeframe: $timeframe, contract: $contract) {
320
+ contractFeeEarnings(
321
+ timeframe: $timeframe
322
+ contract: $contract
323
+ startTimestamp: $startTimestamp
324
+ endTimestamp: $endTimestamp
325
+ ) {
309
326
  contract
310
327
  dailyEarnings {
311
328
  date
@@ -318,7 +335,9 @@ export class EkuboCLVault extends BaseStrategy<
318
335
  `,
319
336
  variables: {
320
337
  timeframe: timePeriod,
321
- contract: this.address.address
338
+ contract: this.address.address,
339
+ startTimestamp: range?.startTimestamp,
340
+ endTimestamp: range?.endTimestamp
322
341
  },
323
342
  fetchPolicy: 'no-cache',
324
343
  });
@@ -469,6 +488,155 @@ export class EkuboCLVault extends BaseStrategy<
469
488
  return (apyForGivenBlocks * (365 * 24 * 3600)) / timeDiffSeconds;
470
489
  }
471
490
 
491
+ /**
492
+ * Calculate lifetime earnings for a user
493
+ * Not yet implemented for Ekubo CL Vault strategy
494
+ */
495
+ getLifetimeEarnings(
496
+ userTVL: SingleTokenInfo,
497
+ investmentFlows: Array<{ amount: string; type: string; timestamp: number; tx_hash: string }>
498
+ ): any {
499
+ throw new Error("getLifetimeEarnings is not implemented yet for this strategy");
500
+ }
501
+
502
+ /**
503
+ * Calculates realized APY based on TVL per share growth, always valued in USDC.
504
+ * This is a vault-level metric (same for all users) and works for all strategies,
505
+ * regardless of quote asset configuration.
506
+ */
507
+ async getUserRealizedAPY(
508
+ blockIdentifier: BlockIdentifier = "latest",
509
+ sinceBlocks = 600000
510
+ ): Promise<number> {
511
+ throw new Error("getUserRealizedAPY not implemented yet for Ekubo CL Vault strategy");
512
+
513
+ /*
514
+ logger.verbose(
515
+ `${EkuboCLVault.name}: getUserRealizedAPY => starting with blockIdentifier=${blockIdentifier}, sinceBlocks=${sinceBlocks}`
516
+ );
517
+
518
+ // TVL amounts (in token units) at current reference block
519
+ const tvlNow = await this._getTVL(blockIdentifier);
520
+ const supplyNow = await this.totalSupply(blockIdentifier);
521
+
522
+ // Determine current block number and timestamp
523
+ let blockNow =
524
+ typeof blockIdentifier == "number"
525
+ ? blockIdentifier
526
+ : (await this.config.provider.getBlockLatestAccepted()).block_number;
527
+ const blockNowTime =
528
+ typeof blockIdentifier == "number"
529
+ ? (await this.config.provider.getBlockWithTxs(blockIdentifier))
530
+ .timestamp
531
+ : new Date().getTime() / 1000;
532
+
533
+ // Look back window, but never before launch block
534
+ const blockBefore = Math.max(
535
+ Number(blockNow) - sinceBlocks,
536
+ this.metadata.launchBlock
537
+ );
538
+
539
+ // Adjust current supply by subtracting harvest reward shares (same idea as netSharesBasedTrueAPY)
540
+ const adjustedSupplyNow = supplyNow.minus(
541
+ await this.getHarvestRewardShares(blockBefore, Number(blockNow))
542
+ );
543
+
544
+ // Historical block info and TVL
545
+ const blockBeforeInfo = await this.config.provider.getBlockWithTxs(
546
+ blockBefore
547
+ );
548
+ const tvlBefore = await this._getTVL(blockBefore);
549
+ const supplyBefore = await this.totalSupply(blockBefore);
550
+
551
+ // Always value TVL in USDC using the pricer for both tokens at both blocks
552
+ const token0Info = this.metadata.depositTokens[0];
553
+ const token1Info = this.metadata.depositTokens[1];
554
+
555
+ const P0Now = await this.pricer.getPrice(
556
+ token0Info.symbol,
557
+ Number(blockNow)
558
+ );
559
+ const P1Now = await this.pricer.getPrice(
560
+ token1Info.symbol,
561
+ Number(blockNow)
562
+ );
563
+ const P0Before = await this.pricer.getPrice(
564
+ token0Info.symbol,
565
+ blockBefore
566
+ );
567
+ const P1Before = await this.pricer.getPrice(
568
+ token1Info.symbol,
569
+ blockBefore
570
+ );
571
+
572
+ // Convert token balances to USDC TVL using current and historical prices
573
+ const tvlNowUsdNumber =
574
+ Number(tvlNow.amount0.toFixed(13)) * P0Now.price +
575
+ Number(tvlNow.amount1.toFixed(13)) * P1Now.price;
576
+ const tvlBeforeUsdNumber =
577
+ Number(tvlBefore.amount0.toFixed(13)) * P0Before.price +
578
+ Number(tvlBefore.amount1.toFixed(13)) * P1Before.price;
579
+
580
+ // Represent USDC TVL as Web3Number with 6 decimals (USDC standard)
581
+ const tvlNowInUSDC = new Web3Number(
582
+ tvlNowUsdNumber.toFixed(13),
583
+ 6
584
+ );
585
+ const tvlBeforeInUSDC = new Web3Number(
586
+ tvlBeforeUsdNumber.toFixed(13),
587
+ 6
588
+ );
589
+
590
+ const tvlPerShareNow = tvlNowInUSDC
591
+ .multipliedBy(1e18)
592
+ .dividedBy(adjustedSupplyNow.toString());
593
+
594
+ const tvlPerShareBf = tvlBeforeInUSDC
595
+ .multipliedBy(1e18)
596
+ .dividedBy(supplyBefore.toString());
597
+
598
+ const timeDiffSeconds = blockNowTime - blockBeforeInfo.timestamp;
599
+
600
+ logger.verbose(
601
+ `${EkuboCLVault.name}: getUserRealizedAPY => token0=${token0Info.symbol}, token1=${token1Info.symbol}`
602
+ );
603
+ logger.verbose(
604
+ `${EkuboCLVault.name}: getUserRealizedAPY => P0Now=${P0Now.price}, P1Now=${P1Now.price}, P0Before=${P0Before.price}, P1Before=${P1Before.price}`
605
+ );
606
+ logger.verbose(
607
+ `${EkuboCLVault.name}: getUserRealizedAPY => raw tvlNow amounts: token0=${tvlNow.amount0.toString()}, token1=${tvlNow.amount1.toString()}`
608
+ );
609
+ logger.verbose(
610
+ `${EkuboCLVault.name}: getUserRealizedAPY => raw tvlBefore amounts: token0=${tvlBefore.amount0.toString()}, token1=${tvlBefore.amount1.toString()}`
611
+ );
612
+ logger.verbose(
613
+ `${EkuboCLVault.name}: getUserRealizedAPY => tvlNowUsdNumber=${tvlNowUsdNumber}, tvlBeforeUsdNumber=${tvlBeforeUsdNumber}`
614
+ );
615
+ logger.verbose(
616
+ `${EkuboCLVault.name}: getUserRealizedAPY => tvlNowInUSDC: ${tvlNowInUSDC.toString()}, tvlBeforeInUSDC: ${tvlBeforeInUSDC.toString()}`
617
+ );
618
+ logger.verbose(
619
+ `${EkuboCLVault.name}: getUserRealizedAPY => tvlPerShareNow: ${tvlPerShareNow.toString()}, tvlPerShareBf: ${tvlPerShareBf.toString()}`
620
+ );
621
+ logger.verbose(
622
+ `${EkuboCLVault.name}: getUserRealizedAPY => Supply before: ${supplyBefore.toString()}, Supply now (adjusted): ${adjustedSupplyNow.toString()}`
623
+ );
624
+ logger.verbose(
625
+ `${EkuboCLVault.name}: getUserRealizedAPY => Time diff in seconds: ${timeDiffSeconds}`
626
+ );
627
+
628
+ const apyForGivenBlocks =
629
+ Number(
630
+ tvlPerShareNow
631
+ .minus(tvlPerShareBf)
632
+ .multipliedBy(10000)
633
+ .dividedBy(tvlPerShareBf)
634
+ ) / 10000;
635
+
636
+ return (apyForGivenBlocks * (365 * 24 * 3600)) / timeDiffSeconds;
637
+ */
638
+ }
639
+
472
640
  async feeBasedAPY(
473
641
  timeperiod: '24h' | '7d' | '30d' | '3m' = '24h'
474
642
  ): Promise<number> {
@@ -572,8 +740,14 @@ export class EkuboCLVault extends BaseStrategy<
572
740
  assets.amount1.toString(),
573
741
  token1Info.decimals
574
742
  );
575
- const P0 = await this.pricer.getPrice(token0Info.symbol);
576
- const P1 = await this.pricer.getPrice(token1Info.symbol);
743
+
744
+ // Convert blockIdentifier to block number for pricer if it's a number
745
+ const blockNumber = typeof blockIdentifier === 'number' || typeof blockIdentifier === 'bigint'
746
+ ? Number(blockIdentifier)
747
+ : undefined;
748
+
749
+ const P0 = await this.pricer.getPrice(token0Info.symbol, blockNumber);
750
+ const P1 = await this.pricer.getPrice(token1Info.symbol, blockNumber);
577
751
  const token0Usd = Number(amount0.toFixed(13)) * P0.price;
578
752
  const token1Usd = Number(amount1.toFixed(13)) * P1.price;
579
753
 
@@ -1995,7 +2169,12 @@ export class EkuboCLVault extends BaseStrategy<
1995
2169
  }
1996
2170
 
1997
2171
  async getInvestmentFlows() {
1998
- const netYield = await this.netAPY();
2172
+ // for LSTs, we use 30d, else 7d for the yield calculation
2173
+ // TODO Make the block compute more dynamic
2174
+ const blocksDiff = this.metadata.additionalInfo.lstContract
2175
+ ? 600000
2176
+ : 600000 / 4;
2177
+ const netYield = await this.netAPY("latest", blocksDiff, "7d" as any);
1999
2178
  const poolKey = await this.getPoolKey();
2000
2179
 
2001
2180
  const linkedFlow: IInvestmentFlow = {
@@ -2154,7 +2333,11 @@ function getLSTFAQs(lstSymbol: string): FAQ[] {
2154
2333
  ]
2155
2334
  }
2156
2335
 
2336
+ const vaultTypeDescription = 'Automatically collects fees and rebalances positions on Ekubo to optimize yield';
2337
+ const vaultType = VaultType.AUTOMATED_LP;
2338
+
2157
2339
  const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2340
+ id: "ekubo_cl_xstrkstrk",
2158
2341
  name: "Ekubo xSTRK/STRK",
2159
2342
  description: <></>,
2160
2343
  address: ContractAddr.from(
@@ -2162,6 +2345,10 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2162
2345
  ),
2163
2346
  launchBlock: 1209881,
2164
2347
  type: "Other",
2348
+ vaultType: {
2349
+ type: vaultType,
2350
+ description: vaultTypeDescription
2351
+ },
2165
2352
  // must be same order as poolKey token0 and token1
2166
2353
  depositTokens: [
2167
2354
  Global.getDefaultTokens().find((t) => t.symbol === "xSTRK")!,
@@ -2169,7 +2356,10 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2169
2356
  ],
2170
2357
  protocols: [_protocol],
2171
2358
  auditUrl: AUDIT_URL,
2172
- maxTVL: Web3Number.fromWei("0", 18),
2359
+ curator: {
2360
+ name: "Unwrap Labs",
2361
+ logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
2362
+ },
2173
2363
  risk: {
2174
2364
  riskFactor: _lstPoolRiskFactors,
2175
2365
  netRisk:
@@ -2179,6 +2369,7 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2179
2369
  },
2180
2370
  apyMethodology:
2181
2371
  "APY based on 30-day historical performance, including fees and rewards.",
2372
+ realizedAPYMethodology: "The realizedAPY is based on past 14 days performance by the vault",
2182
2373
  additionalInfo: {
2183
2374
  newBounds: {
2184
2375
  lower: -1,
@@ -2195,352 +2386,529 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2195
2386
  },
2196
2387
  quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
2197
2388
  },
2389
+ settings: {
2390
+ maxTVL: Web3Number.fromWei("0", 18),
2391
+ isAudited: true,
2392
+ isPaused: false,
2393
+ liveStatus: StrategyLiveStatus.ACTIVE,
2394
+ isInstantWithdrawal: true,
2395
+ hideNetEarnings: true,
2396
+ isTransactionHistDisabled: true,
2397
+ quoteToken: Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
2398
+ alerts: [
2399
+ {
2400
+ type: "info",
2401
+ text: (
2402
+ <p>
2403
+ Depending on the current position range and price, your
2404
+ input amounts are automatically adjusted to nearest
2405
+ required amounts. If you have insufficient tokens, you
2406
+ can acquire the required tokens on{" "}
2407
+ <a
2408
+ href="https://avnu.fi"
2409
+ target="_blank"
2410
+ rel="noopener noreferrer"
2411
+ >
2412
+ Avnu
2413
+ </a>
2414
+ </p>
2415
+ ),
2416
+ tab: "deposit"
2417
+ },
2418
+ {
2419
+ type: "info",
2420
+ text: (
2421
+ <>
2422
+ Depending on the current position range and price, you
2423
+ may receive both of the tokens or one of the tokens
2424
+ depending on the price
2425
+ </>
2426
+ ),
2427
+ tab: "withdraw"
2428
+ }
2429
+ ],
2430
+ tags: [StrategyTag.AUTOMATED_LP]
2431
+ },
2198
2432
  faqs: getLSTFAQs("xSTRK"),
2199
2433
  points: [{
2200
- multiplier: 1,
2434
+ multiplier: 15,
2201
2435
  logo: 'https://endur.fi/favicon.ico',
2202
2436
  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.",
2203
2437
  }],
2204
2438
  contractDetails: [],
2205
- investmentSteps: []
2439
+ investmentSteps: [],
2440
+ tags: [StrategyTag.AUTOMATED_LP],
2441
+ security: {
2442
+ auditStatus: AuditStatus.AUDITED,
2443
+ sourceCode: {
2444
+ type: SourceCodeType.OPEN_SOURCE,
2445
+ contractLink: "https://github.com/trovesfi/troves-contracts",
2446
+ },
2447
+ accessControl: {
2448
+ type: AccessControlType.STANDARD_ACCOUNT,
2449
+ addresses: [ContractAddr.from("0x0")],
2450
+ timeLock: "2 Days",
2451
+ },
2452
+ },
2453
+ redemptionInfo: {
2454
+ instantWithdrawalVault: InstantWithdrawalVault.YES,
2455
+ redemptionsInfo: [],
2456
+ alerts: [],
2457
+ },
2458
+ usualTimeToEarnings: null,
2459
+ usualTimeToEarningsDescription: null,
2206
2460
  };
2207
2461
 
2208
- const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2209
- xSTRKSTRK,
2210
- {
2211
- ...xSTRKSTRK,
2212
- name: "Ekubo xWBTC/WBTC",
2213
- description: <></>,
2214
- address: ContractAddr.from(
2215
- "0x2ea99b4971d3c277fa4a9b4beb7d4d7d169e683393a29eef263d5d57b4380a"
2216
- ),
2217
- launchBlock: 2338309,
2218
- // must be same order as poolKey token0 and token1
2219
- depositTokens: [
2220
- Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
2221
- Global.getDefaultTokens().find((t) => t.symbol === "xWBTC")!,
2222
- ],
2223
- additionalInfo: {
2224
- ...xSTRKSTRK.additionalInfo,
2225
- quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
2226
- lstContract: Global.getDefaultTokens().find((t) => t.symbol === "xWBTC")!.address,
2462
+ // Helper to create common LST alerts
2463
+ const getLSTAlerts = () => [
2464
+ {
2465
+ tab: "deposit" as const,
2466
+ text: (
2467
+ <>
2468
+ To acquire the LST, please visit{" "}
2469
+ <a
2470
+ href="https://app.endur.fi"
2471
+ target="_blank"
2472
+ rel="noopener noreferrer"
2473
+ >
2474
+ endur.fi
2475
+ </a>
2476
+ </>
2477
+ ),
2478
+ type: "info" as const
2227
2479
  },
2228
- faqs: getLSTFAQs("xWBTC"),
2229
- points: [],
2230
- contractDetails: [],
2231
- investmentSteps: []
2232
- },
2233
- {
2234
- ...xSTRKSTRK,
2235
- name: "Ekubo xtBTC/tBTC",
2236
- description: <></>,
2237
- address: ContractAddr.from(
2238
- "0x785dc3dfc4e80ef2690a99512481e3ed3a5266180adda5a47e856245d68a4af"
2239
- ),
2240
- launchBlock: 2415667,
2241
- // must be same order as poolKey token0 and token1
2242
- depositTokens: [
2243
- Global.getDefaultTokens().find((t) => t.symbol === "xtBTC")!,
2244
- Global.getDefaultTokens().find((t) => t.symbol === "tBTC")!,
2245
- ],
2246
- additionalInfo: {
2247
- ...xSTRKSTRK.additionalInfo,
2248
- quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "tBTC")!,
2249
- lstContract: Global.getDefaultTokens().find((t) => t.symbol === "xtBTC")!.address,
2480
+ {
2481
+ type: "info" as const,
2482
+ text: (
2483
+ <p>
2484
+ Depending on the current position range and price, your input
2485
+ amounts are automatically adjusted to nearest required amounts.
2486
+ If you have insufficient tokens, you can acquire the required
2487
+ tokens on{" "}
2488
+ <a
2489
+ href="https://avnu.fi"
2490
+ target="_blank"
2491
+ rel="noopener noreferrer"
2492
+ >
2493
+ Avnu
2494
+ </a>
2495
+ </p>
2496
+ ),
2497
+ tab: "deposit" as const
2250
2498
  },
2251
- faqs: getLSTFAQs("xtBTC"),
2252
- points: [],
2253
- contractDetails: [],
2254
- investmentSteps: []
2255
- },
2256
- {
2499
+ {
2500
+ type: "info" as const,
2501
+ text: (
2502
+ <>
2503
+ Depending on the current position range and price, you may
2504
+ receive both of the tokens or one of the tokens depending on the
2505
+ price
2506
+ </>
2507
+ ),
2508
+ tab: "withdraw" as const
2509
+ }
2510
+ ];
2511
+
2512
+ // Helper to create LST strategy settings
2513
+ const createLSTSettings = (quoteTokenSymbol: string) => ({
2514
+ ...xSTRKSTRK.settings,
2515
+ isAudited: true,
2516
+ liveStatus: StrategyLiveStatus.ACTIVE,
2517
+ isInstantWithdrawal: true,
2518
+ hideNetEarnings: true,
2519
+ isTransactionHistDisabled: true,
2520
+ quoteToken: Global.getDefaultTokens().find(
2521
+ (t) => t.symbol === quoteTokenSymbol
2522
+ )!,
2523
+ alerts: getLSTAlerts(),
2524
+ tags: [StrategyTag.AUTOMATED_LP] as StrategyTag[],
2525
+ });
2526
+
2527
+ // Helper to create an LST strategy
2528
+ const createLSTStrategy = (params: {
2529
+ id: string;
2530
+ name: string;
2531
+ address: string;
2532
+ launchBlock: number;
2533
+ depositToken0Symbol: string;
2534
+ depositToken1Symbol: string;
2535
+ quoteTokenSymbol: string;
2536
+ lstSymbol: string;
2537
+ lstContractAddress?: string;
2538
+ }): IStrategyMetadata<CLVaultStrategySettings> => ({
2257
2539
  ...xSTRKSTRK,
2258
- name: "Ekubo xsBTC/solvBTC",
2540
+ id: params.id,
2541
+ name: params.name,
2259
2542
  description: <></>,
2260
- address: ContractAddr.from(
2261
- "0x3af1c7faa7c464cf2c494e988972ad1939f1103dbfb6e47e9bf0c47e49b14ef"
2262
- ),
2263
- launchBlock: 2344809,
2264
2543
  // must be same order as poolKey token0 and token1
2265
- depositTokens: [
2266
- Global.getDefaultTokens().find((t) => t.symbol === "xsBTC")!,
2267
- Global.getDefaultTokens().find((t) => t.symbol === "solvBTC")!,
2268
- ],
2269
- additionalInfo: {
2270
- ...xSTRKSTRK.additionalInfo,
2271
- quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "solvBTC")!,
2272
- lstContract: Global.getDefaultTokens().find((t) => t.symbol === "xsBTC")!.address,
2544
+ address: ContractAddr.from(params.address),
2545
+ launchBlock: params.launchBlock,
2546
+ vaultType: {
2547
+ type: vaultType,
2548
+ description: vaultTypeDescription
2273
2549
  },
2274
- faqs: getLSTFAQs("xsBTC"),
2275
- points: [],
2276
- contractDetails: [],
2277
- investmentSteps: []
2278
- },
2279
- {
2280
- ...xSTRKSTRK,
2281
- name: "Ekubo xLBTC/LBTC",
2282
- description: <></>,
2283
- address: ContractAddr.from(
2284
- "0x314c4653ab1aa01f5465773cb879f525d7e369a137bc3ae084761aee99a1712"
2285
- ),
2286
- launchBlock: 2412442,
2287
- // must be same order as poolKey token0 and token1
2288
2550
  depositTokens: [
2289
- Global.getDefaultTokens().find((t) => t.symbol === "LBTC")!,
2290
- Global.getDefaultTokens().find((t) => t.symbol === "xLBTC")!,
2551
+ Global.getDefaultTokens().find(
2552
+ (t) => t.symbol === params.depositToken0Symbol
2553
+ )!,
2554
+ Global.getDefaultTokens().find((t) => t.symbol === params.depositToken1Symbol)!
2291
2555
  ],
2556
+ realizedAPYMethodology: "The realizedAPY is based on past 14 days performance by the vault",
2292
2557
  additionalInfo: {
2293
- ...xSTRKSTRK.additionalInfo,
2294
- quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "LBTC")!,
2295
- lstContract: Global.getDefaultTokens().find((t) => t.symbol === "xLBTC")!.address,
2558
+ ...xSTRKSTRK.additionalInfo,
2559
+ quoteAsset: Global.getDefaultTokens().find(
2560
+ (t) => t.symbol === params.quoteTokenSymbol
2561
+ )!,
2562
+ lstContract: params.lstContractAddress
2563
+ ? ContractAddr.from(params.lstContractAddress)
2564
+ : Global.getDefaultTokens().find((t) => t.symbol === params.lstSymbol)!
2565
+ .address
2296
2566
  },
2297
- faqs: getLSTFAQs("xLBTC"),
2567
+ settings: createLSTSettings(params.quoteTokenSymbol),
2568
+ faqs: getLSTFAQs(params.lstSymbol),
2298
2569
  points: [],
2299
2570
  contractDetails: [],
2300
- investmentSteps: []
2301
- }
2571
+ investmentSteps: [],
2572
+ tags: params.id.toLowerCase().includes('btc') ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP]
2573
+ });
2574
+
2575
+ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2576
+ xSTRKSTRK,
2577
+ createLSTStrategy({
2578
+ id: "ekubo_cl_xwbtcwbtc",
2579
+ name: "Ekubo xWBTC/WBTC",
2580
+ address: "0x2ea99b4971d3c277fa4a9b4beb7d4d7d169e683393a29eef263d5d57b4380a",
2581
+ launchBlock: 2338309,
2582
+ depositToken0Symbol: "WBTC",
2583
+ depositToken1Symbol: "xWBTC",
2584
+ quoteTokenSymbol: "WBTC",
2585
+ lstSymbol: "xWBTC",
2586
+ }),
2587
+ createLSTStrategy({
2588
+ id: "ekubo_cl_xtbtctbtc",
2589
+ name: "Ekubo xtBTC/tBTC",
2590
+ address: "0x785dc3dfc4e80ef2690a99512481e3ed3a5266180adda5a47e856245d68a4af",
2591
+ launchBlock: 2415667,
2592
+ depositToken0Symbol: "xtBTC",
2593
+ depositToken1Symbol: "tBTC",
2594
+ quoteTokenSymbol: "tBTC",
2595
+ lstSymbol: "xtBTC",
2596
+ }),
2597
+ createLSTStrategy({
2598
+ id: "ekubo_cl_xsbtcsolvbtc",
2599
+ name: "Ekubo xsBTC/solvBTC",
2600
+ address: "0x3af1c7faa7c464cf2c494e988972ad1939f1103dbfb6e47e9bf0c47e49b14ef",
2601
+ launchBlock: 2344809,
2602
+ depositToken0Symbol: "xsBTC",
2603
+ depositToken1Symbol: "solvBTC",
2604
+ quoteTokenSymbol: "solvBTC",
2605
+ lstSymbol: "xsBTC",
2606
+ }),
2607
+ createLSTStrategy({
2608
+ id: "ekubo_cl_xlbtclbtc",
2609
+ name: "Ekubo xLBTC/LBTC",
2610
+ address: "0x314c4653ab1aa01f5465773cb879f525d7e369a137bc3ae084761aee99a1712",
2611
+ launchBlock: 2412442,
2612
+ depositToken0Symbol: "LBTC",
2613
+ depositToken1Symbol: "xLBTC",
2614
+ quoteTokenSymbol: "LBTC",
2615
+ lstSymbol: "xLBTC",
2616
+ })
2302
2617
  ];
2303
2618
 
2304
- const ETHUSDCRe7Strategy: IStrategyMetadata<CLVaultStrategySettings> = {
2305
- ...xSTRKSTRK,
2306
- name: "Ekubo ETH/USDC.e",
2307
- description: <></>,
2308
- address: ContractAddr.from(
2309
- "0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
2310
- ),
2311
- launchBlock: 1504232,
2312
- // must be same order as poolKey token0 and token1
2313
- depositTokens: [
2314
- Global.getDefaultTokens().find((t) => t.symbol === "ETH")!,
2315
- Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!
2316
- ],
2317
- apyMethodology:
2318
- "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
2319
- additionalInfo: {
2320
- newBounds: "Managed by Re7",
2321
- truePrice: 1,
2322
- feeBps: 1000,
2323
- rebalanceConditions: {
2324
- customShouldRebalance: async (currentPrice: number) =>
2325
- currentPrice > 0.99 && currentPrice < 1.01,
2326
- minWaitHours: 6,
2327
- direction: "any"
2619
+ const getRe7Alerts = () => [
2620
+ {
2621
+ type: "info" as const,
2622
+ text: (
2623
+ <p>
2624
+ Depending on the current position range and price, your input
2625
+ amounts are automatically adjusted to nearest required amounts.
2626
+ If you have insufficient tokens, you can acquire the required
2627
+ tokens on{" "}
2628
+ <a
2629
+ href="https://avnu.fi"
2630
+ target="_blank"
2631
+ rel="noopener noreferrer"
2632
+ >
2633
+ Avnu
2634
+ </a>
2635
+ </p>
2636
+ ),
2637
+ tab: "deposit" as const
2328
2638
  },
2329
- quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!,
2330
- },
2331
- faqs: [
2639
+ {
2640
+ type: "info" as const,
2641
+ text: (
2642
+ <>
2643
+ Depending on the current position range and price, you may
2644
+ receive both of the tokens or one of the tokens depending on the
2645
+ price
2646
+ </>
2647
+ ),
2648
+ tab: "withdraw" as const
2649
+ }
2650
+ ];
2651
+
2652
+ // Helper to create Re7 strategy settings
2653
+ const createRe7Settings = (quoteTokenSymbol: string, isBTC: boolean, isDeprecated: boolean) => ({
2654
+ ...xSTRKSTRK.settings,
2655
+ isAudited: true,
2656
+ liveStatus: isDeprecated ? StrategyLiveStatus.DEPRECATED : StrategyLiveStatus.ACTIVE,
2657
+ isInstantWithdrawal: true,
2658
+ hideNetEarnings: true,
2659
+ isTransactionHistDisabled: false,
2660
+ quoteToken: Global.getDefaultTokens().find(
2661
+ (t) => t.symbol === quoteTokenSymbol
2662
+ )!,
2663
+ alerts: getRe7Alerts(),
2664
+ tags: isBTC ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP] as StrategyTag[],
2665
+ });
2666
+
2667
+ // Helper to create Re7 FAQs
2668
+ const getRe7FAQs = () => [
2332
2669
  ...faqs,
2333
2670
  {
2334
- question: "Who is the curator of this strategy?",
2335
- answer:
2336
- <div>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 <a href='https://www.re7labs.xyz' style={{textDecoration: "underline", marginLeft: "2px"}} target="_blank">here</a>.</div>
2671
+ question: "Who is the curator of this strategy?",
2672
+ answer: (
2673
+ <div>
2674
+ Re7 Labs is the curator of this strategy. Re7 Labs is a
2675
+ well-known Web3 asset management firm. This strategy is
2676
+ completely managed by them, including ownership of the vault.
2677
+ Troves is developer of the smart contracts and maintains
2678
+ infrastructure to help users access these strategies. You can
2679
+ find more information about them on their website{" "}
2680
+ <a
2681
+ href="https://www.re7labs.xyz"
2682
+ style={{
2683
+ textDecoration: "underline",
2684
+ marginLeft: "2px"
2685
+ }}
2686
+ target="_blank"
2687
+ >
2688
+ here
2689
+ </a>
2690
+ .
2691
+ </div>
2692
+ )
2337
2693
  },
2338
2694
  {
2339
- question: "How is the APY calculated?",
2340
- answer:
2341
- <div>It's an annualized fee APY, calculated as fees earned in the last 24h divided by TVL. Factors like impermanent loss are not considered.</div>
2342
- },
2343
- ],
2344
- risk: highRisk,
2345
- points: [],
2346
- curator: { name: "Re7 Labs", logo: "https://www.re7labs.xyz/favicon.ico" }
2695
+ question: "How is the APY calculated?",
2696
+ answer: (
2697
+ <div>
2698
+ It's an annualized fee APY, calculated as fees earned in the
2699
+ last 24h divided by TVL. Factors like impermanent loss are not
2700
+ considered.
2701
+ </div>
2702
+ )
2703
+ }
2704
+ ];
2705
+
2706
+ // Helper to create a Re7 strategy
2707
+ const createRe7Strategy = (
2708
+ id: string,
2709
+ name: string,
2710
+ address: string,
2711
+ launchBlock: number,
2712
+ depositToken0Symbol: string,
2713
+ depositToken1Symbol: string,
2714
+ quoteTokenSymbol: string,
2715
+ risk:
2716
+ | typeof highRisk
2717
+ | typeof mediumRisk
2718
+ | { riskFactor: RiskFactor[]; netRisk: number; notARisks: RiskType[] },
2719
+ isBTC: boolean
2720
+ ): IStrategyMetadata<CLVaultStrategySettings> => {
2721
+ const isDeprecated = name.toLowerCase().includes('usdc.e');
2722
+ return {
2723
+ ...xSTRKSTRK,
2724
+ id,
2725
+ name,
2726
+ description: <></>,
2727
+ address: ContractAddr.from(address),
2728
+ launchBlock,
2729
+ vaultType: {
2730
+ type: vaultType,
2731
+ description: vaultTypeDescription
2732
+ },
2733
+ depositTokens: [
2734
+ Global.getDefaultTokens().find(
2735
+ (t) => t.symbol === depositToken0Symbol
2736
+ )!,
2737
+ Global.getDefaultTokens().find((t) => t.symbol === depositToken1Symbol)!
2738
+ ],
2739
+ apyMethodology:
2740
+ "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
2741
+ additionalInfo: {
2742
+ newBounds: "Managed by Re7",
2743
+ truePrice: 1,
2744
+ feeBps: 1000,
2745
+ rebalanceConditions: {
2746
+ customShouldRebalance: async (currentPrice: number) =>
2747
+ currentPrice > 0.99 && currentPrice < 1.01,
2748
+ minWaitHours: 6,
2749
+ direction: "any" as const
2750
+ },
2751
+ quoteAsset: Global.getDefaultTokens().find(
2752
+ (t) => t.symbol === quoteTokenSymbol
2753
+ )!
2754
+ },
2755
+ settings: createRe7Settings(quoteTokenSymbol, isBTC, isDeprecated),
2756
+ faqs: getRe7FAQs(),
2757
+ risk,
2758
+ points: [],
2759
+ curator: { name: "Re7 Labs", logo: "https://www.re7labs.xyz/favicon.ico" },
2760
+ tags: isBTC ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP] as StrategyTag[],
2761
+ discontinuationInfo: isDeprecated ? {
2762
+ info: "This strategy has been deprecated and is no longer accepting new deposits."
2763
+ } : undefined,
2764
+ };
2765
+ };
2766
+
2767
+ const ETHUSDCRe7Strategy = createRe7Strategy(
2768
+ "ekubo_cl_ethusdc",
2769
+ "Ekubo ETH/USDC.e",
2770
+ "0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947",
2771
+ 1504232,
2772
+ "ETH",
2773
+ "USDC.e",
2774
+ "USDC.e",
2775
+ highRisk,
2776
+ false // isBTC
2777
+ );
2778
+
2779
+ const stableCoinRisk = {
2780
+ riskFactor: _stableCoinPoolRiskFactors,
2781
+ netRisk:
2782
+ _stableCoinPoolRiskFactors.reduce(
2783
+ (acc, curr) => acc + curr.value * curr.weight,
2784
+ 0
2785
+ ) /
2786
+ _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
2787
+ notARisks: getNoRiskTags(_stableCoinPoolRiskFactors)
2347
2788
  };
2348
2789
 
2349
2790
  const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2350
- ETHUSDCRe7Strategy,
2351
- {
2352
- ...ETHUSDCRe7Strategy,
2353
- name: "Ekubo USDC.e/USDT",
2354
- description: <></>,
2355
- address: ContractAddr.from(
2356
- "0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
2791
+ ETHUSDCRe7Strategy,
2792
+ createRe7Strategy(
2793
+ "ekubo_cl_usdcusdt",
2794
+ "Ekubo USDC.e/USDT",
2795
+ "0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2",
2796
+ 1506139,
2797
+ "USDC.e",
2798
+ "USDT",
2799
+ "USDC.e",
2800
+ stableCoinRisk,
2801
+ false // isBTC
2357
2802
  ),
2358
- launchBlock: 1506139,
2359
- // must be same order as poolKey token0 and token1
2360
- depositTokens: [
2361
- Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!,
2362
- Global.getDefaultTokens().find((t) => t.symbol === "USDT")!
2363
- ],
2364
- risk: {
2365
- riskFactor: _stableCoinPoolRiskFactors,
2366
- netRisk:
2367
- _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
2368
- _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
2369
- notARisks: getNoRiskTags(_stableCoinPoolRiskFactors),
2370
- }
2371
- },
2372
- {
2373
- ...ETHUSDCRe7Strategy,
2374
- name: "Ekubo STRK/USDC.e",
2375
- description: <></>,
2376
- address: ContractAddr.from(
2377
- "0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
2803
+ createRe7Strategy(
2804
+ "ekubo_cl_strkusdc",
2805
+ "Ekubo STRK/USDC.e",
2806
+ "0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30",
2807
+ 1504079,
2808
+ "STRK",
2809
+ "USDC.e",
2810
+ "USDC.e",
2811
+ highRisk,
2812
+ false // isBTC
2378
2813
  ),
2379
- launchBlock: 1504079,
2380
- // must be same order as poolKey token0 and token1
2381
- depositTokens: [
2382
- Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
2383
- Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!
2384
- ],
2385
- risk: highRisk,
2386
- },
2387
- {
2388
- ...ETHUSDCRe7Strategy,
2389
- name: "Ekubo STRK/ETH",
2390
- description: <></>,
2391
- address: ContractAddr.from(
2392
- "0x4ce3024b0ee879009112d7b0e073f8a87153dd35b029347d4247ffe48d28f51"
2393
- ),
2394
- launchBlock: 1504149,
2395
- // must be same order as poolKey token0 and token1
2396
- depositTokens: [
2397
- Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
2398
- Global.getDefaultTokens().find((t) => t.symbol === "ETH")!
2399
- ],
2400
- risk: highRisk,
2401
- },
2402
- {
2403
- ...ETHUSDCRe7Strategy,
2404
- name: "Ekubo WBTC/USDC.e",
2405
- description: <></>,
2406
- address: ContractAddr.from(
2407
- "0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
2814
+ createRe7Strategy(
2815
+ "ekubo_cl_strketh",
2816
+ "Ekubo STRK/ETH",
2817
+ "0x4ce3024b0ee879009112d7b0e073f8a87153dd35b029347d4247ffe48d28f51",
2818
+ 1504149,
2819
+ "STRK",
2820
+ "ETH",
2821
+ "USDC",
2822
+ highRisk,
2823
+ false // isBTC
2408
2824
  ),
2409
- launchBlock: 1506144,
2410
- // must be same order as poolKey token0 and token1
2411
- depositTokens: [
2412
- Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
2413
- Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!
2414
- ],
2415
- risk: mediumRisk,
2416
- },
2417
- {
2418
- ...ETHUSDCRe7Strategy,
2419
- name: "Ekubo tBTC/USDC.e",
2420
- description: <></>,
2421
- address: ContractAddr.from(
2422
- "0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
2423
- ),
2424
- launchBlock: 1501764,
2425
- // must be same order as poolKey token0 and token1
2426
- depositTokens: [
2427
- Global.getDefaultTokens().find((t) => t.symbol === "tBTC")!,
2428
- Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!
2429
- ],
2430
- risk: mediumRisk,
2431
- },
2432
- {
2433
- ...ETHUSDCRe7Strategy,
2434
- name: "Ekubo WBTC/ETH",
2435
- description: <></>,
2436
- address: ContractAddr.from(
2437
- "0x1c9232b8186d9317652f05055615f18a120c2ad9e5ee96c39e031c257fb945b"
2825
+ createRe7Strategy(
2826
+ "ekubo_cl_wbtcusdc",
2827
+ "Ekubo WBTC/USDC.e",
2828
+ "0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1",
2829
+ 1506144,
2830
+ "WBTC",
2831
+ "USDC.e",
2832
+ "USDC.e",
2833
+ mediumRisk,
2834
+ true // isBTC
2438
2835
  ),
2439
- launchBlock: 1506145,
2440
- // must be same order as poolKey token0 and token1
2441
- depositTokens: [
2442
- Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
2443
- Global.getDefaultTokens().find((t) => t.symbol === "ETH")!
2444
- ],
2445
- risk: mediumRisk,
2446
- },
2447
- {
2448
- ...ETHUSDCRe7Strategy,
2449
- name: "Ekubo WBTC/STRK",
2450
- description: <></>,
2451
- address: ContractAddr.from(
2452
- "0x1248e385c23a929a015ec298a26560fa7745bbd6e41a886550e337b02714b1b"
2836
+ // createRe7Strategy(
2837
+ // "ekubo_cl_tbtcusdce",
2838
+ // "Ekubo tBTC/USDC.e",
2839
+ // "0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456",
2840
+ // 1501764,
2841
+ // "tBTC",
2842
+ // "USDC.e",
2843
+ // "USDC.e",
2844
+ // mediumRisk,
2845
+ // ),
2846
+ createRe7Strategy(
2847
+ "ekubo_cl_wbtceth",
2848
+ "Ekubo WBTC/ETH",
2849
+ "0x1c9232b8186d9317652f05055615f18a120c2ad9e5ee96c39e031c257fb945b",
2850
+ 1506145,
2851
+ "WBTC",
2852
+ "ETH",
2853
+ "USDC",
2854
+ mediumRisk,
2855
+ true // isBTC
2453
2856
  ),
2454
- launchBlock: 1506147,
2455
- // must be same order as poolKey token0 and token1
2456
- depositTokens: [
2457
- Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
2458
- Global.getDefaultTokens().find((t) => t.symbol === "STRK")!
2459
- ],
2460
- risk: highRisk,
2461
- },
2462
- {
2463
- ...ETHUSDCRe7Strategy,
2464
- name: "Ekubo USDC/USDT",
2465
- description: <></>,
2466
- address: ContractAddr.from(
2467
- "0x5203a08b471e46bf33990ac83aff577bbe5a5d789e61de2c6531e3c4773d1c9"
2857
+ createRe7Strategy(
2858
+ "ekubo_cl_wbtcstrk",
2859
+ "Ekubo WBTC/STRK",
2860
+ "0x1248e385c23a929a015ec298a26560fa7745bbd6e41a886550e337b02714b1b",
2861
+ 1506147,
2862
+ "WBTC",
2863
+ "STRK",
2864
+ "USDC",
2865
+ highRisk,
2866
+ true // isBTC
2468
2867
  ),
2469
- launchBlock: 3998018,
2470
- // must be same order as poolKey token0 and token1
2471
- depositTokens: [
2472
- Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2473
- Global.getDefaultTokens().find((t) => t.symbol === "USDT")!
2474
- ],
2475
- risk: {
2476
- riskFactor: _stableCoinPoolRiskFactors,
2477
- netRisk:
2478
- _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
2479
- _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
2480
- notARisks: getNoRiskTags(_stableCoinPoolRiskFactors),
2481
- },
2482
- additionalInfo: {
2483
- ...ETHUSDCRe7Strategy.additionalInfo,
2484
- quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2485
- }
2486
- },
2487
- {
2488
- ...ETHUSDCRe7Strategy,
2489
- name: "Ekubo ETH/USDC",
2490
- description: <></>,
2491
- address: ContractAddr.from(
2492
- "0x4d00c7423b3c0fae3640f6099ac97acbfd8708f099e09bfe3a7a6a680399228"
2868
+ createRe7Strategy(
2869
+ "ekubo_cl_usdc_v2usdt",
2870
+ "Ekubo USDC/USDT",
2871
+ "0x5203a08b471e46bf33990ac83aff577bbe5a5d789e61de2c6531e3c4773d1c9",
2872
+ 3998018,
2873
+ "USDC",
2874
+ "USDT",
2875
+ "USDC",
2876
+ stableCoinRisk,
2877
+ false // isBTC
2493
2878
  ),
2494
- launchBlock: 3998025,
2495
- // must be same order as poolKey token0 and token1
2496
- depositTokens: [
2497
- Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2498
- Global.getDefaultTokens().find((t) => t.symbol === "ETH")!,
2499
- ],
2500
- risk: highRisk,
2501
- additionalInfo: {
2502
- ...ETHUSDCRe7Strategy.additionalInfo,
2503
- quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2504
- }
2505
- },
2506
- {
2507
- ...ETHUSDCRe7Strategy,
2508
- name: "Ekubo STRK/USDC",
2509
- description: <></>,
2510
- address: ContractAddr.from(
2511
- "0x4de22bd0a8eb4d0a18736e66dd36d20ba50bc106346bbfac3dbeaac1ab37ce1"
2879
+ createRe7Strategy(
2880
+ "ekubo_cl_ethusdc_v2",
2881
+ "Ekubo ETH/USDC",
2882
+ "0x4d00c7423b3c0fae3640f6099ac97acbfd8708f099e09bfe3a7a6a680399228",
2883
+ 3998025,
2884
+ "USDC",
2885
+ "ETH",
2886
+ "USDC",
2887
+ highRisk,
2888
+ false // isBTC
2512
2889
  ),
2513
- launchBlock: 3998030,
2514
- // must be same order as poolKey token0 and token1
2515
- depositTokens: [
2516
- Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2517
- Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
2518
- ],
2519
- risk: highRisk,
2520
- additionalInfo: {
2521
- ...ETHUSDCRe7Strategy.additionalInfo,
2522
- quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2523
- }
2524
- },
2525
- {
2526
- ...ETHUSDCRe7Strategy,
2527
- name: "Ekubo WBTC/USDC",
2528
- description: <></>,
2529
- address: ContractAddr.from(
2530
- "0x76101c3b80af1103c9c6d541ca627f61b5ae7ae79d7fce96ccdf7bdb648450d"
2890
+ createRe7Strategy(
2891
+ "ekubo_cl_strkusdc_v2",
2892
+ "Ekubo STRK/USDC",
2893
+ "0x4de22bd0a8eb4d0a18736e66dd36d20ba50bc106346bbfac3dbeaac1ab37ce1",
2894
+ 3998030,
2895
+ "USDC",
2896
+ "STRK",
2897
+ "USDC",
2898
+ highRisk,
2899
+ false // isBTC
2531
2900
  ),
2532
- launchBlock: 3998034,
2533
- // must be same order as poolKey token0 and token1
2534
- depositTokens: [
2535
- Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2536
- Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
2537
- ],
2538
- risk: mediumRisk,
2539
- additionalInfo: {
2540
- ...ETHUSDCRe7Strategy.additionalInfo,
2541
- quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2542
- }
2543
- }
2901
+ createRe7Strategy(
2902
+ "ekubo_cl_wbtcusdc_v2",
2903
+ "Ekubo WBTC/USDC",
2904
+ "0x76101c3b80af1103c9c6d541ca627f61b5ae7ae79d7fce96ccdf7bdb648450d",
2905
+ 3998034,
2906
+ "USDC",
2907
+ "WBTC",
2908
+ "USDC",
2909
+ mediumRisk,
2910
+ true // isBTC
2911
+ )
2544
2912
  ];
2545
2913
 
2546
2914
  /**
@@ -2602,4 +2970,4 @@ EkuboCLVaultStrategies.forEach((s) => {
2602
2970
  "Monitor and Rebalance position to optimize yield",
2603
2971
  "Harvest and re-invest any rewards every week (Auto-compound)",
2604
2972
  ]
2605
- });
2973
+ });