Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Farm token #706

Open
wants to merge 17 commits into
base: feature/dev
Choose a base branch
from
Open

Farm token #706

wants to merge 17 commits into from

Conversation

vishnukumavat
Copy link
Contributor

No description provided.

x/liquidity/abci.go Fixed Show fixed Hide fixed
func FarmCoinDecimals(baseDecimals, quoteDecimals uint64) uint64 {
baseExponent := math.Log10(float64(baseDecimals))
quoteExponent := math.Log10(float64(quoteDecimals))
if baseExponent+quoteExponent >= 18 {

Check notice

Code scanning / CodeQL

Floating point arithmetic

Floating point arithmetic operations are not associative and a possible source of non-determinism
if baseExponent+quoteExponent >= 18 {
return uint64(math.Pow10(18))
}
return uint64(math.Pow10(int(baseExponent + quoteExponent)))

Check notice

Code scanning / CodeQL

Floating point arithmetic

Floating point arithmetic operations are not associative and a possible source of non-determinism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants