Skip to content

Commit

Permalink
Merge pull request #117 from primitivefinance/fix/log-normal-trading-…
Browse files Browse the repository at this point in the history
…function

fix: rounding direction in computeTradingFunction in LogNormalMath
  • Loading branch information
clemlak authored Apr 3, 2024
2 parents af5c660 + 89e1a96 commit 32f9862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LogNormal/LogNormalMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function computeTradingFunction(
LogNormalParams memory params
) pure returns (int256) {
int256 a = Gaussian.ppf(int256(rX.divWadDown(L)));
int256 b = Gaussian.ppf(int256(rY.divWadDown(L.mulWadDown(params.mean))));
int256 b = Gaussian.ppf(int256(rY.divWadDown(L.mulWadUp(params.mean))));
return a + b + int256(params.width);
}

Expand Down

0 comments on commit 32f9862

Please sign in to comment.