@haven-fi/solauto-sdk 1.0.496 → 1.0.498

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.
@@ -186,7 +186,7 @@ function getJupSwapRebalanceDetails(client, values, targetLiqUtilizationRateBps,
186
186
  const highLiquidity = (0, numberUtils_1.fromBaseUnit)(client.solautoPositionState?.netWorth.baseAmountUsdValue ?? BigInt(0), generalAccounts_1.USD_DECIMALS) > 10000;
187
187
  const usingMajor = (0, generalUtils_2.tokenInfo)(client.supplyMint).isMajor || (0, generalUtils_2.tokenInfo)(client.debtMint).isMajor;
188
188
  const inputPadding = targetLiqUtilizationRateBps === 0 && !usingMajor && highLiquidity
189
- ? 0.0001
189
+ ? 0.1
190
190
  : 0;
191
191
  if (inputPadding) {
192
192
  inputAmount += BigInt(Math.round(Number(inputAmount) * inputPadding));
@@ -200,7 +200,7 @@ function getJupSwapRebalanceDetails(client, values, targetLiqUtilizationRateBps,
200
200
  const repaying = values.rebalanceDirection === generated_1.RebalanceDirection.Repay;
201
201
  const { requiresFlashLoan, useDebtLiquidity } = rebalanceRequiresFlashLoan(client, values);
202
202
  const flashLoanRepayFromDebt = repaying && requiresFlashLoan && useDebtLiquidity;
203
- const exactOut = (targetLiqUtilizationRateBps === 0 && highLiquidity && usingMajor) ||
203
+ const exactOut = (targetLiqUtilizationRateBps === 0 && !highLiquidity && usingMajor) ||
204
204
  // values.repayingCloseToMaxLtv ||
205
205
  flashLoanRepayFromDebt;
206
206
  const exactIn = !exactOut;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.496",
3
+ "version": "1.0.498",
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",
@@ -403,7 +403,7 @@ export function getJupSwapRebalanceDetails(
403
403
  tokenInfo(client.supplyMint).isMajor || tokenInfo(client.debtMint).isMajor;
404
404
  const inputPadding =
405
405
  targetLiqUtilizationRateBps === 0 && !usingMajor && highLiquidity
406
- ? 0.0001
406
+ ? 0.1
407
407
  : 0;
408
408
  if (inputPadding) {
409
409
  inputAmount += BigInt(Math.round(Number(inputAmount) * inputPadding));
@@ -431,7 +431,7 @@ export function getJupSwapRebalanceDetails(
431
431
  repaying && requiresFlashLoan && useDebtLiquidity;
432
432
 
433
433
  const exactOut =
434
- (targetLiqUtilizationRateBps === 0 && highLiquidity && usingMajor) ||
434
+ (targetLiqUtilizationRateBps === 0 && !highLiquidity && usingMajor) ||
435
435
  // values.repayingCloseToMaxLtv ||
436
436
  flashLoanRepayFromDebt;
437
437
  const exactIn = !exactOut;