Skip to content

Commit

Permalink
use add()
Browse files Browse the repository at this point in the history
  • Loading branch information
Aodhgan committed Jul 2, 2021
1 parent 4638747 commit 68b67ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/SushiYieldSource.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ contract SushiYieldSource is IYieldSource {

uint256 sushiBeforeBalance = sushi.balanceOf(address(this));

uint256 requiredShares = ((amount.mul(totalShares) + totalShares)).div(barSushiBalance);
uint256 requiredShares = ((amount.mul(totalShares).add(totalShares))).div(barSushiBalance);
if(requiredShares == 0) return 0;

uint256 requiredSharesBalance = requiredShares.sub(1);
Expand Down

0 comments on commit 68b67ac

Please sign in to comment.