@haven-fi/solauto-sdk 1.0.480 → 1.0.481

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.
@@ -34,7 +34,7 @@ async function getJupSwapTransaction(signer, swapDetails, attemptNum) {
34
34
  : swapDetails.exactIn
35
35
  ? "ExactIn"
36
36
  : undefined,
37
- slippageBps: memecoinSwap ? 500 : 300,
37
+ slippageBps: memecoinSwap ? 500 : 200,
38
38
  maxAccounts: !swapDetails.exactOut ? 40 : undefined,
39
39
  }), 4, 200);
40
40
  const priceImpactBps = Math.round((0, numberUtils_1.toBps)(parseFloat(quoteResponse.priceImpactPct))) + 1;
@@ -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) * 1.1, (0, numberUtils_1.fromBps)(finalPriceSlippageBps) * 0.025);
63
+ const inc = Math.max((0, numberUtils_1.fromBps)(finalPriceImpactBps) * 1.1, (0, numberUtils_1.fromBps)(finalPriceSlippageBps) * 0.03);
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);
@@ -75,8 +75,8 @@ function getDebtAdjustmentUsd(liqThresholdBps, supplyUsd, debtUsd, targetLiqUtil
75
75
  }
76
76
  function getSolautoFeesBps(isReferred, targetLiqUtilizationRateBps, positionNetWorthUsd, rebalanceDirection) {
77
77
  const minSize = 10000; // Minimum position size
78
- const maxSize = 500000; // Maximum position size
79
- const maxFeeBps = 100; // Fee in basis points for minSize (1%)
78
+ const maxSize = 250000; // Maximum position size
79
+ const maxFeeBps = 50; // Fee in basis points for minSize (0.5%)
80
80
  const minFeeBps = 25; // Fee in basis points for maxSize (0.25%)
81
81
  const k = 1.5;
82
82
  if (targetLiqUtilizationRateBps !== undefined &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.480",
3
+ "version": "1.0.481",
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",
@@ -71,7 +71,7 @@ export async function getJupSwapTransaction(
71
71
  : swapDetails.exactIn
72
72
  ? "ExactIn"
73
73
  : undefined,
74
- slippageBps: memecoinSwap ? 500 : 300,
74
+ slippageBps: memecoinSwap ? 500 : 200,
75
75
  maxAccounts: !swapDetails.exactOut ? 40 : undefined,
76
76
  }),
77
77
  4,
@@ -119,7 +119,7 @@ export async function getJupSwapTransaction(
119
119
  consoleLog("Raw inAmount:", quoteResponse.inAmount);
120
120
  const inc = Math.max(
121
121
  fromBps(finalPriceImpactBps) * 1.1,
122
- fromBps(finalPriceSlippageBps) * 0.025
122
+ fromBps(finalPriceSlippageBps) * 0.03
123
123
  );
124
124
  consoleLog("Inc:", inc);
125
125
  quoteResponse.inAmount = Math.round(
@@ -104,8 +104,8 @@ export function getSolautoFeesBps(
104
104
  total: number;
105
105
  } {
106
106
  const minSize = 10_000; // Minimum position size
107
- const maxSize = 500_000; // Maximum position size
108
- const maxFeeBps = 100; // Fee in basis points for minSize (1%)
107
+ const maxSize = 250_000; // Maximum position size
108
+ const maxFeeBps = 50; // Fee in basis points for minSize (0.5%)
109
109
  const minFeeBps = 25; // Fee in basis points for maxSize (0.25%)
110
110
  const k = 1.5;
111
111