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

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.
Files changed (51) hide show
  1. package/dist/cli.js +2 -2
  2. package/dist/cli.mjs +2 -2
  3. package/dist/index.browser.global.js +16173 -24081
  4. package/dist/index.browser.mjs +8572 -16661
  5. package/dist/index.d.ts +600 -2666
  6. package/dist/index.js +8660 -16784
  7. package/dist/index.mjs +8585 -16674
  8. package/package.json +3 -3
  9. package/src/data/redeem-request-nft.abi.json +752 -0
  10. package/src/data/universal-vault.abi.json +8 -7
  11. package/src/dataTypes/bignumber.browser.ts +5 -1
  12. package/src/dataTypes/bignumber.node.ts +5 -0
  13. package/src/global.ts +21 -1
  14. package/src/interfaces/common.tsx +39 -4
  15. package/src/modules/avnu.ts +19 -10
  16. package/src/modules/index.ts +1 -1
  17. package/src/strategies/base-strategy.ts +92 -8
  18. package/src/strategies/constants.ts +8 -3
  19. package/src/strategies/ekubo-cl-vault.tsx +150 -16
  20. package/src/strategies/factory.ts +21 -1
  21. package/src/strategies/index.ts +2 -6
  22. package/src/strategies/registry.ts +28 -5
  23. package/src/strategies/sensei.ts +29 -13
  24. package/src/strategies/svk-strategy.ts +29 -4
  25. package/src/strategies/token-boosted-xstrk-carry-strategy.tsx +1057 -0
  26. package/src/strategies/universal-adapters/adapter-utils.ts +2 -0
  27. package/src/strategies/universal-adapters/avnu-adapter.ts +19 -10
  28. package/src/strategies/universal-adapters/index.ts +1 -2
  29. package/src/strategies/universal-adapters/svk-troves-adapter.ts +160 -13
  30. package/src/strategies/universal-adapters/vesu-modify-position-adapter.ts +91 -42
  31. package/src/strategies/universal-adapters/vesu-multiply-adapter.ts +75 -52
  32. package/src/strategies/universal-adapters/vesu-position-common.ts +38 -31
  33. package/src/strategies/universal-lst-muliplier-strategy.tsx +222 -269
  34. package/src/strategies/universal-strategy.tsx +166 -105
  35. package/src/strategies/vesu-rebalance.tsx +3 -6
  36. package/src/strategies/yoloVault.ts +1084 -0
  37. package/src/utils/health-factor-math.ts +29 -0
  38. package/src/modules/ExtendedWrapperSDk/index.ts +0 -62
  39. package/src/modules/ExtendedWrapperSDk/types.ts +0 -334
  40. package/src/modules/ExtendedWrapperSDk/wrapper.ts +0 -611
  41. package/src/strategies/universal-adapters/extended-adapter.ts +0 -835
  42. package/src/strategies/universal-adapters/usdc<>usdce-adapter.ts +0 -200
  43. package/src/strategies/vesu-extended-strategy/services/executionService.ts +0 -2233
  44. package/src/strategies/vesu-extended-strategy/services/extended-vesu-state-manager.ts +0 -4254
  45. package/src/strategies/vesu-extended-strategy/services/ltv-imbalance-rebalance-math.ts +0 -783
  46. package/src/strategies/vesu-extended-strategy/services/operationService.ts +0 -56
  47. package/src/strategies/vesu-extended-strategy/types/transaction-metadata.ts +0 -88
  48. package/src/strategies/vesu-extended-strategy/utils/config.runtime.ts +0 -78
  49. package/src/strategies/vesu-extended-strategy/utils/constants.ts +0 -48
  50. package/src/strategies/vesu-extended-strategy/utils/helper.ts +0 -528
  51. package/src/strategies/vesu-extended-strategy/vesu-extended-strategy.tsx +0 -1014
@@ -1,19 +1,20 @@
1
1
  import { ContractAddr, Web3Number } from "@/dataTypes";
2
- import { BaseStrategy, SingleActionAmount, SingleTokenInfo } from "./base-strategy";
2
+ import { SingleActionAmount, SingleTokenInfo, UserPositionCard, UserPositionCardsInput } from "./base-strategy";
3
3
  import { PricerBase } from "@/modules/pricerBase";
4
- import { FAQ, getNoRiskTags, IConfig, IStrategyMetadata, Protocols, RiskFactor, RiskType, StrategyTag, VaultPosition, AuditStatus, SourceCodeType, AccessControlType, InstantWithdrawalVault, StrategyLiveStatus, StrategySettings, VaultType, RedemptionInfo } from "@/interfaces";
4
+ import { FAQ, getNoRiskTags, IConfig, IStrategyMetadata, Protocols, RiskFactor, RiskType, StrategyTag, VaultPosition, AuditStatus, SourceCodeType, AccessControlType, InstantWithdrawalVault, StrategyLiveStatus, StrategySettings, VaultType, RedemptionInfo, UnwrapLabsCurator, getMainnetConfig } 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";
8
8
  import UniversalVaultAbi from '../data/universal-vault.abi.json';
9
9
  import ManagerAbi from '../data/vault-manager.abi.json';
10
- import { ApproveCallParams, AvnuSwapCallParams, BaseAdapter, CommonAdapter, DepositParams, FlashloanCallParams, GenerateCallFn, LeafAdapterFn, ManageCall, WithdrawParams } from "./universal-adapters";
10
+ import { ApproveCallParams, AvnuAdapter, AvnuSwapCallParams, BaseAdapter, BaseAdapterConfig, CommonAdapter, DepositParams, FlashloanCallParams, GenerateCallFn, LeafAdapterFn, ManageCall, VesuModifyPositionAdapter, VesuMultiplyAdapter, WithdrawParams } from "./universal-adapters";
11
11
  import { VesuAdapter, VesuModifyPositionCallParams, VesuDefiSpringRewardsCallParams, VesuPools } from "./universal-adapters/vesu-adapter";
12
12
  import { Global } from "@/global";
13
- import { AvnuWrapper, ERC20 } from "@/modules";
14
- import { AVNU_MIDDLEWARE, VESU_SINGLETON } from "./universal-adapters/adapter-utils";
13
+ import { AvnuWrapper, ERC20, PricerFromApi } from "@/modules";
14
+ import { AVNU_EXCHANGE, AVNU_MIDDLEWARE, AVNU_QUOTE_URL, VESU_SINGLETON } from "./universal-adapters/adapter-utils";
15
15
  import { LSTPriceType } from "./types";
16
16
  import { HarvestInfo, VesuHarvests } from "@/modules/harvests";
17
+ import { SVKStrategy } from "./svk-strategy";
17
18
 
18
19
  export interface UniversalManageCall {
19
20
  proofs: string[];
@@ -42,7 +43,8 @@ export interface UniversalStrategySettings {
42
43
 
43
44
  export enum AUMTypes {
44
45
  FINALISED = 'finalised',
45
- DEFISPRING = 'defispring'
46
+ DEFISPRING = 'defispring',
47
+ BTCFI = 'btcfi',
46
48
  }
47
49
 
48
50
  export enum PositionTypeAvnuExtended {
@@ -52,47 +54,18 @@ export enum PositionTypeAvnuExtended {
52
54
 
53
55
  export class UniversalStrategy<
54
56
  S extends UniversalStrategySettings
55
- > extends BaseStrategy<
56
- SingleTokenInfo,
57
- SingleActionAmount
58
- > {
59
-
60
- /** Contract address of the strategy */
61
- readonly address: ContractAddr;
62
- /** Pricer instance for token price calculations */
63
- readonly pricer: PricerBase;
64
- /** Metadata containing strategy information */
65
- readonly metadata: IStrategyMetadata<S>;
66
- /** Contract instance for interacting with the strategy */
67
- readonly contract: Contract;
68
- readonly managerContract: Contract;
69
- merkleTree: StandardMerkleTree | undefined;
57
+ > extends SVKStrategy<S> {
70
58
 
71
59
  constructor(
72
60
  config: IConfig,
73
61
  pricer: PricerBase,
74
62
  metadata: IStrategyMetadata<S>
75
63
  ) {
76
- super(config);
77
- this.pricer = pricer;
78
-
64
+ super(config, pricer, metadata);
79
65
  assert(
80
66
  metadata.depositTokens.length === 1,
81
- "VesuRebalance only supports 1 deposit token"
67
+ "VesuRebalance only supports 1 deposit token",
82
68
  );
83
- this.metadata = metadata;
84
- this.address = metadata.address;
85
-
86
- this.contract = new Contract({
87
- abi: UniversalVaultAbi,
88
- address: this.address.address,
89
- providerOrAccount: this.config.provider
90
- });
91
- this.managerContract = new Contract({
92
- abi: ManagerAbi,
93
- address: this.metadata.additionalInfo.manager.address,
94
- providerOrAccount: this.config.provider
95
- });
96
69
  }
97
70
 
98
71
  getMerkleTree() {
@@ -411,6 +384,50 @@ export class UniversalStrategy<
411
384
  return (apyForGivenBlocks * (365 * 24 * 3600)) / timeDiffSeconds;
412
385
  }
413
386
 
387
+ async getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]> {
388
+ const { user, investmentFlows = [] } = input;
389
+ const [userTVL] = await Promise.all([
390
+ this.getUserTVL(user),
391
+ ]);
392
+ const cards: UserPositionCard[] = [
393
+ {
394
+ title: "Your Holdings",
395
+ tooltip: "Your Holdings",
396
+ value: this.formatTokenAmountForCard(userTVL.amount, userTVL.tokenInfo),
397
+ subValue: `≈ ${this.formatUSDForCard(userTVL.usdValue)}`,
398
+ subValueColor: "positive",
399
+ },
400
+ ];
401
+
402
+ let lifetimeAmount = userTVL.amount.multipliedBy(0);
403
+ let lifetimeTokenInfo = userTVL.tokenInfo;
404
+ let lifetimeUsdValue = 0;
405
+ if (investmentFlows.length > 0) {
406
+ try {
407
+ const earningsResult = this.getLifetimeEarnings(userTVL, investmentFlows);
408
+ lifetimeAmount = earningsResult.lifetimeEarnings;
409
+ lifetimeTokenInfo = earningsResult.tokenInfo.tokenInfo;
410
+ const userAmount = userTVL.amount.toNumber();
411
+ if (Number.isFinite(userAmount) && userAmount > 0) {
412
+ const pricePerToken = userTVL.usdValue / userAmount;
413
+ lifetimeUsdValue = lifetimeAmount.toNumber() * pricePerToken;
414
+ }
415
+ } catch (error) {
416
+ logger.warn(`${this.getTag()}::getUserPositionCards lifetime earnings fallback`, error);
417
+ }
418
+ }
419
+
420
+ cards.push({
421
+ title: "Lifetime Earnings",
422
+ tooltip: "Lifetime Earnings",
423
+ value: this.formatTokenAmountForCard(lifetimeAmount, lifetimeTokenInfo),
424
+ subValue: `≈ ${this.formatUSDForCard(lifetimeUsdValue)}`,
425
+ subValueColor: this.getSubValueColorFromSignedNumber(lifetimeUsdValue),
426
+ });
427
+
428
+ return cards;
429
+ }
430
+
414
431
  /**
415
432
  * Calculates the total TVL of the strategy.
416
433
  * @returns Object containing the total amount in token units and USD value
@@ -550,15 +567,33 @@ export class UniversalStrategy<
550
567
  return rewardAssets;
551
568
  }
552
569
 
553
- getVesuAdapters() {
554
- const vesuAdapter1 = this.getAdapter(UNIVERSAL_ADAPTERS.VESU_LEG1) as unknown as VesuAdapter;
555
- const vesuAdapter2 = this.getAdapter(UNIVERSAL_ADAPTERS.VESU_LEG2) as unknown as VesuAdapter;
556
- vesuAdapter1.pricer = this.pricer;
557
- vesuAdapter2.pricer = this.pricer;
558
- vesuAdapter1.networkConfig = this.config;
559
- vesuAdapter2.networkConfig = this.config;
570
+ getVesuMultiplyAdapter(): VesuMultiplyAdapter {
571
+ const id = UNIVERSAL_ADAPTER_IDS.VESU_MULTIPLY;
572
+ const adapter = this.getAdapter(id) as VesuMultiplyAdapter;
573
+ adapter.config.pricer = this.pricer;
574
+ adapter.config.networkConfig = this.config;
575
+ adapter._vesuAdapter.pricer = this.pricer;
576
+ adapter._vesuAdapter.networkConfig = this.config;
577
+ return adapter;
578
+ }
579
+
580
+ getVesuModifyPositionAdapter(): VesuModifyPositionAdapter {
581
+ const id = UNIVERSAL_ADAPTER_IDS.VESU_MODIFY;
582
+ const adapter = this.getAdapter(id) as VesuModifyPositionAdapter;
583
+ adapter.config.pricer = this.pricer;
584
+ adapter.config.networkConfig = this.config;
585
+ adapter._vesuAdapter.pricer = this.pricer;
586
+ adapter._vesuAdapter.networkConfig = this.config;
587
+ return adapter;
588
+ }
560
589
 
561
- return [vesuAdapter1, vesuAdapter2];
590
+ /**
591
+ * Legacy helper for retired Evergreen flows. New integrations should use
592
+ * getVesuMultiplyAdapter / getVesuModifyPositionAdapter and BaseAdapter deposit/withdraw leaves.
593
+ */
594
+ getVesuAdapters(): VesuAdapter[] {
595
+ const multiply = this.getVesuMultiplyAdapter();
596
+ return [multiply._vesuAdapter];
562
597
  }
563
598
 
564
599
  async getVesuPositions(blockNumber: BlockIdentifier = 'latest'): Promise<VaultPosition[]> {
@@ -586,16 +621,15 @@ export class UniversalStrategy<
586
621
  return this.managerContract.populate('set_manage_root', [strategist.address, num.getHexString(root)]);
587
622
  }
588
623
 
589
- // TODO: callConstructor now returns Promise<ManageCall[]>, migrate callers to await and flatten
590
- getManageCall(proofIds: string[], manageCalls: ManageCall[]) {
591
- assert(proofIds.length == manageCalls.length, 'Proof IDs and Manage Calls length mismatch');
592
- return this.managerContract.populate('manage_vault_with_merkle_verification', {
593
- proofs: proofIds.map(id => this.getProofs(id).proofs),
594
- decoder_and_sanitizers: manageCalls.map(call => call.sanitizer.address),
595
- targets: manageCalls.map(call => call.call.contractAddress.address),
596
- selectors: manageCalls.map(call => call.call.selector),
597
- calldatas: manageCalls.map(call => call.call.calldata),
598
- });
624
+ /**
625
+ * Compatibility helper: SVKStrategy's `getManageCall` expects proof-groups.
626
+ * We derive proof-groups from each manageCall's `proofReadableId`.
627
+ */
628
+ protected getManageCallFromManageCalls(manageCalls: ManageCall[]) {
629
+ return this.getManageCall(
630
+ this.getProofGroupsForManageCalls(manageCalls),
631
+ manageCalls,
632
+ );
599
633
  }
600
634
 
601
635
  getVesuModifyPositionCalls(params: {
@@ -821,22 +855,9 @@ export class UniversalStrategy<
821
855
  amount: borrow2Amount,
822
856
  data: flashloanCalldata.map(i => BigInt(i))
823
857
  })
824
- const manageCall = this.getManageCall([UNIVERSAL_MANAGE_IDS.FLASH_LOAN], [manageCall1 as unknown as ManageCall]);
825
- return manageCall;
826
- }
827
-
828
- async getBringLiquidityCall(params: {
829
- amount: Web3Number
830
- }) {
831
- const manage1Info = this.getProofs<ApproveCallParams>(UNIVERSAL_MANAGE_IDS.APPROVE_BRING_LIQUIDITY);
832
- const manageCall1 = manage1Info.callConstructor({
833
- amount: params.amount
834
- });
835
- const manage2Info = this.getProofs<ApproveCallParams>(UNIVERSAL_MANAGE_IDS.BRING_LIQUIDITY);
836
- const manageCall2 = manage2Info.callConstructor({
837
- amount: params.amount
838
- });
839
- const manageCall = this.getManageCall([UNIVERSAL_MANAGE_IDS.APPROVE_BRING_LIQUIDITY, UNIVERSAL_MANAGE_IDS.BRING_LIQUIDITY], [manageCall1 as unknown as ManageCall, manageCall2 as unknown as ManageCall]);
858
+ const manageCall = this.getManageCallFromManageCalls([
859
+ manageCall1 as unknown as ManageCall,
860
+ ]);
840
861
  return manageCall;
841
862
  }
842
863
 
@@ -866,7 +887,6 @@ export class UniversalStrategy<
866
887
  amount,
867
888
  proofs
868
889
  });
869
- const proofIds: string[] = [UNIVERSAL_MANAGE_IDS.DEFISPRING_REWARDS];
870
890
  const manageCalls: ManageCall[] = [manageCall1 as unknown as ManageCall];
871
891
 
872
892
  // swap rewards for underlying
@@ -891,14 +911,11 @@ export class UniversalStrategy<
891
911
  const manageCall3 = manage3Info.callConstructor({
892
912
  props: swapInfo
893
913
  });
894
- proofIds.push(UNIVERSAL_MANAGE_IDS.APPROVE_SWAP_TOKEN1);
895
- proofIds.push(UNIVERSAL_MANAGE_IDS.AVNU_SWAP_REWARDS);
896
-
897
914
  manageCalls.push(manageCall2 as unknown as ManageCall);
898
915
  manageCalls.push(manageCall3 as unknown as ManageCall);
899
916
  }
900
917
 
901
- const manageCall = this.getManageCall(proofIds, manageCalls);
918
+ const manageCall = this.getManageCallFromManageCalls(manageCalls);
902
919
  return { call: manageCall, reward: actualReward, tokenInfo: STRK };
903
920
  }
904
921
 
@@ -921,14 +938,16 @@ export class UniversalStrategy<
921
938
  });
922
939
 
923
940
  if (params.isLeg1toLeg2) {
924
- const manageCall = this.getManageCall([
925
- ...callSet1.map(i => i.step), ...callSet2.map(i => i.step)
926
- ], [...callSet1.map(i => i.manageCall), ...callSet2.map(i => i.manageCall)]);
941
+ const manageCall = this.getManageCallFromManageCalls([
942
+ ...callSet1.map(i => i.manageCall),
943
+ ...callSet2.map(i => i.manageCall),
944
+ ]);
927
945
  return manageCall;
928
946
  } else {
929
- const manageCall = this.getManageCall([
930
- ...callSet2.map(i => i.step), ...callSet1.map(i => i.step)
931
- ], [...callSet2.map(i => i.manageCall), ...callSet1.map(i => i.manageCall)]);
947
+ const manageCall = this.getManageCallFromManageCalls([
948
+ ...callSet2.map(i => i.manageCall),
949
+ ...callSet1.map(i => i.manageCall),
950
+ ]);
932
951
  return manageCall;
933
952
  }
934
953
  }
@@ -952,10 +971,10 @@ export enum UNIVERSAL_MANAGE_IDS {
952
971
  AVNU_SWAP_REWARDS = 'avnu_swap_rewards'
953
972
  }
954
973
 
955
- export enum UNIVERSAL_ADAPTERS {
956
- COMMON = 'common_adapter',
957
- VESU_LEG1 = 'vesu_leg1_adapter',
958
- VESU_LEG2 = 'vesu_leg2_adapter'
974
+ export enum UNIVERSAL_ADAPTER_IDS {
975
+ VESU_MULTIPLY = 'vesu_multiply',
976
+ VESU_MODIFY = 'vesu_modify',
977
+ AVNU = 'avnu',
959
978
  }
960
979
 
961
980
  function getLooperSettings(
@@ -965,6 +984,9 @@ function getLooperSettings(
965
984
  pool1: ContractAddr,
966
985
  pool2: ContractAddr,
967
986
  ) {
987
+ vaultSettings.leafAdapters = [];
988
+ vaultSettings.adapters = [];
989
+
968
990
  const USDCToken = Global.getDefaultTokens().find(token => token.symbol === token1Symbol)!;
969
991
  const ETHToken = Global.getDefaultTokens().find(token => token.symbol === token2Symbol)!;
970
992
 
@@ -975,19 +997,45 @@ function getLooperSettings(
975
997
  vaultAddress: vaultSettings.vaultAddress,
976
998
  vaultAllocator: vaultSettings.vaultAllocator,
977
999
  })
978
- const vesuAdapterUSDCETH = new VesuAdapter({
979
- poolId: pool1,
980
- collateral: USDCToken,
981
- debt: ETHToken,
1000
+
1001
+ const baseAdapterConfig: BaseAdapterConfig = {
1002
+ baseToken: USDCToken,
1003
+ supportedPositions: [{ asset: USDCToken, isDebt: false }],
1004
+ networkConfig: getMainnetConfig(),
1005
+ pricer: new PricerFromApi(getMainnetConfig(), Global.getDefaultTokens()),
982
1006
  vaultAllocator: vaultSettings.vaultAllocator,
983
- id: UNIVERSAL_MANAGE_IDS.VESU_LEG1
1007
+ vaultAddress: vaultSettings.vaultAddress,
1008
+ };
1009
+ const vesuMultiplyAdapter = new VesuMultiplyAdapter({
1010
+ poolId: pool1,
1011
+ collateral: ETHToken,
1012
+ debt: USDCToken,
1013
+ marginToken: USDCToken,
1014
+ targetHealthFactor: 1.3,
1015
+ minHealthFactor: 1.2,
1016
+ quoteAmountToFetchPrice: new Web3Number(0.1, 18),
1017
+ minimumVesuMovementAmount: 5,
1018
+ ...baseAdapterConfig,
1019
+ supportedPositions: [{asset: ETHToken, isDebt: false}, {asset: USDCToken, isDebt: true}],
984
1020
  })
985
- const vesuAdapterETHUSDC = new VesuAdapter({
986
- poolId: pool2,
1021
+ const vesuModifyPositionAdapter = new VesuModifyPositionAdapter({
1022
+ poolId: pool1,
987
1023
  collateral: ETHToken,
988
1024
  debt: USDCToken,
989
- vaultAllocator: vaultSettings.vaultAllocator,
990
- id: UNIVERSAL_MANAGE_IDS.VESU_LEG2
1025
+ targetLtv: 0.75,
1026
+ maxLtv: 0.9,
1027
+ ...baseAdapterConfig,
1028
+ supportedPositions: [{asset: ETHToken, isDebt: false}, {asset: USDCToken, isDebt: true}],
1029
+ })
1030
+
1031
+ const avnuAdapter = new AvnuAdapter({
1032
+ baseUrl: AVNU_QUOTE_URL,
1033
+ avnuContract: AVNU_EXCHANGE,
1034
+ slippage: 0.01,
1035
+ minimumExtendedPriceDifferenceForSwapOpen: 0,
1036
+ maximumExtendedPriceDifferenceForSwapClosing: 0,
1037
+ ...baseAdapterConfig,
1038
+ supportedPositions: [{asset: ETHToken, isDebt: false}, {asset: USDCToken, isDebt: false}],
991
1039
  })
992
1040
  // vaultSettings.adapters.push(...[{
993
1041
  // id: UNIVERSAL_ADAPTERS.COMMON,
@@ -1004,8 +1052,24 @@ function getLooperSettings(
1004
1052
  // vaultSettings.leafAdapters.push(commonAdapter.getFlashloanAdapter.bind(commonAdapter));
1005
1053
  // vaultSettings.leafAdapters.push(vesuAdapterUSDCETH.getModifyPosition.bind(vesuAdapterUSDCETH));
1006
1054
  // vaultSettings.leafAdapters.push(vesuAdapterETHUSDC.getModifyPosition.bind(vesuAdapterETHUSDC));
1007
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(USDCToken.address, VESU_SINGLETON, UNIVERSAL_MANAGE_IDS.APPROVE_TOKEN1).bind(commonAdapter));
1008
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(ETHToken.address, VESU_SINGLETON, UNIVERSAL_MANAGE_IDS.APPROVE_TOKEN2).bind(commonAdapter));
1055
+ vaultSettings.adapters.push({
1056
+ id: UNIVERSAL_ADAPTER_IDS.VESU_MULTIPLY,
1057
+ adapter: vesuMultiplyAdapter,
1058
+ });
1059
+ vaultSettings.adapters.push({
1060
+ id: UNIVERSAL_ADAPTER_IDS.VESU_MODIFY,
1061
+ adapter: vesuModifyPositionAdapter,
1062
+ });
1063
+ vaultSettings.adapters.push({
1064
+ id: UNIVERSAL_ADAPTER_IDS.AVNU,
1065
+ adapter: avnuAdapter,
1066
+ });
1067
+ vaultSettings.leafAdapters.push(() => vesuMultiplyAdapter.getDepositLeaf());
1068
+ vaultSettings.leafAdapters.push(() => vesuMultiplyAdapter.getWithdrawLeaf());
1069
+ vaultSettings.leafAdapters.push(() => vesuModifyPositionAdapter.getDepositLeaf());
1070
+ vaultSettings.leafAdapters.push(() => vesuModifyPositionAdapter.getWithdrawLeaf());
1071
+ vaultSettings.leafAdapters.push(() => avnuAdapter.getDepositLeaf());
1072
+ vaultSettings.leafAdapters.push(() => avnuAdapter.getWithdrawLeaf());
1009
1073
 
1010
1074
  // to bridge liquidity back to vault (used by bring_liquidity)
1011
1075
  vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(USDCToken.address, vaultSettings.vaultAddress, UNIVERSAL_MANAGE_IDS.APPROVE_BRING_LIQUIDITY).bind(commonAdapter));
@@ -1015,8 +1079,8 @@ function getLooperSettings(
1015
1079
  // vaultSettings.leafAdapters.push(vesuAdapterUSDCETH.getDefispringRewardsAdapter(UNIVERSAL_MANAGE_IDS.DEFISPRING_REWARDS).bind(vesuAdapterUSDCETH));
1016
1080
 
1017
1081
  // avnu swap
1018
- const STRKToken = Global.getDefaultTokens().find(token => token.symbol === 'STRK')!;
1019
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(STRKToken.address, AVNU_MIDDLEWARE, UNIVERSAL_MANAGE_IDS.APPROVE_SWAP_TOKEN1).bind(commonAdapter));
1082
+ // const STRKToken = Global.getDefaultTokens().find(token => token.symbol === 'STRK')!;
1083
+ // vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(STRKToken.address, AVNU_MIDDLEWARE, UNIVERSAL_MANAGE_IDS.APPROVE_SWAP_TOKEN1).bind(commonAdapter));
1020
1084
  // vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(STRKToken.address, USDCToken.address, UNIVERSAL_MANAGE_IDS.AVNU_SWAP_REWARDS, true).bind(commonAdapter));
1021
1085
  return vaultSettings;
1022
1086
  }
@@ -1351,11 +1415,8 @@ const createUniversalStrategy = (params: {
1351
1415
  risk: getUniversalRisk(),
1352
1416
  auditUrl: AUDIT_URL,
1353
1417
  protocols: [Protocols.VESU],
1354
- realizedAPYMethodology: "The realizedAPY is based on past 14 days performance by the vault",
1355
- curator: {
1356
- name: "Unwrap Labs",
1357
- logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
1358
- },
1418
+ realizedApyMethodology: "The realizedAPY is based on past 14 days performance by the vault",
1419
+ curator: UnwrapLabsCurator,
1359
1420
  settings: createUniversalSettings(params.tokenSymbol, params.maxTVLDecimals),
1360
1421
  contractDetails: getContractDetails(params.vaultSettings),
1361
1422
  faqs: getFAQs(),
@@ -18,6 +18,7 @@ import {
18
18
  StrategySettings,
19
19
  StrategyLiveStatus,
20
20
  VaultType,
21
+ UnwrapLabsCurator,
21
22
  } from "@/interfaces";
22
23
  import { AvnuWrapper, Pricer, SwapInfo } from "@/modules";
23
24
  import { Account, CairoCustomEnum, Contract, num, uint256, BlockIdentifier } from "starknet";
@@ -1035,7 +1036,6 @@ const createVesuRebalanceSettings = (tokenSymbol: string): StrategySettings => {
1035
1036
  (t) => t.symbol === tokenSymbol
1036
1037
  )!;
1037
1038
  return {
1038
- maxTVL: Web3Number.fromWei("0", depositToken.decimals),
1039
1039
  isPaused: false,
1040
1040
  liveStatus: StrategyLiveStatus.DEPRECATED,
1041
1041
  isAudited: true,
@@ -1067,10 +1067,7 @@ const createVesuRebalanceStrategy = (
1067
1067
  ],
1068
1068
  protocols: [_protocol],
1069
1069
  auditUrl: AUDIT_URL,
1070
- curator: {
1071
- name: "Unwrap Labs",
1072
- logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
1073
- },
1070
+ curator: UnwrapLabsCurator,
1074
1071
  settings: createVesuRebalanceSettings(tokenSymbol),
1075
1072
  risk: getVesuRebalanceRisk(),
1076
1073
  additionalInfo: {
@@ -1097,7 +1094,7 @@ const VESU_SECURITY = {
1097
1094
  contractLink: "https://github.com/trovesfi/troves-contracts",
1098
1095
  },
1099
1096
  accessControl: {
1100
- type: AccessControlType.STANDARD_ACCOUNT,
1097
+ type: AccessControlType.ROLE_BASED_ACCESS,
1101
1098
  addresses: [ContractAddr.from("0x0")],
1102
1099
  timeLock: "2 Days",
1103
1100
  },