@strkfarm/sdk 2.0.0-dev.36 → 2.0.0-dev.38

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.
package/dist/index.mjs CHANGED
@@ -39180,6 +39180,7 @@ var HyperLSTStrategies = [
39180
39180
 
39181
39181
  // src/strategies/token-boosted-xstrk-carry-strategy.tsx
39182
39182
  import { uint256 as uint25625, num as num14 } from "starknet";
39183
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
39183
39184
  var BoostedxSTRKCarryStrategy = class _BoostedxSTRKCarryStrategy extends SVKStrategy {
39184
39185
  constructor(config, pricer, metadata) {
39185
39186
  super(config, pricer, metadata);
@@ -39818,15 +39819,15 @@ var boostedxSTRKCarrySettings = {
39818
39819
  leafAdapters: [],
39819
39820
  adapters: [],
39820
39821
  // Calc using the maxLTV / targetLTV (0.5)
39821
- targetHealthFactor: 1.32,
39822
+ targetHealthFactor: 1.36,
39822
39823
  // Calc using the maxLTV / maxAcceptableLTV (0.55)
39823
- minHealthFactor: 1.2,
39824
+ minHealthFactor: 1.3,
39824
39825
  vesuPoolId: VesuPools.Prime,
39825
39826
  // New metadata-driven token configuration
39826
39827
  depositToken: Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
39827
39828
  debtToken: Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
39828
39829
  lstHyperToken: Global.getDefaultTokens().find((t) => t.symbol === "xSTRK"),
39829
- maxLTV: 0.66,
39830
+ maxLTV: 0.68,
39830
39831
  targetLTV: 0.5,
39831
39832
  // BTC.Fi rewards flag - false for USDC (uses old report flow)
39832
39833
  hasBtcFiRewards: false,
@@ -39857,13 +39858,13 @@ var wbtcBoostedSettings = {
39857
39858
  ),
39858
39859
  leafAdapters: [],
39859
39860
  adapters: [],
39860
- targetHealthFactor: 1.32,
39861
- minHealthFactor: 1.2,
39861
+ targetHealthFactor: 1.4,
39862
+ minHealthFactor: 1.35,
39862
39863
  vesuPoolId: VesuPools.Prime,
39863
39864
  depositToken: Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
39864
39865
  debtToken: Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
39865
39866
  lstHyperToken: Global.getDefaultTokens().find((t) => t.symbol === "xSTRK"),
39866
- maxLTV: 0.66,
39867
+ maxLTV: 0.7,
39867
39868
  targetLTV: 0.5,
39868
39869
  hasBtcFiRewards: true,
39869
39870
  hyperLstVaultAddress: ContractAddr.from(
@@ -39874,6 +39875,145 @@ var wbtcBoostedSettings = {
39874
39875
  ),
39875
39876
  trovesStrategyId: "hyper_xstrk"
39876
39877
  };
39878
+ var boostedCarryRiskFactors = [
39879
+ {
39880
+ type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
39881
+ value: 2 /* WELL_AUDITED */,
39882
+ // 20% — core trust assumption; SVK is audited but still multi-contract (vault, manager, adapters).
39883
+ weight: 20,
39884
+ reason: "Built on the Starknet Vault Kit (SVK), with audits under the Sherlock-audited branch."
39885
+ },
39886
+ {
39887
+ type: "Liquidation Risk" /* LIQUIDATION_RISK */,
39888
+ value: 3 /* MODERATE_PROBABILITY */,
39889
+ // 20% — tied with smart contract; uncorrelated collateral/debt is the main principal risk here.
39890
+ weight: 20,
39891
+ reason: "Collateral (USDC or WBTC) and STRK debt are not price-correlated. We target ~50% LTV and rebalance above ~55%, with a health-factor buffer, but extreme moves or prolonged monitoring gaps can still trigger liquidation."
39892
+ },
39893
+ {
39894
+ type: "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */,
39895
+ value: 3 /* MODERATE_CONCERNS */,
39896
+ // 15% — below liquidation but above ops risks; every unwind/withdraw depends on xSTRK→STRK depth.
39897
+ weight: 15,
39898
+ reason: "Closing the loop requires selling xSTRK to STRK on DEXes to repay Vesu debt. xSTRK liquidity can be thin at fair prices; larger withdrawals or rebalances may take longer or complete in smaller chunks."
39899
+ },
39900
+ {
39901
+ type: "Technical Risk" /* TECHNICAL_RISK */,
39902
+ value: 3 /* SOME_COMPLEXITY */,
39903
+ // 13% — monitoring/rebalancing stack matters, but usually recoverable without instant loss.
39904
+ weight: 13,
39905
+ reason: "Yield routes across Vesu, Avnu, and Hyper xSTRK with automated monitoring. Technical failures can delay rebalancing."
39906
+ },
39907
+ {
39908
+ type: "Depeg Risk" /* DEPEG_RISK */,
39909
+ value: 3 /* OCCASIONAL_DEPEG */,
39910
+ // 12% — affects yield and swap notionals; USDC/WBTC depeg is rarer than xSTRK/STRK drift.
39911
+ weight: 12,
39912
+ reason: "xSTRK yield depends on its exchange rate vs STRK; USDC and WBTC carry standard stablecoin and BTC market risks."
39913
+ },
39914
+ {
39915
+ type: "Oracle Risk" /* ORACLE_RISK */,
39916
+ value: 2 /* SINGLE_RELIABLE */,
39917
+ // 10% — Vesu HF depends on feeds; Starknet oracles are established but not redundant here.
39918
+ weight: 10,
39919
+ reason: "Vesu collateral and debt valuations rely on Starknet price feeds."
39920
+ },
39921
+ {
39922
+ type: "Counterparty Risk" /* COUNTERPARTY_RISK */,
39923
+ value: 2 /* REPUTABLE_COUNTERPARTY */,
39924
+ // 10% — same tier as oracle; Vesu/Endur/Troves are mature but still protocol counterparty risk.
39925
+ weight: 10,
39926
+ reason: "Exposure to Vesu lending, Endur (xSTRK), and Troves Hyper vault infrastructure."
39927
+ },
39928
+ {
39929
+ type: "Market Risk" /* MARKET_RISK */,
39930
+ value: 3 /* MODERATE_VOLATILITY */,
39931
+ // 5% — largely captured by liquidation + depeg factors; kept small to avoid double-counting vol.
39932
+ weight: 5,
39933
+ reason: "STRK, BTC, and stablecoin volatility can move loan-to-value and swap costs."
39934
+ }
39935
+ ];
39936
+ function getBoostedCarryRisk() {
39937
+ const netRisk = boostedCarryRiskFactors.reduce(
39938
+ (acc, curr) => acc + curr.value * curr.weight,
39939
+ 0
39940
+ ) / boostedCarryRiskFactors.reduce((acc, curr) => acc + curr.weight, 0);
39941
+ return {
39942
+ riskFactor: boostedCarryRiskFactors,
39943
+ netRisk,
39944
+ notARisks: getNoRiskTags(boostedCarryRiskFactors)
39945
+ };
39946
+ }
39947
+ function getBoostedCarryFAQs(depositSymbol, debtSymbol, lstSymbol) {
39948
+ return [
39949
+ {
39950
+ question: `What is ${depositSymbol} Boosted?`,
39951
+ answer: `${depositSymbol} Boosted is a carry-style vault: your ${depositSymbol} is supplied as collateral on Vesu, ${debtSymbol} is borrowed, swapped to ${lstSymbol}, and deposited into Hyper-${lstSymbol} for additional yield on top of the lending loop.`
39952
+ },
39953
+ {
39954
+ question: "How does this strategy generate yield?",
39955
+ answer: `Yield comes from several layers: ${lstSymbol} staking yield inside Hyper-${lstSymbol}, the spread between borrowing ${debtSymbol} and holding ${lstSymbol}, and efficient routing via Avnu. The vault targets about 50% loan-to-value and rebalances when LTV rises above ~55% so risk and yield stay in balance.`
39956
+ },
39957
+ {
39958
+ question: "Which protocols are used?",
39959
+ answer: /* @__PURE__ */ jsxs5("span", { children: [
39960
+ /* @__PURE__ */ jsx6("strong", { children: "Vesu" }),
39961
+ " for collateral and borrowing, ",
39962
+ /* @__PURE__ */ jsx6("strong", { children: "Avnu" }),
39963
+ " ",
39964
+ "for swaps, ",
39965
+ /* @__PURE__ */ jsx6("strong", { children: "Endur" }),
39966
+ " for ",
39967
+ lstSymbol,
39968
+ ", and the Troves",
39969
+ " ",
39970
+ /* @__PURE__ */ jsxs5("strong", { children: [
39971
+ "Hyper-",
39972
+ lstSymbol
39973
+ ] }),
39974
+ " vault for the boosted leg."
39975
+ ] })
39976
+ },
39977
+ {
39978
+ question: "Is there liquidation risk?",
39979
+ answer: `Yes. Your ${depositSymbol} collateral and ${debtSymbol} debt can move in different directions, which affects your health factor on Vesu. We actively monitor positions and rebalance automatically through our systems to keep loan-to-value near target. However, unexpected technical failures or very sharp market moves can still lead to liquidation. Under normal conditions we aim for a buffer of roughly 30% adverse price movement before liquidation becomes likely \u2014 but if monitoring is unavailable for many hours during a trending market, that buffer can be consumed. In extreme scenarios, liquidation remains possible.`
39980
+ },
39981
+ {
39982
+ question: "What do I receive when I deposit?",
39983
+ answer: "You receive vault tokens representing your share of the vault. They reflect both principal and accrued yield."
39984
+ },
39985
+ {
39986
+ question: "How long do withdrawals take?",
39987
+ answer: "Withdrawals typically take 1\u20132 hours. You receive an NFT for your request; funds are sent to the NFT owner once the vault unwinds its positions. The vault must sell xSTRK back to STRK to repay debt \u2014 if DEX liquidity is thin or your withdrawal is large, unwinding can take longer or happen in smaller steps to limit slippage."
39988
+ },
39989
+ {
39990
+ question: "Is this vault non-custodial?",
39991
+ answer: "Yes. The vault runs on-chain. You hold your vault tokens, and positions are transparent via on-chain contracts."
39992
+ },
39993
+ {
39994
+ question: "Are there any fees?",
39995
+ answer: "Troves charges a 10% performance fee on yield only \u2014 not on your deposited principal. The APY shown is already net of this fee. When you withdraw, a 0.1% redemption fee applies. That small fee helps keep the vault efficient for long-term depositors, very short stays create extra swap and rebalancing costs for everyone. If you stay for a reasonable period, your yield will typically far outweigh this one-time charge."
39996
+ },
39997
+ {
39998
+ question: "Is the vault audited?",
39999
+ answer: /* @__PURE__ */ jsxs5("span", { children: [
40000
+ "Yes. The strategy is built on the audited Starknet Vault Kit. See the security details beside the strategy name and the",
40001
+ " ",
40002
+ /* @__PURE__ */ jsx6(
40003
+ "a",
40004
+ {
40005
+ href: "https://github.com/trovesfi/starknet_vault_kit/tree/sherlock-audited",
40006
+ target: "_blank",
40007
+ rel: "noopener noreferrer",
40008
+ style: { textDecoration: "underline" },
40009
+ children: "open-source repo"
40010
+ }
40011
+ ),
40012
+ "."
40013
+ ] })
40014
+ }
40015
+ ];
40016
+ }
39877
40017
  function getStrategySettings2(settings, meta) {
39878
40018
  const depositToken = settings.depositToken;
39879
40019
  const debtToken = settings.debtToken;
@@ -39881,7 +40021,7 @@ function getStrategySettings2(settings, meta) {
39881
40021
  return {
39882
40022
  id: meta.id,
39883
40023
  name: meta.name,
39884
- description: `Deposits ${depositToken.symbol} as collateral on Vesu, borrows ${debtToken.symbol}, swaps to ${lstToken.symbol}, and deposits into Hyper-${lstToken.symbol} for boosted yield`,
40024
+ description: `Deposits ${depositToken.symbol} as collateral on Vesu, borrows ${debtToken.symbol}, swaps to ${lstToken.symbol}, and deposits into Hyper-${lstToken.symbol} for boosted yield. Target LTV is about 50%, with rebalances happening when LTV is above 55%.`,
39885
40025
  address: settings.vaultAddress,
39886
40026
  launchBlock: meta.launchBlock,
39887
40027
  type: "ERC4626",
@@ -39891,13 +40031,8 @@ function getStrategySettings2(settings, meta) {
39891
40031
  },
39892
40032
  depositTokens: [depositToken],
39893
40033
  additionalInfo: getBoostedxSTRKCarrySettings(settings),
39894
- // TODO: config lateron
39895
- risk: {
39896
- riskFactor: [],
39897
- netRisk: 0,
39898
- notARisks: []
39899
- },
39900
- protocols: [Protocols.VESU, Protocols.TROVES],
40034
+ risk: getBoostedCarryRisk(),
40035
+ protocols: [Protocols.VESU, Protocols.ENDUR, Protocols.TROVES],
39901
40036
  curator: {
39902
40037
  name: "Unwrap Labs",
39903
40038
  logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
@@ -39905,7 +40040,7 @@ function getStrategySettings2(settings, meta) {
39905
40040
  settings: {
39906
40041
  maxTVL: Web3Number.fromWei(0, depositToken.decimals),
39907
40042
  isPaused: false,
39908
- isAudited: false,
40043
+ isAudited: true,
39909
40044
  isInstantWithdrawal: false,
39910
40045
  hideHarvestInfo: true,
39911
40046
  quoteToken: depositToken,
@@ -39918,27 +40053,32 @@ function getStrategySettings2(settings, meta) {
39918
40053
  ]
39919
40054
  },
39920
40055
  contractDetails: getContractDetails(settings),
39921
- // TODO: config later
39922
- faqs: [],
40056
+ faqs: getBoostedCarryFAQs(
40057
+ depositToken.symbol,
40058
+ debtToken.symbol,
40059
+ lstToken.symbol
40060
+ ),
40061
+ apyMethodology: "APY reflects net returns after a 10% performance fee on yield (not on principal). Underlying xSTRK appreciation and Vesu borrow costs can move over time; displayed APY is an estimate.",
39923
40062
  investmentSteps: [
39924
40063
  `Deposit ${depositToken.symbol} into the vault`,
39925
40064
  `${depositToken.symbol} is supplied as collateral on Vesu, ${debtToken.symbol} is borrowed`,
39926
40065
  `Borrowed ${debtToken.symbol} is swapped to ${lstToken.symbol} via Avnu`,
39927
40066
  `${lstToken.symbol} is deposited into the Hyper-${lstToken.symbol} vault for additional yield`,
39928
- `On withdrawal, the pipeline reverses to return ${depositToken.symbol}`
40067
+ `Actively monitored and rebalanced to maintain optimal LTV and yield.`
39929
40068
  ],
39930
40069
  // TODO: config later
39931
40070
  tags: ["Meta Vaults" /* META_VAULT */],
39932
40071
  security: {
39933
40072
  auditStatus: "Audited" /* AUDITED */,
39934
40073
  sourceCode: {
39935
- type: "Closed Source" /* CLOSED_SOURCE */,
39936
- contractLink: "https://github.com/trovesfi/troves-contracts"
40074
+ type: "Open Source" /* OPEN_SOURCE */,
40075
+ contractLink: "https://github.com/trovesfi/starknet_vault_kit/tree/sherlock-audited"
39937
40076
  },
40077
+ // TODO
39938
40078
  accessControl: {
39939
40079
  type: "Standard Account" /* STANDARD_ACCOUNT */,
39940
40080
  addresses: [ContractAddr.from("0x0")],
39941
- timeLock: "2 Days"
40081
+ timeLock: "0 Days"
39942
40082
  }
39943
40083
  },
39944
40084
  redemptionInfo: {
@@ -39957,8 +40097,8 @@ function getStrategySettings2(settings, meta) {
39957
40097
  }
39958
40098
  ]
39959
40099
  },
39960
- usualTimeToEarnings: null,
39961
- usualTimeToEarningsDescription: null
40100
+ usualTimeToEarnings: "2 weeks",
40101
+ usualTimeToEarningsDescription: "This strategy depends on Hyper xSTRK's yield, which depends on the price of xSTRK on DEX appreciating. It may be possible the increase is not continuous and generally rebases atleast once every 2 weeks."
39962
40102
  };
39963
40103
  }
39964
40104
  var BoostedxSTRKCarryStrategies = [
@@ -40132,6 +40272,7 @@ var FactoryStrategyType = /* @__PURE__ */ ((FactoryStrategyType2) => {
40132
40272
  FactoryStrategyType2["VESU_REBALANCE"] = "VESU_REBALANCE";
40133
40273
  FactoryStrategyType2["SENSEI"] = "SENSEI";
40134
40274
  FactoryStrategyType2["YOLO_VAULT"] = "YOLO_VAULT";
40275
+ FactoryStrategyType2["BOOSTEDXSTRKCARRY"] = "BOOSTEDXSTRKCARRY";
40135
40276
  return FactoryStrategyType2;
40136
40277
  })(FactoryStrategyType || {});
40137
40278
  function createUniversalStrategy2(config, pricer, metadata) {
@@ -40152,6 +40293,9 @@ function createVesuRebalanceStrategy2(config, pricer, metadata) {
40152
40293
  function createSenseiStrategy(config, pricer, metadata) {
40153
40294
  return new SenseiVault(config, pricer, metadata);
40154
40295
  }
40296
+ function createBoostedXSTRKCarryStrategy(config, pricer, metadata) {
40297
+ return new BoostedxSTRKCarryStrategy(config, pricer, metadata);
40298
+ }
40155
40299
  function getStrategyTypeFromMetadata(metadata) {
40156
40300
  const info = metadata.additionalInfo;
40157
40301
  if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
@@ -40160,6 +40304,9 @@ function getStrategyTypeFromMetadata(metadata) {
40160
40304
  if (info && "borrowable_assets" in info && "underlyingToken" in info) {
40161
40305
  return "HYPER_LST" /* HYPER_LST */;
40162
40306
  }
40307
+ if (info && "depositToken" in info && "debtToken" in info && "lstToken" in info) {
40308
+ return "BOOSTEDXSTRKCARRY" /* BOOSTEDXSTRKCARRY */;
40309
+ }
40163
40310
  if (info && ("newBounds" in info || typeof info.newBounds !== "undefined") && "rebalanceConditions" in info && "quoteAsset" in info) {
40164
40311
  return "EKUBO_CL" /* EKUBO_CL */;
40165
40312
  }
@@ -40214,6 +40361,12 @@ function createStrategy(type, config, pricer, metadata) {
40214
40361
  pricer,
40215
40362
  metadata
40216
40363
  );
40364
+ case "BOOSTEDXSTRKCARRY" /* BOOSTEDXSTRKCARRY */:
40365
+ return createBoostedXSTRKCarryStrategy(
40366
+ config,
40367
+ pricer,
40368
+ metadata
40369
+ );
40217
40370
  default:
40218
40371
  throw new Error(`Unknown strategy type: ${type}`);
40219
40372
  }
@@ -40906,6 +41059,7 @@ export {
40906
41059
  assert,
40907
41060
  buildStrategyRegistry,
40908
41061
  configureLogger,
41062
+ createBoostedXSTRKCarryStrategy,
40909
41063
  createEkuboCLStrategy,
40910
41064
  createHyperLSTStrategy,
40911
41065
  createSenseiStrategy,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strkfarm/sdk",
3
- "version": "2.0.0-dev.36",
3
+ "version": "2.0.0-dev.38",
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",
@@ -12,6 +12,7 @@ import {
12
12
  import { YoLoVault, YoloVaultSettings } from "./yoloVault";
13
13
  import { VesuRebalance, VesuRebalanceSettings } from "./vesu-rebalance";
14
14
  import { SenseiVault, SenseiVaultSettings } from "./sensei";
15
+ import { BoostedxSTRKCarryStrategy, BoostedxSTRKCarryStrategySettings } from "./token-boosted-xstrk-carry-strategy";
15
16
 
16
17
  export enum FactoryStrategyType {
17
18
  UNIVERSAL = "UNIVERSAL",
@@ -19,7 +20,8 @@ export enum FactoryStrategyType {
19
20
  HYPER_LST = "HYPER_LST",
20
21
  VESU_REBALANCE = "VESU_REBALANCE",
21
22
  SENSEI = "SENSEI",
22
- YOLO_VAULT = "YOLO_VAULT"
23
+ YOLO_VAULT = "YOLO_VAULT",
24
+ BOOSTEDXSTRKCARRY = "BOOSTEDXSTRKCARRY"
23
25
  }
24
26
 
25
27
  export function createUniversalStrategy(
@@ -70,6 +72,14 @@ export function createSenseiStrategy(
70
72
  return new SenseiVault(config, pricer, metadata);
71
73
  }
72
74
 
75
+ export function createBoostedXSTRKCarryStrategy(
76
+ config: IConfig,
77
+ pricer: PricerBase,
78
+ metadata: IStrategyMetadata<BoostedxSTRKCarryStrategySettings>
79
+ ): BoostedxSTRKCarryStrategy<BoostedxSTRKCarryStrategySettings> {
80
+ return new BoostedxSTRKCarryStrategy<BoostedxSTRKCarryStrategySettings>(config, pricer, metadata);
81
+ }
82
+
73
83
  /**
74
84
  * Determines the strategy type from metadata by inspecting the additionalInfo structure
75
85
  */
@@ -77,7 +87,7 @@ export function getStrategyTypeFromMetadata(
77
87
  metadata: IStrategyMetadata<any>
78
88
  ): FactoryStrategyType {
79
89
  const info = metadata.additionalInfo;
80
-
90
+
81
91
  if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
82
92
  return FactoryStrategyType.YOLO_VAULT;
83
93
  }
@@ -87,6 +97,10 @@ export function getStrategyTypeFromMetadata(
87
97
  return FactoryStrategyType.HYPER_LST;
88
98
  }
89
99
 
100
+ if (info && "depositToken" in info && "debtToken" in info && "lstToken" in info) {
101
+ return FactoryStrategyType.BOOSTEDXSTRKCARRY;
102
+ }
103
+
90
104
  // Check for EkuboCL (has newBounds, rebalanceConditions, quoteAsset)
91
105
  if (
92
106
  info &&
@@ -173,7 +187,13 @@ export function createStrategy(
173
187
  pricer,
174
188
  metadata as IStrategyMetadata<YoloVaultSettings>
175
189
  );
190
+ case FactoryStrategyType.BOOSTEDXSTRKCARRY:
191
+ return createBoostedXSTRKCarryStrategy(
192
+ config,
193
+ pricer,
194
+ metadata as IStrategyMetadata<BoostedxSTRKCarryStrategySettings>
195
+ );
176
196
  default:
177
197
  throw new Error(`Unknown strategy type: ${type}`);
178
198
  }
179
- }
199
+ }