Skip to content

Commit

Permalink
Merge pull request #437 from primitivefinance/fix-getSpotPrice
Browse files Browse the repository at this point in the history
Update NormalStrategyLib.sol
  • Loading branch information
Alexangelj authored Aug 21, 2023
2 parents 47d1e0b + 2ecf094 commit c35bbfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/strategies/NormalStrategyLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ function approximatePriceGivenX(
) pure returns (uint256 priceWad) {
(uint256 upperBoundX, uint256 lowerBoundX) = self.getReserveXBounds();

if (reserveXPerWad >= upperBoundX) return self.strikePriceWad; // Terminal price limit.
if (reserveXPerWad >= upperBoundX) return 0; // Terminal price limit.
if (reserveXPerWad <= lowerBoundX) return type(uint128).max; // Upper price limit.

uint256 timeRemainingYearsWad =
Expand Down

0 comments on commit c35bbfc

Please sign in to comment.