morpho-org / morpho-utils

Repository gathering useful libraries and contracts.
GNU Affero General Public License v3.0
65 stars 1 forks source link

Add fuzz finding revert on percentmul #105

Closed QGarchery closed 1 year ago

Rubilmax commented 1 year ago

I fixed the failing tests because test ranges were too wide. In particular, when rounding half up, it is necessary that the test value be less than type(uint256).max - half_scale, which wasn't necessarily the case.

QGarchery commented 1 year ago

I can't review because I opened this PR, but consider that I approve it :)

Rubilmax commented 1 year ago

I shouldn't have merged this. Let's do this optimistically: if you've got changes requests, let's discuss them here first and I'll open a dedicated PR after.