@haven-fi/solauto-sdk 1.0.440 → 1.0.441

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.
@@ -60,7 +60,7 @@ async function getJupSwapTransaction(signer, swapDetails, attemptNum) {
60
60
  (0, generalUtils_1.consoleLog)("Increased price impact bps:", finalPriceImpactBps);
61
61
  if (swapDetails.addPadding) {
62
62
  (0, generalUtils_1.consoleLog)("Raw inAmount:", quoteResponse.inAmount);
63
- const inc = Math.max((0, numberUtils_1.fromBps)(finalPriceImpactBps), (0, numberUtils_1.fromBps)(finalPriceSlippageBps) / 4);
63
+ const inc = Math.max((0, numberUtils_1.fromBps)(finalPriceImpactBps) * 1.1, (0, numberUtils_1.fromBps)(finalPriceSlippageBps) * 0.1);
64
64
  (0, generalUtils_1.consoleLog)("Inc:", inc);
65
65
  quoteResponse.inAmount = Math.round(parseInt(quoteResponse.inAmount) + parseInt(quoteResponse.inAmount) * inc).toString();
66
66
  (0, generalUtils_1.consoleLog)("Increased inAmount:", quoteResponse.inAmount);
@@ -190,7 +190,7 @@ function getJupSwapRebalanceDetails(client, values, targetLiqUtilizationRateBps,
190
190
  destinationWallet: flashLoanRepayFromDebt
191
191
  ? (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(client.signer.publicKey)
192
192
  : client.solautoPosition,
193
- slippageIncFactor: 0.5 + (attemptNum ?? 0) * 0.25,
193
+ slippageIncFactor: 0.2 + (attemptNum ?? 0) * 0.25,
194
194
  amount: exactOut ? outputAmount : inputAmount,
195
195
  exactIn: exactIn,
196
196
  exactOut: exactOut,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.440",
3
+ "version": "1.0.441",
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",
@@ -118,8 +118,8 @@ export async function getJupSwapTransaction(
118
118
  if (swapDetails.addPadding) {
119
119
  consoleLog("Raw inAmount:", quoteResponse.inAmount);
120
120
  const inc = Math.max(
121
- fromBps(finalPriceImpactBps),
122
- fromBps(finalPriceSlippageBps) / 4
121
+ fromBps(finalPriceImpactBps) * 1.1,
122
+ fromBps(finalPriceSlippageBps) * 0.1
123
123
  );
124
124
  consoleLog("Inc:", inc);
125
125
  quoteResponse.inAmount = Math.round(
@@ -398,7 +398,7 @@ export function getJupSwapRebalanceDetails(
398
398
  destinationWallet: flashLoanRepayFromDebt
399
399
  ? toWeb3JsPublicKey(client.signer.publicKey)
400
400
  : client.solautoPosition,
401
- slippageIncFactor: 0.5 + (attemptNum ?? 0) * 0.25,
401
+ slippageIncFactor: 0.2 + (attemptNum ?? 0) * 0.25,
402
402
  amount: exactOut ? outputAmount : inputAmount,
403
403
  exactIn: exactIn,
404
404
  exactOut: exactOut,