Skip to content

Commit

Permalink
remove redundant sumReserves check in calcLpTokenSupply
Browse files Browse the repository at this point in the history
  • Loading branch information
nickkatsios committed Aug 21, 2024
1 parent ec8e7e3 commit ba1ce3f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/functions/Stable2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ contract Stable2 is ProportionalLPToken2, IBeanstalkWellFunction {
uint256[] memory scaledReserves = getScaledReserves(reserves, decimals);

uint256 Ann = a * N * N;

uint256 sumReserves = scaledReserves[0] + scaledReserves[1];
if (sumReserves == 0) return 0;
lpTokenSupply = sumReserves;
for (uint256 i = 0; i < 255; i++) {
uint256 dP = lpTokenSupply;
Expand Down

0 comments on commit ba1ce3f

Please sign in to comment.