Insrt-Finance / insrt-v2-contracts

0 stars 3 forks source link

Use ABDK Math Library for Floating Point Calculations #161

Closed NouDaimon closed 1 year ago

NouDaimon commented 1 year ago

Currently a custom SCALE is used to calculate updates of the globalRatio. It may be more prudent to use an existing library, for floating point calculations.

NouDaimon commented 1 year ago

@CruzMolina Thoughts on this? Its not strictly necessary however I'm inclined to think it may be beneficial in some cases for accuracy.

What exists currently instead of ABDK is the SCALE = 10 ** 36 factor which ensures a pretty high accuracy.

CruzMolina commented 1 year ago

I don't think this is necessary for launch. If all goes well and $MINT supply and/or balances start breaching the trillions (accounting for decimal value) then we should put it on the roadmap as an upgrade.