@drift-labs/sdk-browser 2.119.0-beta.5 → 2.119.0-beta.6

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.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.119.0-beta.5
1
+ 2.119.0-beta.6
@@ -501,7 +501,7 @@ function calculateSpreadReserves(amm, oraclePriceData, now, isPrediction = false
501
501
  let maxOffset = 0;
502
502
  let referencePriceOffset = numericConstants_1.ZERO;
503
503
  if (amm.curveUpdateIntensity > 100) {
504
- maxOffset = Math.max(amm.maxSpread / 5, (numericConstants_1.PERCENTAGE_PRECISION.toNumber() / 10000) *
504
+ maxOffset = Math.max(amm.maxSpread / 2, (numericConstants_1.PERCENTAGE_PRECISION.toNumber() / 10000) *
505
505
  (amm.curveUpdateIntensity - 100));
506
506
  const liquidityFraction = calculateInventoryLiquidityRatio(amm.baseAssetAmountWithAmm, amm.baseAssetReserve, amm.minBaseAssetReserve, amm.maxBaseAssetReserve);
507
507
  const liquidityFractionSigned = liquidityFraction.mul((0, __1.sigNum)(amm.baseAssetAmountWithAmm.add(amm.baseAssetAmountWithUnsettledLp)));
@@ -501,7 +501,7 @@ function calculateSpreadReserves(amm, oraclePriceData, now, isPrediction = false
501
501
  let maxOffset = 0;
502
502
  let referencePriceOffset = numericConstants_1.ZERO;
503
503
  if (amm.curveUpdateIntensity > 100) {
504
- maxOffset = Math.max(amm.maxSpread / 5, (numericConstants_1.PERCENTAGE_PRECISION.toNumber() / 10000) *
504
+ maxOffset = Math.max(amm.maxSpread / 2, (numericConstants_1.PERCENTAGE_PRECISION.toNumber() / 10000) *
505
505
  (amm.curveUpdateIntensity - 100));
506
506
  const liquidityFraction = calculateInventoryLiquidityRatio(amm.baseAssetAmountWithAmm, amm.baseAssetReserve, amm.minBaseAssetReserve, amm.maxBaseAssetReserve);
507
507
  const liquidityFractionSigned = liquidityFraction.mul((0, __1.sigNum)(amm.baseAssetAmountWithAmm.add(amm.baseAssetAmountWithUnsettledLp)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk-browser",
3
- "version": "2.119.0-beta.5",
3
+ "version": "2.119.0-beta.6",
4
4
  "main": "lib/node/index.js",
5
5
  "types": "lib/node/index.d.ts",
6
6
  "browser": "./lib/browser/index.js",
package/src/math/amm.ts CHANGED
@@ -950,7 +950,7 @@ export function calculateSpreadReserves(
950
950
  let referencePriceOffset = ZERO;
951
951
  if (amm.curveUpdateIntensity > 100) {
952
952
  maxOffset = Math.max(
953
- amm.maxSpread / 5,
953
+ amm.maxSpread / 2,
954
954
  (PERCENTAGE_PRECISION.toNumber() / 10000) *
955
955
  (amm.curveUpdateIntensity - 100)
956
956
  );