-
Notifications
You must be signed in to change notification settings - Fork 32
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
Base and quote currency multipliers usage #97
Comments
HI @mihneacalugaru, The best way to understand base and quote currency multipliers is to understand that their choice affects the range of possible prices your market will support. Prices are stored using a fixed decimal point number that can range from 0 to In your case for instance, if you expect your market price to start at around 10 quote/base. In the underlying representation, since your quote currency has 6 decimals, this would actually be 10^7 raw_quote/base. You would then want the middle of your possible price range (which is the value 1.0) to map to something around 10^7. We can call this price the baseline price. That is saying that having For most use-cases, one of the two multipliers is going to be one. Tick size is somewhat related but not really : the only constraint is that tick size can't be smaller than (1/2**32) the baseline price, which should be something to consider when dealing with assets with smaller prices. For some use-cases, it might be worth it to lower the baseline price to gain some more precision. But most of the time my advice here is not to worry too much about it and just check that your max and min prices are sensible for your use-case. |
Hello @ellttBen, thank you very much for the answer, really appreciate it! I have a question though. Assuming the same case I mentioned above (base mint: 0 decimals & quote mint: 6 decimals), if I create the market with the multipliers you specified ( |
Hi @mihneacalugaru,
So the recommendation here would be quote_multiplier = 10^6 and base_multiplier = 1. |
Hello,
I am trying to make sense of the base and quote currency multipliers. I don't think I got why do we use them or how do we use them.
Aren't the decimals numbers of the mints enough?
Let's say I have a market with the following pair:
Sorry if these are silly question, I'm just trying to figure how everything ties together.
The text was updated successfully, but these errors were encountered: