@meteora-ag/cp-amm-sdk 1.1.1 → 1.1.2

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/dist/index.mjs CHANGED
@@ -7419,7 +7419,10 @@ function getNextSqrtPriceFromOutput(sqrtPrice, liquidity, outAmount, isB) {
7419
7419
 
7420
7420
  // src/helpers/fee.ts
7421
7421
  import Decimal2 from "decimal.js";
7422
- function getBaseFeeNumerator(feeSchedulerMode, cliffFeeNumerator, period, reductionFactor) {
7422
+ function getBaseFeeNumerator(feeSchedulerMode, cliffFeeNumerator, period, reductionFactor, periodFrequency) {
7423
+ if (periodFrequency.eq(new BN5(0)) || period.eq(new BN5(0))) {
7424
+ return cliffFeeNumerator;
7425
+ }
7423
7426
  let feeNumerator;
7424
7427
  if (feeSchedulerMode == 0 /* Linear */) {
7425
7428
  feeNumerator = cliffFeeNumerator.sub(period.mul(reductionFactor));
@@ -7451,7 +7454,8 @@ function getFeeNumerator(currentPoint, activationPoint, numberOfPeriod, periodFr
7451
7454
  feeSchedulerMode,
7452
7455
  cliffFeeNumerator,
7453
7456
  period,
7454
- reductionFactor
7457
+ reductionFactor,
7458
+ periodFrequency
7455
7459
  );
7456
7460
  if (dynamicFeeParams) {
7457
7461
  const { volatilityAccumulator, binStep, variableFeeControl } = dynamicFeeParams;