Reversing pair order


#1

Is there any way to reverse the pair order? I have two tokens, one is called “TRADETOKEN” and the other is called “TRADEMONEY”. These were created to be used for a crypto trading simulation game. The offline version has been very popular. When I go to trade this pair, it refers to buying TRADEMONEY with TRADETOKENS. I realize I can do the exact same transactions regardless of which order they are listed in, but this game is for complete newbies and it is totally counterintuitive for them to buy and sell money with tokens. Tokens are the things you buy and sell, Money is what you pay for them with. That is how the game is supposed to work. It makes intuitive sense. But that’s not how they are displayed. I have tried reversing which one is token1 and which one is token2. Doesn’t matter. It always wants to buy and sell money instead of buying tokens with money.

This is a completely trivial thing, but it completely ruins the game as a tool for new people. I could create new tokens, but what determines which order they will be in? Is there any possible way to just get the damn thing to display the pair the other way?


#2

This is a known issue with counterblock.

If your users are using counterwallet the only way is to add the TRADEMONEY on the counterblock code as the liquid asset. There’s no current way to do this from the user side.

As how to handle this, if you’re creating a wallet for the game, you could just invert the trade formula on the user facing data. (less than ideal, but it’s how it’s done on some projects)


#3

I’m not planning to create a new user interface. I want them to learn to use counterwallet. Another solution is to create a new currency and a new token, but what determines which one is considered the liquid asset? Is it based on which one is created first? Is it based on which one is typed in as asset 1 the first time the pair is traded? Is it something else?


#4

On counterblock there’s a variable called QUOTE_ASSETS (in counterblock/lib/config.py) that determines the main quote asset in certain situations.

Regarding default ordering of quote assets, i still don’t have a clear knowledge of how counterwallet orders quote assets (still a lot of stuff needed to understand the whole codebase).