Skip to content

Commit

Permalink
fix: number error when calculating prices from edge ticks
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmellis committed Dec 11, 2023
1 parent e629a13 commit cca31ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/univ3-helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const calculatePriceFromTick = (tick: number): bigint => {
} else if (tickNum >= MAX_TICK) {
return MaxUint256;
} else {
return BigInt(Math.pow(TICK_PRICE_BASE, tickNum) * 1e18);
return decimalToEthers(new Decimal(TICK_PRICE_BASE).pow(tickNum));
}
};

Expand Down

0 comments on commit cca31ee

Please sign in to comment.