@haven-fi/solauto-sdk 1.0.119 → 1.0.120

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,7 +34,9 @@ async function getJupSwapTransaction(signer, swapDetails, attemptNum) {
34
34
  slippageBps: 10,
35
35
  maxAccounts: !swapDetails.exactOut ? 60 : undefined,
36
36
  }), 3);
37
- const finalPriceSlippageBps = Math.round(Math.max(50, quoteResponse.slippageBps, Math.round((0, numberUtils_1.toBps)(parseFloat(quoteResponse.priceImpactPct))) + 1) *
37
+ const finalPriceSlippageBps = Math.round(Math.max(
38
+ // 50,
39
+ quoteResponse.slippageBps, Math.round((0, numberUtils_1.toBps)(parseFloat(quoteResponse.priceImpactPct))) + 1) *
38
40
  (1 + (swapDetails.slippageBpsIncFactor ?? 0)));
39
41
  quoteResponse.slippageBps = finalPriceSlippageBps;
40
42
  console.log(quoteResponse);
@@ -174,7 +174,7 @@ function getJupSwapRebalanceDetails(client, values, targetLiqUtilizationRateBps,
174
174
  inputMint: (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(input.mint),
175
175
  outputMint: (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(output.mint),
176
176
  destinationWallet: client.solautoPosition,
177
- slippageBpsIncFactor: 0.25 + (attemptNum ?? 0) * 0.2,
177
+ // slippageBpsIncFactor: 0.25 + (attemptNum ?? 0) * 0.2,
178
178
  amount: rebalancingToZero
179
179
  ? client.solautoPositionState.debt.amountUsed.baseUnit +
180
180
  BigInt(Math.round(Number(client.solautoPositionState.debt.amountUsed.baseUnit) *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.119",
3
+ "version": "1.0.120",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "Typescript SDK for the Solauto program on the Solana blockchain",
@@ -73,7 +73,7 @@ export async function getJupSwapTransaction(
73
73
 
74
74
  const finalPriceSlippageBps = Math.round(
75
75
  Math.max(
76
- 50,
76
+ // 50,
77
77
  quoteResponse.slippageBps,
78
78
  Math.round(toBps(parseFloat(quoteResponse.priceImpactPct))) + 1
79
79
  ) *
@@ -355,7 +355,7 @@ export function getJupSwapRebalanceDetails(
355
355
  inputMint: toWeb3JsPublicKey(input.mint),
356
356
  outputMint: toWeb3JsPublicKey(output.mint),
357
357
  destinationWallet: client.solautoPosition,
358
- slippageBpsIncFactor: 0.25 + (attemptNum ?? 0) * 0.2,
358
+ // slippageBpsIncFactor: 0.25 + (attemptNum ?? 0) * 0.2,
359
359
  amount: rebalancingToZero
360
360
  ? client.solautoPositionState!.debt.amountUsed.baseUnit +
361
361
  BigInt(