@strkfarm/sdk 1.1.29 → 1.1.32

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.
@@ -28641,6 +28641,7 @@ ${r2}}` : "}", l2;
28641
28641
  var index_browser_exports = {};
28642
28642
  __export(index_browser_exports, {
28643
28643
  AUMTypes: () => AUMTypes,
28644
+ AVNU_EXCHANGE: () => AVNU_EXCHANGE,
28644
28645
  AVNU_MIDDLEWARE: () => AVNU_MIDDLEWARE,
28645
28646
  AutoCompounderSTRK: () => AutoCompounderSTRK,
28646
28647
  AvnuWrapper: () => AvnuWrapper,
@@ -28679,6 +28680,7 @@ ${r2}}` : "}", l2;
28679
28680
  UniversalStrategies: () => UniversalStrategies,
28680
28681
  UniversalStrategy: () => UniversalStrategy,
28681
28682
  VESU_SINGLETON: () => VESU_SINGLETON,
28683
+ VESU_V2_MODIFY_POSITION_SANITIZER: () => VESU_V2_MODIFY_POSITION_SANITIZER,
28682
28684
  VesuAdapter: () => VesuAdapter,
28683
28685
  VesuAmountDenomination: () => VesuAmountDenomination,
28684
28686
  VesuAmountType: () => VesuAmountType,
@@ -83040,9 +83042,11 @@ spurious results.`);
83040
83042
  // src/strategies/universal-adapters/adapter-utils.ts
83041
83043
  var SIMPLE_SANITIZER = ContractAddr.from("0x5a2e3ceb3da368b983a8717898427ab7b6daf04014b70f321e777f9aad940b4");
83042
83044
  var SIMPLE_SANITIZER_V2 = ContractAddr.from("0x7b6f98311af8aa425278570e62abf523e6462eaa01a38c1feab9b2f416492e2");
83045
+ var VESU_V2_MODIFY_POSITION_SANITIZER = ContractAddr.from("0x04Bf71F2BD9D6F8819057c9dD524F0d5fbc38317C00500d7b9a0FdCf01195066");
83043
83046
  var SIMPLE_SANITIZER_VESU_V1_DELEGATIONS = ContractAddr.from("0x5643d54da70a471cd2b6fa37f52ea7a13cc3f3910689a839f8490a663d2208a");
83044
83047
  var PRICE_ROUTER = ContractAddr.from("0x05e83Fa38D791d2dba8E6f487758A9687FfEe191A6Cf8a6c5761ab0a110DB837");
83045
83048
  var AVNU_MIDDLEWARE = ContractAddr.from("0x4a7972ed3f5d1e74a6d6c4a8f467666953d081c8f2270390cc169d50d17cb0d");
83049
+ var AVNU_EXCHANGE = ContractAddr.from("0x04270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f");
83046
83050
  var VESU_SINGLETON = ContractAddr.from("0x000d8d6dfec4d33bfb6895de9f3852143a17c6f92fd2a21da3d6924d34870160");
83047
83051
  function toBigInt3(value) {
83048
83052
  if (typeof value === "string") {
@@ -83186,11 +83190,11 @@ spurious results.`);
83186
83190
  };
83187
83191
  };
83188
83192
  }
83189
- getAvnuAdapter(fromToken, toToken, id) {
83193
+ getAvnuAdapter(fromToken, toToken, id, isMiddleware) {
83190
83194
  return () => ({
83191
83195
  leaf: this.constructSimpleLeafData({
83192
83196
  id,
83193
- target: AVNU_MIDDLEWARE,
83197
+ target: isMiddleware ? AVNU_MIDDLEWARE : AVNU_EXCHANGE,
83194
83198
  method: "multi_route_swap",
83195
83199
  packedArguments: [
83196
83200
  fromToken.toBigInt(),
@@ -83198,15 +83202,15 @@ spurious results.`);
83198
83202
  this.config.vaultAllocator.toBigInt()
83199
83203
  ]
83200
83204
  }),
83201
- callConstructor: this.getAvnuCall(fromToken, toToken).bind(this)
83205
+ callConstructor: this.getAvnuCall(fromToken, toToken, isMiddleware).bind(this)
83202
83206
  });
83203
83207
  }
83204
- getAvnuCall(fromToken, toToken) {
83208
+ getAvnuCall(fromToken, toToken, isMiddleware) {
83205
83209
  return (params) => {
83206
83210
  return {
83207
83211
  sanitizer: SIMPLE_SANITIZER,
83208
83212
  call: {
83209
- contractAddress: AVNU_MIDDLEWARE,
83213
+ contractAddress: isMiddleware ? AVNU_MIDDLEWARE : AVNU_EXCHANGE,
83210
83214
  selector: hash_exports.getSelectorFromName("multi_route_swap"),
83211
83215
  calldata: [
83212
83216
  fromToken.toBigInt(),
@@ -87957,24 +87961,30 @@ spurious results.`);
87957
87961
  this.VESU_MULTIPLY = ContractAddr.from("0x027fef272d0a9a3844767c851a64b36fe4f0115141d81134baade95d2b27b781");
87958
87962
  this.getModifyPosition = () => {
87959
87963
  const positionData = [0n];
87960
- const packedArguments = [
87961
- toBigInt3(this.config.poolId.toString()),
87962
- // pool id
87964
+ const { addr, isV2 } = getVesuSingletonAddress(this.config.poolId);
87965
+ const commonPackedData = [
87963
87966
  toBigInt3(this.config.collateral.address.toString()),
87964
87967
  // collateral
87965
87968
  toBigInt3(this.config.debt.address.toString()),
87966
87969
  // debt
87967
- toBigInt3(this.config.vaultAllocator.toString()),
87970
+ toBigInt3(this.config.vaultAllocator.toString())
87968
87971
  // vault allocator
87972
+ ];
87973
+ const packedArguments = isV2 ? [
87974
+ ...commonPackedData
87975
+ ] : [
87976
+ toBigInt3(this.config.poolId.toString()),
87977
+ // pool id
87978
+ ...commonPackedData,
87969
87979
  toBigInt3(positionData.length),
87970
87980
  ...positionData
87971
87981
  ];
87972
87982
  const output = this.constructSimpleLeafData({
87973
87983
  id: this.config.id,
87974
- target: getVesuSingletonAddress(this.config.poolId).addr,
87984
+ target: addr,
87975
87985
  method: "modify_position",
87976
87986
  packedArguments
87977
- });
87987
+ }, isV2 ? VESU_V2_MODIFY_POSITION_SANITIZER : SIMPLE_SANITIZER);
87978
87988
  return { leaf: output, callConstructor: this.getModifyPositionCall.bind(this) };
87979
87989
  };
87980
87990
  this.getModifyPositionCall = (params) => {
@@ -88015,7 +88025,7 @@ spurious results.`);
88015
88025
  }
88016
88026
  });
88017
88027
  return {
88018
- sanitizer: SIMPLE_SANITIZER,
88028
+ sanitizer: isV2 ? VESU_V2_MODIFY_POSITION_SANITIZER : SIMPLE_SANITIZER,
88019
88029
  call: {
88020
88030
  contractAddress: ContractAddr.from(contract.address),
88021
88031
  selector: hash_exports.getSelectorFromName("modify_position"),
@@ -88025,25 +88035,27 @@ spurious results.`);
88025
88035
  }
88026
88036
  };
88027
88037
  };
88028
- this.getMultiplyAdapter = () => {
88029
- const packedArguments = [
88030
- toBigInt3(this.config.poolId.toString()),
88031
- // pool id
88032
- toBigInt3(this.config.collateral.address.toString()),
88033
- // collateral
88034
- toBigInt3(this.config.debt.address.toString()),
88035
- // debt
88036
- toBigInt3(this.config.vaultAllocator.toString())
88037
- // vault allocator
88038
- ];
88039
- const { isV2 } = getVesuSingletonAddress(this.config.poolId);
88040
- const output = this.constructSimpleLeafData({
88041
- id: this.config.id,
88042
- target: isV2 ? this.VESU_MULTIPLY : this.VESU_MULTIPLY_V1,
88043
- method: "modify_lever",
88044
- packedArguments
88045
- }, SIMPLE_SANITIZER_V2);
88046
- return { leaf: output, callConstructor: this.getMultiplyCall.bind(this) };
88038
+ this.getMultiplyAdapter = (id) => {
88039
+ return () => {
88040
+ const packedArguments = [
88041
+ toBigInt3(this.config.poolId.toString()),
88042
+ // pool id
88043
+ toBigInt3(this.config.collateral.address.toString()),
88044
+ // collateral
88045
+ toBigInt3(this.config.debt.address.toString()),
88046
+ // debt
88047
+ toBigInt3(this.config.vaultAllocator.toString())
88048
+ // vault allocator
88049
+ ];
88050
+ const { isV2 } = getVesuSingletonAddress(this.config.poolId);
88051
+ const output = this.constructSimpleLeafData({
88052
+ id,
88053
+ target: isV2 ? this.VESU_MULTIPLY : this.VESU_MULTIPLY_V1,
88054
+ method: "modify_lever",
88055
+ packedArguments
88056
+ }, SIMPLE_SANITIZER_V2);
88057
+ return { leaf: output, callConstructor: this.getMultiplyCall.bind(this) };
88058
+ };
88047
88059
  };
88048
88060
  this.getMultiplyCall = (params) => {
88049
88061
  const isIncrease = params.isIncrease;
@@ -91251,7 +91263,7 @@ spurious results.`);
91251
91263
  vaultSettings.leafAdapters.push(vesuAdapterUSDCETH.getDefispringRewardsAdapter("defispring_rewards" /* DEFISPRING_REWARDS */).bind(vesuAdapterUSDCETH));
91252
91264
  const STRKToken = Global.getDefaultTokens().find((token) => token.symbol === "STRK");
91253
91265
  vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(STRKToken.address, AVNU_MIDDLEWARE, "approve_swap_token1" /* APPROVE_SWAP_TOKEN1 */).bind(commonAdapter));
91254
- vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(STRKToken.address, USDCToken.address, "avnu_swap_rewards" /* AVNU_SWAP_REWARDS */).bind(commonAdapter));
91266
+ vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(STRKToken.address, USDCToken.address, "avnu_swap_rewards" /* AVNU_SWAP_REWARDS */, true).bind(commonAdapter));
91255
91267
  return vaultSettings;
91256
91268
  }
91257
91269
  var _riskFactor3 = [
@@ -91605,8 +91617,159 @@ spurious results.`);
91605
91617
  return price;
91606
91618
  }
91607
91619
  async getAvnuSwapMultiplyCall(params) {
91608
- return [];
91620
+ return this._getAvnuDepositSwapLegCall({
91621
+ ...params,
91622
+ minHF: 1.02
91623
+ });
91609
91624
  }
91625
+ async _getAvnuDepositSwapLegCall(params) {
91626
+ logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall params: ${JSON.stringify(params)}`);
91627
+ assert3(params.isDeposit, "Only deposit is supported in _getAvnuDepositSwapLegCall");
91628
+ const [vesuAdapter1] = this.getVesuAdapters();
91629
+ const legLTV = await vesuAdapter1.getLTVConfig(this.config);
91630
+ logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall legLTV: ${legLTV}`);
91631
+ const existingPositions = await vesuAdapter1.getPositions(this.config);
91632
+ const collateralisation = await vesuAdapter1.getCollateralization(this.config);
91633
+ const existingCollateralInfo = existingPositions[0];
91634
+ const existingDebtInfo = existingPositions[1];
91635
+ logger2.debug(`${this.getTag()}::_getAvnuDepositSwapLegCall existingCollateralInfo: ${JSON.stringify(existingCollateralInfo)},
91636
+ existingDebtInfo: ${JSON.stringify(existingDebtInfo)}, collateralisation: ${JSON.stringify(collateralisation)}`);
91637
+ const collateralPrice = collateralisation[0].usdValue > 0 ? collateralisation[0].usdValue / existingCollateralInfo.amount.toNumber() : 1;
91638
+ const debtPrice = collateralisation[1].usdValue > 0 ? collateralisation[1].usdValue / existingDebtInfo.amount.toNumber() : 1;
91639
+ logger2.debug(`${this.getTag()}::_getAvnuDepositSwapLegCall collateralPrice: ${collateralPrice}, debtPrice: ${debtPrice}`);
91640
+ const totalCollateral = existingCollateralInfo.amount.plus(params.leg1DepositAmount);
91641
+ logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall totalCollateral: ${totalCollateral}`);
91642
+ const totalDebtAmount = totalCollateral.multipliedBy(collateralPrice).multipliedBy(legLTV).dividedBy(debtPrice).dividedBy(params.minHF);
91643
+ logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall totalDebtAmount: ${totalDebtAmount}`);
91644
+ const debtAmount = totalDebtAmount.minus(existingDebtInfo.amount);
91645
+ if (debtAmount.lt(0)) {
91646
+ const lstDEXPrice = await this.getLSTDexPrice();
91647
+ const debtAmountInLST = debtAmount.abs().dividedBy(lstDEXPrice);
91648
+ const calls = await this.getVesuMultiplyCall({
91649
+ isDeposit: false,
91650
+ leg1DepositAmount: debtAmountInLST
91651
+ });
91652
+ assert3(calls.length == 1, "Expected 1 call for unwind");
91653
+ return calls[0];
91654
+ }
91655
+ logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall debtAmount: ${debtAmount}`);
91656
+ const STEP0 = "approve_token1" /* APPROVE_TOKEN1 */;
91657
+ const manage0Info = this.getProofs(STEP0);
91658
+ const manageCall0 = manage0Info.callConstructor({
91659
+ amount: params.leg1DepositAmount
91660
+ });
91661
+ const STEP1 = "vesu_leg1" /* VESU_LEG1 */;
91662
+ const manage1Info = this.getProofs(STEP1);
91663
+ const manageCall1 = manage1Info.callConstructor(VesuAdapter.getDefaultModifyPositionCallParams({
91664
+ collateralAmount: params.leg1DepositAmount,
91665
+ isAddCollateral: params.isDeposit,
91666
+ debtAmount,
91667
+ isBorrow: params.isDeposit
91668
+ }));
91669
+ const proofIds = [STEP0, STEP1];
91670
+ const manageCalls = [manageCall0, manageCall1];
91671
+ if (debtAmount.gt(0)) {
91672
+ const STEP2 = "avnu_multiply_approve_deposit" /* AVNU_MULTIPLY_APPROVE_DEPOSIT */;
91673
+ const manage2Info = this.getProofs(STEP2);
91674
+ const manageCall2 = manage2Info.callConstructor({
91675
+ amount: debtAmount
91676
+ });
91677
+ const debtTokenInfo = vesuAdapter1.config.debt;
91678
+ const lstTokenInfo = this.asset();
91679
+ const avnuModule = new AvnuWrapper();
91680
+ const quote = await avnuModule.getQuotes(
91681
+ debtTokenInfo.address.address,
91682
+ lstTokenInfo.address.address,
91683
+ debtAmount.toWei(),
91684
+ this.metadata.additionalInfo.vaultAllocator.address
91685
+ );
91686
+ const minAmount = await this._getMinOutputAmountLSTBuy(debtAmount);
91687
+ const minAmountWei = minAmount.toWei();
91688
+ logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall minAmount: ${minAmount}`);
91689
+ const swapInfo = await avnuModule.getSwapInfo(
91690
+ quote,
91691
+ this.metadata.additionalInfo.vaultAllocator.address,
91692
+ 0,
91693
+ this.address.address,
91694
+ minAmountWei
91695
+ );
91696
+ logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall swapInfo: ${JSON.stringify(swapInfo)}`);
91697
+ const STEP3 = "avnu_multiply_swap_deposit" /* AVNU_MULTIPLY_SWAP_DEPOSIT */;
91698
+ const manage3Info = this.getProofs(STEP3);
91699
+ const manageCall3 = manage3Info.callConstructor({
91700
+ props: swapInfo
91701
+ });
91702
+ proofIds.push(STEP2);
91703
+ proofIds.push(STEP3);
91704
+ manageCalls.push(manageCall2, manageCall3);
91705
+ const newCollateral = minAmount.plus(totalCollateral);
91706
+ const newHF = newCollateral.multipliedBy(collateralPrice).multipliedBy(legLTV).dividedBy(totalDebtAmount).dividedBy(debtPrice).toNumber();
91707
+ logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall newHF: ${newHF}`);
91708
+ if (newHF > this.metadata.additionalInfo.minHealthFactor && newHF < this.metadata.additionalInfo.targetHealthFactor + 0.05) {
91709
+ logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall newHF is above min and below target + 0.05, adding collateral on vesu`);
91710
+ const STEP4 = "approve_token1" /* APPROVE_TOKEN1 */;
91711
+ const manage4Info = this.getProofs(STEP4);
91712
+ const manageCall4 = manage4Info.callConstructor({
91713
+ amount: minAmount
91714
+ });
91715
+ const STEP5 = "vesu_leg1" /* VESU_LEG1 */;
91716
+ const manage5Info = this.getProofs(STEP5);
91717
+ const manageCall5 = manage5Info.callConstructor(VesuAdapter.getDefaultModifyPositionCallParams({
91718
+ collateralAmount: minAmount,
91719
+ isAddCollateral: true,
91720
+ debtAmount: Web3Number.fromWei("0", this.asset().decimals),
91721
+ isBorrow: params.isDeposit
91722
+ }));
91723
+ proofIds.push(STEP4, STEP5);
91724
+ manageCalls.push(manageCall4, manageCall5);
91725
+ }
91726
+ }
91727
+ const manageCall = this.getManageCall(proofIds, manageCalls);
91728
+ return manageCall;
91729
+ }
91730
+ // todo unwind or not deposit when the yield is bad.
91731
+ async getLSTMultiplierRebalanceCall() {
91732
+ const positions = await this.getVaultPositions();
91733
+ assert3(positions.length == 3, "Rebalance call is only supported for 3 positions");
91734
+ const existingCollateralInfo = positions[0];
91735
+ const existingDebtInfo = positions[1];
91736
+ const unusedBalance = positions[2];
91737
+ const [healthFactor] = await this.getVesuHealthFactors();
91738
+ const [vesuAdapter1] = this.getVesuAdapters();
91739
+ const legLTV = await vesuAdapter1.getLTVConfig(this.config);
91740
+ const collateralisation = await vesuAdapter1.getCollateralization(this.config);
91741
+ logger2.debug(`${this.getTag()}::getVesuMultiplyCall existingCollateralInfo: ${JSON.stringify(existingCollateralInfo)},
91742
+ existingDebtInfo: ${JSON.stringify(existingDebtInfo)}, collateralisation: ${JSON.stringify(collateralisation)}`);
91743
+ const collateralPrice = collateralisation[0].usdValue > 0 ? collateralisation[0].usdValue / existingCollateralInfo.amount.toNumber() : 1;
91744
+ const debtPrice = collateralisation[1].usdValue > 0 ? collateralisation[1].usdValue / existingDebtInfo.amount.toNumber() : 1;
91745
+ logger2.debug(`${this.getTag()}::getVesuMultiplyCall collateralPrice: ${collateralPrice}, debtPrice: ${debtPrice}`);
91746
+ const isHFTooLow = healthFactor < this.metadata.additionalInfo.minHealthFactor;
91747
+ const isHFTooHigh = healthFactor > this.metadata.additionalInfo.targetHealthFactor + 0.05;
91748
+ if (isHFTooLow || isHFTooHigh) {
91749
+ const manageCall = await this._getAvnuDepositSwapLegCall({
91750
+ isDeposit: true,
91751
+ leg1DepositAmount: unusedBalance.amount,
91752
+ minHF: 1.02
91753
+ // todo, shouldnt use this 1.02 HF, if there isn;t more looping left.
91754
+ });
91755
+ return { shouldRebalance: true, manageCall };
91756
+ } else {
91757
+ return { shouldRebalance: false, manageCall: void 0 };
91758
+ }
91759
+ }
91760
+ //
91761
+ async _getMinOutputAmountLSTBuy(amountInUnderlying) {
91762
+ const lstTruePrice = await this.getLSTExchangeRate();
91763
+ const minOutputAmount = amountInUnderlying.dividedBy(lstTruePrice);
91764
+ return minOutputAmount;
91765
+ }
91766
+ async _getMinOutputAmountLSTSell(amountInLST) {
91767
+ const lstTruePrice = await this.getLSTExchangeRate();
91768
+ const minOutputAmount = amountInLST.multipliedBy(lstTruePrice).multipliedBy(0.995);
91769
+ return minOutputAmount;
91770
+ }
91771
+ // todo add a function to findout max borrowable amount without fucking yield
91772
+ // if the current net yield < LST yield, add a function to calculate how much to unwind.
91610
91773
  /**
91611
91774
  * Uses vesu's multiple call to create leverage on LST
91612
91775
  * Deposit amount is in LST
@@ -91658,7 +91821,11 @@ spurious results.`);
91658
91821
  async getLSTAPR(_address) {
91659
91822
  try {
91660
91823
  const vesuAdapter1 = this.getVesuAdapters()[0];
91661
- return await LSTAPRService.getLSTAPR(vesuAdapter1.config.debt.address);
91824
+ const apr = await LSTAPRService.getLSTAPR(vesuAdapter1.config.debt.address);
91825
+ if (!apr) {
91826
+ throw new Error("Failed to get LST APR");
91827
+ }
91828
+ return apr;
91662
91829
  } catch (error2) {
91663
91830
  logger2.warn(`${this.getTag()}: Failed to get LST APR: ${error2}`);
91664
91831
  return 0;
@@ -91669,7 +91836,9 @@ spurious results.`);
91669
91836
  const { net, splits } = await super.netAPY();
91670
91837
  let _net = net;
91671
91838
  if (this.asset().symbol == "xWBTC") {
91672
- _net *= 5;
91839
+ const debtToken = this.getVesuAdapters()[0].config.debt;
91840
+ const lstAPY = await this.getLSTAPR(debtToken.address);
91841
+ _net = lstAPY * 5;
91673
91842
  }
91674
91843
  return {
91675
91844
  net: _net,
@@ -91716,7 +91885,7 @@ spurious results.`);
91716
91885
  const proofsIDs = [];
91717
91886
  const manageCalls = [];
91718
91887
  if (params.marginAmount.greaterThan(0)) {
91719
- const STEP1_ID = "approve_token1" /* APPROVE_TOKEN1 */;
91888
+ const STEP1_ID = "multiple_approve" /* MULTIPLE_APPROVE */;
91720
91889
  const manage1Info = this.getProofs(STEP1_ID);
91721
91890
  const depositAmount = params.marginAmount;
91722
91891
  const manageCall1 = manage1Info.callConstructor({
@@ -91826,12 +91995,22 @@ spurious results.`);
91826
91995
  highlightTextWithLinks("conversion rate oracle", [{ highlight: "conversion rate oracle", link: "https://docs.pragma.build/starknet/development#conversion-rate" }]),
91827
91996
  "which is resilient to liquidity issues and price volatility, hence reducing the risk of liquidation. However, overtime, if left un-monitored, debt can increase enough to trigger a liquidation. But no worries, our continuous monitoring systems look for situations with reduced health factor and balance collateral/debt to bring it back to safe levels. With Troves, you can have a peaceful sleep."
91828
91997
  ] }),
91829
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { backgroundColor: "#222", padding: "10px", borderRadius: "8px", marginBottom: "20px", border: "1px solid #444" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { fontSize: "13px", color: "#ccc" }, children: [
91830
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Withdrawals:" }),
91831
- " Requests can take up to ",
91832
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "1-2 hours" }),
91833
- " to process as the vault unwinds and settles routing."
91834
- ] }) })
91998
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { backgroundColor: "#222", padding: "10px", borderRadius: "8px", marginBottom: "20px", border: "1px solid #444" }, children: [
91999
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { fontSize: "13px", color: "#ccc" }, children: [
92000
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Withdrawals:" }),
92001
+ " Requests can take up to ",
92002
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "1-2 hours" }),
92003
+ " to process as the vault unwinds and settles routing."
92004
+ ] }),
92005
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { fontSize: "13px", color: "#ccc" }, children: [
92006
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Debt limits:" }),
92007
+ " Pools on Vesu have debt caps that are gradually increased over time. Until caps are raised, deposited LSTs remain in the vault, generating a shared net return for all depositors."
92008
+ ] }),
92009
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { fontSize: "13px", color: "#ccc" }, children: [
92010
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "APY assumptions:" }),
92011
+ " APY shown is the max possible value given current LST and borrowing rates. True APY will be subject to the actual leverage, based on above point. More insights on exact APY will be added soon."
92012
+ ] })
92013
+ ] })
91835
92014
  ] });
91836
92015
  }
91837
92016
  function getDescription2(tokenSymbol, underlyingSymbol) {
@@ -91846,7 +92025,7 @@ spurious results.`);
91846
92025
  collateral: lstToken,
91847
92026
  debt: underlyingToken,
91848
92027
  vaultAllocator: vaultSettings.vaultAllocator,
91849
- id: "multiply_vesu" /* MULTIPLY_VESU */
92028
+ id: "vesu_leg1" /* VESU_LEG1 */
91850
92029
  });
91851
92030
  const commonAdapter = new CommonAdapter({
91852
92031
  manager: vaultSettings.manager,
@@ -91855,10 +92034,10 @@ spurious results.`);
91855
92034
  vaultAddress: vaultSettings.vaultAddress,
91856
92035
  vaultAllocator: vaultSettings.vaultAllocator
91857
92036
  });
91858
- const { isV2 } = getVesuSingletonAddress(pool1);
92037
+ const { isV2, addr: poolAddr } = getVesuSingletonAddress(pool1);
91859
92038
  const VESU_MULTIPLY = isV2 ? vesuAdapterLST.VESU_MULTIPLY : vesuAdapterLST.VESU_MULTIPLY_V1;
91860
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, VESU_MULTIPLY, "approve_token1" /* APPROVE_TOKEN1 */).bind(commonAdapter));
91861
- vaultSettings.leafAdapters.push(vesuAdapterLST.getMultiplyAdapter.bind(vesuAdapterLST));
92039
+ vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, VESU_MULTIPLY, "multiple_approve" /* MULTIPLE_APPROVE */).bind(commonAdapter));
92040
+ vaultSettings.leafAdapters.push(vesuAdapterLST.getMultiplyAdapter("multiply_vesu" /* MULTIPLY_VESU */).bind(vesuAdapterLST));
91862
92041
  vaultSettings.leafAdapters.push(vesuAdapterLST.getVesuModifyDelegationAdapter("switch_delegation_on" /* SWITCH_DELEGATION_ON */).bind(vesuAdapterLST));
91863
92042
  vaultSettings.leafAdapters.push(vesuAdapterLST.getVesuModifyDelegationAdapter("switch_delegation_off" /* SWITCH_DELEGATION_OFF */).bind(vesuAdapterLST));
91864
92043
  vaultSettings.adapters.push(...[{
@@ -91868,12 +92047,18 @@ spurious results.`);
91868
92047
  id: "common_adapter" /* COMMON */,
91869
92048
  adapter: commonAdapter
91870
92049
  }]);
92050
+ vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(underlyingToken.address, AVNU_EXCHANGE, "avnu_multiply_approve_deposit" /* AVNU_MULTIPLY_APPROVE_DEPOSIT */).bind(commonAdapter));
92051
+ vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(underlyingToken.address, lstToken.address, "avnu_multiply_swap_deposit" /* AVNU_MULTIPLY_SWAP_DEPOSIT */, false).bind(commonAdapter));
92052
+ vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, AVNU_EXCHANGE, "avnu_multiply_approve_withdraw" /* AVNU_MULTIPLY_APPROVE_WITHDRAW */).bind(commonAdapter));
92053
+ vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(lstToken.address, underlyingToken.address, "avnu_multiply_swap_withdraw" /* AVNU_MULTIPLY_SWAP_WITHDRAW */, false).bind(commonAdapter));
92054
+ vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, poolAddr, "approve_token1" /* APPROVE_TOKEN1 */).bind(commonAdapter));
92055
+ vaultSettings.leafAdapters.push(vesuAdapterLST.getModifyPosition.bind(vesuAdapterLST));
91871
92056
  vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, vaultSettings.vaultAddress, "approve_bring_liquidity" /* APPROVE_BRING_LIQUIDITY */).bind(commonAdapter));
91872
92057
  vaultSettings.leafAdapters.push(commonAdapter.getBringLiquidityAdapter("bring_liquidity" /* BRING_LIQUIDITY */).bind(commonAdapter));
91873
92058
  vaultSettings.leafAdapters.push(vesuAdapterLST.getDefispringRewardsAdapter("defispring_rewards" /* DEFISPRING_REWARDS */).bind(vesuAdapterLST));
91874
92059
  const STRKToken = Global.getDefaultTokens().find((token) => token.symbol === "STRK");
91875
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(STRKToken.address, AVNU_MIDDLEWARE, "approve_swap_token1" /* APPROVE_SWAP_TOKEN1 */).bind(commonAdapter));
91876
- vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(STRKToken.address, lstToken.address, "avnu_swap_rewards" /* AVNU_SWAP_REWARDS */).bind(commonAdapter));
92060
+ vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(STRKToken.address, AVNU_EXCHANGE, "approve_swap_token1" /* APPROVE_SWAP_TOKEN1 */).bind(commonAdapter));
92061
+ vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(STRKToken.address, lstToken.address, "avnu_swap_rewards" /* AVNU_SWAP_REWARDS */, false).bind(commonAdapter));
91877
92062
  return vaultSettings;
91878
92063
  }
91879
92064
  var AUDIT_URL4 = "https://docs.troves.fi/p/security#starknet-vault-kit";
@@ -91974,11 +92159,11 @@ spurious results.`);
91974
92159
  minHealthFactor: 1.05
91975
92160
  };
91976
92161
  var hyperxLBTC = {
91977
- vaultAddress: ContractAddr.from("0x38e96a301428d204ab4553799aa386a0f14a5ef9b30a5830be1814e4fb8da1c"),
91978
- manager: ContractAddr.from("0x18d376446d9df1f783e17aff1f21bac3d97aa3ba378e367742cdd744468ad35"),
91979
- vaultAllocator: ContractAddr.from("0x3e98774ca0508505ba6d7f17d95ec391648f44f947b0d211241464a4f5b9b20"),
91980
- redeemRequestNFT: ContractAddr.from("0x268017b4c8b2117ca0136d9a77e3666db44b143447566f0746ca0b1c9ab1e72"),
91981
- aumOracle: ContractAddr.from("0x521a3f339c65e918e0d8a065b14baef1ea25676bb7fca1e0238ac47e20d7755"),
92162
+ vaultAddress: ContractAddr.from("0x64cf24d4883fe569926419a0569ab34497c6956a1a308fa883257f7486d7030"),
92163
+ manager: ContractAddr.from("0x203530a4022a99b8f4b406aaf33b0849d43ad7422c1d5cc14ff8c667abec6c0"),
92164
+ vaultAllocator: ContractAddr.from("0x7dbc8ccd4eabce6ea6c19e0e5c9ccca3a93bd510303b9e071cbe25fc508546e"),
92165
+ redeemRequestNFT: ContractAddr.from("0x5ee66a39af9aef3d0d48982b4a63e8bd2a5bad021916bd87fb0eae3a26800b8"),
92166
+ aumOracle: ContractAddr.from("0x23d69e4391fa72d10e625e7575d8bddbb4aff96f04503f83fdde23123bf41d0"),
91982
92167
  leafAdapters: [],
91983
92168
  adapters: [],
91984
92169
  targetHealthFactor: 1.1,
@@ -91986,7 +92171,7 @@ spurious results.`);
91986
92171
  };
91987
92172
  function getInvestmentSteps(lstSymbol, underlyingSymbol) {
91988
92173
  return [
91989
- `Deposit ${underlyingSymbol} into the vault`,
92174
+ `Deposit ${lstSymbol} into the vault`,
91990
92175
  `The vault manager loops the ${underlyingSymbol} to buy ${lstSymbol}`,
91991
92176
  `The vault manager collateralizes the ${lstSymbol} on Vesu`,
91992
92177
  `The vault manager borrows more ${underlyingSymbol} to loop further`,