stellar-deprecated / kelp

Kelp is a free and open-source trading bot for the Stellar DEX and 100+ centralized exchanges
https://kelpbot.io
Other
1.1k stars 262 forks source link

[2] Values for amount and price are incorrect on exchanges with low precision #439

Open nikhilsaraf opened 4 years ago

nikhilsaraf commented 4 years ago

related to #435

Describe the bug

The bot is capping precision for amount and volume too early, which results in incorrect values.

Expected behavior

I think the correct behavior in this situation is for the bot to cap precision on volume and price as late as possible and use full-precision values for internal calculations

Frequency

The frequency is: Always (when precision is too low)

Possible Solution

This bug can be fixed by changing when we cap precision

nikhilsaraf commented 4 years ago

this can be solved by increasing the precision on the exchange as much as possible. If this is an issue for you, tag me on this issue.

ddombrowsky commented 4 years ago

does this mean it's no longer a limitation of the go sdk?

ire-and-curses commented 4 years ago

That's correct. Fixed in the Go SDK here: https://github.com/stellar/go/releases/tag/horizonclient-v3.1.0