Rename rounding modes and complete with fourth (#4455)

Co-authored-by: ernestognw <ernestognw@gmail.com>
This commit is contained in:
Francisco
2023-07-13 17:52:03 -03:00
committed by GitHub
parent a55af77c75
commit 84db204a41
10 changed files with 210 additions and 173 deletions

View File

@ -81,10 +81,10 @@ abstract contract ERC4626Fees is ERC4626 {
}
function _feeOnRaw(uint256 assets, uint256 feeBasePoint) private pure returns (uint256) {
return assets.mulDiv(feeBasePoint, 1e5, Math.Rounding.Up);
return assets.mulDiv(feeBasePoint, 1e5, Math.Rounding.Ceil);
}
function _feeOnTotal(uint256 assets, uint256 feeBasePoint) private pure returns (uint256) {
return assets.mulDiv(feeBasePoint, feeBasePoint + 1e5, Math.Rounding.Up);
return assets.mulDiv(feeBasePoint, feeBasePoint + 1e5, Math.Rounding.Ceil);
}
}