@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.browser.global.js +177 -23
- package/dist/index.browser.mjs +177 -23
- package/dist/index.d.ts +5 -3
- package/dist/index.js +178 -23
- package/dist/index.mjs +177 -23
- package/package.json +1 -1
- package/src/strategies/factory.ts +23 -3
- package/src/strategies/token-boosted-xstrk-carry-strategy.tsx +190 -24
|
@@ -28000,6 +28000,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
28000
28000
|
assert: () => assert3,
|
|
28001
28001
|
buildStrategyRegistry: () => buildStrategyRegistry,
|
|
28002
28002
|
configureLogger: () => configureLogger,
|
|
28003
|
+
createBoostedXSTRKCarryStrategy: () => createBoostedXSTRKCarryStrategy,
|
|
28003
28004
|
createEkuboCLStrategy: () => createEkuboCLStrategy,
|
|
28004
28005
|
createHyperLSTStrategy: () => createHyperLSTStrategy,
|
|
28005
28006
|
createSenseiStrategy: () => createSenseiStrategy,
|
|
@@ -126416,6 +126417,7 @@ spurious results.`);
|
|
|
126416
126417
|
];
|
|
126417
126418
|
|
|
126418
126419
|
// src/strategies/token-boosted-xstrk-carry-strategy.tsx
|
|
126420
|
+
var import_jsx_runtime6 = __toESM(require_jsx_runtime());
|
|
126419
126421
|
var BoostedxSTRKCarryStrategy = class _BoostedxSTRKCarryStrategy extends SVKStrategy {
|
|
126420
126422
|
constructor(config3, pricer, metadata) {
|
|
126421
126423
|
super(config3, pricer, metadata);
|
|
@@ -127054,15 +127056,15 @@ spurious results.`);
|
|
|
127054
127056
|
leafAdapters: [],
|
|
127055
127057
|
adapters: [],
|
|
127056
127058
|
// Calc using the maxLTV / targetLTV (0.5)
|
|
127057
|
-
targetHealthFactor: 1.
|
|
127059
|
+
targetHealthFactor: 1.36,
|
|
127058
127060
|
// Calc using the maxLTV / maxAcceptableLTV (0.55)
|
|
127059
|
-
minHealthFactor: 1.
|
|
127061
|
+
minHealthFactor: 1.3,
|
|
127060
127062
|
vesuPoolId: VesuPools.Prime,
|
|
127061
127063
|
// New metadata-driven token configuration
|
|
127062
127064
|
depositToken: Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
|
|
127063
127065
|
debtToken: Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
127064
127066
|
lstHyperToken: Global.getDefaultTokens().find((t) => t.symbol === "xSTRK"),
|
|
127065
|
-
maxLTV: 0.
|
|
127067
|
+
maxLTV: 0.68,
|
|
127066
127068
|
targetLTV: 0.5,
|
|
127067
127069
|
// BTC.Fi rewards flag - false for USDC (uses old report flow)
|
|
127068
127070
|
hasBtcFiRewards: false,
|
|
@@ -127093,13 +127095,13 @@ spurious results.`);
|
|
|
127093
127095
|
),
|
|
127094
127096
|
leafAdapters: [],
|
|
127095
127097
|
adapters: [],
|
|
127096
|
-
targetHealthFactor: 1.
|
|
127097
|
-
minHealthFactor: 1.
|
|
127098
|
+
targetHealthFactor: 1.4,
|
|
127099
|
+
minHealthFactor: 1.35,
|
|
127098
127100
|
vesuPoolId: VesuPools.Prime,
|
|
127099
127101
|
depositToken: Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
|
|
127100
127102
|
debtToken: Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
127101
127103
|
lstHyperToken: Global.getDefaultTokens().find((t) => t.symbol === "xSTRK"),
|
|
127102
|
-
maxLTV: 0.
|
|
127104
|
+
maxLTV: 0.7,
|
|
127103
127105
|
targetLTV: 0.5,
|
|
127104
127106
|
hasBtcFiRewards: true,
|
|
127105
127107
|
hyperLstVaultAddress: ContractAddr.from(
|
|
@@ -127110,6 +127112,145 @@ spurious results.`);
|
|
|
127110
127112
|
),
|
|
127111
127113
|
trovesStrategyId: "hyper_xstrk"
|
|
127112
127114
|
};
|
|
127115
|
+
var boostedCarryRiskFactors = [
|
|
127116
|
+
{
|
|
127117
|
+
type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
|
|
127118
|
+
value: 2 /* WELL_AUDITED */,
|
|
127119
|
+
// 20% — core trust assumption; SVK is audited but still multi-contract (vault, manager, adapters).
|
|
127120
|
+
weight: 20,
|
|
127121
|
+
reason: "Built on the Starknet Vault Kit (SVK), with audits under the Sherlock-audited branch."
|
|
127122
|
+
},
|
|
127123
|
+
{
|
|
127124
|
+
type: "Liquidation Risk" /* LIQUIDATION_RISK */,
|
|
127125
|
+
value: 3 /* MODERATE_PROBABILITY */,
|
|
127126
|
+
// 20% — tied with smart contract; uncorrelated collateral/debt is the main principal risk here.
|
|
127127
|
+
weight: 20,
|
|
127128
|
+
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."
|
|
127129
|
+
},
|
|
127130
|
+
{
|
|
127131
|
+
type: "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */,
|
|
127132
|
+
value: 3 /* MODERATE_CONCERNS */,
|
|
127133
|
+
// 15% — below liquidation but above ops risks; every unwind/withdraw depends on xSTRK→STRK depth.
|
|
127134
|
+
weight: 15,
|
|
127135
|
+
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."
|
|
127136
|
+
},
|
|
127137
|
+
{
|
|
127138
|
+
type: "Technical Risk" /* TECHNICAL_RISK */,
|
|
127139
|
+
value: 3 /* SOME_COMPLEXITY */,
|
|
127140
|
+
// 13% — monitoring/rebalancing stack matters, but usually recoverable without instant loss.
|
|
127141
|
+
weight: 13,
|
|
127142
|
+
reason: "Yield routes across Vesu, Avnu, and Hyper xSTRK with automated monitoring. Technical failures can delay rebalancing."
|
|
127143
|
+
},
|
|
127144
|
+
{
|
|
127145
|
+
type: "Depeg Risk" /* DEPEG_RISK */,
|
|
127146
|
+
value: 3 /* OCCASIONAL_DEPEG */,
|
|
127147
|
+
// 12% — affects yield and swap notionals; USDC/WBTC depeg is rarer than xSTRK/STRK drift.
|
|
127148
|
+
weight: 12,
|
|
127149
|
+
reason: "xSTRK yield depends on its exchange rate vs STRK; USDC and WBTC carry standard stablecoin and BTC market risks."
|
|
127150
|
+
},
|
|
127151
|
+
{
|
|
127152
|
+
type: "Oracle Risk" /* ORACLE_RISK */,
|
|
127153
|
+
value: 2 /* SINGLE_RELIABLE */,
|
|
127154
|
+
// 10% — Vesu HF depends on feeds; Starknet oracles are established but not redundant here.
|
|
127155
|
+
weight: 10,
|
|
127156
|
+
reason: "Vesu collateral and debt valuations rely on Starknet price feeds."
|
|
127157
|
+
},
|
|
127158
|
+
{
|
|
127159
|
+
type: "Counterparty Risk" /* COUNTERPARTY_RISK */,
|
|
127160
|
+
value: 2 /* REPUTABLE_COUNTERPARTY */,
|
|
127161
|
+
// 10% — same tier as oracle; Vesu/Endur/Troves are mature but still protocol counterparty risk.
|
|
127162
|
+
weight: 10,
|
|
127163
|
+
reason: "Exposure to Vesu lending, Endur (xSTRK), and Troves Hyper vault infrastructure."
|
|
127164
|
+
},
|
|
127165
|
+
{
|
|
127166
|
+
type: "Market Risk" /* MARKET_RISK */,
|
|
127167
|
+
value: 3 /* MODERATE_VOLATILITY */,
|
|
127168
|
+
// 5% — largely captured by liquidation + depeg factors; kept small to avoid double-counting vol.
|
|
127169
|
+
weight: 5,
|
|
127170
|
+
reason: "STRK, BTC, and stablecoin volatility can move loan-to-value and swap costs."
|
|
127171
|
+
}
|
|
127172
|
+
];
|
|
127173
|
+
function getBoostedCarryRisk() {
|
|
127174
|
+
const netRisk = boostedCarryRiskFactors.reduce(
|
|
127175
|
+
(acc, curr) => acc + curr.value * curr.weight,
|
|
127176
|
+
0
|
|
127177
|
+
) / boostedCarryRiskFactors.reduce((acc, curr) => acc + curr.weight, 0);
|
|
127178
|
+
return {
|
|
127179
|
+
riskFactor: boostedCarryRiskFactors,
|
|
127180
|
+
netRisk,
|
|
127181
|
+
notARisks: getNoRiskTags(boostedCarryRiskFactors)
|
|
127182
|
+
};
|
|
127183
|
+
}
|
|
127184
|
+
function getBoostedCarryFAQs(depositSymbol, debtSymbol, lstSymbol) {
|
|
127185
|
+
return [
|
|
127186
|
+
{
|
|
127187
|
+
question: `What is ${depositSymbol} Boosted?`,
|
|
127188
|
+
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.`
|
|
127189
|
+
},
|
|
127190
|
+
{
|
|
127191
|
+
question: "How does this strategy generate yield?",
|
|
127192
|
+
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.`
|
|
127193
|
+
},
|
|
127194
|
+
{
|
|
127195
|
+
question: "Which protocols are used?",
|
|
127196
|
+
answer: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { children: [
|
|
127197
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("strong", { children: "Vesu" }),
|
|
127198
|
+
" for collateral and borrowing, ",
|
|
127199
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("strong", { children: "Avnu" }),
|
|
127200
|
+
" ",
|
|
127201
|
+
"for swaps, ",
|
|
127202
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("strong", { children: "Endur" }),
|
|
127203
|
+
" for ",
|
|
127204
|
+
lstSymbol,
|
|
127205
|
+
", and the Troves",
|
|
127206
|
+
" ",
|
|
127207
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("strong", { children: [
|
|
127208
|
+
"Hyper-",
|
|
127209
|
+
lstSymbol
|
|
127210
|
+
] }),
|
|
127211
|
+
" vault for the boosted leg."
|
|
127212
|
+
] })
|
|
127213
|
+
},
|
|
127214
|
+
{
|
|
127215
|
+
question: "Is there liquidation risk?",
|
|
127216
|
+
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.`
|
|
127217
|
+
},
|
|
127218
|
+
{
|
|
127219
|
+
question: "What do I receive when I deposit?",
|
|
127220
|
+
answer: "You receive vault tokens representing your share of the vault. They reflect both principal and accrued yield."
|
|
127221
|
+
},
|
|
127222
|
+
{
|
|
127223
|
+
question: "How long do withdrawals take?",
|
|
127224
|
+
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."
|
|
127225
|
+
},
|
|
127226
|
+
{
|
|
127227
|
+
question: "Is this vault non-custodial?",
|
|
127228
|
+
answer: "Yes. The vault runs on-chain. You hold your vault tokens, and positions are transparent via on-chain contracts."
|
|
127229
|
+
},
|
|
127230
|
+
{
|
|
127231
|
+
question: "Are there any fees?",
|
|
127232
|
+
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."
|
|
127233
|
+
},
|
|
127234
|
+
{
|
|
127235
|
+
question: "Is the vault audited?",
|
|
127236
|
+
answer: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { children: [
|
|
127237
|
+
"Yes. The strategy is built on the audited Starknet Vault Kit. See the security details beside the strategy name and the",
|
|
127238
|
+
" ",
|
|
127239
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
127240
|
+
"a",
|
|
127241
|
+
{
|
|
127242
|
+
href: "https://github.com/trovesfi/starknet_vault_kit/tree/sherlock-audited",
|
|
127243
|
+
target: "_blank",
|
|
127244
|
+
rel: "noopener noreferrer",
|
|
127245
|
+
style: { textDecoration: "underline" },
|
|
127246
|
+
children: "open-source repo"
|
|
127247
|
+
}
|
|
127248
|
+
),
|
|
127249
|
+
"."
|
|
127250
|
+
] })
|
|
127251
|
+
}
|
|
127252
|
+
];
|
|
127253
|
+
}
|
|
127113
127254
|
function getStrategySettings2(settings2, meta) {
|
|
127114
127255
|
const depositToken = settings2.depositToken;
|
|
127115
127256
|
const debtToken = settings2.debtToken;
|
|
@@ -127117,7 +127258,7 @@ spurious results.`);
|
|
|
127117
127258
|
return {
|
|
127118
127259
|
id: meta.id,
|
|
127119
127260
|
name: meta.name,
|
|
127120
|
-
description: `Deposits ${depositToken.symbol} as collateral on Vesu, borrows ${debtToken.symbol}, swaps to ${lstToken.symbol}, and deposits into Hyper-${lstToken.symbol} for boosted yield
|
|
127261
|
+
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%.`,
|
|
127121
127262
|
address: settings2.vaultAddress,
|
|
127122
127263
|
launchBlock: meta.launchBlock,
|
|
127123
127264
|
type: "ERC4626",
|
|
@@ -127127,13 +127268,8 @@ spurious results.`);
|
|
|
127127
127268
|
},
|
|
127128
127269
|
depositTokens: [depositToken],
|
|
127129
127270
|
additionalInfo: getBoostedxSTRKCarrySettings(settings2),
|
|
127130
|
-
|
|
127131
|
-
|
|
127132
|
-
riskFactor: [],
|
|
127133
|
-
netRisk: 0,
|
|
127134
|
-
notARisks: []
|
|
127135
|
-
},
|
|
127136
|
-
protocols: [Protocols.VESU, Protocols.TROVES],
|
|
127271
|
+
risk: getBoostedCarryRisk(),
|
|
127272
|
+
protocols: [Protocols.VESU, Protocols.ENDUR, Protocols.TROVES],
|
|
127137
127273
|
curator: {
|
|
127138
127274
|
name: "Unwrap Labs",
|
|
127139
127275
|
logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
|
|
@@ -127141,7 +127277,7 @@ spurious results.`);
|
|
|
127141
127277
|
settings: {
|
|
127142
127278
|
maxTVL: Web3Number.fromWei(0, depositToken.decimals),
|
|
127143
127279
|
isPaused: false,
|
|
127144
|
-
isAudited:
|
|
127280
|
+
isAudited: true,
|
|
127145
127281
|
isInstantWithdrawal: false,
|
|
127146
127282
|
hideHarvestInfo: true,
|
|
127147
127283
|
quoteToken: depositToken,
|
|
@@ -127154,27 +127290,32 @@ spurious results.`);
|
|
|
127154
127290
|
]
|
|
127155
127291
|
},
|
|
127156
127292
|
contractDetails: getContractDetails(settings2),
|
|
127157
|
-
|
|
127158
|
-
|
|
127293
|
+
faqs: getBoostedCarryFAQs(
|
|
127294
|
+
depositToken.symbol,
|
|
127295
|
+
debtToken.symbol,
|
|
127296
|
+
lstToken.symbol
|
|
127297
|
+
),
|
|
127298
|
+
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.",
|
|
127159
127299
|
investmentSteps: [
|
|
127160
127300
|
`Deposit ${depositToken.symbol} into the vault`,
|
|
127161
127301
|
`${depositToken.symbol} is supplied as collateral on Vesu, ${debtToken.symbol} is borrowed`,
|
|
127162
127302
|
`Borrowed ${debtToken.symbol} is swapped to ${lstToken.symbol} via Avnu`,
|
|
127163
127303
|
`${lstToken.symbol} is deposited into the Hyper-${lstToken.symbol} vault for additional yield`,
|
|
127164
|
-
`
|
|
127304
|
+
`Actively monitored and rebalanced to maintain optimal LTV and yield.`
|
|
127165
127305
|
],
|
|
127166
127306
|
// TODO: config later
|
|
127167
127307
|
tags: ["Meta Vaults" /* META_VAULT */],
|
|
127168
127308
|
security: {
|
|
127169
127309
|
auditStatus: "Audited" /* AUDITED */,
|
|
127170
127310
|
sourceCode: {
|
|
127171
|
-
type: "
|
|
127172
|
-
contractLink: "https://github.com/trovesfi/
|
|
127311
|
+
type: "Open Source" /* OPEN_SOURCE */,
|
|
127312
|
+
contractLink: "https://github.com/trovesfi/starknet_vault_kit/tree/sherlock-audited"
|
|
127173
127313
|
},
|
|
127314
|
+
// TODO
|
|
127174
127315
|
accessControl: {
|
|
127175
127316
|
type: "Standard Account" /* STANDARD_ACCOUNT */,
|
|
127176
127317
|
addresses: [ContractAddr.from("0x0")],
|
|
127177
|
-
timeLock: "
|
|
127318
|
+
timeLock: "0 Days"
|
|
127178
127319
|
}
|
|
127179
127320
|
},
|
|
127180
127321
|
redemptionInfo: {
|
|
@@ -127193,8 +127334,8 @@ spurious results.`);
|
|
|
127193
127334
|
}
|
|
127194
127335
|
]
|
|
127195
127336
|
},
|
|
127196
|
-
usualTimeToEarnings:
|
|
127197
|
-
usualTimeToEarningsDescription:
|
|
127337
|
+
usualTimeToEarnings: "2 weeks",
|
|
127338
|
+
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."
|
|
127198
127339
|
};
|
|
127199
127340
|
}
|
|
127200
127341
|
var BoostedxSTRKCarryStrategies = [
|
|
@@ -127368,6 +127509,7 @@ spurious results.`);
|
|
|
127368
127509
|
FactoryStrategyType2["VESU_REBALANCE"] = "VESU_REBALANCE";
|
|
127369
127510
|
FactoryStrategyType2["SENSEI"] = "SENSEI";
|
|
127370
127511
|
FactoryStrategyType2["YOLO_VAULT"] = "YOLO_VAULT";
|
|
127512
|
+
FactoryStrategyType2["BOOSTEDXSTRKCARRY"] = "BOOSTEDXSTRKCARRY";
|
|
127371
127513
|
return FactoryStrategyType2;
|
|
127372
127514
|
})(FactoryStrategyType || {});
|
|
127373
127515
|
function createUniversalStrategy2(config3, pricer, metadata) {
|
|
@@ -127388,6 +127530,9 @@ spurious results.`);
|
|
|
127388
127530
|
function createSenseiStrategy(config3, pricer, metadata) {
|
|
127389
127531
|
return new SenseiVault(config3, pricer, metadata);
|
|
127390
127532
|
}
|
|
127533
|
+
function createBoostedXSTRKCarryStrategy(config3, pricer, metadata) {
|
|
127534
|
+
return new BoostedxSTRKCarryStrategy(config3, pricer, metadata);
|
|
127535
|
+
}
|
|
127391
127536
|
function getStrategyTypeFromMetadata(metadata) {
|
|
127392
127537
|
const info = metadata.additionalInfo;
|
|
127393
127538
|
if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
|
|
@@ -127396,6 +127541,9 @@ spurious results.`);
|
|
|
127396
127541
|
if (info && "borrowable_assets" in info && "underlyingToken" in info) {
|
|
127397
127542
|
return "HYPER_LST" /* HYPER_LST */;
|
|
127398
127543
|
}
|
|
127544
|
+
if (info && "depositToken" in info && "debtToken" in info && "lstToken" in info) {
|
|
127545
|
+
return "BOOSTEDXSTRKCARRY" /* BOOSTEDXSTRKCARRY */;
|
|
127546
|
+
}
|
|
127399
127547
|
if (info && ("newBounds" in info || typeof info.newBounds !== "undefined") && "rebalanceConditions" in info && "quoteAsset" in info) {
|
|
127400
127548
|
return "EKUBO_CL" /* EKUBO_CL */;
|
|
127401
127549
|
}
|
|
@@ -127450,6 +127598,12 @@ spurious results.`);
|
|
|
127450
127598
|
pricer,
|
|
127451
127599
|
metadata
|
|
127452
127600
|
);
|
|
127601
|
+
case "BOOSTEDXSTRKCARRY" /* BOOSTEDXSTRKCARRY */:
|
|
127602
|
+
return createBoostedXSTRKCarryStrategy(
|
|
127603
|
+
config3,
|
|
127604
|
+
pricer,
|
|
127605
|
+
metadata
|
|
127606
|
+
);
|
|
127453
127607
|
default:
|
|
127454
127608
|
throw new Error(`Unknown strategy type: ${type}`);
|
|
127455
127609
|
}
|
package/dist/index.browser.mjs
CHANGED
|
@@ -39015,6 +39015,7 @@ var HyperLSTStrategies = [
|
|
|
39015
39015
|
|
|
39016
39016
|
// src/strategies/token-boosted-xstrk-carry-strategy.tsx
|
|
39017
39017
|
import { uint256 as uint25624, num as num14 } from "starknet";
|
|
39018
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
39018
39019
|
var BoostedxSTRKCarryStrategy = class _BoostedxSTRKCarryStrategy extends SVKStrategy {
|
|
39019
39020
|
constructor(config, pricer, metadata) {
|
|
39020
39021
|
super(config, pricer, metadata);
|
|
@@ -39653,15 +39654,15 @@ var boostedxSTRKCarrySettings = {
|
|
|
39653
39654
|
leafAdapters: [],
|
|
39654
39655
|
adapters: [],
|
|
39655
39656
|
// Calc using the maxLTV / targetLTV (0.5)
|
|
39656
|
-
targetHealthFactor: 1.
|
|
39657
|
+
targetHealthFactor: 1.36,
|
|
39657
39658
|
// Calc using the maxLTV / maxAcceptableLTV (0.55)
|
|
39658
|
-
minHealthFactor: 1.
|
|
39659
|
+
minHealthFactor: 1.3,
|
|
39659
39660
|
vesuPoolId: VesuPools.Prime,
|
|
39660
39661
|
// New metadata-driven token configuration
|
|
39661
39662
|
depositToken: Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
|
|
39662
39663
|
debtToken: Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
39663
39664
|
lstHyperToken: Global.getDefaultTokens().find((t) => t.symbol === "xSTRK"),
|
|
39664
|
-
maxLTV: 0.
|
|
39665
|
+
maxLTV: 0.68,
|
|
39665
39666
|
targetLTV: 0.5,
|
|
39666
39667
|
// BTC.Fi rewards flag - false for USDC (uses old report flow)
|
|
39667
39668
|
hasBtcFiRewards: false,
|
|
@@ -39692,13 +39693,13 @@ var wbtcBoostedSettings = {
|
|
|
39692
39693
|
),
|
|
39693
39694
|
leafAdapters: [],
|
|
39694
39695
|
adapters: [],
|
|
39695
|
-
targetHealthFactor: 1.
|
|
39696
|
-
minHealthFactor: 1.
|
|
39696
|
+
targetHealthFactor: 1.4,
|
|
39697
|
+
minHealthFactor: 1.35,
|
|
39697
39698
|
vesuPoolId: VesuPools.Prime,
|
|
39698
39699
|
depositToken: Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
|
|
39699
39700
|
debtToken: Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
39700
39701
|
lstHyperToken: Global.getDefaultTokens().find((t) => t.symbol === "xSTRK"),
|
|
39701
|
-
maxLTV: 0.
|
|
39702
|
+
maxLTV: 0.7,
|
|
39702
39703
|
targetLTV: 0.5,
|
|
39703
39704
|
hasBtcFiRewards: true,
|
|
39704
39705
|
hyperLstVaultAddress: ContractAddr.from(
|
|
@@ -39709,6 +39710,145 @@ var wbtcBoostedSettings = {
|
|
|
39709
39710
|
),
|
|
39710
39711
|
trovesStrategyId: "hyper_xstrk"
|
|
39711
39712
|
};
|
|
39713
|
+
var boostedCarryRiskFactors = [
|
|
39714
|
+
{
|
|
39715
|
+
type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
|
|
39716
|
+
value: 2 /* WELL_AUDITED */,
|
|
39717
|
+
// 20% — core trust assumption; SVK is audited but still multi-contract (vault, manager, adapters).
|
|
39718
|
+
weight: 20,
|
|
39719
|
+
reason: "Built on the Starknet Vault Kit (SVK), with audits under the Sherlock-audited branch."
|
|
39720
|
+
},
|
|
39721
|
+
{
|
|
39722
|
+
type: "Liquidation Risk" /* LIQUIDATION_RISK */,
|
|
39723
|
+
value: 3 /* MODERATE_PROBABILITY */,
|
|
39724
|
+
// 20% — tied with smart contract; uncorrelated collateral/debt is the main principal risk here.
|
|
39725
|
+
weight: 20,
|
|
39726
|
+
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."
|
|
39727
|
+
},
|
|
39728
|
+
{
|
|
39729
|
+
type: "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */,
|
|
39730
|
+
value: 3 /* MODERATE_CONCERNS */,
|
|
39731
|
+
// 15% — below liquidation but above ops risks; every unwind/withdraw depends on xSTRK→STRK depth.
|
|
39732
|
+
weight: 15,
|
|
39733
|
+
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."
|
|
39734
|
+
},
|
|
39735
|
+
{
|
|
39736
|
+
type: "Technical Risk" /* TECHNICAL_RISK */,
|
|
39737
|
+
value: 3 /* SOME_COMPLEXITY */,
|
|
39738
|
+
// 13% — monitoring/rebalancing stack matters, but usually recoverable without instant loss.
|
|
39739
|
+
weight: 13,
|
|
39740
|
+
reason: "Yield routes across Vesu, Avnu, and Hyper xSTRK with automated monitoring. Technical failures can delay rebalancing."
|
|
39741
|
+
},
|
|
39742
|
+
{
|
|
39743
|
+
type: "Depeg Risk" /* DEPEG_RISK */,
|
|
39744
|
+
value: 3 /* OCCASIONAL_DEPEG */,
|
|
39745
|
+
// 12% — affects yield and swap notionals; USDC/WBTC depeg is rarer than xSTRK/STRK drift.
|
|
39746
|
+
weight: 12,
|
|
39747
|
+
reason: "xSTRK yield depends on its exchange rate vs STRK; USDC and WBTC carry standard stablecoin and BTC market risks."
|
|
39748
|
+
},
|
|
39749
|
+
{
|
|
39750
|
+
type: "Oracle Risk" /* ORACLE_RISK */,
|
|
39751
|
+
value: 2 /* SINGLE_RELIABLE */,
|
|
39752
|
+
// 10% — Vesu HF depends on feeds; Starknet oracles are established but not redundant here.
|
|
39753
|
+
weight: 10,
|
|
39754
|
+
reason: "Vesu collateral and debt valuations rely on Starknet price feeds."
|
|
39755
|
+
},
|
|
39756
|
+
{
|
|
39757
|
+
type: "Counterparty Risk" /* COUNTERPARTY_RISK */,
|
|
39758
|
+
value: 2 /* REPUTABLE_COUNTERPARTY */,
|
|
39759
|
+
// 10% — same tier as oracle; Vesu/Endur/Troves are mature but still protocol counterparty risk.
|
|
39760
|
+
weight: 10,
|
|
39761
|
+
reason: "Exposure to Vesu lending, Endur (xSTRK), and Troves Hyper vault infrastructure."
|
|
39762
|
+
},
|
|
39763
|
+
{
|
|
39764
|
+
type: "Market Risk" /* MARKET_RISK */,
|
|
39765
|
+
value: 3 /* MODERATE_VOLATILITY */,
|
|
39766
|
+
// 5% — largely captured by liquidation + depeg factors; kept small to avoid double-counting vol.
|
|
39767
|
+
weight: 5,
|
|
39768
|
+
reason: "STRK, BTC, and stablecoin volatility can move loan-to-value and swap costs."
|
|
39769
|
+
}
|
|
39770
|
+
];
|
|
39771
|
+
function getBoostedCarryRisk() {
|
|
39772
|
+
const netRisk = boostedCarryRiskFactors.reduce(
|
|
39773
|
+
(acc, curr) => acc + curr.value * curr.weight,
|
|
39774
|
+
0
|
|
39775
|
+
) / boostedCarryRiskFactors.reduce((acc, curr) => acc + curr.weight, 0);
|
|
39776
|
+
return {
|
|
39777
|
+
riskFactor: boostedCarryRiskFactors,
|
|
39778
|
+
netRisk,
|
|
39779
|
+
notARisks: getNoRiskTags(boostedCarryRiskFactors)
|
|
39780
|
+
};
|
|
39781
|
+
}
|
|
39782
|
+
function getBoostedCarryFAQs(depositSymbol, debtSymbol, lstSymbol) {
|
|
39783
|
+
return [
|
|
39784
|
+
{
|
|
39785
|
+
question: `What is ${depositSymbol} Boosted?`,
|
|
39786
|
+
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.`
|
|
39787
|
+
},
|
|
39788
|
+
{
|
|
39789
|
+
question: "How does this strategy generate yield?",
|
|
39790
|
+
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.`
|
|
39791
|
+
},
|
|
39792
|
+
{
|
|
39793
|
+
question: "Which protocols are used?",
|
|
39794
|
+
answer: /* @__PURE__ */ jsxs5("span", { children: [
|
|
39795
|
+
/* @__PURE__ */ jsx6("strong", { children: "Vesu" }),
|
|
39796
|
+
" for collateral and borrowing, ",
|
|
39797
|
+
/* @__PURE__ */ jsx6("strong", { children: "Avnu" }),
|
|
39798
|
+
" ",
|
|
39799
|
+
"for swaps, ",
|
|
39800
|
+
/* @__PURE__ */ jsx6("strong", { children: "Endur" }),
|
|
39801
|
+
" for ",
|
|
39802
|
+
lstSymbol,
|
|
39803
|
+
", and the Troves",
|
|
39804
|
+
" ",
|
|
39805
|
+
/* @__PURE__ */ jsxs5("strong", { children: [
|
|
39806
|
+
"Hyper-",
|
|
39807
|
+
lstSymbol
|
|
39808
|
+
] }),
|
|
39809
|
+
" vault for the boosted leg."
|
|
39810
|
+
] })
|
|
39811
|
+
},
|
|
39812
|
+
{
|
|
39813
|
+
question: "Is there liquidation risk?",
|
|
39814
|
+
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.`
|
|
39815
|
+
},
|
|
39816
|
+
{
|
|
39817
|
+
question: "What do I receive when I deposit?",
|
|
39818
|
+
answer: "You receive vault tokens representing your share of the vault. They reflect both principal and accrued yield."
|
|
39819
|
+
},
|
|
39820
|
+
{
|
|
39821
|
+
question: "How long do withdrawals take?",
|
|
39822
|
+
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."
|
|
39823
|
+
},
|
|
39824
|
+
{
|
|
39825
|
+
question: "Is this vault non-custodial?",
|
|
39826
|
+
answer: "Yes. The vault runs on-chain. You hold your vault tokens, and positions are transparent via on-chain contracts."
|
|
39827
|
+
},
|
|
39828
|
+
{
|
|
39829
|
+
question: "Are there any fees?",
|
|
39830
|
+
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."
|
|
39831
|
+
},
|
|
39832
|
+
{
|
|
39833
|
+
question: "Is the vault audited?",
|
|
39834
|
+
answer: /* @__PURE__ */ jsxs5("span", { children: [
|
|
39835
|
+
"Yes. The strategy is built on the audited Starknet Vault Kit. See the security details beside the strategy name and the",
|
|
39836
|
+
" ",
|
|
39837
|
+
/* @__PURE__ */ jsx6(
|
|
39838
|
+
"a",
|
|
39839
|
+
{
|
|
39840
|
+
href: "https://github.com/trovesfi/starknet_vault_kit/tree/sherlock-audited",
|
|
39841
|
+
target: "_blank",
|
|
39842
|
+
rel: "noopener noreferrer",
|
|
39843
|
+
style: { textDecoration: "underline" },
|
|
39844
|
+
children: "open-source repo"
|
|
39845
|
+
}
|
|
39846
|
+
),
|
|
39847
|
+
"."
|
|
39848
|
+
] })
|
|
39849
|
+
}
|
|
39850
|
+
];
|
|
39851
|
+
}
|
|
39712
39852
|
function getStrategySettings2(settings, meta) {
|
|
39713
39853
|
const depositToken = settings.depositToken;
|
|
39714
39854
|
const debtToken = settings.debtToken;
|
|
@@ -39716,7 +39856,7 @@ function getStrategySettings2(settings, meta) {
|
|
|
39716
39856
|
return {
|
|
39717
39857
|
id: meta.id,
|
|
39718
39858
|
name: meta.name,
|
|
39719
|
-
description: `Deposits ${depositToken.symbol} as collateral on Vesu, borrows ${debtToken.symbol}, swaps to ${lstToken.symbol}, and deposits into Hyper-${lstToken.symbol} for boosted yield
|
|
39859
|
+
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%.`,
|
|
39720
39860
|
address: settings.vaultAddress,
|
|
39721
39861
|
launchBlock: meta.launchBlock,
|
|
39722
39862
|
type: "ERC4626",
|
|
@@ -39726,13 +39866,8 @@ function getStrategySettings2(settings, meta) {
|
|
|
39726
39866
|
},
|
|
39727
39867
|
depositTokens: [depositToken],
|
|
39728
39868
|
additionalInfo: getBoostedxSTRKCarrySettings(settings),
|
|
39729
|
-
|
|
39730
|
-
|
|
39731
|
-
riskFactor: [],
|
|
39732
|
-
netRisk: 0,
|
|
39733
|
-
notARisks: []
|
|
39734
|
-
},
|
|
39735
|
-
protocols: [Protocols.VESU, Protocols.TROVES],
|
|
39869
|
+
risk: getBoostedCarryRisk(),
|
|
39870
|
+
protocols: [Protocols.VESU, Protocols.ENDUR, Protocols.TROVES],
|
|
39736
39871
|
curator: {
|
|
39737
39872
|
name: "Unwrap Labs",
|
|
39738
39873
|
logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
|
|
@@ -39740,7 +39875,7 @@ function getStrategySettings2(settings, meta) {
|
|
|
39740
39875
|
settings: {
|
|
39741
39876
|
maxTVL: Web3Number.fromWei(0, depositToken.decimals),
|
|
39742
39877
|
isPaused: false,
|
|
39743
|
-
isAudited:
|
|
39878
|
+
isAudited: true,
|
|
39744
39879
|
isInstantWithdrawal: false,
|
|
39745
39880
|
hideHarvestInfo: true,
|
|
39746
39881
|
quoteToken: depositToken,
|
|
@@ -39753,27 +39888,32 @@ function getStrategySettings2(settings, meta) {
|
|
|
39753
39888
|
]
|
|
39754
39889
|
},
|
|
39755
39890
|
contractDetails: getContractDetails(settings),
|
|
39756
|
-
|
|
39757
|
-
|
|
39891
|
+
faqs: getBoostedCarryFAQs(
|
|
39892
|
+
depositToken.symbol,
|
|
39893
|
+
debtToken.symbol,
|
|
39894
|
+
lstToken.symbol
|
|
39895
|
+
),
|
|
39896
|
+
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.",
|
|
39758
39897
|
investmentSteps: [
|
|
39759
39898
|
`Deposit ${depositToken.symbol} into the vault`,
|
|
39760
39899
|
`${depositToken.symbol} is supplied as collateral on Vesu, ${debtToken.symbol} is borrowed`,
|
|
39761
39900
|
`Borrowed ${debtToken.symbol} is swapped to ${lstToken.symbol} via Avnu`,
|
|
39762
39901
|
`${lstToken.symbol} is deposited into the Hyper-${lstToken.symbol} vault for additional yield`,
|
|
39763
|
-
`
|
|
39902
|
+
`Actively monitored and rebalanced to maintain optimal LTV and yield.`
|
|
39764
39903
|
],
|
|
39765
39904
|
// TODO: config later
|
|
39766
39905
|
tags: ["Meta Vaults" /* META_VAULT */],
|
|
39767
39906
|
security: {
|
|
39768
39907
|
auditStatus: "Audited" /* AUDITED */,
|
|
39769
39908
|
sourceCode: {
|
|
39770
|
-
type: "
|
|
39771
|
-
contractLink: "https://github.com/trovesfi/
|
|
39909
|
+
type: "Open Source" /* OPEN_SOURCE */,
|
|
39910
|
+
contractLink: "https://github.com/trovesfi/starknet_vault_kit/tree/sherlock-audited"
|
|
39772
39911
|
},
|
|
39912
|
+
// TODO
|
|
39773
39913
|
accessControl: {
|
|
39774
39914
|
type: "Standard Account" /* STANDARD_ACCOUNT */,
|
|
39775
39915
|
addresses: [ContractAddr.from("0x0")],
|
|
39776
|
-
timeLock: "
|
|
39916
|
+
timeLock: "0 Days"
|
|
39777
39917
|
}
|
|
39778
39918
|
},
|
|
39779
39919
|
redemptionInfo: {
|
|
@@ -39792,8 +39932,8 @@ function getStrategySettings2(settings, meta) {
|
|
|
39792
39932
|
}
|
|
39793
39933
|
]
|
|
39794
39934
|
},
|
|
39795
|
-
usualTimeToEarnings:
|
|
39796
|
-
usualTimeToEarningsDescription:
|
|
39935
|
+
usualTimeToEarnings: "2 weeks",
|
|
39936
|
+
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."
|
|
39797
39937
|
};
|
|
39798
39938
|
}
|
|
39799
39939
|
var BoostedxSTRKCarryStrategies = [
|
|
@@ -39967,6 +40107,7 @@ var FactoryStrategyType = /* @__PURE__ */ ((FactoryStrategyType2) => {
|
|
|
39967
40107
|
FactoryStrategyType2["VESU_REBALANCE"] = "VESU_REBALANCE";
|
|
39968
40108
|
FactoryStrategyType2["SENSEI"] = "SENSEI";
|
|
39969
40109
|
FactoryStrategyType2["YOLO_VAULT"] = "YOLO_VAULT";
|
|
40110
|
+
FactoryStrategyType2["BOOSTEDXSTRKCARRY"] = "BOOSTEDXSTRKCARRY";
|
|
39970
40111
|
return FactoryStrategyType2;
|
|
39971
40112
|
})(FactoryStrategyType || {});
|
|
39972
40113
|
function createUniversalStrategy2(config, pricer, metadata) {
|
|
@@ -39987,6 +40128,9 @@ function createVesuRebalanceStrategy2(config, pricer, metadata) {
|
|
|
39987
40128
|
function createSenseiStrategy(config, pricer, metadata) {
|
|
39988
40129
|
return new SenseiVault(config, pricer, metadata);
|
|
39989
40130
|
}
|
|
40131
|
+
function createBoostedXSTRKCarryStrategy(config, pricer, metadata) {
|
|
40132
|
+
return new BoostedxSTRKCarryStrategy(config, pricer, metadata);
|
|
40133
|
+
}
|
|
39990
40134
|
function getStrategyTypeFromMetadata(metadata) {
|
|
39991
40135
|
const info = metadata.additionalInfo;
|
|
39992
40136
|
if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
|
|
@@ -39995,6 +40139,9 @@ function getStrategyTypeFromMetadata(metadata) {
|
|
|
39995
40139
|
if (info && "borrowable_assets" in info && "underlyingToken" in info) {
|
|
39996
40140
|
return "HYPER_LST" /* HYPER_LST */;
|
|
39997
40141
|
}
|
|
40142
|
+
if (info && "depositToken" in info && "debtToken" in info && "lstToken" in info) {
|
|
40143
|
+
return "BOOSTEDXSTRKCARRY" /* BOOSTEDXSTRKCARRY */;
|
|
40144
|
+
}
|
|
39998
40145
|
if (info && ("newBounds" in info || typeof info.newBounds !== "undefined") && "rebalanceConditions" in info && "quoteAsset" in info) {
|
|
39999
40146
|
return "EKUBO_CL" /* EKUBO_CL */;
|
|
40000
40147
|
}
|
|
@@ -40049,6 +40196,12 @@ function createStrategy(type, config, pricer, metadata) {
|
|
|
40049
40196
|
pricer,
|
|
40050
40197
|
metadata
|
|
40051
40198
|
);
|
|
40199
|
+
case "BOOSTEDXSTRKCARRY" /* BOOSTEDXSTRKCARRY */:
|
|
40200
|
+
return createBoostedXSTRKCarryStrategy(
|
|
40201
|
+
config,
|
|
40202
|
+
pricer,
|
|
40203
|
+
metadata
|
|
40204
|
+
);
|
|
40052
40205
|
default:
|
|
40053
40206
|
throw new Error(`Unknown strategy type: ${type}`);
|
|
40054
40207
|
}
|
|
@@ -40148,6 +40301,7 @@ export {
|
|
|
40148
40301
|
assert,
|
|
40149
40302
|
buildStrategyRegistry,
|
|
40150
40303
|
configureLogger,
|
|
40304
|
+
createBoostedXSTRKCarryStrategy,
|
|
40151
40305
|
createEkuboCLStrategy,
|
|
40152
40306
|
createHyperLSTStrategy,
|
|
40153
40307
|
createSenseiStrategy,
|