You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we calculate costs we usually need to convert those from USD to TFT or to get them from price rate over some duration.
By doing so we have to deal with double division and convert the result back to integer since we operate with integers on chain.
Each time we do this we introduce some numerical error by getting rid of some small "after comma" digits.
To minimize this numerical error (btw, which is one of the reason we use usd units instead of musd) it is suggested to use a rounding operation before converting back to integer.
The text was updated successfully, but these errors were encountered:
When we calculate costs we usually need to convert those from USD to TFT or to get them from price rate over some duration.
By doing so we have to deal with double division and convert the result back to integer since we operate with integers on chain.
Each time we do this we introduce some numerical error by getting rid of some small "after comma" digits.
To minimize this numerical error (btw, which is one of the reason we use usd units instead of musd) it is suggested to use a rounding operation before converting back to integer.
The text was updated successfully, but these errors were encountered: