@strkfarm/sdk 2.0.0-staging.1 → 2.0.0-staging.10

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.
@@ -1,7 +1,7 @@
1
1
  import { ContractAddr, Web3Number } from "@/dataTypes";
2
2
  import { BaseStrategy, SingleActionAmount, SingleTokenInfo } from "./base-strategy";
3
3
  import { PricerBase } from "@/modules/pricerBase";
4
- import { FAQ, getNoRiskTags, IConfig, IStrategyMetadata, Protocols, RiskFactor, RiskType, StrategyCategory, StrategyTag, VaultPosition, AuditStatus, SourceCodeType, AccessControlType, InstantWithdrawalVault } from "@/interfaces";
4
+ import { FAQ, getNoRiskTags, IConfig, IStrategyMetadata, Protocols, RiskFactor, RiskType, StrategyTag, VaultPosition, AuditStatus, SourceCodeType, AccessControlType, InstantWithdrawalVault, StrategyLiveStatus, StrategySettings, VaultType } from "@/interfaces";
5
5
  import { BlockIdentifier, Call, CallData, Contract, num, uint256 } from "starknet";
6
6
  import { VesuRebalanceSettings } from "./vesu-rebalance";
7
7
  import { assert, LeafData, logger, StandardMerkleTree } from "@/utils";
@@ -25,6 +25,7 @@ export interface UniversalStrategySettings {
25
25
  vaultAllocator: ContractAddr,
26
26
  redeemRequestNFT: ContractAddr,
27
27
  aumOracle: ContractAddr,
28
+ redemptionRouter?: ContractAddr, // optional router to redeem in different tokens
28
29
 
29
30
  // Individual merkle tree leaves
30
31
  leafAdapters: LeafAdapterFn<any>[],
@@ -525,7 +526,7 @@ export class UniversalStrategy<
525
526
  const netAPY = await this.netAPY();
526
527
  // account only 80% of value
527
528
  const defispringAPY = (netAPY.splits.find(s => s.id === 'defispring')?.apy || 0) * 0.8;
528
- if (!defispringAPY) throw new Error('DefiSpring APY not found');
529
+ // if (!defispringAPY) throw new Error('DefiSpring APY not found');
529
530
 
530
531
  // compute rewards contribution to AUM
531
532
  const timeDiff = (Math.round(Date.now() / 1000) - Number(lastReportTime));
@@ -1023,8 +1024,8 @@ const usdcVaultSettings: UniversalStrategySettings = {
1023
1024
  aumOracle: ContractAddr.from("0x6faf45ed185dec13ef723c9ead4266cab98d06f2cb237e331b1fa5c2aa79afe"),
1024
1025
  leafAdapters: [],
1025
1026
  adapters: [],
1026
- targetHealthFactor: 1.3,
1027
- minHealthFactor: 1.25
1027
+ targetHealthFactor: 1.25,
1028
+ minHealthFactor: 1.15
1028
1029
  }
1029
1030
 
1030
1031
  const wbtcVaultSettings: UniversalStrategySettings = {
@@ -1035,8 +1036,8 @@ const wbtcVaultSettings: UniversalStrategySettings = {
1035
1036
  aumOracle: ContractAddr.from("0x2edf4edbed3f839e7f07dcd913e92299898ff4cf0ba532f8c572c66c5b331b2"),
1036
1037
  leafAdapters: [],
1037
1038
  adapters: [],
1038
- targetHealthFactor: 1.3,
1039
- minHealthFactor: 1.25
1039
+ targetHealthFactor: 1.20,
1040
+ minHealthFactor: 1.15
1040
1041
  }
1041
1042
 
1042
1043
  const ethVaultSettings: UniversalStrategySettings = {
@@ -1047,8 +1048,8 @@ const ethVaultSettings: UniversalStrategySettings = {
1047
1048
  aumOracle: ContractAddr.from("0x4b747f2e75c057bed9aa2ce46fbdc2159dc684c15bd32d4f95983a6ecf39a05"),
1048
1049
  leafAdapters: [],
1049
1050
  adapters: [],
1050
- targetHealthFactor: 1.3,
1051
- minHealthFactor: 1.25
1051
+ targetHealthFactor: 1.25,
1052
+ minHealthFactor: 1.21
1052
1053
  }
1053
1054
 
1054
1055
  const strkVaultSettings: UniversalStrategySettings = {
@@ -1059,8 +1060,8 @@ const strkVaultSettings: UniversalStrategySettings = {
1059
1060
  aumOracle: ContractAddr.from("0x6d7dbfad4bb51715da211468389a623da00c0625f8f6efbea822ee5ac5231f4"),
1060
1061
  leafAdapters: [],
1061
1062
  adapters: [],
1062
- targetHealthFactor: 1.3,
1063
- minHealthFactor: 1.25
1063
+ targetHealthFactor: 1.20,
1064
+ minHealthFactor: 1.15
1064
1065
  }
1065
1066
 
1066
1067
  const usdtVaultSettings: UniversalStrategySettings = {
@@ -1071,8 +1072,8 @@ const usdtVaultSettings: UniversalStrategySettings = {
1071
1072
  aumOracle: ContractAddr.from("0x7018f8040c8066a4ab929e6760ae52dd43b6a3a289172f514750a61fcc565cc"),
1072
1073
  leafAdapters: [],
1073
1074
  adapters: [],
1074
- targetHealthFactor: 1.3,
1075
- minHealthFactor: 1.25
1075
+ targetHealthFactor: 1.25,
1076
+ minHealthFactor: 1.15
1076
1077
  }
1077
1078
 
1078
1079
  type AllowedSources = 'vesu' | 'endur' | 'extended';
@@ -1121,7 +1122,6 @@ export default function MetaVaultDescription(allowedSources: AllowedSources[]) {
1121
1122
  <h1 style={{ fontSize: "18px", marginBottom: "10px" }}>Meta Vault — Automated Yield Router</h1>
1122
1123
  <p style={{ fontSize: "14px", lineHeight: "1.5", marginBottom: "16px" }}>
1123
1124
  This Evergreen vault is a tokenized Meta Vault, auto-compounding strategy that continuously allocates your deposited
1124
- asset to the best available yield source in the ecosystem. Depositors receive vault shares that
1125
1125
  represent a proportional claim on the underlying assets and accrued yield. Allocation shifts are
1126
1126
  handled programmatically based on on-chain signals and risk filters, minimizing idle capital and
1127
1127
  maximizing net APY.
@@ -1239,6 +1239,39 @@ const investmentSteps: string[] = [
1239
1239
 
1240
1240
  const AUDIT_URL = 'https://docs.troves.fi/p/security#starknet-vault-kit'
1241
1241
 
1242
+ // Helper to create common risk object
1243
+ const getUniversalRisk = () => ({
1244
+ riskFactor: _riskFactor,
1245
+ netRisk:
1246
+ _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
1247
+ _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1248
+ notARisks: getNoRiskTags(_riskFactor)
1249
+ });
1250
+
1251
+ // Helper to create Universal strategy settings
1252
+ const createUniversalSettings = (
1253
+ tokenSymbol: string,
1254
+ maxTVLDecimals: number
1255
+ ): StrategySettings => ({
1256
+ maxTVL: Web3Number.fromWei(0, maxTVLDecimals),
1257
+ isAudited: true,
1258
+ liveStatus: StrategyLiveStatus.ACTIVE,
1259
+ isPaused: false,
1260
+ isInstantWithdrawal: false,
1261
+ hideHarvestInfo: true,
1262
+ quoteToken: Global.getDefaultTokens().find(
1263
+ (token) => token.symbol === tokenSymbol
1264
+ )!,
1265
+ alerts: [
1266
+ {
1267
+ tab: "withdraw" as const,
1268
+ text: "On withdrawal, you will receive an NFT representing your withdrawal request. The funds will be automatically sent to your wallet (NFT owner) in 1-2 hours. You can monitor the status in transactions tab.",
1269
+ type: "info" as const
1270
+ }
1271
+ ],
1272
+ showWithdrawalWarningModal: true
1273
+ });
1274
+
1242
1275
  const EVERGREEN_SECURITY = {
1243
1276
  auditStatus: AuditStatus.AUDITED,
1244
1277
  sourceCode: {
@@ -1261,136 +1294,103 @@ const EVERGREEN_REDEMPTION_INFO = {
1261
1294
  },
1262
1295
  };
1263
1296
 
1264
- export const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[] =
1265
- [
1266
- {
1267
- name: "USDC Evergreen",
1268
- description: getDescription('USDC', ['vesu', 'extended']),
1269
- address: ContractAddr.from('0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e'),
1270
- launchBlock: 0,
1271
- type: 'ERC4626',
1272
- depositTokens: [Global.getDefaultTokens().find(token => token.symbol === 'USDC')!],
1273
- additionalInfo: getLooperSettings('USDC', 'ETH', usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
1274
- risk: {
1275
- riskFactor: _riskFactor,
1276
- netRisk:
1277
- _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
1278
- _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1279
- notARisks: getNoRiskTags(_riskFactor)
1280
- },
1281
- auditUrl: AUDIT_URL,
1282
- protocols: [Protocols.VESU],
1283
- maxTVL: Web3Number.fromWei(0, 6),
1284
- contractDetails: getContractDetails(usdcVaultSettings),
1285
- faqs: getFAQs(),
1286
- investmentSteps: investmentSteps,
1287
- category: StrategyCategory.META_VAULTS,
1288
- tags: [StrategyTag.EVERGREEN],
1289
- security: EVERGREEN_SECURITY,
1290
- redemptionInfo: EVERGREEN_REDEMPTION_INFO,
1291
- },
1292
- {
1293
- name: "WBTC Evergreen",
1294
- description: getDescription('WBTC', ['vesu', 'endur', 'extended']),
1295
- address: ContractAddr.from('0x5a4c1651b913aa2ea7afd9024911603152a19058624c3e425405370d62bf80c'),
1296
- launchBlock: 0,
1297
- type: 'ERC4626',
1298
- depositTokens: [Global.getDefaultTokens().find(token => token.symbol === 'WBTC')!],
1299
- additionalInfo: getLooperSettings('WBTC', 'ETH', wbtcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
1300
- risk: {
1301
- riskFactor: _riskFactor,
1302
- netRisk:
1303
- _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
1304
- _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1305
- notARisks: getNoRiskTags(_riskFactor)
1306
- },
1307
- protocols: [Protocols.VESU],
1308
- maxTVL: Web3Number.fromWei(0, 8),
1309
- contractDetails: getContractDetails(wbtcVaultSettings),
1310
- faqs: getFAQs(),
1311
- investmentSteps: investmentSteps,
1312
- auditUrl: AUDIT_URL,
1313
- category: StrategyCategory.META_VAULTS,
1314
- tags: [StrategyTag.EVERGREEN],
1315
- security: EVERGREEN_SECURITY,
1316
- redemptionInfo: EVERGREEN_REDEMPTION_INFO,
1317
- },
1318
- {
1319
- name: "ETH Evergreen",
1320
- description: getDescription('ETH', ['vesu', 'extended']),
1321
- address: ContractAddr.from('0x446c22d4d3f5cb52b4950ba832ba1df99464c6673a37c092b1d9622650dbd8'),
1322
- launchBlock: 0,
1323
- type: 'ERC4626',
1324
- depositTokens: [Global.getDefaultTokens().find(token => token.symbol === 'ETH')!],
1325
- additionalInfo: getLooperSettings('ETH', 'WBTC', ethVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
1326
- risk: {
1327
- riskFactor: _riskFactor,
1328
- netRisk:
1329
- _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
1330
- _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1331
- notARisks: getNoRiskTags(_riskFactor)
1332
- },
1333
- protocols: [Protocols.VESU],
1334
- maxTVL: Web3Number.fromWei(0, 18),
1335
- contractDetails: getContractDetails(ethVaultSettings),
1336
- faqs: getFAQs(),
1337
- investmentSteps: investmentSteps,
1338
- auditUrl: AUDIT_URL,
1339
- category: StrategyCategory.META_VAULTS,
1340
- tags: [StrategyTag.EVERGREEN],
1341
- security: EVERGREEN_SECURITY,
1342
- redemptionInfo: EVERGREEN_REDEMPTION_INFO,
1297
+ // Helper to create a Universal strategy
1298
+ const createUniversalStrategy = (params: {
1299
+ tokenSymbol: string;
1300
+ address: string;
1301
+ vaultSettings: UniversalStrategySettings;
1302
+ token1Symbol: string;
1303
+ token2Symbol: string;
1304
+ maxTVLDecimals: number;
1305
+ allowedSources: AllowedSources[];
1306
+ tags: StrategyTag[];
1307
+ }): IStrategyMetadata<UniversalStrategySettings> => ({
1308
+ id: `evergreen_${params.tokenSymbol.toLowerCase()}`,
1309
+ name: `${params.tokenSymbol} Evergreen`,
1310
+ description: getDescription(params.tokenSymbol, params.allowedSources),
1311
+ address: ContractAddr.from(params.address),
1312
+ launchBlock: 0,
1313
+ type: "ERC4626" as const,
1314
+ vaultType: {
1315
+ type: VaultType.FARMING,
1316
+ description: "this is a yield farming vault"
1343
1317
  },
1344
- {
1345
- name: "STRK Evergreen",
1346
- description: getDescription('STRK', ['vesu', 'endur', 'extended']),
1347
- address: ContractAddr.from('0x55d012f57e58c96e0a5c7ebbe55853989d01e6538b15a95e7178aca4af05c21'),
1348
- launchBlock: 0,
1349
- type: 'ERC4626',
1350
- depositTokens: [Global.getDefaultTokens().find(token => token.symbol === 'STRK')!],
1351
- additionalInfo: getLooperSettings('STRK', 'ETH', strkVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
1352
- risk: {
1353
- riskFactor: _riskFactor,
1354
- netRisk:
1355
- _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
1356
- _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1357
- notARisks: getNoRiskTags(_riskFactor)
1358
- },
1359
- protocols: [Protocols.VESU],
1360
- maxTVL: Web3Number.fromWei(0, 18),
1361
- contractDetails: getContractDetails(strkVaultSettings),
1362
- faqs: getFAQs(),
1363
- investmentSteps: investmentSteps,
1364
- auditUrl: AUDIT_URL,
1365
- category: StrategyCategory.META_VAULTS,
1366
- tags: [StrategyTag.EVERGREEN],
1367
- security: EVERGREEN_SECURITY,
1368
- redemptionInfo: EVERGREEN_REDEMPTION_INFO,
1318
+ depositTokens: [
1319
+ Global.getDefaultTokens().find((token) => token.symbol === params.tokenSymbol)!
1320
+ ],
1321
+ additionalInfo: getLooperSettings(
1322
+ params.token1Symbol,
1323
+ params.token2Symbol,
1324
+ params.vaultSettings,
1325
+ VesuPools.Genesis,
1326
+ VesuPools.Genesis
1327
+ ),
1328
+ risk: getUniversalRisk(),
1329
+ auditUrl: AUDIT_URL,
1330
+ protocols: [Protocols.VESU],
1331
+ curator: {
1332
+ name: "Unwrap Labs",
1333
+ logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
1369
1334
  },
1370
- {
1371
- name: "USDT Evergreen",
1372
- description: getDescription('USDT', ['vesu']),
1373
- address: ContractAddr.from('0x1c4933d1880c6778585e597154eaca7b428579d72f3aae425ad2e4d26c6bb3'),
1374
- launchBlock: 0,
1375
- type: 'ERC4626',
1376
- depositTokens: [Global.getDefaultTokens().find(token => token.symbol === 'USDT')!],
1377
- additionalInfo: getLooperSettings('USDT', 'ETH', usdtVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
1378
- risk: {
1379
- riskFactor: _riskFactor,
1380
- netRisk:
1381
- _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
1382
- _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1383
- notARisks: getNoRiskTags(_riskFactor)
1384
- },
1385
- protocols: [Protocols.VESU],
1386
- maxTVL: Web3Number.fromWei(0, 6),
1387
- contractDetails: getContractDetails(usdtVaultSettings),
1388
- faqs: getFAQs(),
1389
- investmentSteps: investmentSteps,
1390
- auditUrl: AUDIT_URL,
1391
- category: StrategyCategory.META_VAULTS,
1392
- tags: [StrategyTag.EVERGREEN],
1393
- security: EVERGREEN_SECURITY,
1394
- redemptionInfo: EVERGREEN_REDEMPTION_INFO,
1395
- }
1396
- ]
1335
+ settings: createUniversalSettings(params.tokenSymbol, params.maxTVLDecimals),
1336
+ contractDetails: getContractDetails(params.vaultSettings),
1337
+ faqs: getFAQs(),
1338
+ investmentSteps: investmentSteps,
1339
+ tags: params.tags,
1340
+ security: EVERGREEN_SECURITY,
1341
+ redemptionInfo: EVERGREEN_REDEMPTION_INFO
1342
+ });
1343
+
1344
+ export const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[] =
1345
+ [
1346
+ createUniversalStrategy({
1347
+ tokenSymbol: "USDC.e",
1348
+ address: "0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e",
1349
+ vaultSettings: usdcVaultSettings,
1350
+ token1Symbol: "USDC.e",
1351
+ token2Symbol: "ETH",
1352
+ maxTVLDecimals: 6,
1353
+ allowedSources: ["vesu", "extended"],
1354
+ tags: [StrategyTag.META_VAULT]
1355
+ }),
1356
+ createUniversalStrategy({
1357
+ tokenSymbol: "WBTC",
1358
+ address: "0x5a4c1651b913aa2ea7afd9024911603152a19058624c3e425405370d62bf80c",
1359
+ vaultSettings: wbtcVaultSettings,
1360
+ token1Symbol: "WBTC",
1361
+ token2Symbol: "ETH",
1362
+ maxTVLDecimals: 8,
1363
+ allowedSources: ["vesu", "endur", "extended"],
1364
+ tags: [StrategyTag.BTC, StrategyTag.META_VAULT]
1365
+ }),
1366
+ createUniversalStrategy({
1367
+ tokenSymbol: "ETH",
1368
+ address: "0x446c22d4d3f5cb52b4950ba832ba1df99464c6673a37c092b1d9622650dbd8",
1369
+ vaultSettings: ethVaultSettings,
1370
+ token1Symbol: "ETH",
1371
+ token2Symbol: "WBTC",
1372
+ maxTVLDecimals: 18,
1373
+ allowedSources: ["vesu", "extended"],
1374
+ tags: [StrategyTag.META_VAULT]
1375
+ }),
1376
+ createUniversalStrategy({
1377
+ tokenSymbol: "STRK",
1378
+ address: "0x55d012f57e58c96e0a5c7ebbe55853989d01e6538b15a95e7178aca4af05c21",
1379
+ vaultSettings: strkVaultSettings,
1380
+ token1Symbol: "STRK",
1381
+ token2Symbol: "ETH",
1382
+ maxTVLDecimals: 18,
1383
+ allowedSources: ["vesu", "endur", "extended"],
1384
+ tags: [StrategyTag.META_VAULT]
1385
+ }),
1386
+ createUniversalStrategy({
1387
+ tokenSymbol: "USDT",
1388
+ address: "0x1c4933d1880c6778585e597154eaca7b428579d72f3aae425ad2e4d26c6bb3",
1389
+ vaultSettings: usdtVaultSettings,
1390
+ token1Symbol: "USDT",
1391
+ token2Symbol: "ETH",
1392
+ maxTVLDecimals: 6,
1393
+ allowedSources: ["vesu"],
1394
+ tags: [StrategyTag.META_VAULT]
1395
+ })
1396
+ ];
@@ -10,12 +10,14 @@ import {
10
10
  IStrategyMetadata,
11
11
  RiskFactor,
12
12
  RiskType,
13
- StrategyCategory,
14
13
  StrategyTag,
15
14
  AuditStatus,
16
15
  SourceCodeType,
17
16
  AccessControlType,
18
17
  InstantWithdrawalVault,
18
+ StrategySettings,
19
+ StrategyLiveStatus,
20
+ VaultType,
19
21
  } from "@/interfaces";
20
22
  import { AvnuWrapper, Pricer, SwapInfo } from "@/modules";
21
23
  import { Account, CairoCustomEnum, Contract, num, uint256, BlockIdentifier } from "starknet";
@@ -332,7 +334,7 @@ export class VesuRebalance extends BaseStrategy<
332
334
  }
333
335
 
334
336
  static async getAllPossibleVerifiedPools(asset: ContractAddr) {
335
- const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.VESU_BASE_STAGING}/pools`);
337
+ const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.VESU_BASE}/pools`);
336
338
  const verifiedPools = data.data.filter((d: any) => d.isVerified);
337
339
  const pools = verifiedPools
338
340
  .map((p: any) => {
@@ -598,7 +600,7 @@ export class VesuRebalance extends BaseStrategy<
598
600
  let pools: any[] = [];
599
601
  try {
600
602
  const data = await getAPIUsingHeadlessBrowser(
601
- `${ENDPOINTS.VESU_BASE_STAGING}/pools`
603
+ `${ENDPOINTS.VESU_BASE}/pools`
602
604
  );
603
605
  pools = data.data;
604
606
 
@@ -1014,6 +1016,70 @@ const _riskFactor: RiskFactor[] = [
1014
1016
  const AUDIT_URL =
1015
1017
  "https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
1016
1018
 
1019
+ // Helper to create common risk object
1020
+ const getVesuRebalanceRisk = () => ({
1021
+ riskFactor: _riskFactor,
1022
+ netRisk:
1023
+ _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
1024
+ _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1025
+ notARisks: getNoRiskTags(_riskFactor)
1026
+ });
1027
+
1028
+ // Helper to create Vesu Rebalance strategy settings
1029
+ const createVesuRebalanceSettings = (tokenSymbol: string): StrategySettings => {
1030
+ const depositToken = Global.getDefaultTokens().find(
1031
+ (t) => t.symbol === tokenSymbol
1032
+ )!;
1033
+ return {
1034
+ maxTVL: Web3Number.fromWei("0", depositToken.decimals),
1035
+ isPaused: false,
1036
+ liveStatus: StrategyLiveStatus.ACTIVE,
1037
+ isAudited: true,
1038
+ isInstantWithdrawal: true,
1039
+ quoteToken: depositToken,
1040
+ alerts: []
1041
+ };
1042
+ };
1043
+
1044
+ // Helper to create a Vesu Rebalance strategy
1045
+ const createVesuRebalanceStrategy = (
1046
+ idSymbol: string,
1047
+ name: string,
1048
+ tokenSymbol: string,
1049
+ address: string
1050
+ ): IStrategyMetadata<VesuRebalanceSettings> => ({
1051
+ id: `vesu_fusion_${idSymbol.toLowerCase()}`,
1052
+ name,
1053
+ description: _description.replace("{{TOKEN}}", tokenSymbol),
1054
+ address: ContractAddr.from(address),
1055
+ launchBlock: 0,
1056
+ type: "ERC4626" as const,
1057
+ vaultType: {
1058
+ type: VaultType.FARMING,
1059
+ description: "this is a yield farming vault"
1060
+ },
1061
+ depositTokens: [
1062
+ Global.getDefaultTokens().find((t) => t.symbol === tokenSymbol)!
1063
+ ],
1064
+ protocols: [_protocol],
1065
+ auditUrl: AUDIT_URL,
1066
+ curator: {
1067
+ name: "Unwrap Labs",
1068
+ logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
1069
+ },
1070
+ settings: createVesuRebalanceSettings(tokenSymbol),
1071
+ risk: getVesuRebalanceRisk(),
1072
+ additionalInfo: {
1073
+ feeBps: 1000
1074
+ },
1075
+ faqs,
1076
+ contractDetails: [],
1077
+ investmentSteps: [],
1078
+ tags: [],
1079
+ security: VESU_SECURITY,
1080
+ redemptionInfo: VESU_REDEMPTION_INFO,
1081
+ });
1082
+
1017
1083
  // Shared security & redemption metadata for all Vesu strategies
1018
1084
  const VESU_SECURITY = {
1019
1085
  auditStatus: AuditStatus.AUDITED,
@@ -1083,153 +1149,32 @@ const faqs: FAQ[] = [
1083
1149
  * Represents the Vesu Rebalance Strategies.
1084
1150
  */
1085
1151
  export const VesuRebalanceStrategies: IStrategyMetadata<VesuRebalanceSettings>[] =
1086
- [
1087
- {
1088
- name: "Vesu Fusion STRK",
1089
- description: _description,
1090
- address: ContractAddr.from(
1091
- "0x7fb5bcb8525954a60fde4e8fb8220477696ce7117ef264775a1770e23571929"
1092
- ),
1093
- launchBlock: 0,
1094
- type: "ERC4626",
1095
- depositTokens: [
1096
- Global.getDefaultTokens().find((t) => t.symbol === "STRK")!
1097
- ],
1098
- protocols: [_protocol],
1099
- auditUrl: AUDIT_URL,
1100
- maxTVL: Web3Number.fromWei("0", 18),
1101
- risk: {
1102
- riskFactor: _riskFactor,
1103
- netRisk:
1104
- _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
1105
- _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1106
- notARisks: getNoRiskTags(_riskFactor)
1107
- },
1108
- additionalInfo: {
1109
- feeBps: 1000
1110
- },
1111
- faqs,
1112
- contractDetails: [],
1113
- investmentSteps: [],
1114
- category: StrategyCategory.ALL,
1115
- tags: [StrategyTag.VESU],
1116
- security: VESU_SECURITY,
1117
- redemptionInfo: VESU_REDEMPTION_INFO,
1118
- },
1119
- {
1120
- name: "Vesu Fusion ETH",
1121
- description: _description.replace("{{TOKEN}}", "ETH"),
1122
- address: ContractAddr.from(
1123
- "0x5eaf5ee75231cecf79921ff8ded4b5ffe96be718bcb3daf206690ad1a9ad0ca"
1124
- ),
1125
- launchBlock: 0,
1126
- type: "ERC4626",
1127
- auditUrl: AUDIT_URL,
1128
- depositTokens: [
1129
- Global.getDefaultTokens().find((t) => t.symbol === "ETH")!
1130
- ],
1131
- protocols: [_protocol],
1132
- maxTVL: Web3Number.fromWei("0", 18),
1133
- risk: {
1134
- riskFactor: _riskFactor,
1135
- netRisk:
1136
- _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
1137
- _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1138
- notARisks: getNoRiskTags(_riskFactor)
1139
- },
1140
- additionalInfo: {
1141
- feeBps: 1000
1142
- },
1143
- faqs,
1144
- contractDetails: [],
1145
- investmentSteps: [],
1146
- category: StrategyCategory.ALL,
1147
- tags: [StrategyTag.VESU],
1148
- security: VESU_SECURITY,
1149
- redemptionInfo: VESU_REDEMPTION_INFO,
1150
- },
1151
- {
1152
- name: "Vesu Fusion USDC",
1153
- description: _description.replace("{{TOKEN}}", "USDC"),
1154
- address: ContractAddr.from(
1155
- "0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"
1156
- ),
1157
- launchBlock: 0,
1158
- type: "ERC4626",
1159
- auditUrl: AUDIT_URL,
1160
- depositTokens: [
1161
- Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
1162
- ],
1163
- protocols: [_protocol],
1164
- maxTVL: Web3Number.fromWei("0", 6),
1165
- risk: {
1166
- riskFactor: _riskFactor,
1167
- netRisk:
1168
- _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
1169
- _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1170
- notARisks: getNoRiskTags(_riskFactor)
1171
- },
1172
- additionalInfo: {
1173
- feeBps: 1000
1174
- },
1175
- faqs,
1176
- contractDetails: [],
1177
- investmentSteps: [],
1178
- category: StrategyCategory.ALL,
1179
- tags: [StrategyTag.VESU],
1180
- security: VESU_SECURITY,
1181
- redemptionInfo: VESU_REDEMPTION_INFO,
1182
- },
1183
- {
1184
- name: "Vesu Fusion USDT",
1185
- description: _description.replace("{{TOKEN}}", "USDT"),
1186
- address: ContractAddr.from(
1187
- "0x115e94e722cfc4c77a2f15c4aefb0928c1c0029e5a57570df24c650cb7cec2c"
1188
- ),
1189
- launchBlock: 0,
1190
- type: "ERC4626",
1191
- depositTokens: [
1192
- Global.getDefaultTokens().find((t) => t.symbol === "USDT")!
1193
- ],
1194
- auditUrl: AUDIT_URL,
1195
- protocols: [_protocol],
1196
- maxTVL: Web3Number.fromWei("0", 6),
1197
- risk: {
1198
- riskFactor: _riskFactor,
1199
- netRisk:
1200
- _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
1201
- _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1202
- notARisks: getNoRiskTags(_riskFactor)
1203
- },
1204
- additionalInfo: {
1205
- feeBps: 1000
1206
- },
1207
- faqs,
1208
- contractDetails: [],
1209
- investmentSteps: [],
1210
- category: StrategyCategory.ALL,
1211
- tags: [StrategyTag.VESU],
1212
- security: VESU_SECURITY,
1213
- redemptionInfo: VESU_REDEMPTION_INFO,
1214
- // }, {
1215
- // name: 'Vesu Fusion WBTC',
1216
- // description: _description.replace('{{TOKEN}}', 'WBTC'),
1217
- // address: ContractAddr.from('0x778007f8136a5b827325d21613803e796bda4d676fbe1e34aeab0b2a2ec027f'),
1218
- // type: 'ERC4626',
1219
- // depositTokens: [Global.getDefaultTokens().find(t => t.symbol === 'WBTC')!],
1220
- // auditUrl: AUDIT_URL,
1221
- // protocols: [_protocol],
1222
- // maxTVL: Web3Number.fromWei('0', 8),
1223
- // risk: {
1224
- // riskFactor: _riskFactor,
1225
- // netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
1226
- // },
1227
- // additionalInfo: {
1228
- // feeBps: 1000,
1229
- // },
1230
-
1231
- }
1232
- ];
1152
+ [
1153
+ createVesuRebalanceStrategy(
1154
+ 'strk',
1155
+ "Vesu Fusion STRK",
1156
+ "STRK",
1157
+ "0x7fb5bcb8525954a60fde4e8fb8220477696ce7117ef264775a1770e23571929"
1158
+ ),
1159
+ createVesuRebalanceStrategy(
1160
+ 'eth',
1161
+ "Vesu Fusion ETH",
1162
+ "ETH",
1163
+ "0x5eaf5ee75231cecf79921ff8ded4b5ffe96be718bcb3daf206690ad1a9ad0ca"
1164
+ ),
1165
+ createVesuRebalanceStrategy(
1166
+ 'usdc',
1167
+ "Vesu Fusion USDC.e",
1168
+ "USDC.e",
1169
+ "0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"
1170
+ ),
1171
+ createVesuRebalanceStrategy(
1172
+ 'usdt',
1173
+ "Vesu Fusion USDT",
1174
+ "USDT",
1175
+ "0x115e94e722cfc4c77a2f15c4aefb0928c1c0029e5a57570df24c650cb7cec2c"
1176
+ )
1177
+ ];
1233
1178
 
1234
1179
  // auto assign contract details to each strategy
1235
1180
  VesuRebalanceStrategies.forEach((s) => {
@@ -1,5 +1,6 @@
1
1
  export * from '@/utils/logger';
2
2
  export * from './oz-merkle';
3
+ export * from "./strategy-utils";
3
4
 
4
5
  // Utility type to make all optional properties required
5
6
  export type RequiredFields<T> = {