Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

base amount when placing orders is not correct #435

Closed
nikhilsaraf opened this issue Jun 8, 2020 · 0 comments
Closed

base amount when placing orders is not correct #435

nikhilsaraf opened this issue Jun 8, 2020 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@nikhilsaraf
Copy link
Contributor

Describe the bug

The bot gives a significantly different base amount on some occasions.

Expected behavior

I think the correct behavior in this situation is for the bot to use base amounts that are close to the amount specified within a small range of error (to allow for non-exhaustive floating point representations and negligible losses due price or amount conversions)

Frequency

The frequency is: Sometimes

Possible Solution

This bug is likely caused by a recent adjustment of how amounts and prices are propagated to fix another issue. I don't recall the exact issue but it was a recent fix.

We can fix this issue by increasing the precision of inverted numbers. For example,

currently InvertNumber(8, 2) = 0.13, which is wrong.
it needs to be InvertNumber(8, 2) = 0.125.

Your Environment

git hash: f7927c7

@nikhilsaraf nikhilsaraf added the bug Something isn't working label Jun 8, 2020
@nikhilsaraf nikhilsaraf added this to the v1.8.x milestone Jun 8, 2020
@nikhilsaraf nikhilsaraf self-assigned this Jun 8, 2020
@nikhilsaraf nikhilsaraf modified the milestones: v1.8.x, v1.10.0 Sep 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant