Closed fedgiac closed 4 years ago
I would vote for baseToken and quoteToken, as this is commonly used in finance: https://www.investopedia.com/terms/b/basecurrency.asp
Which one? base or quote? I'm going to go with base.
With my logic, targetToken would become the baseToken and stableToken the quoteToken, right? Since the price is currently given as: [ targetToken ] / [ stableToken ].
If I were to change both, then I imagine the opposite:
targetToken
is the volatile one and subject to being "quoted" while stableToken
is the baseToken
.
Remember that these prices given as ratios are expressed exactly opposite of what you would imagine "[ targetToken ] / [ stableToken ]" means price of Stable Token in terms of Target Token.
So, when we see EUR / CAD is does not mean "how many EUR per CAD", but rather the opposite (i.e. "How many CAD per EUR" or EUR / CAD = 1.52) which says 1 EUR = 1.52 CAD.
Attached is a screenshot of my findings:
However, according to others that I have spoken with in my example above EUR is the "base token" and CAD is the "quote token", so I suppose your suggestion @josojo is correct. However, I find it very strange that ETH is going to become the base token and DAI will become the quote token.
I think this particular line in the code base is a reasonable argument/proof for converting target
to quote
and stable
to base
:
Since it will become:
all prices are of the form: 1 quote token = "price" base tokens
for example,
all prices are of the form: 1 ETH = "price of ETH" DAI
Here are some other comments in the code that would suggest target become quote and stable become base:
My understanding from Wikipedia is that Alex is right and in our code "target"="base" and "stable"="quote". This is also considering your examples, since the price tells you by definition "1 base currency = price quote currency". Without any context I'd also have expected them to work the other way around however.
8500 XBT/USD => 8500 USD = 1 BTC. => 8500 [stableToken] = 1 [targetToken] 110 EUR/JPY => 100JPY = 1 EUR
Hence, xbt and eur should be the base token = target Token.
Ya ok. Not sure why I am so confused here.
This is a conversation we periodically have every couple of weeks 😅
I agree with the comment of @josojo above, just I'm confused why we call it base and target. We usually refer to them as base and quote currencies.
Also understand why @bh2smith is confused, same reason I was confused, or @twalth3r was confused. This is the reverse logic to the mathematical way, where for example 25 Km/h means "25 Km = 1 h"
A/B is the same as A-B, and it’s a market where A is the base and B is the quote. Normally the quote is something the trader is comfortable on seeing price in —> like USD Is the currency the trader will use in the transaction.
When you say A-B price is 100, you mean A Costs 100 B , in other words 1 A = 100 B
Please @Rafanator correct if it's not right
@anxolin you are 100% correct:
A is the base currency, B is quote currency (You use B to quote the price of 1(A), hence the name)
Also, in trading A/B or A-B are fine, traders don't care.
The term "stable token" can be misleading as it's not necessary for the stable token to be "stable" in any sense. The only difference between target token and stable token is that the price is always written in terms of amount of stable tokens against one target token. As proposed by Ben, we could use "relative token" instead.