@haven-fi/solauto-sdk 1.0.645 → 1.0.647

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.
@@ -90,7 +90,7 @@ function swapThenDeposit(client, depositMint, depositAmountBaseUnit) {
90
90
  outputMint: client.pos.supplyMint,
91
91
  amount: depositAmountBaseUnit,
92
92
  exactIn: true,
93
- slippageBps: memeSwap ? 300 : 50,
93
+ slippageBps: memeSwap ? 250 : 100,
94
94
  };
95
95
  const jupSwapManager = new services_1.JupSwapManager(client.signer);
96
96
  const { setupIx, swapIx, cleanupIx, lookupTableAddresses } = await jupSwapManager.getJupSwapTxData({
@@ -120,7 +120,7 @@ function getMaxLiqUtilizationRateBps(maxLtvBps, liqThresholdBps, offsetFromMaxLt
120
120
  1); // -1 to account for any rounding issues
121
121
  }
122
122
  function maxRepayFromBps(maxLtvBps, liqThresholdBps) {
123
- return Math.min(9000, getMaxLiqUtilizationRateBps(maxLtvBps, liqThresholdBps - 1000, constants_1.OFFSET_FROM_MAX_LTV));
123
+ return Math.min(8750, getMaxLiqUtilizationRateBps(maxLtvBps, liqThresholdBps - 1000, constants_1.OFFSET_FROM_MAX_LTV));
124
124
  }
125
125
  function maxRepayToBps(maxLtvBps, liqThresholdBps) {
126
126
  return Math.min(maxRepayFromBps(maxLtvBps, liqThresholdBps) - constants_1.MIN_REPAY_GAP_BPS, getMaxLiqUtilizationRateBps(maxLtvBps, liqThresholdBps, constants_1.OFFSET_FROM_MAX_LTV));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.645",
3
+ "version": "1.0.647",
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",
@@ -145,7 +145,7 @@ export function swapThenDeposit(
145
145
  outputMint: client.pos.supplyMint,
146
146
  amount: depositAmountBaseUnit,
147
147
  exactIn: true,
148
- slippageBps: memeSwap ? 300 : 50,
148
+ slippageBps: memeSwap ? 250 : 100,
149
149
  };
150
150
  const jupSwapManager = new JupSwapManager(client.signer);
151
151
  const { setupIx, swapIx, cleanupIx, lookupTableAddresses } =
@@ -168,7 +168,7 @@ export function getMaxLiqUtilizationRateBps(
168
168
 
169
169
  export function maxRepayFromBps(maxLtvBps: number, liqThresholdBps: number) {
170
170
  return Math.min(
171
- 9000,
171
+ 8750,
172
172
  getMaxLiqUtilizationRateBps(maxLtvBps, liqThresholdBps - 1000, OFFSET_FROM_MAX_LTV)
173
173
  );
174
174
  }