morpho-org / morpho-utils

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

perf: compound math div #60

Closed MathisGD closed 1 year ago

MathisGD commented 1 year ago

Trying to formally prove CompoundMath (#59), I realized that some computations on the div functions where unnecessary.

Instead of doing SCALE x x / y / WAD, we can simply do WAD x x / y.

Note that I didn't modified the non-overflowing test, because we are comparing against Compound's library (in fact not really).

MathisGD commented 1 year ago

Amazing ! thanks