Skip to content

Commit

Permalink
fix: use mulDiv for protocol loss comp
Browse files Browse the repository at this point in the history
  • Loading branch information
dyedm1 committed Nov 27, 2023
1 parent 7ea479e commit 650292f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/CollateralTracker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ contract CollateralTracker is ERC20Minimal, Multicall {
// subtract delegatee balance from N since it was already transferred to the delegator
_mint(
delegator,
((assets * (totalSupply - delegateeBalance)) / (totalAssets() - assets)) -
Math.mulDiv(assets, totalSupply - delegateeBalance, totalAssets() - assets) -
delegateeBalance
);
}
Expand Down

0 comments on commit 650292f

Please sign in to comment.