@strkfarm/sdk 2.0.0-dev.41 → 2.0.0-dev.43
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 +14 -31
- package/dist/index.browser.mjs +14 -31
- package/dist/index.d.ts +1 -2
- package/dist/index.js +14 -31
- package/dist/index.mjs +14 -31
- package/package.json +1 -1
- package/src/interfaces/common.tsx +2 -3
- package/src/strategies/ekubo-cl-vault.tsx +0 -5
- package/src/strategies/svk-strategy.ts +7 -0
- package/src/strategies/token-boosted-xstrk-carry-strategy.tsx +8 -9
- package/src/strategies/universal-lst-muliplier-strategy.tsx +0 -19
- package/src/strategies/universal-strategy.tsx +0 -1
|
@@ -105605,9 +105605,6 @@ spurious results.`);
|
|
|
105605
105605
|
async getUserRealizedAPY(blockIdentifier = "latest", sinceBlocks = 6e5) {
|
|
105606
105606
|
throw new Error("getUserRealizedAPY not implemented yet for Ekubo CL Vault strategy");
|
|
105607
105607
|
}
|
|
105608
|
-
async getMaxTVL() {
|
|
105609
|
-
return new Web3Number("0", 18);
|
|
105610
|
-
}
|
|
105611
105608
|
async getUserPositionCards(input) {
|
|
105612
105609
|
const quoteToken = this.metadata.additionalInfo.quoteAsset;
|
|
105613
105610
|
const [userTVL, quotePrice] = await Promise.all([
|
|
@@ -124500,6 +124497,12 @@ spurious results.`);
|
|
|
124500
124497
|
const maxWithdrawables = await Promise.all(this.metadata.additionalInfo.adapters.map((adapter2) => adapter2.adapter.maxWithdraw()));
|
|
124501
124498
|
return maxWithdrawables;
|
|
124502
124499
|
}
|
|
124500
|
+
async getMaxTVL() {
|
|
124501
|
+
const lstToken = this.asset();
|
|
124502
|
+
const depositLimit = await this.contract.call("get_deposit_limit", []);
|
|
124503
|
+
const limitBN = uint256_exports.uint256ToBN(depositLimit);
|
|
124504
|
+
return Web3Number.fromWei(limitBN.toString(), lstToken.decimals);
|
|
124505
|
+
}
|
|
124503
124506
|
};
|
|
124504
124507
|
|
|
124505
124508
|
// src/strategies/universal-strategy.tsx
|
|
@@ -125370,7 +125373,6 @@ spurious results.`);
|
|
|
125370
125373
|
var createUniversalSettings = (tokenSymbol, maxTVLDecimals) => {
|
|
125371
125374
|
const isUSDT = tokenSymbol === "USDT";
|
|
125372
125375
|
return {
|
|
125373
|
-
maxTVL: Web3Number.fromWei(0, maxTVLDecimals),
|
|
125374
125376
|
isAudited: true,
|
|
125375
125377
|
liveStatus: isUSDT ? "Retired" /* RETIRED */ : "Active" /* ACTIVE */,
|
|
125376
125378
|
isPaused: isUSDT,
|
|
@@ -126457,29 +126459,11 @@ spurious results.`);
|
|
|
126457
126459
|
`If required, adjust leverage or re-allocate assets within LST pool on Vesu to optimize yield`
|
|
126458
126460
|
];
|
|
126459
126461
|
}
|
|
126460
|
-
function getMaxTVL(lstSymbol) {
|
|
126461
|
-
const lstMaxTVLs = {
|
|
126462
|
-
xWBTC: 5,
|
|
126463
|
-
xLBTC: 5,
|
|
126464
|
-
xtBTC: 5,
|
|
126465
|
-
xsBTC: 5,
|
|
126466
|
-
xSTRK: 7e6
|
|
126467
|
-
};
|
|
126468
|
-
const maxTVLValue = lstMaxTVLs[lstSymbol] || 0;
|
|
126469
|
-
const token = Global.getDefaultTokens().find(
|
|
126470
|
-
(token2) => token2.symbol === lstSymbol
|
|
126471
|
-
);
|
|
126472
|
-
if (!token) {
|
|
126473
|
-
return Web3Number.fromWei(0, 18);
|
|
126474
|
-
}
|
|
126475
|
-
return Web3Number.fromWei(maxTVLValue, token.decimals);
|
|
126476
|
-
}
|
|
126477
126462
|
function createHyperLSTSettings(lstSymbol, underlyingSymbol) {
|
|
126478
126463
|
const depositToken = Global.getDefaultTokens().find(
|
|
126479
126464
|
(token) => token.symbol === lstSymbol
|
|
126480
126465
|
);
|
|
126481
126466
|
return {
|
|
126482
|
-
maxTVL: getMaxTVL(lstSymbol),
|
|
126483
126467
|
isPaused: false,
|
|
126484
126468
|
liveStatus: "Hot & New \u{1F525}" /* HOT */,
|
|
126485
126469
|
isAudited: true,
|
|
@@ -127311,38 +127295,38 @@ spurious results.`);
|
|
|
127311
127295
|
var boostedCarryRiskFactors = [
|
|
127312
127296
|
{
|
|
127313
127297
|
type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
|
|
127314
|
-
value:
|
|
127298
|
+
value: 1 /* BATTLE_TESTED */,
|
|
127315
127299
|
// 20% — core trust assumption; SVK is audited but still multi-contract (vault, manager, adapters).
|
|
127316
127300
|
weight: 20,
|
|
127317
127301
|
reason: "Built on the Starknet Vault Kit (SVK), with audits under the Sherlock-audited branch."
|
|
127318
127302
|
},
|
|
127319
127303
|
{
|
|
127320
127304
|
type: "Liquidation Risk" /* LIQUIDATION_RISK */,
|
|
127321
|
-
value:
|
|
127305
|
+
value: 2 /* LOW_PROBABILITY */,
|
|
127322
127306
|
// 20% — tied with smart contract; uncorrelated collateral/debt is the main principal risk here.
|
|
127323
127307
|
weight: 20,
|
|
127324
127308
|
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."
|
|
127325
127309
|
},
|
|
127326
127310
|
{
|
|
127327
127311
|
type: "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */,
|
|
127328
|
-
value:
|
|
127312
|
+
value: 1 /* GOOD_LIQUIDITY */,
|
|
127329
127313
|
// 15% — below liquidation but above ops risks; every unwind/withdraw depends on xSTRK→STRK depth.
|
|
127330
127314
|
weight: 15,
|
|
127331
|
-
reason: "Closing the loop requires selling xSTRK to STRK on DEXes to repay Vesu debt.
|
|
127315
|
+
reason: "Closing the loop requires selling xSTRK to STRK on DEXes to repay Vesu debt. larger withdrawals or rebalances may take longer or complete in smaller chunks."
|
|
127332
127316
|
},
|
|
127333
127317
|
{
|
|
127334
127318
|
type: "Technical Risk" /* TECHNICAL_RISK */,
|
|
127335
127319
|
value: 3 /* SOME_COMPLEXITY */,
|
|
127336
127320
|
// 13% — monitoring/rebalancing stack matters, but usually recoverable without instant loss.
|
|
127337
|
-
weight:
|
|
127321
|
+
weight: 10,
|
|
127338
127322
|
reason: "Yield routes across Vesu, Avnu, and Hyper xSTRK with automated monitoring. Technical failures can delay rebalancing."
|
|
127339
127323
|
},
|
|
127340
127324
|
{
|
|
127341
127325
|
type: "Depeg Risk" /* DEPEG_RISK */,
|
|
127342
|
-
value:
|
|
127326
|
+
value: 2 /* GENERALLY_STABLE */,
|
|
127343
127327
|
// 12% — affects yield and swap notionals; USDC/WBTC depeg is rarer than xSTRK/STRK drift.
|
|
127344
127328
|
weight: 12,
|
|
127345
|
-
reason: "xSTRK
|
|
127329
|
+
reason: "Historically, xSTRK's DEX price has been generally stable compared to its true price."
|
|
127346
127330
|
},
|
|
127347
127331
|
{
|
|
127348
127332
|
type: "Oracle Risk" /* ORACLE_RISK */,
|
|
@@ -127362,7 +127346,7 @@ spurious results.`);
|
|
|
127362
127346
|
type: "Market Risk" /* MARKET_RISK */,
|
|
127363
127347
|
value: 3 /* MODERATE_VOLATILITY */,
|
|
127364
127348
|
// 5% — largely captured by liquidation + depeg factors; kept small to avoid double-counting vol.
|
|
127365
|
-
weight:
|
|
127349
|
+
weight: 8,
|
|
127366
127350
|
reason: "STRK, BTC, and stablecoin volatility can move loan-to-value and swap costs."
|
|
127367
127351
|
}
|
|
127368
127352
|
];
|
|
@@ -127471,7 +127455,6 @@ spurious results.`);
|
|
|
127471
127455
|
logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
|
|
127472
127456
|
},
|
|
127473
127457
|
settings: {
|
|
127474
|
-
maxTVL: Web3Number.fromWei(0, depositToken.decimals),
|
|
127475
127458
|
liveStatus: "Hot & New \u{1F525}" /* HOT */,
|
|
127476
127459
|
isPaused: false,
|
|
127477
127460
|
isAudited: true,
|
package/dist/index.browser.mjs
CHANGED
|
@@ -18171,9 +18171,6 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
18171
18171
|
async getUserRealizedAPY(blockIdentifier = "latest", sinceBlocks = 6e5) {
|
|
18172
18172
|
throw new Error("getUserRealizedAPY not implemented yet for Ekubo CL Vault strategy");
|
|
18173
18173
|
}
|
|
18174
|
-
async getMaxTVL() {
|
|
18175
|
-
return new Web3Number("0", 18);
|
|
18176
|
-
}
|
|
18177
18174
|
async getUserPositionCards(input) {
|
|
18178
18175
|
const quoteToken = this.metadata.additionalInfo.quoteAsset;
|
|
18179
18176
|
const [userTVL, quotePrice] = await Promise.all([
|
|
@@ -37094,6 +37091,12 @@ var SVKStrategy = class extends BaseStrategy {
|
|
|
37094
37091
|
const maxWithdrawables = await Promise.all(this.metadata.additionalInfo.adapters.map((adapter) => adapter.adapter.maxWithdraw()));
|
|
37095
37092
|
return maxWithdrawables;
|
|
37096
37093
|
}
|
|
37094
|
+
async getMaxTVL() {
|
|
37095
|
+
const lstToken = this.asset();
|
|
37096
|
+
const depositLimit = await this.contract.call("get_deposit_limit", []);
|
|
37097
|
+
const limitBN = uint25621.uint256ToBN(depositLimit);
|
|
37098
|
+
return Web3Number.fromWei(limitBN.toString(), lstToken.decimals);
|
|
37099
|
+
}
|
|
37097
37100
|
};
|
|
37098
37101
|
|
|
37099
37102
|
// src/strategies/universal-strategy.tsx
|
|
@@ -37964,7 +37967,6 @@ var getUniversalRisk = () => ({
|
|
|
37964
37967
|
var createUniversalSettings = (tokenSymbol, maxTVLDecimals) => {
|
|
37965
37968
|
const isUSDT = tokenSymbol === "USDT";
|
|
37966
37969
|
return {
|
|
37967
|
-
maxTVL: Web3Number.fromWei(0, maxTVLDecimals),
|
|
37968
37970
|
isAudited: true,
|
|
37969
37971
|
liveStatus: isUSDT ? "Retired" /* RETIRED */ : "Active" /* ACTIVE */,
|
|
37970
37972
|
isPaused: isUSDT,
|
|
@@ -39054,29 +39056,11 @@ function getInvestmentSteps(lstSymbol, underlyingSymbol) {
|
|
|
39054
39056
|
`If required, adjust leverage or re-allocate assets within LST pool on Vesu to optimize yield`
|
|
39055
39057
|
];
|
|
39056
39058
|
}
|
|
39057
|
-
function getMaxTVL(lstSymbol) {
|
|
39058
|
-
const lstMaxTVLs = {
|
|
39059
|
-
xWBTC: 5,
|
|
39060
|
-
xLBTC: 5,
|
|
39061
|
-
xtBTC: 5,
|
|
39062
|
-
xsBTC: 5,
|
|
39063
|
-
xSTRK: 7e6
|
|
39064
|
-
};
|
|
39065
|
-
const maxTVLValue = lstMaxTVLs[lstSymbol] || 0;
|
|
39066
|
-
const token = Global.getDefaultTokens().find(
|
|
39067
|
-
(token2) => token2.symbol === lstSymbol
|
|
39068
|
-
);
|
|
39069
|
-
if (!token) {
|
|
39070
|
-
return Web3Number.fromWei(0, 18);
|
|
39071
|
-
}
|
|
39072
|
-
return Web3Number.fromWei(maxTVLValue, token.decimals);
|
|
39073
|
-
}
|
|
39074
39059
|
function createHyperLSTSettings(lstSymbol, underlyingSymbol) {
|
|
39075
39060
|
const depositToken = Global.getDefaultTokens().find(
|
|
39076
39061
|
(token) => token.symbol === lstSymbol
|
|
39077
39062
|
);
|
|
39078
39063
|
return {
|
|
39079
|
-
maxTVL: getMaxTVL(lstSymbol),
|
|
39080
39064
|
isPaused: false,
|
|
39081
39065
|
liveStatus: "Hot & New \u{1F525}" /* HOT */,
|
|
39082
39066
|
isAudited: true,
|
|
@@ -39909,38 +39893,38 @@ var wbtcBoostedSettings = {
|
|
|
39909
39893
|
var boostedCarryRiskFactors = [
|
|
39910
39894
|
{
|
|
39911
39895
|
type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
|
|
39912
|
-
value:
|
|
39896
|
+
value: 1 /* BATTLE_TESTED */,
|
|
39913
39897
|
// 20% — core trust assumption; SVK is audited but still multi-contract (vault, manager, adapters).
|
|
39914
39898
|
weight: 20,
|
|
39915
39899
|
reason: "Built on the Starknet Vault Kit (SVK), with audits under the Sherlock-audited branch."
|
|
39916
39900
|
},
|
|
39917
39901
|
{
|
|
39918
39902
|
type: "Liquidation Risk" /* LIQUIDATION_RISK */,
|
|
39919
|
-
value:
|
|
39903
|
+
value: 2 /* LOW_PROBABILITY */,
|
|
39920
39904
|
// 20% — tied with smart contract; uncorrelated collateral/debt is the main principal risk here.
|
|
39921
39905
|
weight: 20,
|
|
39922
39906
|
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."
|
|
39923
39907
|
},
|
|
39924
39908
|
{
|
|
39925
39909
|
type: "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */,
|
|
39926
|
-
value:
|
|
39910
|
+
value: 1 /* GOOD_LIQUIDITY */,
|
|
39927
39911
|
// 15% — below liquidation but above ops risks; every unwind/withdraw depends on xSTRK→STRK depth.
|
|
39928
39912
|
weight: 15,
|
|
39929
|
-
reason: "Closing the loop requires selling xSTRK to STRK on DEXes to repay Vesu debt.
|
|
39913
|
+
reason: "Closing the loop requires selling xSTRK to STRK on DEXes to repay Vesu debt. larger withdrawals or rebalances may take longer or complete in smaller chunks."
|
|
39930
39914
|
},
|
|
39931
39915
|
{
|
|
39932
39916
|
type: "Technical Risk" /* TECHNICAL_RISK */,
|
|
39933
39917
|
value: 3 /* SOME_COMPLEXITY */,
|
|
39934
39918
|
// 13% — monitoring/rebalancing stack matters, but usually recoverable without instant loss.
|
|
39935
|
-
weight:
|
|
39919
|
+
weight: 10,
|
|
39936
39920
|
reason: "Yield routes across Vesu, Avnu, and Hyper xSTRK with automated monitoring. Technical failures can delay rebalancing."
|
|
39937
39921
|
},
|
|
39938
39922
|
{
|
|
39939
39923
|
type: "Depeg Risk" /* DEPEG_RISK */,
|
|
39940
|
-
value:
|
|
39924
|
+
value: 2 /* GENERALLY_STABLE */,
|
|
39941
39925
|
// 12% — affects yield and swap notionals; USDC/WBTC depeg is rarer than xSTRK/STRK drift.
|
|
39942
39926
|
weight: 12,
|
|
39943
|
-
reason: "xSTRK
|
|
39927
|
+
reason: "Historically, xSTRK's DEX price has been generally stable compared to its true price."
|
|
39944
39928
|
},
|
|
39945
39929
|
{
|
|
39946
39930
|
type: "Oracle Risk" /* ORACLE_RISK */,
|
|
@@ -39960,7 +39944,7 @@ var boostedCarryRiskFactors = [
|
|
|
39960
39944
|
type: "Market Risk" /* MARKET_RISK */,
|
|
39961
39945
|
value: 3 /* MODERATE_VOLATILITY */,
|
|
39962
39946
|
// 5% — largely captured by liquidation + depeg factors; kept small to avoid double-counting vol.
|
|
39963
|
-
weight:
|
|
39947
|
+
weight: 8,
|
|
39964
39948
|
reason: "STRK, BTC, and stablecoin volatility can move loan-to-value and swap costs."
|
|
39965
39949
|
}
|
|
39966
39950
|
];
|
|
@@ -40069,7 +40053,6 @@ function getStrategySettings2(settings, meta) {
|
|
|
40069
40053
|
logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
|
|
40070
40054
|
},
|
|
40071
40055
|
settings: {
|
|
40072
|
-
maxTVL: Web3Number.fromWei(0, depositToken.decimals),
|
|
40073
40056
|
liveStatus: "Hot & New \u{1F525}" /* HOT */,
|
|
40074
40057
|
isPaused: false,
|
|
40075
40058
|
isAudited: true,
|
package/dist/index.d.ts
CHANGED
|
@@ -208,7 +208,6 @@ interface StrategyAlert {
|
|
|
208
208
|
tab: "all" | "deposit" | "withdraw";
|
|
209
209
|
}
|
|
210
210
|
interface StrategySettings {
|
|
211
|
-
maxTVL?: Web3Number;
|
|
212
211
|
liveStatus?: StrategyLiveStatus;
|
|
213
212
|
isPaused?: boolean;
|
|
214
213
|
isInMaintenance?: boolean;
|
|
@@ -1118,7 +1117,6 @@ declare class EkuboCLVault extends BaseStrategy<DualTokenInfo, DualActionAmount>
|
|
|
1118
1117
|
* regardless of quote asset configuration.
|
|
1119
1118
|
*/
|
|
1120
1119
|
getUserRealizedAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
|
|
1121
|
-
getMaxTVL(): Promise<Web3Number>;
|
|
1122
1120
|
getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]>;
|
|
1123
1121
|
feeBasedAPY(timeperiod?: '24h' | '7d' | '30d' | '3m'): Promise<number>;
|
|
1124
1122
|
/**
|
|
@@ -2469,6 +2467,7 @@ declare abstract class SVKStrategy<S extends UniversalStrategySettings> extends
|
|
|
2469
2467
|
getPrevAUM(): Promise<Web3Number>;
|
|
2470
2468
|
maxDepositables(): Promise<PositionInfo[]>;
|
|
2471
2469
|
maxWithdrawables(): Promise<PositionInfo[]>;
|
|
2470
|
+
getMaxTVL(): Promise<Web3Number>;
|
|
2472
2471
|
}
|
|
2473
2472
|
|
|
2474
2473
|
interface UniversalManageCall {
|
package/dist/index.js
CHANGED
|
@@ -18501,9 +18501,6 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
18501
18501
|
async getUserRealizedAPY(blockIdentifier = "latest", sinceBlocks = 6e5) {
|
|
18502
18502
|
throw new Error("getUserRealizedAPY not implemented yet for Ekubo CL Vault strategy");
|
|
18503
18503
|
}
|
|
18504
|
-
async getMaxTVL() {
|
|
18505
|
-
return new Web3Number("0", 18);
|
|
18506
|
-
}
|
|
18507
18504
|
async getUserPositionCards(input) {
|
|
18508
18505
|
const quoteToken = this.metadata.additionalInfo.quoteAsset;
|
|
18509
18506
|
const [userTVL, quotePrice] = await Promise.all([
|
|
@@ -37424,6 +37421,12 @@ var SVKStrategy = class extends BaseStrategy {
|
|
|
37424
37421
|
const maxWithdrawables = await Promise.all(this.metadata.additionalInfo.adapters.map((adapter) => adapter.adapter.maxWithdraw()));
|
|
37425
37422
|
return maxWithdrawables;
|
|
37426
37423
|
}
|
|
37424
|
+
async getMaxTVL() {
|
|
37425
|
+
const lstToken = this.asset();
|
|
37426
|
+
const depositLimit = await this.contract.call("get_deposit_limit", []);
|
|
37427
|
+
const limitBN = import_starknet34.uint256.uint256ToBN(depositLimit);
|
|
37428
|
+
return Web3Number.fromWei(limitBN.toString(), lstToken.decimals);
|
|
37429
|
+
}
|
|
37427
37430
|
};
|
|
37428
37431
|
|
|
37429
37432
|
// src/strategies/universal-strategy.tsx
|
|
@@ -38294,7 +38297,6 @@ var getUniversalRisk = () => ({
|
|
|
38294
38297
|
var createUniversalSettings = (tokenSymbol, maxTVLDecimals) => {
|
|
38295
38298
|
const isUSDT = tokenSymbol === "USDT";
|
|
38296
38299
|
return {
|
|
38297
|
-
maxTVL: Web3Number.fromWei(0, maxTVLDecimals),
|
|
38298
38300
|
isAudited: true,
|
|
38299
38301
|
liveStatus: isUSDT ? "Retired" /* RETIRED */ : "Active" /* ACTIVE */,
|
|
38300
38302
|
isPaused: isUSDT,
|
|
@@ -39384,29 +39386,11 @@ function getInvestmentSteps(lstSymbol, underlyingSymbol) {
|
|
|
39384
39386
|
`If required, adjust leverage or re-allocate assets within LST pool on Vesu to optimize yield`
|
|
39385
39387
|
];
|
|
39386
39388
|
}
|
|
39387
|
-
function getMaxTVL(lstSymbol) {
|
|
39388
|
-
const lstMaxTVLs = {
|
|
39389
|
-
xWBTC: 5,
|
|
39390
|
-
xLBTC: 5,
|
|
39391
|
-
xtBTC: 5,
|
|
39392
|
-
xsBTC: 5,
|
|
39393
|
-
xSTRK: 7e6
|
|
39394
|
-
};
|
|
39395
|
-
const maxTVLValue = lstMaxTVLs[lstSymbol] || 0;
|
|
39396
|
-
const token = Global.getDefaultTokens().find(
|
|
39397
|
-
(token2) => token2.symbol === lstSymbol
|
|
39398
|
-
);
|
|
39399
|
-
if (!token) {
|
|
39400
|
-
return Web3Number.fromWei(0, 18);
|
|
39401
|
-
}
|
|
39402
|
-
return Web3Number.fromWei(maxTVLValue, token.decimals);
|
|
39403
|
-
}
|
|
39404
39389
|
function createHyperLSTSettings(lstSymbol, underlyingSymbol) {
|
|
39405
39390
|
const depositToken = Global.getDefaultTokens().find(
|
|
39406
39391
|
(token) => token.symbol === lstSymbol
|
|
39407
39392
|
);
|
|
39408
39393
|
return {
|
|
39409
|
-
maxTVL: getMaxTVL(lstSymbol),
|
|
39410
39394
|
isPaused: false,
|
|
39411
39395
|
liveStatus: "Hot & New \u{1F525}" /* HOT */,
|
|
39412
39396
|
isAudited: true,
|
|
@@ -40239,38 +40223,38 @@ var wbtcBoostedSettings = {
|
|
|
40239
40223
|
var boostedCarryRiskFactors = [
|
|
40240
40224
|
{
|
|
40241
40225
|
type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
|
|
40242
|
-
value:
|
|
40226
|
+
value: 1 /* BATTLE_TESTED */,
|
|
40243
40227
|
// 20% — core trust assumption; SVK is audited but still multi-contract (vault, manager, adapters).
|
|
40244
40228
|
weight: 20,
|
|
40245
40229
|
reason: "Built on the Starknet Vault Kit (SVK), with audits under the Sherlock-audited branch."
|
|
40246
40230
|
},
|
|
40247
40231
|
{
|
|
40248
40232
|
type: "Liquidation Risk" /* LIQUIDATION_RISK */,
|
|
40249
|
-
value:
|
|
40233
|
+
value: 2 /* LOW_PROBABILITY */,
|
|
40250
40234
|
// 20% — tied with smart contract; uncorrelated collateral/debt is the main principal risk here.
|
|
40251
40235
|
weight: 20,
|
|
40252
40236
|
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."
|
|
40253
40237
|
},
|
|
40254
40238
|
{
|
|
40255
40239
|
type: "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */,
|
|
40256
|
-
value:
|
|
40240
|
+
value: 1 /* GOOD_LIQUIDITY */,
|
|
40257
40241
|
// 15% — below liquidation but above ops risks; every unwind/withdraw depends on xSTRK→STRK depth.
|
|
40258
40242
|
weight: 15,
|
|
40259
|
-
reason: "Closing the loop requires selling xSTRK to STRK on DEXes to repay Vesu debt.
|
|
40243
|
+
reason: "Closing the loop requires selling xSTRK to STRK on DEXes to repay Vesu debt. larger withdrawals or rebalances may take longer or complete in smaller chunks."
|
|
40260
40244
|
},
|
|
40261
40245
|
{
|
|
40262
40246
|
type: "Technical Risk" /* TECHNICAL_RISK */,
|
|
40263
40247
|
value: 3 /* SOME_COMPLEXITY */,
|
|
40264
40248
|
// 13% — monitoring/rebalancing stack matters, but usually recoverable without instant loss.
|
|
40265
|
-
weight:
|
|
40249
|
+
weight: 10,
|
|
40266
40250
|
reason: "Yield routes across Vesu, Avnu, and Hyper xSTRK with automated monitoring. Technical failures can delay rebalancing."
|
|
40267
40251
|
},
|
|
40268
40252
|
{
|
|
40269
40253
|
type: "Depeg Risk" /* DEPEG_RISK */,
|
|
40270
|
-
value:
|
|
40254
|
+
value: 2 /* GENERALLY_STABLE */,
|
|
40271
40255
|
// 12% — affects yield and swap notionals; USDC/WBTC depeg is rarer than xSTRK/STRK drift.
|
|
40272
40256
|
weight: 12,
|
|
40273
|
-
reason: "xSTRK
|
|
40257
|
+
reason: "Historically, xSTRK's DEX price has been generally stable compared to its true price."
|
|
40274
40258
|
},
|
|
40275
40259
|
{
|
|
40276
40260
|
type: "Oracle Risk" /* ORACLE_RISK */,
|
|
@@ -40290,7 +40274,7 @@ var boostedCarryRiskFactors = [
|
|
|
40290
40274
|
type: "Market Risk" /* MARKET_RISK */,
|
|
40291
40275
|
value: 3 /* MODERATE_VOLATILITY */,
|
|
40292
40276
|
// 5% — largely captured by liquidation + depeg factors; kept small to avoid double-counting vol.
|
|
40293
|
-
weight:
|
|
40277
|
+
weight: 8,
|
|
40294
40278
|
reason: "STRK, BTC, and stablecoin volatility can move loan-to-value and swap costs."
|
|
40295
40279
|
}
|
|
40296
40280
|
];
|
|
@@ -40399,7 +40383,6 @@ function getStrategySettings2(settings, meta) {
|
|
|
40399
40383
|
logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
|
|
40400
40384
|
},
|
|
40401
40385
|
settings: {
|
|
40402
|
-
maxTVL: Web3Number.fromWei(0, depositToken.decimals),
|
|
40403
40386
|
liveStatus: "Hot & New \u{1F525}" /* HOT */,
|
|
40404
40387
|
isPaused: false,
|
|
40405
40388
|
isAudited: true,
|
package/dist/index.mjs
CHANGED
|
@@ -18336,9 +18336,6 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
18336
18336
|
async getUserRealizedAPY(blockIdentifier = "latest", sinceBlocks = 6e5) {
|
|
18337
18337
|
throw new Error("getUserRealizedAPY not implemented yet for Ekubo CL Vault strategy");
|
|
18338
18338
|
}
|
|
18339
|
-
async getMaxTVL() {
|
|
18340
|
-
return new Web3Number("0", 18);
|
|
18341
|
-
}
|
|
18342
18339
|
async getUserPositionCards(input) {
|
|
18343
18340
|
const quoteToken = this.metadata.additionalInfo.quoteAsset;
|
|
18344
18341
|
const [userTVL, quotePrice] = await Promise.all([
|
|
@@ -37259,6 +37256,12 @@ var SVKStrategy = class extends BaseStrategy {
|
|
|
37259
37256
|
const maxWithdrawables = await Promise.all(this.metadata.additionalInfo.adapters.map((adapter) => adapter.adapter.maxWithdraw()));
|
|
37260
37257
|
return maxWithdrawables;
|
|
37261
37258
|
}
|
|
37259
|
+
async getMaxTVL() {
|
|
37260
|
+
const lstToken = this.asset();
|
|
37261
|
+
const depositLimit = await this.contract.call("get_deposit_limit", []);
|
|
37262
|
+
const limitBN = uint25622.uint256ToBN(depositLimit);
|
|
37263
|
+
return Web3Number.fromWei(limitBN.toString(), lstToken.decimals);
|
|
37264
|
+
}
|
|
37262
37265
|
};
|
|
37263
37266
|
|
|
37264
37267
|
// src/strategies/universal-strategy.tsx
|
|
@@ -38129,7 +38132,6 @@ var getUniversalRisk = () => ({
|
|
|
38129
38132
|
var createUniversalSettings = (tokenSymbol, maxTVLDecimals) => {
|
|
38130
38133
|
const isUSDT = tokenSymbol === "USDT";
|
|
38131
38134
|
return {
|
|
38132
|
-
maxTVL: Web3Number.fromWei(0, maxTVLDecimals),
|
|
38133
38135
|
isAudited: true,
|
|
38134
38136
|
liveStatus: isUSDT ? "Retired" /* RETIRED */ : "Active" /* ACTIVE */,
|
|
38135
38137
|
isPaused: isUSDT,
|
|
@@ -39219,29 +39221,11 @@ function getInvestmentSteps(lstSymbol, underlyingSymbol) {
|
|
|
39219
39221
|
`If required, adjust leverage or re-allocate assets within LST pool on Vesu to optimize yield`
|
|
39220
39222
|
];
|
|
39221
39223
|
}
|
|
39222
|
-
function getMaxTVL(lstSymbol) {
|
|
39223
|
-
const lstMaxTVLs = {
|
|
39224
|
-
xWBTC: 5,
|
|
39225
|
-
xLBTC: 5,
|
|
39226
|
-
xtBTC: 5,
|
|
39227
|
-
xsBTC: 5,
|
|
39228
|
-
xSTRK: 7e6
|
|
39229
|
-
};
|
|
39230
|
-
const maxTVLValue = lstMaxTVLs[lstSymbol] || 0;
|
|
39231
|
-
const token = Global.getDefaultTokens().find(
|
|
39232
|
-
(token2) => token2.symbol === lstSymbol
|
|
39233
|
-
);
|
|
39234
|
-
if (!token) {
|
|
39235
|
-
return Web3Number.fromWei(0, 18);
|
|
39236
|
-
}
|
|
39237
|
-
return Web3Number.fromWei(maxTVLValue, token.decimals);
|
|
39238
|
-
}
|
|
39239
39224
|
function createHyperLSTSettings(lstSymbol, underlyingSymbol) {
|
|
39240
39225
|
const depositToken = Global.getDefaultTokens().find(
|
|
39241
39226
|
(token) => token.symbol === lstSymbol
|
|
39242
39227
|
);
|
|
39243
39228
|
return {
|
|
39244
|
-
maxTVL: getMaxTVL(lstSymbol),
|
|
39245
39229
|
isPaused: false,
|
|
39246
39230
|
liveStatus: "Hot & New \u{1F525}" /* HOT */,
|
|
39247
39231
|
isAudited: true,
|
|
@@ -40074,38 +40058,38 @@ var wbtcBoostedSettings = {
|
|
|
40074
40058
|
var boostedCarryRiskFactors = [
|
|
40075
40059
|
{
|
|
40076
40060
|
type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
|
|
40077
|
-
value:
|
|
40061
|
+
value: 1 /* BATTLE_TESTED */,
|
|
40078
40062
|
// 20% — core trust assumption; SVK is audited but still multi-contract (vault, manager, adapters).
|
|
40079
40063
|
weight: 20,
|
|
40080
40064
|
reason: "Built on the Starknet Vault Kit (SVK), with audits under the Sherlock-audited branch."
|
|
40081
40065
|
},
|
|
40082
40066
|
{
|
|
40083
40067
|
type: "Liquidation Risk" /* LIQUIDATION_RISK */,
|
|
40084
|
-
value:
|
|
40068
|
+
value: 2 /* LOW_PROBABILITY */,
|
|
40085
40069
|
// 20% — tied with smart contract; uncorrelated collateral/debt is the main principal risk here.
|
|
40086
40070
|
weight: 20,
|
|
40087
40071
|
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."
|
|
40088
40072
|
},
|
|
40089
40073
|
{
|
|
40090
40074
|
type: "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */,
|
|
40091
|
-
value:
|
|
40075
|
+
value: 1 /* GOOD_LIQUIDITY */,
|
|
40092
40076
|
// 15% — below liquidation but above ops risks; every unwind/withdraw depends on xSTRK→STRK depth.
|
|
40093
40077
|
weight: 15,
|
|
40094
|
-
reason: "Closing the loop requires selling xSTRK to STRK on DEXes to repay Vesu debt.
|
|
40078
|
+
reason: "Closing the loop requires selling xSTRK to STRK on DEXes to repay Vesu debt. larger withdrawals or rebalances may take longer or complete in smaller chunks."
|
|
40095
40079
|
},
|
|
40096
40080
|
{
|
|
40097
40081
|
type: "Technical Risk" /* TECHNICAL_RISK */,
|
|
40098
40082
|
value: 3 /* SOME_COMPLEXITY */,
|
|
40099
40083
|
// 13% — monitoring/rebalancing stack matters, but usually recoverable without instant loss.
|
|
40100
|
-
weight:
|
|
40084
|
+
weight: 10,
|
|
40101
40085
|
reason: "Yield routes across Vesu, Avnu, and Hyper xSTRK with automated monitoring. Technical failures can delay rebalancing."
|
|
40102
40086
|
},
|
|
40103
40087
|
{
|
|
40104
40088
|
type: "Depeg Risk" /* DEPEG_RISK */,
|
|
40105
|
-
value:
|
|
40089
|
+
value: 2 /* GENERALLY_STABLE */,
|
|
40106
40090
|
// 12% — affects yield and swap notionals; USDC/WBTC depeg is rarer than xSTRK/STRK drift.
|
|
40107
40091
|
weight: 12,
|
|
40108
|
-
reason: "xSTRK
|
|
40092
|
+
reason: "Historically, xSTRK's DEX price has been generally stable compared to its true price."
|
|
40109
40093
|
},
|
|
40110
40094
|
{
|
|
40111
40095
|
type: "Oracle Risk" /* ORACLE_RISK */,
|
|
@@ -40125,7 +40109,7 @@ var boostedCarryRiskFactors = [
|
|
|
40125
40109
|
type: "Market Risk" /* MARKET_RISK */,
|
|
40126
40110
|
value: 3 /* MODERATE_VOLATILITY */,
|
|
40127
40111
|
// 5% — largely captured by liquidation + depeg factors; kept small to avoid double-counting vol.
|
|
40128
|
-
weight:
|
|
40112
|
+
weight: 8,
|
|
40129
40113
|
reason: "STRK, BTC, and stablecoin volatility can move loan-to-value and swap costs."
|
|
40130
40114
|
}
|
|
40131
40115
|
];
|
|
@@ -40234,7 +40218,6 @@ function getStrategySettings2(settings, meta) {
|
|
|
40234
40218
|
logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
|
|
40235
40219
|
},
|
|
40236
40220
|
settings: {
|
|
40237
|
-
maxTVL: Web3Number.fromWei(0, depositToken.decimals),
|
|
40238
40221
|
liveStatus: "Hot & New \u{1F525}" /* HOT */,
|
|
40239
40222
|
isPaused: false,
|
|
40240
40223
|
isAudited: true,
|
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@ export interface TokenInfo {
|
|
|
35
35
|
displayDecimals: number;
|
|
36
36
|
priceProxySymbol?: string; // for tokens like illiquid tokens, we use a proxy symbol to get the price
|
|
37
37
|
priceCheckAmount?: number; // for tokens like BTC, doing 1BTC price check may not be ideal, esp on illiquid netwrks like sn
|
|
38
|
-
dontPrice?: boolean; // a flag that skips pricer to check these tokens.
|
|
38
|
+
dontPrice?: boolean; // a flag that skips pricer to check these tokens.
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export enum Network {
|
|
@@ -152,7 +152,6 @@ export interface StrategyAlert {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
export interface StrategySettings {
|
|
155
|
-
maxTVL?: Web3Number;
|
|
156
155
|
liveStatus?: StrategyLiveStatus;
|
|
157
156
|
isPaused?: boolean;
|
|
158
157
|
isInMaintenance?: boolean;
|
|
@@ -470,4 +469,4 @@ export const Protocols = {
|
|
|
470
469
|
export const UnwrapLabsCurator: ICurator = {
|
|
471
470
|
name: "Unwrap Labs",
|
|
472
471
|
logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
|
|
473
|
-
}
|
|
472
|
+
}
|
|
@@ -649,11 +649,6 @@ export class EkuboCLVault extends BaseStrategy<
|
|
|
649
649
|
*/
|
|
650
650
|
}
|
|
651
651
|
|
|
652
|
-
async getMaxTVL(): Promise<Web3Number> {
|
|
653
|
-
// This strategy doesn't have a maxTVL so returning 0 simply
|
|
654
|
-
return new Web3Number('0', 18);
|
|
655
|
-
}
|
|
656
|
-
|
|
657
652
|
async getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]> {
|
|
658
653
|
const quoteToken = this.metadata.additionalInfo.quoteAsset;
|
|
659
654
|
const [userTVL, quotePrice] = await Promise.all([
|
|
@@ -496,4 +496,11 @@ export abstract class SVKStrategy<S extends UniversalStrategySettings>
|
|
|
496
496
|
return maxWithdrawables;
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
+
|
|
500
|
+
async getMaxTVL(): Promise<Web3Number> {
|
|
501
|
+
const lstToken = this.asset();
|
|
502
|
+
const depositLimit: any = await this.contract.call("get_deposit_limit", []);
|
|
503
|
+
const limitBN = uint256.uint256ToBN(depositLimit);
|
|
504
|
+
return Web3Number.fromWei(limitBN.toString(), lstToken.decimals);
|
|
505
|
+
}
|
|
499
506
|
}
|
|
@@ -1002,7 +1002,7 @@ const wbtcBoostedSettings: BoostedxSTRKCarryStrategySettings = {
|
|
|
1002
1002
|
const boostedCarryRiskFactors: RiskFactor[] = [
|
|
1003
1003
|
{
|
|
1004
1004
|
type: RiskType.SMART_CONTRACT_RISK,
|
|
1005
|
-
value: SmartContractRiskLevel.
|
|
1005
|
+
value: SmartContractRiskLevel.BATTLE_TESTED,
|
|
1006
1006
|
// 20% — core trust assumption; SVK is audited but still multi-contract (vault, manager, adapters).
|
|
1007
1007
|
weight: 20,
|
|
1008
1008
|
reason:
|
|
@@ -1010,7 +1010,7 @@ const boostedCarryRiskFactors: RiskFactor[] = [
|
|
|
1010
1010
|
},
|
|
1011
1011
|
{
|
|
1012
1012
|
type: RiskType.LIQUIDATION_RISK,
|
|
1013
|
-
value: LiquidationRiskLevel.
|
|
1013
|
+
value: LiquidationRiskLevel.LOW_PROBABILITY,
|
|
1014
1014
|
// 20% — tied with smart contract; uncorrelated collateral/debt is the main principal risk here.
|
|
1015
1015
|
weight: 20,
|
|
1016
1016
|
reason:
|
|
@@ -1018,27 +1018,27 @@ const boostedCarryRiskFactors: RiskFactor[] = [
|
|
|
1018
1018
|
},
|
|
1019
1019
|
{
|
|
1020
1020
|
type: RiskType.LOW_LIQUIDITY_RISK,
|
|
1021
|
-
value: LowLiquidityRiskLevel.
|
|
1021
|
+
value: LowLiquidityRiskLevel.GOOD_LIQUIDITY,
|
|
1022
1022
|
// 15% — below liquidation but above ops risks; every unwind/withdraw depends on xSTRK→STRK depth.
|
|
1023
1023
|
weight: 15,
|
|
1024
1024
|
reason:
|
|
1025
|
-
"Closing the loop requires selling xSTRK to STRK on DEXes to repay Vesu debt.
|
|
1025
|
+
"Closing the loop requires selling xSTRK to STRK on DEXes to repay Vesu debt. larger withdrawals or rebalances may take longer or complete in smaller chunks.",
|
|
1026
1026
|
},
|
|
1027
1027
|
{
|
|
1028
1028
|
type: RiskType.TECHNICAL_RISK,
|
|
1029
1029
|
value: TechnicalRiskLevel.SOME_COMPLEXITY,
|
|
1030
1030
|
// 13% — monitoring/rebalancing stack matters, but usually recoverable without instant loss.
|
|
1031
|
-
weight:
|
|
1031
|
+
weight: 10,
|
|
1032
1032
|
reason:
|
|
1033
1033
|
"Yield routes across Vesu, Avnu, and Hyper xSTRK with automated monitoring. Technical failures can delay rebalancing.",
|
|
1034
1034
|
},
|
|
1035
1035
|
{
|
|
1036
1036
|
type: RiskType.DEPEG_RISK,
|
|
1037
|
-
value: DepegRiskLevel.
|
|
1037
|
+
value: DepegRiskLevel.GENERALLY_STABLE,
|
|
1038
1038
|
// 12% — affects yield and swap notionals; USDC/WBTC depeg is rarer than xSTRK/STRK drift.
|
|
1039
1039
|
weight: 12,
|
|
1040
1040
|
reason:
|
|
1041
|
-
"xSTRK
|
|
1041
|
+
"Historically, xSTRK's DEX price has been generally stable compared to its true price.",
|
|
1042
1042
|
},
|
|
1043
1043
|
{
|
|
1044
1044
|
type: RiskType.ORACLE_RISK,
|
|
@@ -1059,7 +1059,7 @@ const boostedCarryRiskFactors: RiskFactor[] = [
|
|
|
1059
1059
|
type: RiskType.MARKET_RISK,
|
|
1060
1060
|
value: MarketRiskLevel.MODERATE_VOLATILITY,
|
|
1061
1061
|
// 5% — largely captured by liquidation + depeg factors; kept small to avoid double-counting vol.
|
|
1062
|
-
weight:
|
|
1062
|
+
weight: 8,
|
|
1063
1063
|
reason:
|
|
1064
1064
|
"STRK, BTC, and stablecoin volatility can move loan-to-value and swap costs.",
|
|
1065
1065
|
},
|
|
@@ -1176,7 +1176,6 @@ function getStrategySettings(
|
|
|
1176
1176
|
logo: "https://assets.troves.fi/integrations/unwraplabs/white.png",
|
|
1177
1177
|
},
|
|
1178
1178
|
settings: {
|
|
1179
|
-
maxTVL: Web3Number.fromWei(0, depositToken.decimals),
|
|
1180
1179
|
liveStatus: StrategyLiveStatus.HOT,
|
|
1181
1180
|
isPaused: false,
|
|
1182
1181
|
isAudited: true,
|
|
@@ -1110,24 +1110,6 @@ export function getInvestmentSteps(lstSymbol: string, underlyingSymbol: string)
|
|
|
1110
1110
|
]
|
|
1111
1111
|
}
|
|
1112
1112
|
|
|
1113
|
-
function getMaxTVL(lstSymbol: string): Web3Number {
|
|
1114
|
-
const lstMaxTVLs: Record<string, number> = {
|
|
1115
|
-
xWBTC: 5,
|
|
1116
|
-
xLBTC: 5,
|
|
1117
|
-
xtBTC: 5,
|
|
1118
|
-
xsBTC: 5,
|
|
1119
|
-
xSTRK: 7000000,
|
|
1120
|
-
};
|
|
1121
|
-
const maxTVLValue = lstMaxTVLs[lstSymbol] || 0;
|
|
1122
|
-
const token = Global.getDefaultTokens().find(
|
|
1123
|
-
(token) => token.symbol === lstSymbol,
|
|
1124
|
-
);
|
|
1125
|
-
if (!token) {
|
|
1126
|
-
return Web3Number.fromWei(0, 18);
|
|
1127
|
-
}
|
|
1128
|
-
return Web3Number.fromWei(maxTVLValue, token.decimals);
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
1113
|
function createHyperLSTSettings(
|
|
1132
1114
|
lstSymbol: string,
|
|
1133
1115
|
underlyingSymbol: string,
|
|
@@ -1136,7 +1118,6 @@ function createHyperLSTSettings(
|
|
|
1136
1118
|
(token) => token.symbol === lstSymbol,
|
|
1137
1119
|
)!;
|
|
1138
1120
|
return {
|
|
1139
|
-
maxTVL: getMaxTVL(lstSymbol),
|
|
1140
1121
|
isPaused: false,
|
|
1141
1122
|
liveStatus: StrategyLiveStatus.HOT,
|
|
1142
1123
|
isAudited: true,
|
|
@@ -1174,7 +1174,6 @@ const createUniversalSettings = (
|
|
|
1174
1174
|
): StrategySettings => {
|
|
1175
1175
|
const isUSDT = tokenSymbol === "USDT";
|
|
1176
1176
|
return {
|
|
1177
|
-
maxTVL: Web3Number.fromWei(0, maxTVLDecimals),
|
|
1178
1177
|
isAudited: true,
|
|
1179
1178
|
liveStatus: isUSDT ? StrategyLiveStatus.RETIRED : StrategyLiveStatus.ACTIVE,
|
|
1180
1179
|
isPaused: isUSDT,
|