@strkfarm/sdk 2.0.0-staging.31 → 2.0.0-staging.33

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.
@@ -90403,6 +90403,7 @@ spurious results.`);
90403
90403
  var AccessControlType = /* @__PURE__ */ ((AccessControlType2) => {
90404
90404
  AccessControlType2["MULTISIG_ACCOUNT"] = "Multisig Account";
90405
90405
  AccessControlType2["STANDARD_ACCOUNT"] = "Standard Account";
90406
+ AccessControlType2["ROLE_BASED_ACCESS"] = "Role Based Access";
90406
90407
  return AccessControlType2;
90407
90408
  })(AccessControlType || {});
90408
90409
  var InstantWithdrawalVault = /* @__PURE__ */ ((InstantWithdrawalVault2) => {
@@ -97726,11 +97727,11 @@ spurious results.`);
97726
97727
  };
97727
97728
 
97728
97729
  // src/strategies/constants.ts
97729
- var COMMON_CONTRACTS = [{
97730
+ var MY_ACCESS_CONTROL = {
97730
97731
  address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
97731
97732
  name: "Access Controller",
97732
97733
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
97733
- }];
97734
+ };
97734
97735
  var ENDPOINTS = {
97735
97736
  VESU_BASE: "https://proxy.api.troves.fi/vesu",
97736
97737
  VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
@@ -98515,7 +98516,7 @@ spurious results.`);
98515
98516
  contractLink: "https://github.com/trovesfi/troves-contracts"
98516
98517
  },
98517
98518
  accessControl: {
98518
- type: "Standard Account" /* STANDARD_ACCOUNT */,
98519
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
98519
98520
  addresses: [ContractAddr.from("0x0")],
98520
98521
  timeLock: "2 Days"
98521
98522
  }
@@ -98594,14 +98595,11 @@ spurious results.`);
98594
98595
  )
98595
98596
  ];
98596
98597
  VesuRebalanceStrategies.forEach((s) => {
98597
- s.contractDetails = [
98598
- {
98599
- address: s.address,
98600
- name: "Vault",
98601
- sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
98602
- },
98603
- ...COMMON_CONTRACTS
98604
- ];
98598
+ s.contractDetails = [{
98599
+ address: s.address,
98600
+ name: "Vault",
98601
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
98602
+ }];
98605
98603
  s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
98606
98604
  s.description = highlightTextWithLinks(
98607
98605
  _description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
@@ -105280,9 +105278,8 @@ spurious results.`);
105280
105278
  contractLink: "https://github.com/trovesfi/troves-contracts"
105281
105279
  },
105282
105280
  accessControl: {
105283
- type: "Standard Account" /* STANDARD_ACCOUNT */,
105284
- addresses: [ContractAddr.from("0x0")],
105285
- timeLock: "2 Days"
105281
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
105282
+ addresses: [MY_ACCESS_CONTROL.address]
105286
105283
  }
105287
105284
  },
105288
105285
  redemptionInfo: {
@@ -105458,7 +105455,14 @@ spurious results.`);
105458
105455
  (t) => t.symbol === quoteTokenSymbol
105459
105456
  ),
105460
105457
  alerts: getRe7Alerts(),
105461
- tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */]
105458
+ tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */],
105459
+ security: {
105460
+ ...xSTRKSTRK.security,
105461
+ accessControl: {
105462
+ ...xSTRKSTRK.security.accessControl,
105463
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")]
105464
+ }
105465
+ }
105462
105466
  });
105463
105467
  var getRe7FAQs = () => [
105464
105468
  ...faqs2,
@@ -115458,7 +115462,7 @@ spurious results.`);
115458
115462
  tokenInfo: this.metadata.depositTokens[0]
115459
115463
  };
115460
115464
  } catch (error2) {
115461
- console.error("Error fetching TVL:", error2);
115465
+ console.error(`[SDK] Error fetching TVL for ${this.metadata.id}:`, error2);
115462
115466
  return {
115463
115467
  usdValue: 0,
115464
115468
  amount: new Web3Number("0", this.metadata.depositTokens[0].decimals),
@@ -115791,7 +115795,7 @@ spurious results.`);
115791
115795
  contractLink: "https://github.com/trovesfi/troves-contracts"
115792
115796
  },
115793
115797
  accessControl: {
115794
- type: "Standard Account" /* STANDARD_ACCOUNT */,
115798
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
115795
115799
  addresses: [ContractAddr.from("0x0")],
115796
115800
  timeLock: "2 Days"
115797
115801
  }
@@ -116958,26 +116962,17 @@ Learn the core value averaging concept.`;
116958
116962
  `Deposit ${main} after start (${input.startDate}) and before expiry (${input.expiryDate}).`,
116959
116963
  `Each epoch (minimum ${formatDurationSeconds(input.minEpochDurationSeconds)}), troves swaps into ${secondary} based on the configured spending level.`,
116960
116964
  `Lower prices can trigger higher spend percentages (TVA behavior).`,
116961
- `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`
116965
+ `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`,
116966
+ `On expiry, entire ${main} token would have been swapped into ${secondary}, unless due to unfavourable market conditions.`
116962
116967
  ];
116963
116968
  return {
116964
- title: `${secondary} TVA (${input.expiryDate})`,
116969
+ title: `${secondary} YOLO (${input.expiryDate})`,
116965
116970
  description,
116966
116971
  vaultTypeDescription: vaultTypeDescription2,
116967
116972
  faqs: faqs3,
116968
116973
  investmentSteps: investmentSteps2
116969
116974
  };
116970
116975
  };
116971
- var getWeightedRisk = (riskFactors) => {
116972
- if (riskFactors.length === 0) {
116973
- return 0;
116974
- }
116975
- const totalWeight = riskFactors.reduce((acc, curr) => acc + curr.weight, 0);
116976
- if (totalWeight === 0) {
116977
- return 0;
116978
- }
116979
- return riskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / totalWeight;
116980
- };
116981
116976
  var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
116982
116977
  var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
116983
116978
  var btcYoloConfig = {
@@ -116999,26 +116994,7 @@ Learn the core value averaging concept.`;
116999
116994
  ]
117000
116995
  };
117001
116996
  var yoloCopy = getYoloVaultCopy(btcYoloConfig);
117002
- var yoloRiskFactors = [
117003
- {
117004
- type: "Market Risk" /* MARKET_RISK */,
117005
- value: 0 /* NO_RISK */,
117006
- weight: 0,
117007
- reason: "Given this strategy itself is like a swap (TVA), market risk is its nature and doesn't need to be considered separately."
117008
- },
117009
- {
117010
- type: "Technical Risk" /* TECHNICAL_RISK */,
117011
- value: 4 /* NEW_IMPLEMENTATION */,
117012
- weight: 25,
117013
- reason: "Execution quality depends on correct epoch operations and relayer discipline."
117014
- },
117015
- {
117016
- type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
117017
- value: 4 /* UNAUDITED */,
117018
- weight: 20,
117019
- reason: "Vault logic and dependencies can still have contract-level risks."
117020
- }
117021
- ];
116997
+ var yoloRiskFactors = [];
117022
116998
  var YoloVaultStrategies = [
117023
116999
  {
117024
117000
  id: btcYoloConfig.id,
@@ -117036,9 +117012,8 @@ Learn the core value averaging concept.`;
117036
117012
  contractLink: ""
117037
117013
  },
117038
117014
  accessControl: {
117039
- type: "Standard Account" /* STANDARD_ACCOUNT */,
117040
- addresses: [ContractAddr.from("0x46ba20c2db9c8032aa2e60a3c2487728756c93fb5ef552e00192827434b8b5f")],
117041
- timeLock: "7 Days"
117015
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
117016
+ addresses: [MY_ACCESS_CONTROL.address]
117042
117017
  }
117043
117018
  },
117044
117019
  redemptionInfo: {
@@ -117057,7 +117032,7 @@ Learn the core value averaging concept.`;
117057
117032
  protocols: [],
117058
117033
  risk: {
117059
117034
  riskFactor: yoloRiskFactors,
117060
- netRisk: getWeightedRisk(yoloRiskFactors),
117035
+ netRisk: 0,
117061
117036
  notARisks: getNoRiskTags(yoloRiskFactors)
117062
117037
  },
117063
117038
  additionalInfo: {
@@ -120475,8 +120450,7 @@ Learn the core value averaging concept.`;
120475
120450
  },
120476
120451
  accessControl: {
120477
120452
  type: "Standard Account" /* STANDARD_ACCOUNT */,
120478
- addresses: [ContractAddr.from("0x0")],
120479
- timeLock: "2 Days"
120453
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
120480
120454
  }
120481
120455
  };
120482
120456
  var EVERGREEN_REDEMPTION_INFO = {
@@ -122140,8 +122114,7 @@ Learn the core value averaging concept.`;
122140
122114
  },
122141
122115
  accessControl: {
122142
122116
  type: "Standard Account" /* STANDARD_ACCOUNT */,
122143
- addresses: [ContractAddr.from("0x0")],
122144
- timeLock: "2 Days"
122117
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
122145
122118
  }
122146
122119
  };
122147
122120
  var HYPER_LST_REDEMPTION_INFO = {
@@ -122290,6 +122263,14 @@ Learn the core value averaging concept.`;
122290
122263
  });
122291
122264
  });
122292
122265
  }
122266
+ if (YoloVaultStrategies && Array.isArray(YoloVaultStrategies)) {
122267
+ YoloVaultStrategies.forEach((metadata) => {
122268
+ registry.push({
122269
+ metadata,
122270
+ type: "yolo-vault" /* YOLO_VAULT */
122271
+ });
122272
+ });
122273
+ }
122293
122274
  return registry;
122294
122275
  }
122295
122276
  function getAllStrategyMetadata() {
@@ -122384,7 +122365,7 @@ Learn the core value averaging concept.`;
122384
122365
  }
122385
122366
  function getStrategyTypeFromMetadata(metadata) {
122386
122367
  const info = metadata.additionalInfo;
122387
- if (info && "mainToken" in info && "secondaryToken" in info && "maxUnitsSpendPerEpoch" in info && "feeBps" in info) {
122368
+ if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
122388
122369
  return "YOLO_VAULT" /* YOLO_VAULT */;
122389
122370
  }
122390
122371
  if (info && "borrowable_assets" in info && "underlyingToken" in info) {
@@ -3168,6 +3168,7 @@ var SourceCodeType = /* @__PURE__ */ ((SourceCodeType2) => {
3168
3168
  var AccessControlType = /* @__PURE__ */ ((AccessControlType2) => {
3169
3169
  AccessControlType2["MULTISIG_ACCOUNT"] = "Multisig Account";
3170
3170
  AccessControlType2["STANDARD_ACCOUNT"] = "Standard Account";
3171
+ AccessControlType2["ROLE_BASED_ACCESS"] = "Role Based Access";
3171
3172
  return AccessControlType2;
3172
3173
  })(AccessControlType || {});
3173
3174
  var InstantWithdrawalVault = /* @__PURE__ */ ((InstantWithdrawalVault2) => {
@@ -10497,11 +10498,11 @@ var vesu_pools_default = {
10497
10498
  };
10498
10499
 
10499
10500
  // src/strategies/constants.ts
10500
- var COMMON_CONTRACTS = [{
10501
+ var MY_ACCESS_CONTROL = {
10501
10502
  address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
10502
10503
  name: "Access Controller",
10503
10504
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
10504
- }];
10505
+ };
10505
10506
  var ENDPOINTS = {
10506
10507
  VESU_BASE: "https://proxy.api.troves.fi/vesu",
10507
10508
  VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
@@ -11286,7 +11287,7 @@ var VESU_SECURITY = {
11286
11287
  contractLink: "https://github.com/trovesfi/troves-contracts"
11287
11288
  },
11288
11289
  accessControl: {
11289
- type: "Standard Account" /* STANDARD_ACCOUNT */,
11290
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
11290
11291
  addresses: [ContractAddr.from("0x0")],
11291
11292
  timeLock: "2 Days"
11292
11293
  }
@@ -11365,14 +11366,11 @@ var VesuRebalanceStrategies = [
11365
11366
  )
11366
11367
  ];
11367
11368
  VesuRebalanceStrategies.forEach((s) => {
11368
- s.contractDetails = [
11369
- {
11370
- address: s.address,
11371
- name: "Vault",
11372
- sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
11373
- },
11374
- ...COMMON_CONTRACTS
11375
- ];
11369
+ s.contractDetails = [{
11370
+ address: s.address,
11371
+ name: "Vault",
11372
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
11373
+ }];
11376
11374
  s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
11377
11375
  s.description = highlightTextWithLinks(
11378
11376
  _description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
@@ -18062,9 +18060,8 @@ var xSTRKSTRK = {
18062
18060
  contractLink: "https://github.com/trovesfi/troves-contracts"
18063
18061
  },
18064
18062
  accessControl: {
18065
- type: "Standard Account" /* STANDARD_ACCOUNT */,
18066
- addresses: [ContractAddr.from("0x0")],
18067
- timeLock: "2 Days"
18063
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
18064
+ addresses: [MY_ACCESS_CONTROL.address]
18068
18065
  }
18069
18066
  },
18070
18067
  redemptionInfo: {
@@ -18240,7 +18237,14 @@ var createRe7Settings = (quoteTokenSymbol, isBTC, isDeprecated) => ({
18240
18237
  (t) => t.symbol === quoteTokenSymbol
18241
18238
  ),
18242
18239
  alerts: getRe7Alerts(),
18243
- tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */]
18240
+ tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */],
18241
+ security: {
18242
+ ...xSTRKSTRK.security,
18243
+ accessControl: {
18244
+ ...xSTRKSTRK.security.accessControl,
18245
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")]
18246
+ }
18247
+ }
18244
18248
  });
18245
18249
  var getRe7FAQs = () => [
18246
18250
  ...faqs2,
@@ -28247,7 +28251,7 @@ var SenseiVault = class _SenseiVault extends BaseStrategy {
28247
28251
  tokenInfo: this.metadata.depositTokens[0]
28248
28252
  };
28249
28253
  } catch (error) {
28250
- console.error("Error fetching TVL:", error);
28254
+ console.error(`[SDK] Error fetching TVL for ${this.metadata.id}:`, error);
28251
28255
  return {
28252
28256
  usdValue: 0,
28253
28257
  amount: new Web3Number("0", this.metadata.depositTokens[0].decimals),
@@ -28580,7 +28584,7 @@ var SenseiStrategies = [
28580
28584
  contractLink: "https://github.com/trovesfi/troves-contracts"
28581
28585
  },
28582
28586
  accessControl: {
28583
- type: "Standard Account" /* STANDARD_ACCOUNT */,
28587
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
28584
28588
  addresses: [ContractAddr.from("0x0")],
28585
28589
  timeLock: "2 Days"
28586
28590
  }
@@ -29751,26 +29755,17 @@ Learn the core value averaging concept.`;
29751
29755
  `Deposit ${main} after start (${input.startDate}) and before expiry (${input.expiryDate}).`,
29752
29756
  `Each epoch (minimum ${formatDurationSeconds(input.minEpochDurationSeconds)}), troves swaps into ${secondary} based on the configured spending level.`,
29753
29757
  `Lower prices can trigger higher spend percentages (TVA behavior).`,
29754
- `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`
29758
+ `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`,
29759
+ `On expiry, entire ${main} token would have been swapped into ${secondary}, unless due to unfavourable market conditions.`
29755
29760
  ];
29756
29761
  return {
29757
- title: `${secondary} TVA (${input.expiryDate})`,
29762
+ title: `${secondary} YOLO (${input.expiryDate})`,
29758
29763
  description,
29759
29764
  vaultTypeDescription: vaultTypeDescription2,
29760
29765
  faqs: faqs3,
29761
29766
  investmentSteps: investmentSteps2
29762
29767
  };
29763
29768
  };
29764
- var getWeightedRisk = (riskFactors) => {
29765
- if (riskFactors.length === 0) {
29766
- return 0;
29767
- }
29768
- const totalWeight = riskFactors.reduce((acc, curr) => acc + curr.weight, 0);
29769
- if (totalWeight === 0) {
29770
- return 0;
29771
- }
29772
- return riskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / totalWeight;
29773
- };
29774
29769
  var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
29775
29770
  var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
29776
29771
  var btcYoloConfig = {
@@ -29792,26 +29787,7 @@ var btcYoloConfig = {
29792
29787
  ]
29793
29788
  };
29794
29789
  var yoloCopy = getYoloVaultCopy(btcYoloConfig);
29795
- var yoloRiskFactors = [
29796
- {
29797
- type: "Market Risk" /* MARKET_RISK */,
29798
- value: 0 /* NO_RISK */,
29799
- weight: 0,
29800
- reason: "Given this strategy itself is like a swap (TVA), market risk is its nature and doesn't need to be considered separately."
29801
- },
29802
- {
29803
- type: "Technical Risk" /* TECHNICAL_RISK */,
29804
- value: 4 /* NEW_IMPLEMENTATION */,
29805
- weight: 25,
29806
- reason: "Execution quality depends on correct epoch operations and relayer discipline."
29807
- },
29808
- {
29809
- type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
29810
- value: 4 /* UNAUDITED */,
29811
- weight: 20,
29812
- reason: "Vault logic and dependencies can still have contract-level risks."
29813
- }
29814
- ];
29790
+ var yoloRiskFactors = [];
29815
29791
  var YoloVaultStrategies = [
29816
29792
  {
29817
29793
  id: btcYoloConfig.id,
@@ -29829,9 +29805,8 @@ var YoloVaultStrategies = [
29829
29805
  contractLink: ""
29830
29806
  },
29831
29807
  accessControl: {
29832
- type: "Standard Account" /* STANDARD_ACCOUNT */,
29833
- addresses: [ContractAddr.from("0x46ba20c2db9c8032aa2e60a3c2487728756c93fb5ef552e00192827434b8b5f")],
29834
- timeLock: "7 Days"
29808
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
29809
+ addresses: [MY_ACCESS_CONTROL.address]
29835
29810
  }
29836
29811
  },
29837
29812
  redemptionInfo: {
@@ -29850,7 +29825,7 @@ var YoloVaultStrategies = [
29850
29825
  protocols: [],
29851
29826
  risk: {
29852
29827
  riskFactor: yoloRiskFactors,
29853
- netRisk: getWeightedRisk(yoloRiskFactors),
29828
+ netRisk: 0,
29854
29829
  notARisks: getNoRiskTags(yoloRiskFactors)
29855
29830
  },
29856
29831
  additionalInfo: {
@@ -33272,8 +33247,7 @@ var EVERGREEN_SECURITY = {
33272
33247
  },
33273
33248
  accessControl: {
33274
33249
  type: "Standard Account" /* STANDARD_ACCOUNT */,
33275
- addresses: [ContractAddr.from("0x0")],
33276
- timeLock: "2 Days"
33250
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
33277
33251
  }
33278
33252
  };
33279
33253
  var EVERGREEN_REDEMPTION_INFO = {
@@ -34940,8 +34914,7 @@ var HYPER_LST_SECURITY = {
34940
34914
  },
34941
34915
  accessControl: {
34942
34916
  type: "Standard Account" /* STANDARD_ACCOUNT */,
34943
- addresses: [ContractAddr.from("0x0")],
34944
- timeLock: "2 Days"
34917
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
34945
34918
  }
34946
34919
  };
34947
34920
  var HYPER_LST_REDEMPTION_INFO = {
@@ -35090,6 +35063,14 @@ function buildStrategyRegistry() {
35090
35063
  });
35091
35064
  });
35092
35065
  }
35066
+ if (YoloVaultStrategies && Array.isArray(YoloVaultStrategies)) {
35067
+ YoloVaultStrategies.forEach((metadata) => {
35068
+ registry.push({
35069
+ metadata,
35070
+ type: "yolo-vault" /* YOLO_VAULT */
35071
+ });
35072
+ });
35073
+ }
35093
35074
  return registry;
35094
35075
  }
35095
35076
  function getAllStrategyMetadata() {
@@ -35184,7 +35165,7 @@ function createSenseiStrategy(config, pricer, metadata) {
35184
35165
  }
35185
35166
  function getStrategyTypeFromMetadata(metadata) {
35186
35167
  const info = metadata.additionalInfo;
35187
- if (info && "mainToken" in info && "secondaryToken" in info && "maxUnitsSpendPerEpoch" in info && "feeBps" in info) {
35168
+ if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
35188
35169
  return "YOLO_VAULT" /* YOLO_VAULT */;
35189
35170
  }
35190
35171
  if (info && "borrowable_assets" in info && "underlyingToken" in info) {
package/dist/index.d.ts CHANGED
@@ -148,7 +148,8 @@ declare enum SourceCodeType {
148
148
  }
149
149
  declare enum AccessControlType {
150
150
  MULTISIG_ACCOUNT = "Multisig Account",
151
- STANDARD_ACCOUNT = "Standard Account"
151
+ STANDARD_ACCOUNT = "Standard Account",
152
+ ROLE_BASED_ACCESS = "Role Based Access"
152
153
  }
153
154
  declare enum InstantWithdrawalVault {
154
155
  YES = "Yes",
@@ -161,7 +162,7 @@ interface SourceCodeInfo {
161
162
  interface AccessControlInfo {
162
163
  type: AccessControlType;
163
164
  addresses: ContractAddr[];
164
- timeLock: string;
165
+ timeLock?: string;
165
166
  }
166
167
  interface SecurityMetadata {
167
168
  auditStatus: AuditStatus;
package/dist/index.js CHANGED
@@ -3210,6 +3210,7 @@ var SourceCodeType = /* @__PURE__ */ ((SourceCodeType2) => {
3210
3210
  var AccessControlType = /* @__PURE__ */ ((AccessControlType2) => {
3211
3211
  AccessControlType2["MULTISIG_ACCOUNT"] = "Multisig Account";
3212
3212
  AccessControlType2["STANDARD_ACCOUNT"] = "Standard Account";
3213
+ AccessControlType2["ROLE_BASED_ACCESS"] = "Role Based Access";
3213
3214
  return AccessControlType2;
3214
3215
  })(AccessControlType || {});
3215
3216
  var InstantWithdrawalVault = /* @__PURE__ */ ((InstantWithdrawalVault2) => {
@@ -10539,11 +10540,11 @@ var vesu_pools_default = {
10539
10540
  };
10540
10541
 
10541
10542
  // src/strategies/constants.ts
10542
- var COMMON_CONTRACTS = [{
10543
+ var MY_ACCESS_CONTROL = {
10543
10544
  address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
10544
10545
  name: "Access Controller",
10545
10546
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
10546
- }];
10547
+ };
10547
10548
  var ENDPOINTS = {
10548
10549
  VESU_BASE: "https://proxy.api.troves.fi/vesu",
10549
10550
  VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
@@ -11328,7 +11329,7 @@ var VESU_SECURITY = {
11328
11329
  contractLink: "https://github.com/trovesfi/troves-contracts"
11329
11330
  },
11330
11331
  accessControl: {
11331
- type: "Standard Account" /* STANDARD_ACCOUNT */,
11332
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
11332
11333
  addresses: [ContractAddr.from("0x0")],
11333
11334
  timeLock: "2 Days"
11334
11335
  }
@@ -11407,14 +11408,11 @@ var VesuRebalanceStrategies = [
11407
11408
  )
11408
11409
  ];
11409
11410
  VesuRebalanceStrategies.forEach((s) => {
11410
- s.contractDetails = [
11411
- {
11412
- address: s.address,
11413
- name: "Vault",
11414
- sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
11415
- },
11416
- ...COMMON_CONTRACTS
11417
- ];
11411
+ s.contractDetails = [{
11412
+ address: s.address,
11413
+ name: "Vault",
11414
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
11415
+ }];
11418
11416
  s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
11419
11417
  s.description = highlightTextWithLinks(
11420
11418
  _description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
@@ -18100,9 +18098,8 @@ var xSTRKSTRK = {
18100
18098
  contractLink: "https://github.com/trovesfi/troves-contracts"
18101
18099
  },
18102
18100
  accessControl: {
18103
- type: "Standard Account" /* STANDARD_ACCOUNT */,
18104
- addresses: [ContractAddr.from("0x0")],
18105
- timeLock: "2 Days"
18101
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
18102
+ addresses: [MY_ACCESS_CONTROL.address]
18106
18103
  }
18107
18104
  },
18108
18105
  redemptionInfo: {
@@ -18278,7 +18275,14 @@ var createRe7Settings = (quoteTokenSymbol, isBTC, isDeprecated) => ({
18278
18275
  (t) => t.symbol === quoteTokenSymbol
18279
18276
  ),
18280
18277
  alerts: getRe7Alerts(),
18281
- tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */]
18278
+ tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */],
18279
+ security: {
18280
+ ...xSTRKSTRK.security,
18281
+ accessControl: {
18282
+ ...xSTRKSTRK.security.accessControl,
18283
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")]
18284
+ }
18285
+ }
18282
18286
  });
18283
18287
  var getRe7FAQs = () => [
18284
18288
  ...faqs2,
@@ -28386,7 +28390,7 @@ var SenseiVault = class _SenseiVault extends BaseStrategy {
28386
28390
  tokenInfo: this.metadata.depositTokens[0]
28387
28391
  };
28388
28392
  } catch (error) {
28389
- console.error("Error fetching TVL:", error);
28393
+ console.error(`[SDK] Error fetching TVL for ${this.metadata.id}:`, error);
28390
28394
  return {
28391
28395
  usdValue: 0,
28392
28396
  amount: new Web3Number("0", this.metadata.depositTokens[0].decimals),
@@ -28719,7 +28723,7 @@ var SenseiStrategies = [
28719
28723
  contractLink: "https://github.com/trovesfi/troves-contracts"
28720
28724
  },
28721
28725
  accessControl: {
28722
- type: "Standard Account" /* STANDARD_ACCOUNT */,
28726
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
28723
28727
  addresses: [ContractAddr.from("0x0")],
28724
28728
  timeLock: "2 Days"
28725
28729
  }
@@ -29890,26 +29894,17 @@ Learn the core value averaging concept.`;
29890
29894
  `Deposit ${main} after start (${input.startDate}) and before expiry (${input.expiryDate}).`,
29891
29895
  `Each epoch (minimum ${formatDurationSeconds(input.minEpochDurationSeconds)}), troves swaps into ${secondary} based on the configured spending level.`,
29892
29896
  `Lower prices can trigger higher spend percentages (TVA behavior).`,
29893
- `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`
29897
+ `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`,
29898
+ `On expiry, entire ${main} token would have been swapped into ${secondary}, unless due to unfavourable market conditions.`
29894
29899
  ];
29895
29900
  return {
29896
- title: `${secondary} TVA (${input.expiryDate})`,
29901
+ title: `${secondary} YOLO (${input.expiryDate})`,
29897
29902
  description,
29898
29903
  vaultTypeDescription: vaultTypeDescription2,
29899
29904
  faqs: faqs3,
29900
29905
  investmentSteps: investmentSteps2
29901
29906
  };
29902
29907
  };
29903
- var getWeightedRisk = (riskFactors) => {
29904
- if (riskFactors.length === 0) {
29905
- return 0;
29906
- }
29907
- const totalWeight = riskFactors.reduce((acc, curr) => acc + curr.weight, 0);
29908
- if (totalWeight === 0) {
29909
- return 0;
29910
- }
29911
- return riskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / totalWeight;
29912
- };
29913
29908
  var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
29914
29909
  var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
29915
29910
  var btcYoloConfig = {
@@ -29931,26 +29926,7 @@ var btcYoloConfig = {
29931
29926
  ]
29932
29927
  };
29933
29928
  var yoloCopy = getYoloVaultCopy(btcYoloConfig);
29934
- var yoloRiskFactors = [
29935
- {
29936
- type: "Market Risk" /* MARKET_RISK */,
29937
- value: 0 /* NO_RISK */,
29938
- weight: 0,
29939
- reason: "Given this strategy itself is like a swap (TVA), market risk is its nature and doesn't need to be considered separately."
29940
- },
29941
- {
29942
- type: "Technical Risk" /* TECHNICAL_RISK */,
29943
- value: 4 /* NEW_IMPLEMENTATION */,
29944
- weight: 25,
29945
- reason: "Execution quality depends on correct epoch operations and relayer discipline."
29946
- },
29947
- {
29948
- type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
29949
- value: 4 /* UNAUDITED */,
29950
- weight: 20,
29951
- reason: "Vault logic and dependencies can still have contract-level risks."
29952
- }
29953
- ];
29929
+ var yoloRiskFactors = [];
29954
29930
  var YoloVaultStrategies = [
29955
29931
  {
29956
29932
  id: btcYoloConfig.id,
@@ -29968,9 +29944,8 @@ var YoloVaultStrategies = [
29968
29944
  contractLink: ""
29969
29945
  },
29970
29946
  accessControl: {
29971
- type: "Standard Account" /* STANDARD_ACCOUNT */,
29972
- addresses: [ContractAddr.from("0x46ba20c2db9c8032aa2e60a3c2487728756c93fb5ef552e00192827434b8b5f")],
29973
- timeLock: "7 Days"
29947
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
29948
+ addresses: [MY_ACCESS_CONTROL.address]
29974
29949
  }
29975
29950
  },
29976
29951
  redemptionInfo: {
@@ -29989,7 +29964,7 @@ var YoloVaultStrategies = [
29989
29964
  protocols: [],
29990
29965
  risk: {
29991
29966
  riskFactor: yoloRiskFactors,
29992
- netRisk: getWeightedRisk(yoloRiskFactors),
29967
+ netRisk: 0,
29993
29968
  notARisks: getNoRiskTags(yoloRiskFactors)
29994
29969
  },
29995
29970
  additionalInfo: {
@@ -33411,8 +33386,7 @@ var EVERGREEN_SECURITY = {
33411
33386
  },
33412
33387
  accessControl: {
33413
33388
  type: "Standard Account" /* STANDARD_ACCOUNT */,
33414
- addresses: [ContractAddr.from("0x0")],
33415
- timeLock: "2 Days"
33389
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
33416
33390
  }
33417
33391
  };
33418
33392
  var EVERGREEN_REDEMPTION_INFO = {
@@ -35079,8 +35053,7 @@ var HYPER_LST_SECURITY = {
35079
35053
  },
35080
35054
  accessControl: {
35081
35055
  type: "Standard Account" /* STANDARD_ACCOUNT */,
35082
- addresses: [ContractAddr.from("0x0")],
35083
- timeLock: "2 Days"
35056
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
35084
35057
  }
35085
35058
  };
35086
35059
  var HYPER_LST_REDEMPTION_INFO = {
@@ -35229,6 +35202,14 @@ function buildStrategyRegistry() {
35229
35202
  });
35230
35203
  });
35231
35204
  }
35205
+ if (YoloVaultStrategies && Array.isArray(YoloVaultStrategies)) {
35206
+ YoloVaultStrategies.forEach((metadata) => {
35207
+ registry.push({
35208
+ metadata,
35209
+ type: "yolo-vault" /* YOLO_VAULT */
35210
+ });
35211
+ });
35212
+ }
35232
35213
  return registry;
35233
35214
  }
35234
35215
  function getAllStrategyMetadata() {
@@ -35323,7 +35304,7 @@ function createSenseiStrategy(config, pricer, metadata) {
35323
35304
  }
35324
35305
  function getStrategyTypeFromMetadata(metadata) {
35325
35306
  const info = metadata.additionalInfo;
35326
- if (info && "mainToken" in info && "secondaryToken" in info && "maxUnitsSpendPerEpoch" in info && "feeBps" in info) {
35307
+ if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
35327
35308
  return "YOLO_VAULT" /* YOLO_VAULT */;
35328
35309
  }
35329
35310
  if (info && "borrowable_assets" in info && "underlyingToken" in info) {
package/dist/index.mjs CHANGED
@@ -3072,6 +3072,7 @@ var SourceCodeType = /* @__PURE__ */ ((SourceCodeType2) => {
3072
3072
  var AccessControlType = /* @__PURE__ */ ((AccessControlType2) => {
3073
3073
  AccessControlType2["MULTISIG_ACCOUNT"] = "Multisig Account";
3074
3074
  AccessControlType2["STANDARD_ACCOUNT"] = "Standard Account";
3075
+ AccessControlType2["ROLE_BASED_ACCESS"] = "Role Based Access";
3075
3076
  return AccessControlType2;
3076
3077
  })(AccessControlType || {});
3077
3078
  var InstantWithdrawalVault = /* @__PURE__ */ ((InstantWithdrawalVault2) => {
@@ -10401,11 +10402,11 @@ var vesu_pools_default = {
10401
10402
  };
10402
10403
 
10403
10404
  // src/strategies/constants.ts
10404
- var COMMON_CONTRACTS = [{
10405
+ var MY_ACCESS_CONTROL = {
10405
10406
  address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
10406
10407
  name: "Access Controller",
10407
10408
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
10408
- }];
10409
+ };
10409
10410
  var ENDPOINTS = {
10410
10411
  VESU_BASE: "https://proxy.api.troves.fi/vesu",
10411
10412
  VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
@@ -11190,7 +11191,7 @@ var VESU_SECURITY = {
11190
11191
  contractLink: "https://github.com/trovesfi/troves-contracts"
11191
11192
  },
11192
11193
  accessControl: {
11193
- type: "Standard Account" /* STANDARD_ACCOUNT */,
11194
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
11194
11195
  addresses: [ContractAddr.from("0x0")],
11195
11196
  timeLock: "2 Days"
11196
11197
  }
@@ -11269,14 +11270,11 @@ var VesuRebalanceStrategies = [
11269
11270
  )
11270
11271
  ];
11271
11272
  VesuRebalanceStrategies.forEach((s) => {
11272
- s.contractDetails = [
11273
- {
11274
- address: s.address,
11275
- name: "Vault",
11276
- sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
11277
- },
11278
- ...COMMON_CONTRACTS
11279
- ];
11273
+ s.contractDetails = [{
11274
+ address: s.address,
11275
+ name: "Vault",
11276
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
11277
+ }];
11280
11278
  s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
11281
11279
  s.description = highlightTextWithLinks(
11282
11280
  _description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
@@ -17966,9 +17964,8 @@ var xSTRKSTRK = {
17966
17964
  contractLink: "https://github.com/trovesfi/troves-contracts"
17967
17965
  },
17968
17966
  accessControl: {
17969
- type: "Standard Account" /* STANDARD_ACCOUNT */,
17970
- addresses: [ContractAddr.from("0x0")],
17971
- timeLock: "2 Days"
17967
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
17968
+ addresses: [MY_ACCESS_CONTROL.address]
17972
17969
  }
17973
17970
  },
17974
17971
  redemptionInfo: {
@@ -18144,7 +18141,14 @@ var createRe7Settings = (quoteTokenSymbol, isBTC, isDeprecated) => ({
18144
18141
  (t) => t.symbol === quoteTokenSymbol
18145
18142
  ),
18146
18143
  alerts: getRe7Alerts(),
18147
- tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */]
18144
+ tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */],
18145
+ security: {
18146
+ ...xSTRKSTRK.security,
18147
+ accessControl: {
18148
+ ...xSTRKSTRK.security.accessControl,
18149
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")]
18150
+ }
18151
+ }
18148
18152
  });
18149
18153
  var getRe7FAQs = () => [
18150
18154
  ...faqs2,
@@ -28252,7 +28256,7 @@ var SenseiVault = class _SenseiVault extends BaseStrategy {
28252
28256
  tokenInfo: this.metadata.depositTokens[0]
28253
28257
  };
28254
28258
  } catch (error) {
28255
- console.error("Error fetching TVL:", error);
28259
+ console.error(`[SDK] Error fetching TVL for ${this.metadata.id}:`, error);
28256
28260
  return {
28257
28261
  usdValue: 0,
28258
28262
  amount: new Web3Number("0", this.metadata.depositTokens[0].decimals),
@@ -28585,7 +28589,7 @@ var SenseiStrategies = [
28585
28589
  contractLink: "https://github.com/trovesfi/troves-contracts"
28586
28590
  },
28587
28591
  accessControl: {
28588
- type: "Standard Account" /* STANDARD_ACCOUNT */,
28592
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
28589
28593
  addresses: [ContractAddr.from("0x0")],
28590
28594
  timeLock: "2 Days"
28591
28595
  }
@@ -29756,26 +29760,17 @@ Learn the core value averaging concept.`;
29756
29760
  `Deposit ${main} after start (${input.startDate}) and before expiry (${input.expiryDate}).`,
29757
29761
  `Each epoch (minimum ${formatDurationSeconds(input.minEpochDurationSeconds)}), troves swaps into ${secondary} based on the configured spending level.`,
29758
29762
  `Lower prices can trigger higher spend percentages (TVA behavior).`,
29759
- `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`
29763
+ `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`,
29764
+ `On expiry, entire ${main} token would have been swapped into ${secondary}, unless due to unfavourable market conditions.`
29760
29765
  ];
29761
29766
  return {
29762
- title: `${secondary} TVA (${input.expiryDate})`,
29767
+ title: `${secondary} YOLO (${input.expiryDate})`,
29763
29768
  description,
29764
29769
  vaultTypeDescription: vaultTypeDescription2,
29765
29770
  faqs: faqs3,
29766
29771
  investmentSteps: investmentSteps2
29767
29772
  };
29768
29773
  };
29769
- var getWeightedRisk = (riskFactors) => {
29770
- if (riskFactors.length === 0) {
29771
- return 0;
29772
- }
29773
- const totalWeight = riskFactors.reduce((acc, curr) => acc + curr.weight, 0);
29774
- if (totalWeight === 0) {
29775
- return 0;
29776
- }
29777
- return riskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / totalWeight;
29778
- };
29779
29774
  var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
29780
29775
  var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
29781
29776
  var btcYoloConfig = {
@@ -29797,26 +29792,7 @@ var btcYoloConfig = {
29797
29792
  ]
29798
29793
  };
29799
29794
  var yoloCopy = getYoloVaultCopy(btcYoloConfig);
29800
- var yoloRiskFactors = [
29801
- {
29802
- type: "Market Risk" /* MARKET_RISK */,
29803
- value: 0 /* NO_RISK */,
29804
- weight: 0,
29805
- reason: "Given this strategy itself is like a swap (TVA), market risk is its nature and doesn't need to be considered separately."
29806
- },
29807
- {
29808
- type: "Technical Risk" /* TECHNICAL_RISK */,
29809
- value: 4 /* NEW_IMPLEMENTATION */,
29810
- weight: 25,
29811
- reason: "Execution quality depends on correct epoch operations and relayer discipline."
29812
- },
29813
- {
29814
- type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
29815
- value: 4 /* UNAUDITED */,
29816
- weight: 20,
29817
- reason: "Vault logic and dependencies can still have contract-level risks."
29818
- }
29819
- ];
29795
+ var yoloRiskFactors = [];
29820
29796
  var YoloVaultStrategies = [
29821
29797
  {
29822
29798
  id: btcYoloConfig.id,
@@ -29834,9 +29810,8 @@ var YoloVaultStrategies = [
29834
29810
  contractLink: ""
29835
29811
  },
29836
29812
  accessControl: {
29837
- type: "Standard Account" /* STANDARD_ACCOUNT */,
29838
- addresses: [ContractAddr.from("0x46ba20c2db9c8032aa2e60a3c2487728756c93fb5ef552e00192827434b8b5f")],
29839
- timeLock: "7 Days"
29813
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
29814
+ addresses: [MY_ACCESS_CONTROL.address]
29840
29815
  }
29841
29816
  },
29842
29817
  redemptionInfo: {
@@ -29855,7 +29830,7 @@ var YoloVaultStrategies = [
29855
29830
  protocols: [],
29856
29831
  risk: {
29857
29832
  riskFactor: yoloRiskFactors,
29858
- netRisk: getWeightedRisk(yoloRiskFactors),
29833
+ netRisk: 0,
29859
29834
  notARisks: getNoRiskTags(yoloRiskFactors)
29860
29835
  },
29861
29836
  additionalInfo: {
@@ -33277,8 +33252,7 @@ var EVERGREEN_SECURITY = {
33277
33252
  },
33278
33253
  accessControl: {
33279
33254
  type: "Standard Account" /* STANDARD_ACCOUNT */,
33280
- addresses: [ContractAddr.from("0x0")],
33281
- timeLock: "2 Days"
33255
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
33282
33256
  }
33283
33257
  };
33284
33258
  var EVERGREEN_REDEMPTION_INFO = {
@@ -34945,8 +34919,7 @@ var HYPER_LST_SECURITY = {
34945
34919
  },
34946
34920
  accessControl: {
34947
34921
  type: "Standard Account" /* STANDARD_ACCOUNT */,
34948
- addresses: [ContractAddr.from("0x0")],
34949
- timeLock: "2 Days"
34922
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
34950
34923
  }
34951
34924
  };
34952
34925
  var HYPER_LST_REDEMPTION_INFO = {
@@ -35095,6 +35068,14 @@ function buildStrategyRegistry() {
35095
35068
  });
35096
35069
  });
35097
35070
  }
35071
+ if (YoloVaultStrategies && Array.isArray(YoloVaultStrategies)) {
35072
+ YoloVaultStrategies.forEach((metadata) => {
35073
+ registry.push({
35074
+ metadata,
35075
+ type: "yolo-vault" /* YOLO_VAULT */
35076
+ });
35077
+ });
35078
+ }
35098
35079
  return registry;
35099
35080
  }
35100
35081
  function getAllStrategyMetadata() {
@@ -35189,7 +35170,7 @@ function createSenseiStrategy(config, pricer, metadata) {
35189
35170
  }
35190
35171
  function getStrategyTypeFromMetadata(metadata) {
35191
35172
  const info = metadata.additionalInfo;
35192
- if (info && "mainToken" in info && "secondaryToken" in info && "maxUnitsSpendPerEpoch" in info && "feeBps" in info) {
35173
+ if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
35193
35174
  return "YOLO_VAULT" /* YOLO_VAULT */;
35194
35175
  }
35195
35176
  if (info && "borrowable_assets" in info && "underlyingToken" in info) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strkfarm/sdk",
3
- "version": "2.0.0-staging.31",
3
+ "version": "2.0.0-staging.33",
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",
@@ -84,6 +84,7 @@ export enum SourceCodeType {
84
84
  export enum AccessControlType {
85
85
  MULTISIG_ACCOUNT = "Multisig Account",
86
86
  STANDARD_ACCOUNT = "Standard Account",
87
+ ROLE_BASED_ACCESS = "Role Based Access",
87
88
  }
88
89
 
89
90
  export enum InstantWithdrawalVault {
@@ -100,7 +101,7 @@ export interface SourceCodeInfo {
100
101
  export interface AccessControlInfo {
101
102
  type: AccessControlType;
102
103
  addresses: ContractAddr[];
103
- timeLock: string;
104
+ timeLock?: string;
104
105
  }
105
106
 
106
107
  export interface SecurityMetadata {
@@ -1,10 +1,10 @@
1
1
  import { ContractAddr } from "@/dataTypes";
2
2
 
3
- export const COMMON_CONTRACTS = [{
3
+ export const MY_ACCESS_CONTROL = {
4
4
  address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
5
5
  name: "Access Controller",
6
6
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo",
7
- }];
7
+ };
8
8
 
9
9
  export const ENDPOINTS = {
10
10
  VESU_BASE: "https://proxy.api.troves.fi/vesu",
@@ -42,12 +42,12 @@ import { DualTokenInfo } from "./base-strategy";
42
42
  import { log } from "winston";
43
43
  import { EkuboHarvests, HarvestInfo } from "@/modules/harvests";
44
44
  import { logger } from "@/utils/logger";
45
- import { COMMON_CONTRACTS } from "./constants";
46
45
  import { DepegRiskLevel, ImpermanentLossLevel, MarketRiskLevel, SmartContractRiskLevel } from "@/interfaces/risks";
47
46
  import { from, gql } from "@apollo/client";
48
47
  import apolloClient from "@/modules/apollo-client";
49
48
  import { binarySearch } from "@/utils/math-utils";
50
49
  import { Quote } from "@avnu/avnu-sdk";
50
+ import { MY_ACCESS_CONTROL } from "./constants";
51
51
 
52
52
  export interface EkuboPoolKey {
53
53
  token0: ContractAddr;
@@ -2445,9 +2445,8 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2445
2445
  contractLink: "https://github.com/trovesfi/troves-contracts",
2446
2446
  },
2447
2447
  accessControl: {
2448
- type: AccessControlType.STANDARD_ACCOUNT,
2449
- addresses: [ContractAddr.from("0x0")],
2450
- timeLock: "2 Days",
2448
+ type: AccessControlType.ROLE_BASED_ACCESS,
2449
+ addresses: [MY_ACCESS_CONTROL.address],
2451
2450
  },
2452
2451
  },
2453
2452
  redemptionInfo: {
@@ -2662,6 +2661,13 @@ const createRe7Settings = (quoteTokenSymbol: string, isBTC: boolean, isDeprecate
2662
2661
  )!,
2663
2662
  alerts: getRe7Alerts(),
2664
2663
  tags: isBTC ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP] as StrategyTag[],
2664
+ security: {
2665
+ ...xSTRKSTRK.security,
2666
+ accessControl: {
2667
+ ...xSTRKSTRK.security.accessControl,
2668
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")],
2669
+ },
2670
+ },
2665
2671
  });
2666
2672
 
2667
2673
  // Helper to create Re7 FAQs
@@ -78,7 +78,7 @@ export function getStrategyTypeFromMetadata(
78
78
  ): FactoryStrategyType {
79
79
  const info = metadata.additionalInfo;
80
80
 
81
- if (info && "mainToken" in info && "secondaryToken" in info && "maxUnitsSpendPerEpoch" in info && "feeBps" in info) {
81
+ if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
82
82
  return FactoryStrategyType.YOLO_VAULT;
83
83
  }
84
84
 
@@ -10,6 +10,7 @@ import {
10
10
  import { UniversalStrategies } from "./universal-strategy";
11
11
  import { VesuRebalanceStrategies } from "./vesu-rebalance";
12
12
  import { SenseiStrategies } from "./sensei";
13
+ import { YoloVaultStrategies } from "./yoloVault";
13
14
 
14
15
  /**
15
16
  * Filter option definition
@@ -144,6 +145,16 @@ export function buildStrategyRegistry(): StrategyRegistryEntry[] {
144
145
  });
145
146
  }
146
147
 
148
+ // Register Yolo Vault strategies
149
+ if (YoloVaultStrategies && Array.isArray(YoloVaultStrategies)) {
150
+ YoloVaultStrategies.forEach((metadata) => {
151
+ registry.push({
152
+ metadata: metadata as any,
153
+ type: StrategyType.YOLO_VAULT,
154
+ });
155
+ });
156
+ }
157
+
147
158
  return registry;
148
159
  }
149
160
 
@@ -94,7 +94,7 @@ export class SenseiVault extends BaseStrategy<
94
94
  tokenInfo: this.metadata.depositTokens[0],
95
95
  };
96
96
  } catch (error) {
97
- console.error('Error fetching TVL:', error);
97
+ console.error(`[SDK] Error fetching TVL for ${this.metadata.id}:`, error);
98
98
  return {
99
99
  usdValue: 0,
100
100
  amount: new Web3Number('0', this.metadata.depositTokens[0].decimals),
@@ -647,7 +647,7 @@ export const SenseiStrategies: IStrategyMetadata<SenseiVaultSettings>[] =
647
647
  contractLink: "https://github.com/trovesfi/troves-contracts",
648
648
  },
649
649
  accessControl: {
650
- type: AccessControlType.STANDARD_ACCOUNT,
650
+ type: AccessControlType.ROLE_BASED_ACCESS,
651
651
  addresses: [ContractAddr.from("0x0")],
652
652
  timeLock: "2 Days",
653
653
  },
@@ -2044,8 +2044,7 @@ const HYPER_LST_SECURITY = {
2044
2044
  },
2045
2045
  accessControl: {
2046
2046
  type: AccessControlType.STANDARD_ACCOUNT,
2047
- addresses: [ContractAddr.from("0x0")],
2048
- timeLock: "2 Days",
2047
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")],
2049
2048
  },
2050
2049
  };
2051
2050
 
@@ -1285,8 +1285,7 @@ const EVERGREEN_SECURITY = {
1285
1285
  },
1286
1286
  accessControl: {
1287
1287
  type: AccessControlType.STANDARD_ACCOUNT,
1288
- addresses: [ContractAddr.from("0x0")],
1289
- timeLock: "2 Days",
1288
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")],
1290
1289
  },
1291
1290
  };
1292
1291
 
@@ -35,7 +35,7 @@ import {
35
35
  import { getAPIUsingHeadlessBrowser } from "@/node/headless";
36
36
  import { HarvestInfo, VesuHarvests } from "@/modules/harvests";
37
37
  import VesuPoolIDs from "@/data/vesu_pools.json";
38
- import { COMMON_CONTRACTS, ENDPOINTS } from "./constants";
38
+ import { ENDPOINTS } from "./constants";
39
39
 
40
40
  interface PoolProps {
41
41
  pool_id: ContractAddr;
@@ -1093,7 +1093,7 @@ const VESU_SECURITY = {
1093
1093
  contractLink: "https://github.com/trovesfi/troves-contracts",
1094
1094
  },
1095
1095
  accessControl: {
1096
- type: AccessControlType.STANDARD_ACCOUNT,
1096
+ type: AccessControlType.ROLE_BASED_ACCESS,
1097
1097
  addresses: [ContractAddr.from("0x0")],
1098
1098
  timeLock: "2 Days",
1099
1099
  },
@@ -1190,8 +1190,7 @@ VesuRebalanceStrategies.forEach((s) => {
1190
1190
  address: s.address,
1191
1191
  name: "Vault",
1192
1192
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
1193
- },
1194
- ...COMMON_CONTRACTS];
1193
+ }];
1195
1194
  // set docs link
1196
1195
  s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults"
1197
1196
 
@@ -7,7 +7,6 @@ import {
7
7
  InstantWithdrawalVault,
8
8
  IStrategyMetadata,
9
9
  RiskFactor,
10
- RiskType,
11
10
  SourceCodeType,
12
11
  StrategyLiveStatus,
13
12
  TokenInfo,
@@ -28,12 +27,7 @@ import { Call, Contract } from "starknet";
28
27
  import YoloVaultAbi from "@/data/yoloVault.abi.json";
29
28
  import { Global } from "@/global";
30
29
  import { ERC20 } from "@/modules";
31
- import {
32
- CounterpartyRiskLevel,
33
- MarketRiskLevel,
34
- SmartContractRiskLevel,
35
- TechnicalRiskLevel,
36
- } from "@/interfaces/risks";
30
+ import { MY_ACCESS_CONTROL } from "./constants";
37
31
 
38
32
  export interface YoloVaultSettings {
39
33
  startDate: string;
@@ -514,10 +508,11 @@ const getYoloVaultCopy = (input: YoloVaultSettings) => {
514
508
  `Each epoch (minimum ${formatDurationSeconds(input.minEpochDurationSeconds)}), troves swaps into ${secondary} based on the configured spending level.`,
515
509
  `Lower prices can trigger higher spend percentages (TVA behavior).`,
516
510
  `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`,
511
+ `On expiry, entire ${main} token would have been swapped into ${secondary}, unless due to unfavourable market conditions.`
517
512
  ];
518
513
 
519
514
  return {
520
- title: `${secondary} TVA (${input.expiryDate})`,
515
+ title: `${secondary} YOLO (${input.expiryDate})`,
521
516
  description,
522
517
  vaultTypeDescription,
523
518
  faqs,
@@ -525,20 +520,6 @@ const getYoloVaultCopy = (input: YoloVaultSettings) => {
525
520
  };
526
521
  };
527
522
 
528
- const getWeightedRisk = (riskFactors: RiskFactor[]): number => {
529
- if (riskFactors.length === 0) {
530
- return 0;
531
- }
532
- const totalWeight = riskFactors.reduce((acc, curr) => acc + curr.weight, 0);
533
- if (totalWeight === 0) {
534
- return 0;
535
- }
536
- return (
537
- riskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
538
- totalWeight
539
- );
540
- };
541
-
542
523
  const usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC")!;
543
524
  const wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!;
544
525
 
@@ -563,28 +544,9 @@ const btcYoloConfig: YoloVaultStrategyConfig = {
563
544
 
564
545
  const yoloCopy = getYoloVaultCopy(btcYoloConfig);
565
546
 
566
- const yoloRiskFactors: RiskFactor[] = [
567
- {
568
- type: RiskType.MARKET_RISK,
569
- value: MarketRiskLevel.NO_RISK,
570
- weight: 0,
571
- reason:
572
- "Given this strategy itself is like a swap (TVA), market risk is its nature and doesn't need to be considered separately.",
573
- },
574
- {
575
- type: RiskType.TECHNICAL_RISK,
576
- value: TechnicalRiskLevel.NEW_IMPLEMENTATION,
577
- weight: 25,
578
- reason:
579
- "Execution quality depends on correct epoch operations and relayer discipline.",
580
- },
581
- {
582
- type: RiskType.SMART_CONTRACT_RISK,
583
- value: SmartContractRiskLevel.UNAUDITED,
584
- weight: 20,
585
- reason: "Vault logic and dependencies can still have contract-level risks.",
586
- },
587
- ];
547
+ // Risk factors intentionally left unrated for this strategy for now.
548
+ // const yoloRiskFactors: RiskFactor[] = [ ... ];
549
+ const yoloRiskFactors: RiskFactor[] = [];
588
550
 
589
551
  export const YoloVaultStrategies: IStrategyMetadata<YoloVaultSettings>[] = [
590
552
  {
@@ -603,9 +565,8 @@ export const YoloVaultStrategies: IStrategyMetadata<YoloVaultSettings>[] = [
603
565
  contractLink: "",
604
566
  },
605
567
  accessControl: {
606
- type: AccessControlType.STANDARD_ACCOUNT,
607
- addresses: [ContractAddr.from("0x46ba20c2db9c8032aa2e60a3c2487728756c93fb5ef552e00192827434b8b5f")],
608
- timeLock: "7 Days",
568
+ type: AccessControlType.ROLE_BASED_ACCESS,
569
+ addresses: [MY_ACCESS_CONTROL.address],
609
570
  },
610
571
  },
611
572
  redemptionInfo: {
@@ -624,7 +585,7 @@ export const YoloVaultStrategies: IStrategyMetadata<YoloVaultSettings>[] = [
624
585
  protocols: [],
625
586
  risk: {
626
587
  riskFactor: yoloRiskFactors,
627
- netRisk: getWeightedRisk(yoloRiskFactors),
588
+ netRisk: 0,
628
589
  notARisks: getNoRiskTags(yoloRiskFactors),
629
590
  },
630
591
  additionalInfo: {