@strkfarm/sdk 2.0.0-staging.32 → 2.0.0-staging.34

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) => {
@@ -92095,10 +92096,18 @@ spurious results.`);
92095
92096
 
92096
92097
  // src/strategies/base-strategy.ts
92097
92098
  var BaseStrategy = class extends CacheClass {
92098
- constructor(config3) {
92099
+ constructor(config3, inputModes) {
92099
92100
  super();
92100
92101
  this.cache = /* @__PURE__ */ new Map();
92101
92102
  this.config = config3;
92103
+ this._depositInputMode = inputModes?.depositInputMode ?? "single";
92104
+ this._withdrawInputMode = inputModes?.withdrawInputMode ?? "single";
92105
+ }
92106
+ depositInputMode() {
92107
+ return this._depositInputMode;
92108
+ }
92109
+ withdrawInputMode() {
92110
+ return this._withdrawInputMode;
92102
92111
  }
92103
92112
  async getUserTVL(user, blockIdentifier) {
92104
92113
  throw new Error("Not implemented");
@@ -97726,11 +97735,11 @@ spurious results.`);
97726
97735
  };
97727
97736
 
97728
97737
  // src/strategies/constants.ts
97729
- var COMMON_CONTRACTS = [{
97738
+ var MY_ACCESS_CONTROL = {
97730
97739
  address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
97731
97740
  name: "Access Controller",
97732
97741
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
97733
- }];
97742
+ };
97734
97743
  var ENDPOINTS = {
97735
97744
  VESU_BASE: "https://proxy.api.troves.fi/vesu",
97736
97745
  VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
@@ -98515,7 +98524,7 @@ spurious results.`);
98515
98524
  contractLink: "https://github.com/trovesfi/troves-contracts"
98516
98525
  },
98517
98526
  accessControl: {
98518
- type: "Standard Account" /* STANDARD_ACCOUNT */,
98527
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
98519
98528
  addresses: [ContractAddr.from("0x0")],
98520
98529
  timeLock: "2 Days"
98521
98530
  }
@@ -98594,14 +98603,11 @@ spurious results.`);
98594
98603
  )
98595
98604
  ];
98596
98605
  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
- ];
98606
+ s.contractDetails = [{
98607
+ address: s.address,
98608
+ name: "Vault",
98609
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
98610
+ }];
98605
98611
  s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
98606
98612
  s.description = highlightTextWithLinks(
98607
98613
  _description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
@@ -103622,7 +103628,10 @@ spurious results.`);
103622
103628
  * @throws {Error} If more than one deposit token is specified
103623
103629
  */
103624
103630
  constructor(config3, pricer, metadata) {
103625
- super(config3);
103631
+ super(config3, {
103632
+ depositInputMode: "dual",
103633
+ withdrawInputMode: "dual"
103634
+ });
103626
103635
  this.BASE_WEIGHT = 1e4;
103627
103636
  this.pricer = pricer;
103628
103637
  assert3(
@@ -105280,9 +105289,8 @@ spurious results.`);
105280
105289
  contractLink: "https://github.com/trovesfi/troves-contracts"
105281
105290
  },
105282
105291
  accessControl: {
105283
- type: "Standard Account" /* STANDARD_ACCOUNT */,
105284
- addresses: [ContractAddr.from("0x0")],
105285
- timeLock: "2 Days"
105292
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
105293
+ addresses: [MY_ACCESS_CONTROL.address]
105286
105294
  }
105287
105295
  },
105288
105296
  redemptionInfo: {
@@ -105458,7 +105466,14 @@ spurious results.`);
105458
105466
  (t) => t.symbol === quoteTokenSymbol
105459
105467
  ),
105460
105468
  alerts: getRe7Alerts(),
105461
- tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */]
105469
+ tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */],
105470
+ security: {
105471
+ ...xSTRKSTRK.security,
105472
+ accessControl: {
105473
+ ...xSTRKSTRK.security.accessControl,
105474
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")]
105475
+ }
105476
+ }
105462
105477
  });
105463
105478
  var getRe7FAQs = () => [
105464
105479
  ...faqs2,
@@ -115791,7 +115806,7 @@ spurious results.`);
115791
115806
  contractLink: "https://github.com/trovesfi/troves-contracts"
115792
115807
  },
115793
115808
  accessControl: {
115794
- type: "Standard Account" /* STANDARD_ACCOUNT */,
115809
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
115795
115810
  addresses: [ContractAddr.from("0x0")],
115796
115811
  timeLock: "2 Days"
115797
115812
  }
@@ -116626,7 +116641,10 @@ spurious results.`);
116626
116641
  // src/strategies/yoloVault.ts
116627
116642
  var YoLoVault = class extends BaseStrategy {
116628
116643
  constructor(config3, pricer, metadata) {
116629
- super(config3);
116644
+ super(config3, {
116645
+ depositInputMode: "single",
116646
+ withdrawInputMode: "dual"
116647
+ });
116630
116648
  this.getSettings = async () => {
116631
116649
  const settings2 = await this.contract.call("get_settings", []);
116632
116650
  return settings2;
@@ -116958,26 +116976,17 @@ Learn the core value averaging concept.`;
116958
116976
  `Deposit ${main} after start (${input.startDate}) and before expiry (${input.expiryDate}).`,
116959
116977
  `Each epoch (minimum ${formatDurationSeconds(input.minEpochDurationSeconds)}), troves swaps into ${secondary} based on the configured spending level.`,
116960
116978
  `Lower prices can trigger higher spend percentages (TVA behavior).`,
116961
- `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`
116979
+ `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`,
116980
+ `On expiry, entire ${main} token would have been swapped into ${secondary}, unless due to unfavourable market conditions.`
116962
116981
  ];
116963
116982
  return {
116964
- title: `${secondary} TVA (${input.expiryDate})`,
116983
+ title: `${secondary} YOLO (${input.expiryDate})`,
116965
116984
  description,
116966
116985
  vaultTypeDescription: vaultTypeDescription2,
116967
116986
  faqs: faqs3,
116968
116987
  investmentSteps: investmentSteps2
116969
116988
  };
116970
116989
  };
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
116990
  var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
116982
116991
  var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
116983
116992
  var btcYoloConfig = {
@@ -116999,26 +117008,7 @@ Learn the core value averaging concept.`;
116999
117008
  ]
117000
117009
  };
117001
117010
  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
- ];
117011
+ var yoloRiskFactors = [];
117022
117012
  var YoloVaultStrategies = [
117023
117013
  {
117024
117014
  id: btcYoloConfig.id,
@@ -117036,9 +117026,8 @@ Learn the core value averaging concept.`;
117036
117026
  contractLink: ""
117037
117027
  },
117038
117028
  accessControl: {
117039
- type: "Standard Account" /* STANDARD_ACCOUNT */,
117040
- addresses: [ContractAddr.from("0x46ba20c2db9c8032aa2e60a3c2487728756c93fb5ef552e00192827434b8b5f")],
117041
- timeLock: "7 Days"
117029
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
117030
+ addresses: [MY_ACCESS_CONTROL.address]
117042
117031
  }
117043
117032
  },
117044
117033
  redemptionInfo: {
@@ -117057,7 +117046,7 @@ Learn the core value averaging concept.`;
117057
117046
  protocols: [],
117058
117047
  risk: {
117059
117048
  riskFactor: yoloRiskFactors,
117060
- netRisk: getWeightedRisk(yoloRiskFactors),
117049
+ netRisk: 0,
117061
117050
  notARisks: getNoRiskTags(yoloRiskFactors)
117062
117051
  },
117063
117052
  additionalInfo: {
@@ -120475,8 +120464,7 @@ Learn the core value averaging concept.`;
120475
120464
  },
120476
120465
  accessControl: {
120477
120466
  type: "Standard Account" /* STANDARD_ACCOUNT */,
120478
- addresses: [ContractAddr.from("0x0")],
120479
- timeLock: "2 Days"
120467
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
120480
120468
  }
120481
120469
  };
120482
120470
  var EVERGREEN_REDEMPTION_INFO = {
@@ -122140,8 +122128,7 @@ Learn the core value averaging concept.`;
122140
122128
  },
122141
122129
  accessControl: {
122142
122130
  type: "Standard Account" /* STANDARD_ACCOUNT */,
122143
- addresses: [ContractAddr.from("0x0")],
122144
- timeLock: "2 Days"
122131
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
122145
122132
  }
122146
122133
  };
122147
122134
  var HYPER_LST_REDEMPTION_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) => {
@@ -4864,10 +4865,18 @@ var CacheClass = class {
4864
4865
 
4865
4866
  // src/strategies/base-strategy.ts
4866
4867
  var BaseStrategy = class extends CacheClass {
4867
- constructor(config) {
4868
+ constructor(config, inputModes) {
4868
4869
  super();
4869
4870
  this.cache = /* @__PURE__ */ new Map();
4870
4871
  this.config = config;
4872
+ this._depositInputMode = inputModes?.depositInputMode ?? "single";
4873
+ this._withdrawInputMode = inputModes?.withdrawInputMode ?? "single";
4874
+ }
4875
+ depositInputMode() {
4876
+ return this._depositInputMode;
4877
+ }
4878
+ withdrawInputMode() {
4879
+ return this._withdrawInputMode;
4871
4880
  }
4872
4881
  async getUserTVL(user, blockIdentifier) {
4873
4882
  throw new Error("Not implemented");
@@ -10497,11 +10506,11 @@ var vesu_pools_default = {
10497
10506
  };
10498
10507
 
10499
10508
  // src/strategies/constants.ts
10500
- var COMMON_CONTRACTS = [{
10509
+ var MY_ACCESS_CONTROL = {
10501
10510
  address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
10502
10511
  name: "Access Controller",
10503
10512
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
10504
- }];
10513
+ };
10505
10514
  var ENDPOINTS = {
10506
10515
  VESU_BASE: "https://proxy.api.troves.fi/vesu",
10507
10516
  VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
@@ -11286,7 +11295,7 @@ var VESU_SECURITY = {
11286
11295
  contractLink: "https://github.com/trovesfi/troves-contracts"
11287
11296
  },
11288
11297
  accessControl: {
11289
- type: "Standard Account" /* STANDARD_ACCOUNT */,
11298
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
11290
11299
  addresses: [ContractAddr.from("0x0")],
11291
11300
  timeLock: "2 Days"
11292
11301
  }
@@ -11365,14 +11374,11 @@ var VesuRebalanceStrategies = [
11365
11374
  )
11366
11375
  ];
11367
11376
  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
- ];
11377
+ s.contractDetails = [{
11378
+ address: s.address,
11379
+ name: "Vault",
11380
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
11381
+ }];
11376
11382
  s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
11377
11383
  s.description = highlightTextWithLinks(
11378
11384
  _description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
@@ -16404,7 +16410,10 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
16404
16410
  * @throws {Error} If more than one deposit token is specified
16405
16411
  */
16406
16412
  constructor(config, pricer, metadata) {
16407
- super(config);
16413
+ super(config, {
16414
+ depositInputMode: "dual",
16415
+ withdrawInputMode: "dual"
16416
+ });
16408
16417
  this.BASE_WEIGHT = 1e4;
16409
16418
  this.pricer = pricer;
16410
16419
  assert(
@@ -18062,9 +18071,8 @@ var xSTRKSTRK = {
18062
18071
  contractLink: "https://github.com/trovesfi/troves-contracts"
18063
18072
  },
18064
18073
  accessControl: {
18065
- type: "Standard Account" /* STANDARD_ACCOUNT */,
18066
- addresses: [ContractAddr.from("0x0")],
18067
- timeLock: "2 Days"
18074
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
18075
+ addresses: [MY_ACCESS_CONTROL.address]
18068
18076
  }
18069
18077
  },
18070
18078
  redemptionInfo: {
@@ -18240,7 +18248,14 @@ var createRe7Settings = (quoteTokenSymbol, isBTC, isDeprecated) => ({
18240
18248
  (t) => t.symbol === quoteTokenSymbol
18241
18249
  ),
18242
18250
  alerts: getRe7Alerts(),
18243
- tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */]
18251
+ tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */],
18252
+ security: {
18253
+ ...xSTRKSTRK.security,
18254
+ accessControl: {
18255
+ ...xSTRKSTRK.security.accessControl,
18256
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")]
18257
+ }
18258
+ }
18244
18259
  });
18245
18260
  var getRe7FAQs = () => [
18246
18261
  ...faqs2,
@@ -28580,7 +28595,7 @@ var SenseiStrategies = [
28580
28595
  contractLink: "https://github.com/trovesfi/troves-contracts"
28581
28596
  },
28582
28597
  accessControl: {
28583
- type: "Standard Account" /* STANDARD_ACCOUNT */,
28598
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
28584
28599
  addresses: [ContractAddr.from("0x0")],
28585
28600
  timeLock: "2 Days"
28586
28601
  }
@@ -29419,7 +29434,10 @@ var yoloVault_abi_default = [
29419
29434
  // src/strategies/yoloVault.ts
29420
29435
  var YoLoVault = class extends BaseStrategy {
29421
29436
  constructor(config, pricer, metadata) {
29422
- super(config);
29437
+ super(config, {
29438
+ depositInputMode: "single",
29439
+ withdrawInputMode: "dual"
29440
+ });
29423
29441
  this.getSettings = async () => {
29424
29442
  const settings = await this.contract.call("get_settings", []);
29425
29443
  return settings;
@@ -29751,26 +29769,17 @@ Learn the core value averaging concept.`;
29751
29769
  `Deposit ${main} after start (${input.startDate}) and before expiry (${input.expiryDate}).`,
29752
29770
  `Each epoch (minimum ${formatDurationSeconds(input.minEpochDurationSeconds)}), troves swaps into ${secondary} based on the configured spending level.`,
29753
29771
  `Lower prices can trigger higher spend percentages (TVA behavior).`,
29754
- `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`
29772
+ `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`,
29773
+ `On expiry, entire ${main} token would have been swapped into ${secondary}, unless due to unfavourable market conditions.`
29755
29774
  ];
29756
29775
  return {
29757
- title: `${secondary} TVA (${input.expiryDate})`,
29776
+ title: `${secondary} YOLO (${input.expiryDate})`,
29758
29777
  description,
29759
29778
  vaultTypeDescription: vaultTypeDescription2,
29760
29779
  faqs: faqs3,
29761
29780
  investmentSteps: investmentSteps2
29762
29781
  };
29763
29782
  };
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
29783
  var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
29775
29784
  var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
29776
29785
  var btcYoloConfig = {
@@ -29792,26 +29801,7 @@ var btcYoloConfig = {
29792
29801
  ]
29793
29802
  };
29794
29803
  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
- ];
29804
+ var yoloRiskFactors = [];
29815
29805
  var YoloVaultStrategies = [
29816
29806
  {
29817
29807
  id: btcYoloConfig.id,
@@ -29829,9 +29819,8 @@ var YoloVaultStrategies = [
29829
29819
  contractLink: ""
29830
29820
  },
29831
29821
  accessControl: {
29832
- type: "Standard Account" /* STANDARD_ACCOUNT */,
29833
- addresses: [ContractAddr.from("0x46ba20c2db9c8032aa2e60a3c2487728756c93fb5ef552e00192827434b8b5f")],
29834
- timeLock: "7 Days"
29822
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
29823
+ addresses: [MY_ACCESS_CONTROL.address]
29835
29824
  }
29836
29825
  },
29837
29826
  redemptionInfo: {
@@ -29850,7 +29839,7 @@ var YoloVaultStrategies = [
29850
29839
  protocols: [],
29851
29840
  risk: {
29852
29841
  riskFactor: yoloRiskFactors,
29853
- netRisk: getWeightedRisk(yoloRiskFactors),
29842
+ netRisk: 0,
29854
29843
  notARisks: getNoRiskTags(yoloRiskFactors)
29855
29844
  },
29856
29845
  additionalInfo: {
@@ -33272,8 +33261,7 @@ var EVERGREEN_SECURITY = {
33272
33261
  },
33273
33262
  accessControl: {
33274
33263
  type: "Standard Account" /* STANDARD_ACCOUNT */,
33275
- addresses: [ContractAddr.from("0x0")],
33276
- timeLock: "2 Days"
33264
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
33277
33265
  }
33278
33266
  };
33279
33267
  var EVERGREEN_REDEMPTION_INFO = {
@@ -34940,8 +34928,7 @@ var HYPER_LST_SECURITY = {
34940
34928
  },
34941
34929
  accessControl: {
34942
34930
  type: "Standard Account" /* STANDARD_ACCOUNT */,
34943
- addresses: [ContractAddr.from("0x0")],
34944
- timeLock: "2 Days"
34931
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
34945
34932
  }
34946
34933
  };
34947
34934
  var HYPER_LST_REDEMPTION_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;
@@ -604,6 +605,8 @@ interface DualTokenInfo {
604
605
  token0: SingleTokenInfo;
605
606
  token1: SingleTokenInfo;
606
607
  }
608
+ type StrategyInputMode = "single" | "dual";
609
+ type InputModeFromAction<T> = T extends DualActionAmount ? "dual" : "single";
607
610
  interface NetAPYSplit {
608
611
  apy: number;
609
612
  id: string;
@@ -620,7 +623,14 @@ interface CacheData {
620
623
  declare class BaseStrategy<TVLInfo, DepositActionInfo, WithdrawActionInfo = DepositActionInfo> extends CacheClass {
621
624
  readonly config: IConfig;
622
625
  readonly cache: Map<string, CacheData>;
623
- constructor(config: IConfig);
626
+ private readonly _depositInputMode;
627
+ private readonly _withdrawInputMode;
628
+ constructor(config: IConfig, inputModes?: {
629
+ depositInputMode?: InputModeFromAction<DepositActionInfo>;
630
+ withdrawInputMode?: InputModeFromAction<WithdrawActionInfo>;
631
+ });
632
+ depositInputMode(): InputModeFromAction<DepositActionInfo>;
633
+ withdrawInputMode(): InputModeFromAction<WithdrawActionInfo>;
624
634
  getUserTVL(user: ContractAddr, blockIdentifier?: BlockIdentifier): Promise<TVLInfo>;
625
635
  getTVL(): Promise<TVLInfo>;
626
636
  depositCall(amountInfo: DepositActionInfo, receiver: ContractAddr): Promise<Call[]>;
@@ -2293,4 +2303,4 @@ declare class PasswordJsonCryptoUtil {
2293
2303
  decrypt(encryptedData: string, password: string): any;
2294
2304
  }
2295
2305
 
2296
- export { APYType, AUMTypes, AVNU_EXCHANGE, AVNU_MIDDLEWARE, type AccessControlInfo, AccessControlType, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type AmountInfo, type AmountsInfo, type ApproveCallParams, AuditStatus, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, BaseAdapter, type BaseAdapterConfig, BaseStrategy, type CLVaultStrategySettings, CommonAdapter, type CommonAdapterConfig, ContractAddr, type DecreaseLeverParams, Deployer, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type EkuboQuote, EkuboQuoter, type EkuboRouteNode, type EkuboSplit, type FAQ, FactoryStrategyType, FatalError, type FilterOption, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, HyperLSTStrategies, type HyperLSTStrategySettings, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, InstantWithdrawalVault, LSTAPRService, LSTPriceType, type LSTStats, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, MyNumber, type NetAPYDetails, type NetAPYSplit, Network, PRICE_ROUTER, PasswordJsonCryptoUtil, type PositionAPY, type PositionInfo, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerLST, PricerRedis, Protocols, type RedemptionInfo, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, type RouteNode, SIMPLE_SANITIZER, SIMPLE_SANITIZER_V2, SIMPLE_SANITIZER_VESU_V1_DELEGATIONS, type SecurityMetadata, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SingleActionAmount, type SingleTokenInfo, type SourceCodeInfo, SourceCodeType, StandardMerkleTree, type StandardMerkleTreeData, Store, type StoreConfig, type StrategyAlert, type StrategyApyHistoryUIConfig, type StrategyCapabilities, type StrategyFilterMetadata, StrategyLiveStatus, type StrategyMetadata, type StrategyRegistryEntry, type StrategySettings, StrategyTag, StrategyType, type SupportedPosition, type Swap, type SwapInfo, TelegramGroupNotif, TelegramNotif, type TokenAmount, type TokenInfo, UNIVERSAL_ADAPTERS, UNIVERSAL_MANAGE_IDS, UniversalLstMultiplierStrategy, type UniversalManageCall, UniversalStrategies, UniversalStrategy, type UniversalStrategySettings, type UserYoloInfo, VESU_SINGLETON, VESU_V2_MODIFY_POSITION_SANITIZER, type VaultPosition, VaultType, VesuAdapter, type VesuAdapterConfig, type VesuAmount, VesuAmountDenomination, VesuAmountType, type VesuDefiSpringRewardsCallParams, type VesuModifyDelegationCallParams, type VesuModifyPositionCallParams, type VesuMultiplyCallParams, VesuPoolMetadata, VesuPools, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, Web3Number, YoLoVault, type YoloSettings, type YoloSpendingLevel, type YoloVaultSettings, type YoloVaultStatus, YoloVaultStrategies, ZkLend, assert, buildStrategyRegistry, createEkuboCLStrategy, createHyperLSTStrategy, createSenseiStrategy, createStrategy, createUniversalStrategy, createVesuRebalanceStrategy, createYoloVaultStrategy, detectCapabilities, extensionMap, getAPIUsingHeadlessBrowser, getAllStrategyMetadata, getAllStrategyTags, getContractDetails, getDefaultStoreConfig, getFilterMetadata, getLiveStrategies, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getStrategiesByType, getStrategyTagDesciption, getStrategyTypeFromMetadata, getTrovesEndpoint, getVesuSingletonAddress, highlightTextWithLinks, type i257, isDualTokenStrategy, logger, toAmountsInfo, toBigInt };
2306
+ export { APYType, AUMTypes, AVNU_EXCHANGE, AVNU_MIDDLEWARE, type AccessControlInfo, AccessControlType, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type AmountInfo, type AmountsInfo, type ApproveCallParams, AuditStatus, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, BaseAdapter, type BaseAdapterConfig, BaseStrategy, type CLVaultStrategySettings, CommonAdapter, type CommonAdapterConfig, ContractAddr, type DecreaseLeverParams, Deployer, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type EkuboQuote, EkuboQuoter, type EkuboRouteNode, type EkuboSplit, type FAQ, FactoryStrategyType, FatalError, type FilterOption, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, HyperLSTStrategies, type HyperLSTStrategySettings, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, type InputModeFromAction, InstantWithdrawalVault, LSTAPRService, LSTPriceType, type LSTStats, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, MyNumber, type NetAPYDetails, type NetAPYSplit, Network, PRICE_ROUTER, PasswordJsonCryptoUtil, type PositionAPY, type PositionInfo, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerLST, PricerRedis, Protocols, type RedemptionInfo, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, type RouteNode, SIMPLE_SANITIZER, SIMPLE_SANITIZER_V2, SIMPLE_SANITIZER_VESU_V1_DELEGATIONS, type SecurityMetadata, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SingleActionAmount, type SingleTokenInfo, type SourceCodeInfo, SourceCodeType, StandardMerkleTree, type StandardMerkleTreeData, Store, type StoreConfig, type StrategyAlert, type StrategyApyHistoryUIConfig, type StrategyCapabilities, type StrategyFilterMetadata, type StrategyInputMode, StrategyLiveStatus, type StrategyMetadata, type StrategyRegistryEntry, type StrategySettings, StrategyTag, StrategyType, type SupportedPosition, type Swap, type SwapInfo, TelegramGroupNotif, TelegramNotif, type TokenAmount, type TokenInfo, UNIVERSAL_ADAPTERS, UNIVERSAL_MANAGE_IDS, UniversalLstMultiplierStrategy, type UniversalManageCall, UniversalStrategies, UniversalStrategy, type UniversalStrategySettings, type UserYoloInfo, VESU_SINGLETON, VESU_V2_MODIFY_POSITION_SANITIZER, type VaultPosition, VaultType, VesuAdapter, type VesuAdapterConfig, type VesuAmount, VesuAmountDenomination, VesuAmountType, type VesuDefiSpringRewardsCallParams, type VesuModifyDelegationCallParams, type VesuModifyPositionCallParams, type VesuMultiplyCallParams, VesuPoolMetadata, VesuPools, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, Web3Number, YoLoVault, type YoloSettings, type YoloSpendingLevel, type YoloVaultSettings, type YoloVaultStatus, YoloVaultStrategies, ZkLend, assert, buildStrategyRegistry, createEkuboCLStrategy, createHyperLSTStrategy, createSenseiStrategy, createStrategy, createUniversalStrategy, createVesuRebalanceStrategy, createYoloVaultStrategy, detectCapabilities, extensionMap, getAPIUsingHeadlessBrowser, getAllStrategyMetadata, getAllStrategyTags, getContractDetails, getDefaultStoreConfig, getFilterMetadata, getLiveStrategies, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getStrategiesByType, getStrategyTagDesciption, getStrategyTypeFromMetadata, getTrovesEndpoint, getVesuSingletonAddress, highlightTextWithLinks, type i257, isDualTokenStrategy, logger, toAmountsInfo, toBigInt };
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) => {
@@ -4906,10 +4907,18 @@ var CacheClass = class {
4906
4907
 
4907
4908
  // src/strategies/base-strategy.ts
4908
4909
  var BaseStrategy = class extends CacheClass {
4909
- constructor(config) {
4910
+ constructor(config, inputModes) {
4910
4911
  super();
4911
4912
  this.cache = /* @__PURE__ */ new Map();
4912
4913
  this.config = config;
4914
+ this._depositInputMode = inputModes?.depositInputMode ?? "single";
4915
+ this._withdrawInputMode = inputModes?.withdrawInputMode ?? "single";
4916
+ }
4917
+ depositInputMode() {
4918
+ return this._depositInputMode;
4919
+ }
4920
+ withdrawInputMode() {
4921
+ return this._withdrawInputMode;
4913
4922
  }
4914
4923
  async getUserTVL(user, blockIdentifier) {
4915
4924
  throw new Error("Not implemented");
@@ -10539,11 +10548,11 @@ var vesu_pools_default = {
10539
10548
  };
10540
10549
 
10541
10550
  // src/strategies/constants.ts
10542
- var COMMON_CONTRACTS = [{
10551
+ var MY_ACCESS_CONTROL = {
10543
10552
  address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
10544
10553
  name: "Access Controller",
10545
10554
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
10546
- }];
10555
+ };
10547
10556
  var ENDPOINTS = {
10548
10557
  VESU_BASE: "https://proxy.api.troves.fi/vesu",
10549
10558
  VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
@@ -11328,7 +11337,7 @@ var VESU_SECURITY = {
11328
11337
  contractLink: "https://github.com/trovesfi/troves-contracts"
11329
11338
  },
11330
11339
  accessControl: {
11331
- type: "Standard Account" /* STANDARD_ACCOUNT */,
11340
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
11332
11341
  addresses: [ContractAddr.from("0x0")],
11333
11342
  timeLock: "2 Days"
11334
11343
  }
@@ -11407,14 +11416,11 @@ var VesuRebalanceStrategies = [
11407
11416
  )
11408
11417
  ];
11409
11418
  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
- ];
11419
+ s.contractDetails = [{
11420
+ address: s.address,
11421
+ name: "Vault",
11422
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
11423
+ }];
11418
11424
  s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
11419
11425
  s.description = highlightTextWithLinks(
11420
11426
  _description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
@@ -16442,7 +16448,10 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
16442
16448
  * @throws {Error} If more than one deposit token is specified
16443
16449
  */
16444
16450
  constructor(config, pricer, metadata) {
16445
- super(config);
16451
+ super(config, {
16452
+ depositInputMode: "dual",
16453
+ withdrawInputMode: "dual"
16454
+ });
16446
16455
  this.BASE_WEIGHT = 1e4;
16447
16456
  this.pricer = pricer;
16448
16457
  assert(
@@ -18100,9 +18109,8 @@ var xSTRKSTRK = {
18100
18109
  contractLink: "https://github.com/trovesfi/troves-contracts"
18101
18110
  },
18102
18111
  accessControl: {
18103
- type: "Standard Account" /* STANDARD_ACCOUNT */,
18104
- addresses: [ContractAddr.from("0x0")],
18105
- timeLock: "2 Days"
18112
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
18113
+ addresses: [MY_ACCESS_CONTROL.address]
18106
18114
  }
18107
18115
  },
18108
18116
  redemptionInfo: {
@@ -18278,7 +18286,14 @@ var createRe7Settings = (quoteTokenSymbol, isBTC, isDeprecated) => ({
18278
18286
  (t) => t.symbol === quoteTokenSymbol
18279
18287
  ),
18280
18288
  alerts: getRe7Alerts(),
18281
- tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */]
18289
+ tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */],
18290
+ security: {
18291
+ ...xSTRKSTRK.security,
18292
+ accessControl: {
18293
+ ...xSTRKSTRK.security.accessControl,
18294
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")]
18295
+ }
18296
+ }
18282
18297
  });
18283
18298
  var getRe7FAQs = () => [
18284
18299
  ...faqs2,
@@ -28719,7 +28734,7 @@ var SenseiStrategies = [
28719
28734
  contractLink: "https://github.com/trovesfi/troves-contracts"
28720
28735
  },
28721
28736
  accessControl: {
28722
- type: "Standard Account" /* STANDARD_ACCOUNT */,
28737
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
28723
28738
  addresses: [ContractAddr.from("0x0")],
28724
28739
  timeLock: "2 Days"
28725
28740
  }
@@ -29558,7 +29573,10 @@ var yoloVault_abi_default = [
29558
29573
  // src/strategies/yoloVault.ts
29559
29574
  var YoLoVault = class extends BaseStrategy {
29560
29575
  constructor(config, pricer, metadata) {
29561
- super(config);
29576
+ super(config, {
29577
+ depositInputMode: "single",
29578
+ withdrawInputMode: "dual"
29579
+ });
29562
29580
  this.getSettings = async () => {
29563
29581
  const settings = await this.contract.call("get_settings", []);
29564
29582
  return settings;
@@ -29890,26 +29908,17 @@ Learn the core value averaging concept.`;
29890
29908
  `Deposit ${main} after start (${input.startDate}) and before expiry (${input.expiryDate}).`,
29891
29909
  `Each epoch (minimum ${formatDurationSeconds(input.minEpochDurationSeconds)}), troves swaps into ${secondary} based on the configured spending level.`,
29892
29910
  `Lower prices can trigger higher spend percentages (TVA behavior).`,
29893
- `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`
29911
+ `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`,
29912
+ `On expiry, entire ${main} token would have been swapped into ${secondary}, unless due to unfavourable market conditions.`
29894
29913
  ];
29895
29914
  return {
29896
- title: `${secondary} TVA (${input.expiryDate})`,
29915
+ title: `${secondary} YOLO (${input.expiryDate})`,
29897
29916
  description,
29898
29917
  vaultTypeDescription: vaultTypeDescription2,
29899
29918
  faqs: faqs3,
29900
29919
  investmentSteps: investmentSteps2
29901
29920
  };
29902
29921
  };
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
29922
  var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
29914
29923
  var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
29915
29924
  var btcYoloConfig = {
@@ -29931,26 +29940,7 @@ var btcYoloConfig = {
29931
29940
  ]
29932
29941
  };
29933
29942
  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
- ];
29943
+ var yoloRiskFactors = [];
29954
29944
  var YoloVaultStrategies = [
29955
29945
  {
29956
29946
  id: btcYoloConfig.id,
@@ -29968,9 +29958,8 @@ var YoloVaultStrategies = [
29968
29958
  contractLink: ""
29969
29959
  },
29970
29960
  accessControl: {
29971
- type: "Standard Account" /* STANDARD_ACCOUNT */,
29972
- addresses: [ContractAddr.from("0x46ba20c2db9c8032aa2e60a3c2487728756c93fb5ef552e00192827434b8b5f")],
29973
- timeLock: "7 Days"
29961
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
29962
+ addresses: [MY_ACCESS_CONTROL.address]
29974
29963
  }
29975
29964
  },
29976
29965
  redemptionInfo: {
@@ -29989,7 +29978,7 @@ var YoloVaultStrategies = [
29989
29978
  protocols: [],
29990
29979
  risk: {
29991
29980
  riskFactor: yoloRiskFactors,
29992
- netRisk: getWeightedRisk(yoloRiskFactors),
29981
+ netRisk: 0,
29993
29982
  notARisks: getNoRiskTags(yoloRiskFactors)
29994
29983
  },
29995
29984
  additionalInfo: {
@@ -33411,8 +33400,7 @@ var EVERGREEN_SECURITY = {
33411
33400
  },
33412
33401
  accessControl: {
33413
33402
  type: "Standard Account" /* STANDARD_ACCOUNT */,
33414
- addresses: [ContractAddr.from("0x0")],
33415
- timeLock: "2 Days"
33403
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
33416
33404
  }
33417
33405
  };
33418
33406
  var EVERGREEN_REDEMPTION_INFO = {
@@ -35079,8 +35067,7 @@ var HYPER_LST_SECURITY = {
35079
35067
  },
35080
35068
  accessControl: {
35081
35069
  type: "Standard Account" /* STANDARD_ACCOUNT */,
35082
- addresses: [ContractAddr.from("0x0")],
35083
- timeLock: "2 Days"
35070
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
35084
35071
  }
35085
35072
  };
35086
35073
  var HYPER_LST_REDEMPTION_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) => {
@@ -4768,10 +4769,18 @@ var CacheClass = class {
4768
4769
 
4769
4770
  // src/strategies/base-strategy.ts
4770
4771
  var BaseStrategy = class extends CacheClass {
4771
- constructor(config) {
4772
+ constructor(config, inputModes) {
4772
4773
  super();
4773
4774
  this.cache = /* @__PURE__ */ new Map();
4774
4775
  this.config = config;
4776
+ this._depositInputMode = inputModes?.depositInputMode ?? "single";
4777
+ this._withdrawInputMode = inputModes?.withdrawInputMode ?? "single";
4778
+ }
4779
+ depositInputMode() {
4780
+ return this._depositInputMode;
4781
+ }
4782
+ withdrawInputMode() {
4783
+ return this._withdrawInputMode;
4775
4784
  }
4776
4785
  async getUserTVL(user, blockIdentifier) {
4777
4786
  throw new Error("Not implemented");
@@ -10401,11 +10410,11 @@ var vesu_pools_default = {
10401
10410
  };
10402
10411
 
10403
10412
  // src/strategies/constants.ts
10404
- var COMMON_CONTRACTS = [{
10413
+ var MY_ACCESS_CONTROL = {
10405
10414
  address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
10406
10415
  name: "Access Controller",
10407
10416
  sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
10408
- }];
10417
+ };
10409
10418
  var ENDPOINTS = {
10410
10419
  VESU_BASE: "https://proxy.api.troves.fi/vesu",
10411
10420
  VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
@@ -11190,7 +11199,7 @@ var VESU_SECURITY = {
11190
11199
  contractLink: "https://github.com/trovesfi/troves-contracts"
11191
11200
  },
11192
11201
  accessControl: {
11193
- type: "Standard Account" /* STANDARD_ACCOUNT */,
11202
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
11194
11203
  addresses: [ContractAddr.from("0x0")],
11195
11204
  timeLock: "2 Days"
11196
11205
  }
@@ -11269,14 +11278,11 @@ var VesuRebalanceStrategies = [
11269
11278
  )
11270
11279
  ];
11271
11280
  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
- ];
11281
+ s.contractDetails = [{
11282
+ address: s.address,
11283
+ name: "Vault",
11284
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
11285
+ }];
11280
11286
  s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
11281
11287
  s.description = highlightTextWithLinks(
11282
11288
  _description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
@@ -16308,7 +16314,10 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
16308
16314
  * @throws {Error} If more than one deposit token is specified
16309
16315
  */
16310
16316
  constructor(config, pricer, metadata) {
16311
- super(config);
16317
+ super(config, {
16318
+ depositInputMode: "dual",
16319
+ withdrawInputMode: "dual"
16320
+ });
16312
16321
  this.BASE_WEIGHT = 1e4;
16313
16322
  this.pricer = pricer;
16314
16323
  assert(
@@ -17966,9 +17975,8 @@ var xSTRKSTRK = {
17966
17975
  contractLink: "https://github.com/trovesfi/troves-contracts"
17967
17976
  },
17968
17977
  accessControl: {
17969
- type: "Standard Account" /* STANDARD_ACCOUNT */,
17970
- addresses: [ContractAddr.from("0x0")],
17971
- timeLock: "2 Days"
17978
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
17979
+ addresses: [MY_ACCESS_CONTROL.address]
17972
17980
  }
17973
17981
  },
17974
17982
  redemptionInfo: {
@@ -18144,7 +18152,14 @@ var createRe7Settings = (quoteTokenSymbol, isBTC, isDeprecated) => ({
18144
18152
  (t) => t.symbol === quoteTokenSymbol
18145
18153
  ),
18146
18154
  alerts: getRe7Alerts(),
18147
- tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */]
18155
+ tags: isBTC ? ["BTC" /* BTC */, "Ekubo" /* AUTOMATED_LP */] : ["Ekubo" /* AUTOMATED_LP */],
18156
+ security: {
18157
+ ...xSTRKSTRK.security,
18158
+ accessControl: {
18159
+ ...xSTRKSTRK.security.accessControl,
18160
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")]
18161
+ }
18162
+ }
18148
18163
  });
18149
18164
  var getRe7FAQs = () => [
18150
18165
  ...faqs2,
@@ -28585,7 +28600,7 @@ var SenseiStrategies = [
28585
28600
  contractLink: "https://github.com/trovesfi/troves-contracts"
28586
28601
  },
28587
28602
  accessControl: {
28588
- type: "Standard Account" /* STANDARD_ACCOUNT */,
28603
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
28589
28604
  addresses: [ContractAddr.from("0x0")],
28590
28605
  timeLock: "2 Days"
28591
28606
  }
@@ -29424,7 +29439,10 @@ var yoloVault_abi_default = [
29424
29439
  // src/strategies/yoloVault.ts
29425
29440
  var YoLoVault = class extends BaseStrategy {
29426
29441
  constructor(config, pricer, metadata) {
29427
- super(config);
29442
+ super(config, {
29443
+ depositInputMode: "single",
29444
+ withdrawInputMode: "dual"
29445
+ });
29428
29446
  this.getSettings = async () => {
29429
29447
  const settings = await this.contract.call("get_settings", []);
29430
29448
  return settings;
@@ -29756,26 +29774,17 @@ Learn the core value averaging concept.`;
29756
29774
  `Deposit ${main} after start (${input.startDate}) and before expiry (${input.expiryDate}).`,
29757
29775
  `Each epoch (minimum ${formatDurationSeconds(input.minEpochDurationSeconds)}), troves swaps into ${secondary} based on the configured spending level.`,
29758
29776
  `Lower prices can trigger higher spend percentages (TVA behavior).`,
29759
- `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`
29777
+ `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`,
29778
+ `On expiry, entire ${main} token would have been swapped into ${secondary}, unless due to unfavourable market conditions.`
29760
29779
  ];
29761
29780
  return {
29762
- title: `${secondary} TVA (${input.expiryDate})`,
29781
+ title: `${secondary} YOLO (${input.expiryDate})`,
29763
29782
  description,
29764
29783
  vaultTypeDescription: vaultTypeDescription2,
29765
29784
  faqs: faqs3,
29766
29785
  investmentSteps: investmentSteps2
29767
29786
  };
29768
29787
  };
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
29788
  var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
29780
29789
  var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
29781
29790
  var btcYoloConfig = {
@@ -29797,26 +29806,7 @@ var btcYoloConfig = {
29797
29806
  ]
29798
29807
  };
29799
29808
  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
- ];
29809
+ var yoloRiskFactors = [];
29820
29810
  var YoloVaultStrategies = [
29821
29811
  {
29822
29812
  id: btcYoloConfig.id,
@@ -29834,9 +29824,8 @@ var YoloVaultStrategies = [
29834
29824
  contractLink: ""
29835
29825
  },
29836
29826
  accessControl: {
29837
- type: "Standard Account" /* STANDARD_ACCOUNT */,
29838
- addresses: [ContractAddr.from("0x46ba20c2db9c8032aa2e60a3c2487728756c93fb5ef552e00192827434b8b5f")],
29839
- timeLock: "7 Days"
29827
+ type: "Role Based Access" /* ROLE_BASED_ACCESS */,
29828
+ addresses: [MY_ACCESS_CONTROL.address]
29840
29829
  }
29841
29830
  },
29842
29831
  redemptionInfo: {
@@ -29855,7 +29844,7 @@ var YoloVaultStrategies = [
29855
29844
  protocols: [],
29856
29845
  risk: {
29857
29846
  riskFactor: yoloRiskFactors,
29858
- netRisk: getWeightedRisk(yoloRiskFactors),
29847
+ netRisk: 0,
29859
29848
  notARisks: getNoRiskTags(yoloRiskFactors)
29860
29849
  },
29861
29850
  additionalInfo: {
@@ -33277,8 +33266,7 @@ var EVERGREEN_SECURITY = {
33277
33266
  },
33278
33267
  accessControl: {
33279
33268
  type: "Standard Account" /* STANDARD_ACCOUNT */,
33280
- addresses: [ContractAddr.from("0x0")],
33281
- timeLock: "2 Days"
33269
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
33282
33270
  }
33283
33271
  };
33284
33272
  var EVERGREEN_REDEMPTION_INFO = {
@@ -34945,8 +34933,7 @@ var HYPER_LST_SECURITY = {
34945
34933
  },
34946
34934
  accessControl: {
34947
34935
  type: "Standard Account" /* STANDARD_ACCOUNT */,
34948
- addresses: [ContractAddr.from("0x0")],
34949
- timeLock: "2 Days"
34936
+ addresses: [ContractAddr.from("0x03495DD1e4838aa06666aac236036D86E81A6553e222FC02e70C2Cbc0062e8d0")]
34950
34937
  }
34951
34938
  };
34952
34939
  var HYPER_LST_REDEMPTION_INFO = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strkfarm/sdk",
3
- "version": "2.0.0-staging.32",
3
+ "version": "2.0.0-staging.34",
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 {
@@ -23,6 +23,9 @@ export interface DualTokenInfo {
23
23
  token1: SingleTokenInfo
24
24
  }
25
25
 
26
+ export type StrategyInputMode = "single" | "dual";
27
+ export type InputModeFromAction<T> = T extends DualActionAmount ? "dual" : "single";
28
+
26
29
  export interface NetAPYSplit {
27
30
  apy: number;
28
31
  id: string;
@@ -45,10 +48,30 @@ export class BaseStrategy<
45
48
  > extends CacheClass {
46
49
  readonly config: IConfig;
47
50
  readonly cache: Map<string, CacheData> = new Map();
48
-
49
- constructor(config: IConfig) {
51
+ private readonly _depositInputMode: InputModeFromAction<DepositActionInfo>;
52
+ private readonly _withdrawInputMode: InputModeFromAction<WithdrawActionInfo>;
53
+
54
+ constructor(
55
+ config: IConfig,
56
+ inputModes?: {
57
+ depositInputMode?: InputModeFromAction<DepositActionInfo>;
58
+ withdrawInputMode?: InputModeFromAction<WithdrawActionInfo>;
59
+ }
60
+ ) {
50
61
  super();
51
62
  this.config = config;
63
+ this._depositInputMode = (inputModes?.depositInputMode ??
64
+ ("single" as InputModeFromAction<DepositActionInfo>));
65
+ this._withdrawInputMode = (inputModes?.withdrawInputMode ??
66
+ ("single" as InputModeFromAction<WithdrawActionInfo>));
67
+ }
68
+
69
+ depositInputMode(): InputModeFromAction<DepositActionInfo> {
70
+ return this._depositInputMode;
71
+ }
72
+
73
+ withdrawInputMode(): InputModeFromAction<WithdrawActionInfo> {
74
+ return this._withdrawInputMode;
52
75
  }
53
76
 
54
77
  async getUserTVL(user: ContractAddr, blockIdentifier?: BlockIdentifier): Promise<TVLInfo> {
@@ -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;
@@ -124,7 +124,10 @@ export class EkuboCLVault extends BaseStrategy<
124
124
  pricer: PricerBase,
125
125
  metadata: IStrategyMetadata<CLVaultStrategySettings>
126
126
  ) {
127
- super(config);
127
+ super(config, {
128
+ depositInputMode: "dual",
129
+ withdrawInputMode: "dual"
130
+ });
128
131
  this.pricer = pricer;
129
132
 
130
133
  assert(
@@ -2445,9 +2448,8 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
2445
2448
  contractLink: "https://github.com/trovesfi/troves-contracts",
2446
2449
  },
2447
2450
  accessControl: {
2448
- type: AccessControlType.STANDARD_ACCOUNT,
2449
- addresses: [ContractAddr.from("0x0")],
2450
- timeLock: "2 Days",
2451
+ type: AccessControlType.ROLE_BASED_ACCESS,
2452
+ addresses: [MY_ACCESS_CONTROL.address],
2451
2453
  },
2452
2454
  },
2453
2455
  redemptionInfo: {
@@ -2662,6 +2664,13 @@ const createRe7Settings = (quoteTokenSymbol: string, isBTC: boolean, isDeprecate
2662
2664
  )!,
2663
2665
  alerts: getRe7Alerts(),
2664
2666
  tags: isBTC ? [StrategyTag.BTC, StrategyTag.AUTOMATED_LP] : [StrategyTag.AUTOMATED_LP] as StrategyTag[],
2667
+ security: {
2668
+ ...xSTRKSTRK.security,
2669
+ accessControl: {
2670
+ ...xSTRKSTRK.security.accessControl,
2671
+ addresses: [ContractAddr.from("0x707bf89863473548fb2844c9f3f96d83fe2394453259035a5791e4b1490642")],
2672
+ },
2673
+ },
2665
2674
  });
2666
2675
 
2667
2676
  // Helper to create Re7 FAQs
@@ -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;
@@ -101,7 +95,10 @@ export class YoLoVault extends BaseStrategy<DualTokenInfo, SingleActionAmount, D
101
95
  pricer: PricerBase,
102
96
  metadata: IStrategyMetadata<YoloVaultSettings>,
103
97
  ) {
104
- super(config);
98
+ super(config, {
99
+ depositInputMode: "single",
100
+ withdrawInputMode: "dual",
101
+ });
105
102
  this.address = metadata.address;
106
103
  this.pricer = pricer;
107
104
  this.metadata = metadata;
@@ -514,10 +511,11 @@ const getYoloVaultCopy = (input: YoloVaultSettings) => {
514
511
  `Each epoch (minimum ${formatDurationSeconds(input.minEpochDurationSeconds)}), troves swaps into ${secondary} based on the configured spending level.`,
515
512
  `Lower prices can trigger higher spend percentages (TVA behavior).`,
516
513
  `Redeem any time to receive your remaining ${main} plus accumulated ${secondary}.`,
514
+ `On expiry, entire ${main} token would have been swapped into ${secondary}, unless due to unfavourable market conditions.`
517
515
  ];
518
516
 
519
517
  return {
520
- title: `${secondary} TVA (${input.expiryDate})`,
518
+ title: `${secondary} YOLO (${input.expiryDate})`,
521
519
  description,
522
520
  vaultTypeDescription,
523
521
  faqs,
@@ -525,20 +523,6 @@ const getYoloVaultCopy = (input: YoloVaultSettings) => {
525
523
  };
526
524
  };
527
525
 
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
526
  const usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC")!;
543
527
  const wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!;
544
528
 
@@ -563,28 +547,9 @@ const btcYoloConfig: YoloVaultStrategyConfig = {
563
547
 
564
548
  const yoloCopy = getYoloVaultCopy(btcYoloConfig);
565
549
 
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
- ];
550
+ // Risk factors intentionally left unrated for this strategy for now.
551
+ // const yoloRiskFactors: RiskFactor[] = [ ... ];
552
+ const yoloRiskFactors: RiskFactor[] = [];
588
553
 
589
554
  export const YoloVaultStrategies: IStrategyMetadata<YoloVaultSettings>[] = [
590
555
  {
@@ -603,9 +568,8 @@ export const YoloVaultStrategies: IStrategyMetadata<YoloVaultSettings>[] = [
603
568
  contractLink: "",
604
569
  },
605
570
  accessControl: {
606
- type: AccessControlType.STANDARD_ACCOUNT,
607
- addresses: [ContractAddr.from("0x46ba20c2db9c8032aa2e60a3c2487728756c93fb5ef552e00192827434b8b5f")],
608
- timeLock: "7 Days",
571
+ type: AccessControlType.ROLE_BASED_ACCESS,
572
+ addresses: [MY_ACCESS_CONTROL.address],
609
573
  },
610
574
  },
611
575
  redemptionInfo: {
@@ -624,7 +588,7 @@ export const YoloVaultStrategies: IStrategyMetadata<YoloVaultSettings>[] = [
624
588
  protocols: [],
625
589
  risk: {
626
590
  riskFactor: yoloRiskFactors,
627
- netRisk: getWeightedRisk(yoloRiskFactors),
591
+ netRisk: 0,
628
592
  notARisks: getNoRiskTags(yoloRiskFactors),
629
593
  },
630
594
  additionalInfo: {