Skip to content

Commit

Permalink
dividing first can lead to decimal numbers and break the transfer (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
vhcsilva authored Oct 1, 2022
1 parent 6f9116d commit 34ebcad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/bepro/NetworkV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ contract NetworkV2 is Governed, ReentrancyGuard {
require(bounties[id].funding.length > fundingId, "W2");
_amountGT0(bounties[id].funding[fundingId].amount);

uint256 rewardAmount = bounties[id].funding[fundingId].amount.div(bounties[id].fundingAmount).mul(bounties[id].rewardAmount);
uint256 rewardAmount = bounties[id].funding[fundingId].amount.mul(bounties[id].rewardAmount).div(bounties[id].fundingAmount);

bounties[id].funding[fundingId].amount = 0;

Expand Down

0 comments on commit 34ebcad

Please sign in to comment.