Skip to content

Commit

Permalink
Fix WeightedMath bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrantuk committed Oct 25, 2022
1 parent fc1c7ab commit 5deadfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@balancer-labs/sor",
"version": "4.0.1-beta.7",
"version": "4.0.1-beta.8",
"license": "GPL-3.0-only",
"main": "dist/index.js",
"module": "dist/index.esm.js",
Expand Down
2 changes: 1 addition & 1 deletion src/pools/weightedPool/weightedMath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ export function _spotPriceAfterSwapExactBPTInForTokenOut(
);
const wo = parseFloat(formatFixed(poolPairData.weightOut, 18));
const Aibpt = amount.toNumber();
const f = parseFloat(formatFixed(poolPairData.swapFee.toNumber()));
const f = parseFloat(formatFixed(poolPairData.swapFee));
return bnum(
((1 - Aibpt / Bbpt) ** ((-1 + wo) / wo) *
Bbpt *
Expand Down

0 comments on commit 5deadfa

Please sign in to comment.