Skip to content

Commit

Permalink
fix: rate per lp corner case
Browse files Browse the repository at this point in the history
  • Loading branch information
romanagureev committed Aug 29, 2024
1 parent 2b162fd commit 4a0153a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/implementations/ChildGauge.vy
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ def rate_per_lp_token(_reward_id: uint256, _with_precision: bool=False) -> uint2
precision: uint256 = 0
rate, precision = self._rate(_reward_id)

rate = rate * 10 ** 18 / self.totalSupply
rate = rate * 10 ** 18 / max(self.totalSupply, 10 ** 18)
if _with_precision:
return rate
return rate / precision
Expand Down

0 comments on commit 4a0153a

Please sign in to comment.