@strkfarm/sdk 2.0.0-staging.67 → 2.0.0-staging.69

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.
@@ -17820,7 +17820,7 @@ ${r2}}` : "}", l2;
17820
17820
  toHexString: () => toHexString2,
17821
17821
  toStorageKey: () => toStorageKey2
17822
17822
  });
17823
- var import_utils149 = require_utils2();
17823
+ var import_utils150 = require_utils2();
17824
17824
  var import_sha2567 = require_sha256();
17825
17825
  var isUndefined3 = (value) => {
17826
17826
  return typeof value === "undefined" || value === void 0;
@@ -17913,7 +17913,7 @@ ${r2}}` : "}", l2;
17913
17913
  if (adaptedValue.length % 2 !== 0) {
17914
17914
  adaptedValue = `0${adaptedValue}`;
17915
17915
  }
17916
- return (0, import_utils149.hexToBytes)(adaptedValue);
17916
+ return (0, import_utils150.hexToBytes)(adaptedValue);
17917
17917
  }
17918
17918
  function addPercent2(number22, percent) {
17919
17919
  const bigIntNum = BigInt(number22);
@@ -104338,8 +104338,14 @@ spurious results.`);
104338
104338
  const P1 = await this.pricer.getPrice(token1Info.symbol);
104339
104339
  const token0Usd = Number(amount0.toFixed(13)) * P0.price;
104340
104340
  const token1Usd = Number(amount1.toFixed(13)) * P1.price;
104341
+ const totalUsdValue = token0Usd + token1Usd;
104342
+ if (totalUsdValue === 0 || token0Usd === 0 || token1Usd === 0 || amount0.eq(0) || amount1.eq(0)) {
104343
+ logger2.warn(
104344
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${totalUsdValue}, amount0=${amount0.toString()}, amount1=${amount1.toString()}, token0Price=${P0.price}, token1Price=${P1.price}, token0Usd=${token0Usd}, token1Usd=${token1Usd}`
104345
+ );
104346
+ }
104341
104347
  return {
104342
- usdValue: token0Usd + token1Usd,
104348
+ usdValue: totalUsdValue,
104343
104349
  token0: {
104344
104350
  tokenInfo: token0Info,
104345
104351
  amount: amount0,
@@ -105668,8 +105674,8 @@ spurious results.`);
105668
105674
  createLSTStrategy({
105669
105675
  id: "ekubo_cl_xstrkbtcstrkbtc",
105670
105676
  name: "Ekubo xstrkBTC/strkBTC",
105671
- address: "0x04509e03352db8bdf329ca44aa38c043da38021d716c4ff474ed46e8707df668",
105672
- launchBlock: 9579283,
105677
+ address: "0x03d1d1932ef6882d4acf763dd0430f4abed3e2a9da28e028f1e2e8dd934b8bf7",
105678
+ launchBlock: 9651140,
105673
105679
  depositToken0Symbol: "xstrkBTC",
105674
105680
  depositToken1Symbol: "strkBTC",
105675
105681
  quoteTokenSymbol: "strkBTC",
@@ -105987,7 +105993,7 @@ spurious results.`);
105987
105993
  "ekubo_cl_strkbtcusdc",
105988
105994
  "Ekubo strkBTC/USDC",
105989
105995
  "0x02dfe5af1665a7adf549008161c818eb18dcf89fc9518ab812294f2b691b2845",
105990
- 9579283,
105996
+ 9650986,
105991
105997
  "USDC",
105992
105998
  "strkBTC",
105993
105999
  "USDC",
@@ -105999,7 +106005,7 @@ spurious results.`);
105999
106005
  "ekubo_cl_strkbtcstrk",
106000
106006
  "Ekubo strkBTC/STRK",
106001
106007
  "0x04784e62a4847484528ba65f500b37a9347e88632e90d866e213f2c2651be828",
106002
- 9579283,
106008
+ 9650592,
106003
106009
  "STRK",
106004
106010
  "strkBTC",
106005
106011
  "USDC",
@@ -106011,7 +106017,7 @@ spurious results.`);
106011
106017
  "ekubo_cl_strkbtceth",
106012
106018
  "Ekubo strkBTC/ETH",
106013
106019
  "0x07118ecd7dece83462b0ac8302c682fb17c7e18b0be13d81867c5bf3f80933ef",
106014
- 9579283,
106020
+ 9650986,
106015
106021
  "ETH",
106016
106022
  "strkBTC",
106017
106023
  "USDC",
@@ -106024,7 +106030,7 @@ spurious results.`);
106024
106030
  "ekubo_cl_wbtcstrkbtc",
106025
106031
  "Ekubo WBTC/strkBTC",
106026
106032
  "0x07e927222730899442b2438bfd6218ff8ac44bd7a3420646fca359b8392e42c1",
106027
- 9579283,
106033
+ 9650986,
106028
106034
  "WBTC",
106029
106035
  "strkBTC",
106030
106036
  "strkBTC",
@@ -116447,8 +116453,14 @@ spurious results.`);
116447
116453
  secondaryTokenAmount.toFixed(sDec),
116448
116454
  sDec
116449
116455
  ).multipliedBy(secondaryTokenPrice.price);
116456
+ const totalUsdValue = primaryTokenUsd.plus(secondaryTokenUsd).toNumber();
116457
+ if (totalUsdValue === 0 || primaryTokenAmount.eq(0) || secondaryTokenAmount.eq(0)) {
116458
+ logger2.warn(
116459
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${totalUsdValue}, primaryTokenAmount=${primaryTokenAmount.toString()}, secondaryTokenAmount=${secondaryTokenAmount.toString()}, primaryTokenPrice=${primaryTokenPrice.price}, secondaryTokenPrice=${secondaryTokenPrice.price}, primaryTokenUsd=${primaryTokenUsd.toNumber()}, secondaryTokenUsd=${secondaryTokenUsd.toNumber()}`
116460
+ );
116461
+ }
116450
116462
  return {
116451
- usdValue: primaryTokenUsd.plus(secondaryTokenUsd).toNumber(),
116463
+ usdValue: totalUsdValue,
116452
116464
  token0: {
116453
116465
  tokenInfo: displayPrimary,
116454
116466
  amount: primaryTokenAmount,
@@ -119797,6 +119809,11 @@ spurious results.`);
119797
119809
  this.metadata.depositTokens[0].symbol
119798
119810
  );
119799
119811
  const usdValue = Number(amount.toFixed(6)) * price.price;
119812
+ if (usdValue === 0 || amount.eq(0)) {
119813
+ logger2.warn(
119814
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${usdValue}, amount=${amount.toString()}, price=${price.price}`
119815
+ );
119816
+ }
119800
119817
  return {
119801
119818
  tokenInfo: this.asset(),
119802
119819
  amount,
@@ -16927,8 +16927,14 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
16927
16927
  const P1 = await this.pricer.getPrice(token1Info.symbol);
16928
16928
  const token0Usd = Number(amount0.toFixed(13)) * P0.price;
16929
16929
  const token1Usd = Number(amount1.toFixed(13)) * P1.price;
16930
+ const totalUsdValue = token0Usd + token1Usd;
16931
+ if (totalUsdValue === 0 || token0Usd === 0 || token1Usd === 0 || amount0.eq(0) || amount1.eq(0)) {
16932
+ logger.warn(
16933
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${totalUsdValue}, amount0=${amount0.toString()}, amount1=${amount1.toString()}, token0Price=${P0.price}, token1Price=${P1.price}, token0Usd=${token0Usd}, token1Usd=${token1Usd}`
16934
+ );
16935
+ }
16930
16936
  return {
16931
- usdValue: token0Usd + token1Usd,
16937
+ usdValue: totalUsdValue,
16932
16938
  token0: {
16933
16939
  tokenInfo: token0Info,
16934
16940
  amount: amount0,
@@ -18257,8 +18263,8 @@ var lstStrategies = [
18257
18263
  createLSTStrategy({
18258
18264
  id: "ekubo_cl_xstrkbtcstrkbtc",
18259
18265
  name: "Ekubo xstrkBTC/strkBTC",
18260
- address: "0x04509e03352db8bdf329ca44aa38c043da38021d716c4ff474ed46e8707df668",
18261
- launchBlock: 9579283,
18266
+ address: "0x03d1d1932ef6882d4acf763dd0430f4abed3e2a9da28e028f1e2e8dd934b8bf7",
18267
+ launchBlock: 9651140,
18262
18268
  depositToken0Symbol: "xstrkBTC",
18263
18269
  depositToken1Symbol: "strkBTC",
18264
18270
  quoteTokenSymbol: "strkBTC",
@@ -18576,7 +18582,7 @@ var RE7Strategies = [
18576
18582
  "ekubo_cl_strkbtcusdc",
18577
18583
  "Ekubo strkBTC/USDC",
18578
18584
  "0x02dfe5af1665a7adf549008161c818eb18dcf89fc9518ab812294f2b691b2845",
18579
- 9579283,
18585
+ 9650986,
18580
18586
  "USDC",
18581
18587
  "strkBTC",
18582
18588
  "USDC",
@@ -18588,7 +18594,7 @@ var RE7Strategies = [
18588
18594
  "ekubo_cl_strkbtcstrk",
18589
18595
  "Ekubo strkBTC/STRK",
18590
18596
  "0x04784e62a4847484528ba65f500b37a9347e88632e90d866e213f2c2651be828",
18591
- 9579283,
18597
+ 9650592,
18592
18598
  "STRK",
18593
18599
  "strkBTC",
18594
18600
  "USDC",
@@ -18600,7 +18606,7 @@ var RE7Strategies = [
18600
18606
  "ekubo_cl_strkbtceth",
18601
18607
  "Ekubo strkBTC/ETH",
18602
18608
  "0x07118ecd7dece83462b0ac8302c682fb17c7e18b0be13d81867c5bf3f80933ef",
18603
- 9579283,
18609
+ 9650986,
18604
18610
  "ETH",
18605
18611
  "strkBTC",
18606
18612
  "USDC",
@@ -18613,7 +18619,7 @@ var RE7Strategies = [
18613
18619
  "ekubo_cl_wbtcstrkbtc",
18614
18620
  "Ekubo WBTC/strkBTC",
18615
18621
  "0x07e927222730899442b2438bfd6218ff8ac44bd7a3420646fca359b8392e42c1",
18616
- 9579283,
18622
+ 9650986,
18617
18623
  "WBTC",
18618
18624
  "strkBTC",
18619
18625
  "strkBTC",
@@ -29045,8 +29051,14 @@ var YoLoVault = class extends BaseStrategy {
29045
29051
  secondaryTokenAmount.toFixed(sDec),
29046
29052
  sDec
29047
29053
  ).multipliedBy(secondaryTokenPrice.price);
29054
+ const totalUsdValue = primaryTokenUsd.plus(secondaryTokenUsd).toNumber();
29055
+ if (totalUsdValue === 0 || primaryTokenAmount.eq(0) || secondaryTokenAmount.eq(0)) {
29056
+ logger.warn(
29057
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${totalUsdValue}, primaryTokenAmount=${primaryTokenAmount.toString()}, secondaryTokenAmount=${secondaryTokenAmount.toString()}, primaryTokenPrice=${primaryTokenPrice.price}, secondaryTokenPrice=${secondaryTokenPrice.price}, primaryTokenUsd=${primaryTokenUsd.toNumber()}, secondaryTokenUsd=${secondaryTokenUsd.toNumber()}`
29058
+ );
29059
+ }
29048
29060
  return {
29049
- usdValue: primaryTokenUsd.plus(secondaryTokenUsd).toNumber(),
29061
+ usdValue: totalUsdValue,
29050
29062
  token0: {
29051
29063
  tokenInfo: displayPrimary,
29052
29064
  amount: primaryTokenAmount,
@@ -32399,6 +32411,11 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
32399
32411
  this.metadata.depositTokens[0].symbol
32400
32412
  );
32401
32413
  const usdValue = Number(amount.toFixed(6)) * price.price;
32414
+ if (usdValue === 0 || amount.eq(0)) {
32415
+ logger.warn(
32416
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${usdValue}, amount=${amount.toString()}, price=${price.price}`
32417
+ );
32418
+ }
32402
32419
  return {
32403
32420
  tokenInfo: this.asset(),
32404
32421
  amount,
package/dist/index.js CHANGED
@@ -16967,8 +16967,14 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
16967
16967
  const P1 = await this.pricer.getPrice(token1Info.symbol);
16968
16968
  const token0Usd = Number(amount0.toFixed(13)) * P0.price;
16969
16969
  const token1Usd = Number(amount1.toFixed(13)) * P1.price;
16970
+ const totalUsdValue = token0Usd + token1Usd;
16971
+ if (totalUsdValue === 0 || token0Usd === 0 || token1Usd === 0 || amount0.eq(0) || amount1.eq(0)) {
16972
+ logger.warn(
16973
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${totalUsdValue}, amount0=${amount0.toString()}, amount1=${amount1.toString()}, token0Price=${P0.price}, token1Price=${P1.price}, token0Usd=${token0Usd}, token1Usd=${token1Usd}`
16974
+ );
16975
+ }
16970
16976
  return {
16971
- usdValue: token0Usd + token1Usd,
16977
+ usdValue: totalUsdValue,
16972
16978
  token0: {
16973
16979
  tokenInfo: token0Info,
16974
16980
  amount: amount0,
@@ -18297,8 +18303,8 @@ var lstStrategies = [
18297
18303
  createLSTStrategy({
18298
18304
  id: "ekubo_cl_xstrkbtcstrkbtc",
18299
18305
  name: "Ekubo xstrkBTC/strkBTC",
18300
- address: "0x04509e03352db8bdf329ca44aa38c043da38021d716c4ff474ed46e8707df668",
18301
- launchBlock: 9579283,
18306
+ address: "0x03d1d1932ef6882d4acf763dd0430f4abed3e2a9da28e028f1e2e8dd934b8bf7",
18307
+ launchBlock: 9651140,
18302
18308
  depositToken0Symbol: "xstrkBTC",
18303
18309
  depositToken1Symbol: "strkBTC",
18304
18310
  quoteTokenSymbol: "strkBTC",
@@ -18616,7 +18622,7 @@ var RE7Strategies = [
18616
18622
  "ekubo_cl_strkbtcusdc",
18617
18623
  "Ekubo strkBTC/USDC",
18618
18624
  "0x02dfe5af1665a7adf549008161c818eb18dcf89fc9518ab812294f2b691b2845",
18619
- 9579283,
18625
+ 9650986,
18620
18626
  "USDC",
18621
18627
  "strkBTC",
18622
18628
  "USDC",
@@ -18628,7 +18634,7 @@ var RE7Strategies = [
18628
18634
  "ekubo_cl_strkbtcstrk",
18629
18635
  "Ekubo strkBTC/STRK",
18630
18636
  "0x04784e62a4847484528ba65f500b37a9347e88632e90d866e213f2c2651be828",
18631
- 9579283,
18637
+ 9650592,
18632
18638
  "STRK",
18633
18639
  "strkBTC",
18634
18640
  "USDC",
@@ -18640,7 +18646,7 @@ var RE7Strategies = [
18640
18646
  "ekubo_cl_strkbtceth",
18641
18647
  "Ekubo strkBTC/ETH",
18642
18648
  "0x07118ecd7dece83462b0ac8302c682fb17c7e18b0be13d81867c5bf3f80933ef",
18643
- 9579283,
18649
+ 9650986,
18644
18650
  "ETH",
18645
18651
  "strkBTC",
18646
18652
  "USDC",
@@ -18653,7 +18659,7 @@ var RE7Strategies = [
18653
18659
  "ekubo_cl_wbtcstrkbtc",
18654
18660
  "Ekubo WBTC/strkBTC",
18655
18661
  "0x07e927222730899442b2438bfd6218ff8ac44bd7a3420646fca359b8392e42c1",
18656
- 9579283,
18662
+ 9650986,
18657
18663
  "WBTC",
18658
18664
  "strkBTC",
18659
18665
  "strkBTC",
@@ -29186,8 +29192,14 @@ var YoLoVault = class extends BaseStrategy {
29186
29192
  secondaryTokenAmount.toFixed(sDec),
29187
29193
  sDec
29188
29194
  ).multipliedBy(secondaryTokenPrice.price);
29195
+ const totalUsdValue = primaryTokenUsd.plus(secondaryTokenUsd).toNumber();
29196
+ if (totalUsdValue === 0 || primaryTokenAmount.eq(0) || secondaryTokenAmount.eq(0)) {
29197
+ logger.warn(
29198
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${totalUsdValue}, primaryTokenAmount=${primaryTokenAmount.toString()}, secondaryTokenAmount=${secondaryTokenAmount.toString()}, primaryTokenPrice=${primaryTokenPrice.price}, secondaryTokenPrice=${secondaryTokenPrice.price}, primaryTokenUsd=${primaryTokenUsd.toNumber()}, secondaryTokenUsd=${secondaryTokenUsd.toNumber()}`
29199
+ );
29200
+ }
29189
29201
  return {
29190
- usdValue: primaryTokenUsd.plus(secondaryTokenUsd).toNumber(),
29202
+ usdValue: totalUsdValue,
29191
29203
  token0: {
29192
29204
  tokenInfo: displayPrimary,
29193
29205
  amount: primaryTokenAmount,
@@ -32540,6 +32552,11 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
32540
32552
  this.metadata.depositTokens[0].symbol
32541
32553
  );
32542
32554
  const usdValue = Number(amount.toFixed(6)) * price.price;
32555
+ if (usdValue === 0 || amount.eq(0)) {
32556
+ logger.warn(
32557
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${usdValue}, amount=${amount.toString()}, price=${price.price}`
32558
+ );
32559
+ }
32543
32560
  return {
32544
32561
  tokenInfo: this.asset(),
32545
32562
  amount,
package/dist/index.mjs CHANGED
@@ -16831,8 +16831,14 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
16831
16831
  const P1 = await this.pricer.getPrice(token1Info.symbol);
16832
16832
  const token0Usd = Number(amount0.toFixed(13)) * P0.price;
16833
16833
  const token1Usd = Number(amount1.toFixed(13)) * P1.price;
16834
+ const totalUsdValue = token0Usd + token1Usd;
16835
+ if (totalUsdValue === 0 || token0Usd === 0 || token1Usd === 0 || amount0.eq(0) || amount1.eq(0)) {
16836
+ logger.warn(
16837
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${totalUsdValue}, amount0=${amount0.toString()}, amount1=${amount1.toString()}, token0Price=${P0.price}, token1Price=${P1.price}, token0Usd=${token0Usd}, token1Usd=${token1Usd}`
16838
+ );
16839
+ }
16834
16840
  return {
16835
- usdValue: token0Usd + token1Usd,
16841
+ usdValue: totalUsdValue,
16836
16842
  token0: {
16837
16843
  tokenInfo: token0Info,
16838
16844
  amount: amount0,
@@ -18161,8 +18167,8 @@ var lstStrategies = [
18161
18167
  createLSTStrategy({
18162
18168
  id: "ekubo_cl_xstrkbtcstrkbtc",
18163
18169
  name: "Ekubo xstrkBTC/strkBTC",
18164
- address: "0x04509e03352db8bdf329ca44aa38c043da38021d716c4ff474ed46e8707df668",
18165
- launchBlock: 9579283,
18170
+ address: "0x03d1d1932ef6882d4acf763dd0430f4abed3e2a9da28e028f1e2e8dd934b8bf7",
18171
+ launchBlock: 9651140,
18166
18172
  depositToken0Symbol: "xstrkBTC",
18167
18173
  depositToken1Symbol: "strkBTC",
18168
18174
  quoteTokenSymbol: "strkBTC",
@@ -18480,7 +18486,7 @@ var RE7Strategies = [
18480
18486
  "ekubo_cl_strkbtcusdc",
18481
18487
  "Ekubo strkBTC/USDC",
18482
18488
  "0x02dfe5af1665a7adf549008161c818eb18dcf89fc9518ab812294f2b691b2845",
18483
- 9579283,
18489
+ 9650986,
18484
18490
  "USDC",
18485
18491
  "strkBTC",
18486
18492
  "USDC",
@@ -18492,7 +18498,7 @@ var RE7Strategies = [
18492
18498
  "ekubo_cl_strkbtcstrk",
18493
18499
  "Ekubo strkBTC/STRK",
18494
18500
  "0x04784e62a4847484528ba65f500b37a9347e88632e90d866e213f2c2651be828",
18495
- 9579283,
18501
+ 9650592,
18496
18502
  "STRK",
18497
18503
  "strkBTC",
18498
18504
  "USDC",
@@ -18504,7 +18510,7 @@ var RE7Strategies = [
18504
18510
  "ekubo_cl_strkbtceth",
18505
18511
  "Ekubo strkBTC/ETH",
18506
18512
  "0x07118ecd7dece83462b0ac8302c682fb17c7e18b0be13d81867c5bf3f80933ef",
18507
- 9579283,
18513
+ 9650986,
18508
18514
  "ETH",
18509
18515
  "strkBTC",
18510
18516
  "USDC",
@@ -18517,7 +18523,7 @@ var RE7Strategies = [
18517
18523
  "ekubo_cl_wbtcstrkbtc",
18518
18524
  "Ekubo WBTC/strkBTC",
18519
18525
  "0x07e927222730899442b2438bfd6218ff8ac44bd7a3420646fca359b8392e42c1",
18520
- 9579283,
18526
+ 9650986,
18521
18527
  "WBTC",
18522
18528
  "strkBTC",
18523
18529
  "strkBTC",
@@ -29050,8 +29056,14 @@ var YoLoVault = class extends BaseStrategy {
29050
29056
  secondaryTokenAmount.toFixed(sDec),
29051
29057
  sDec
29052
29058
  ).multipliedBy(secondaryTokenPrice.price);
29059
+ const totalUsdValue = primaryTokenUsd.plus(secondaryTokenUsd).toNumber();
29060
+ if (totalUsdValue === 0 || primaryTokenAmount.eq(0) || secondaryTokenAmount.eq(0)) {
29061
+ logger.warn(
29062
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${totalUsdValue}, primaryTokenAmount=${primaryTokenAmount.toString()}, secondaryTokenAmount=${secondaryTokenAmount.toString()}, primaryTokenPrice=${primaryTokenPrice.price}, secondaryTokenPrice=${secondaryTokenPrice.price}, primaryTokenUsd=${primaryTokenUsd.toNumber()}, secondaryTokenUsd=${secondaryTokenUsd.toNumber()}`
29063
+ );
29064
+ }
29053
29065
  return {
29054
- usdValue: primaryTokenUsd.plus(secondaryTokenUsd).toNumber(),
29066
+ usdValue: totalUsdValue,
29055
29067
  token0: {
29056
29068
  tokenInfo: displayPrimary,
29057
29069
  amount: primaryTokenAmount,
@@ -32404,6 +32416,11 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
32404
32416
  this.metadata.depositTokens[0].symbol
32405
32417
  );
32406
32418
  const usdValue = Number(amount.toFixed(6)) * price.price;
32419
+ if (usdValue === 0 || amount.eq(0)) {
32420
+ logger.warn(
32421
+ `${this.metadata.name}:getTVL - Zero value detected: usdValue=${usdValue}, amount=${amount.toString()}, price=${price.price}`
32422
+ );
32423
+ }
32407
32424
  return {
32408
32425
  tokenInfo: this.asset(),
32409
32426
  amount,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strkfarm/sdk",
3
- "version": "2.0.0-staging.67",
3
+ "version": "2.0.0-staging.69",
4
4
  "description": "STRKFarm TS SDK (Meant for our internal use, but feel free to use it)",
5
5
  "typings": "dist/index.d.ts",
6
6
  "types": "dist/index.d.ts",
@@ -872,8 +872,23 @@ export class EkuboCLVault extends BaseStrategy<
872
872
  const P1 = await this.pricer.getPrice(token1Info.symbol);
873
873
  const token0Usd = Number(amount0.toFixed(13)) * P0.price;
874
874
  const token1Usd = Number(amount1.toFixed(13)) * P1.price;
875
+ const totalUsdValue = token0Usd + token1Usd;
876
+
877
+ if (totalUsdValue === 0 || token0Usd === 0 || token1Usd === 0 || amount0.eq(0) || amount1.eq(0)) {
878
+ logger.warn(
879
+ `${this.metadata.name}:getTVL - Zero value detected: ` +
880
+ `usdValue=${totalUsdValue}, ` +
881
+ `amount0=${amount0.toString()}, ` +
882
+ `amount1=${amount1.toString()}, ` +
883
+ `token0Price=${P0.price}, ` +
884
+ `token1Price=${P1.price}, ` +
885
+ `token0Usd=${token0Usd}, ` +
886
+ `token1Usd=${token1Usd}`
887
+ );
888
+ }
889
+
875
890
  return {
876
- usdValue: token0Usd + token1Usd,
891
+ usdValue: totalUsdValue,
877
892
  token0: {
878
893
  tokenInfo: token0Info,
879
894
  amount: amount0,
@@ -2630,8 +2645,8 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2630
2645
  createLSTStrategy({
2631
2646
  id: "ekubo_cl_xstrkbtcstrkbtc",
2632
2647
  name: "Ekubo xstrkBTC/strkBTC",
2633
- address: "0x04509e03352db8bdf329ca44aa38c043da38021d716c4ff474ed46e8707df668",
2634
- launchBlock: 9579283,
2648
+ address: "0x03d1d1932ef6882d4acf763dd0430f4abed3e2a9da28e028f1e2e8dd934b8bf7",
2649
+ launchBlock: 9651140,
2635
2650
  depositToken0Symbol: "xstrkBTC",
2636
2651
  depositToken1Symbol: "strkBTC",
2637
2652
  quoteTokenSymbol: "strkBTC",
@@ -2983,7 +2998,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2983
2998
  "ekubo_cl_strkbtcusdc",
2984
2999
  "Ekubo strkBTC/USDC",
2985
3000
  "0x02dfe5af1665a7adf549008161c818eb18dcf89fc9518ab812294f2b691b2845",
2986
- 9579283,
3001
+ 9650986,
2987
3002
  "USDC",
2988
3003
  "strkBTC",
2989
3004
  "USDC",
@@ -2994,7 +3009,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2994
3009
  "ekubo_cl_strkbtcstrk",
2995
3010
  "Ekubo strkBTC/STRK",
2996
3011
  "0x04784e62a4847484528ba65f500b37a9347e88632e90d866e213f2c2651be828",
2997
- 9579283,
3012
+ 9650592,
2998
3013
  "STRK",
2999
3014
  "strkBTC",
3000
3015
  "USDC",
@@ -3005,7 +3020,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
3005
3020
  "ekubo_cl_strkbtceth",
3006
3021
  "Ekubo strkBTC/ETH",
3007
3022
  "0x07118ecd7dece83462b0ac8302c682fb17c7e18b0be13d81867c5bf3f80933ef",
3008
- 9579283,
3023
+ 9650986,
3009
3024
  "ETH",
3010
3025
  "strkBTC",
3011
3026
  "USDC",
@@ -3017,7 +3032,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
3017
3032
  "ekubo_cl_wbtcstrkbtc",
3018
3033
  "Ekubo WBTC/strkBTC",
3019
3034
  "0x07e927222730899442b2438bfd6218ff8ac44bd7a3420646fca359b8392e42c1",
3020
- 9579283,
3035
+ 9650986,
3021
3036
  "WBTC",
3022
3037
  "strkBTC",
3023
3038
  "strkBTC",
@@ -468,6 +468,16 @@ export class UniversalStrategy<
468
468
  this.metadata.depositTokens[0].symbol
469
469
  );
470
470
  const usdValue = Number(amount.toFixed(6)) * price.price;
471
+
472
+ if (usdValue === 0 || amount.eq(0)) {
473
+ logger.warn(
474
+ `${this.metadata.name}:getTVL - Zero value detected: ` +
475
+ `usdValue=${usdValue}, ` +
476
+ `amount=${amount.toString()}, ` +
477
+ `price=${price.price}`
478
+ );
479
+ }
480
+
471
481
  return {
472
482
  tokenInfo: this.asset(),
473
483
  amount,
@@ -461,8 +461,23 @@ export class YoLoVault extends BaseStrategy<DualTokenInfo, SingleActionAmount, D
461
461
  sDec,
462
462
  ).multipliedBy(secondaryTokenPrice.price);
463
463
 
464
+ const totalUsdValue = primaryTokenUsd.plus(secondaryTokenUsd).toNumber();
465
+
466
+ if (totalUsdValue === 0 || primaryTokenAmount.eq(0) || secondaryTokenAmount.eq(0)) {
467
+ logger.warn(
468
+ `${this.metadata.name}:getTVL - Zero value detected: ` +
469
+ `usdValue=${totalUsdValue}, ` +
470
+ `primaryTokenAmount=${primaryTokenAmount.toString()}, ` +
471
+ `secondaryTokenAmount=${secondaryTokenAmount.toString()}, ` +
472
+ `primaryTokenPrice=${primaryTokenPrice.price}, ` +
473
+ `secondaryTokenPrice=${secondaryTokenPrice.price}, ` +
474
+ `primaryTokenUsd=${primaryTokenUsd.toNumber()}, ` +
475
+ `secondaryTokenUsd=${secondaryTokenUsd.toNumber()}`
476
+ );
477
+ }
478
+
464
479
  return {
465
- usdValue: primaryTokenUsd.plus(secondaryTokenUsd).toNumber(),
480
+ usdValue: totalUsdValue,
466
481
  token0: {
467
482
  tokenInfo: displayPrimary,
468
483
  amount: primaryTokenAmount,
@@ -1060,4 +1075,4 @@ export const YoloVaultStrategies: IStrategyMetadata<YoloVaultSettings>[] = yoloV
1060
1075
  "APY history is hidden because this is a TVA accumulation vault, not a yield-bearing APY strategy.",
1061
1076
  },
1062
1077
  }
1063
- });
1078
+ });