dashed-slug.net › Forums › Exchange extension support › Negative Coin Balance
Tagged: exchange, negative balance, trading
- This topic has 8 replies, 3 voices, and was last updated 5 years, 10 months ago by
alexg.
-
AuthorPosts
-
July 13, 2018 at 9:32 am #3628
megeanwasson
ParticipantHi Alex, Great work on the exchange plugin so far 🙂
I have seen maybe an issue/bug in the testing version 0.1.2-beta
I have 2 own coins(based on litecoin) setup and working nicely with the wallet now installed the exchange and did some trades between the coins and have ended up with a negative balance on the on coin.
I am not sure, but think that is not supposed to happen?What would you need from me to help you with this issue?
Let me know so I can give you the correct info to help resolve?
Kind Regards
MeganJuly 13, 2018 at 9:43 am #3629alexg
KeymasterHello Megan,
Thanks for reporting this.
In order to investigate I would need the following:
1. Please identify the WordPress user ID of the user with the negative balance, and the coin symbol of the negative balance.
2. I would need the output of the following SQL queries on your WordPress database:
SELECT * FROM wp_wallets_txs WHERE category='trade' AND account=N AND symbol='XYZ';
SELECT * FROM wp_wallets_orders WHERE account=N AND quote_symbol='XYZ' AND status != 'cancelled';
In the above queries please replace N with the user ID, and XYZ with the coin’s symbol.
If your DB table prefix is something other than
wp_
please replace that in the above queries.Thank you.
kind regards
July 13, 2018 at 10:12 am #3633megeanwasson
ParticipantHi Alex,
You are really quick on the support 🙂
Attached as requested.
Let me know when or if you need further info.Attachments:
You must be logged in to view attached files.July 13, 2018 at 11:30 am #3636alexg
KeymasterThanks I will look at this.
July 13, 2018 at 10:45 pm #3649Anonymous
InactiveHi Alex,
Great job on the exchange plugin!!
I have also been able to get a negative balance while testing.July 14, 2018 at 8:05 am #3654alexg
KeymasterYes, I am still investigating. In the meantime I have released a patch that fixes other bugs.
Plugin is still in beta, thanks for testing!
July 17, 2018 at 2:27 pm #3674alexg
KeymasterIn version
0.2.0-beta
, released just now, I have provided a major refactoring and cleanup of the matching engine. A number of bugs on the trading logic and fee calculation were fixed.Thank you all for you help.
kind regards
July 18, 2018 at 6:04 am #3676megeanwasson
ParticipantGreat work Alex,
I have done the same tests as before, this time I did not get negative balance.
Will continue testing 🙂November 1, 2018 at 4:53 pm #4985alexg
KeymasterAfter a lot of searching I determined the source of the problem and provided a fix in
0.4.2-beta
. The Exchange extension should not cause new negative balances any more when matching trades. The bug was partly due to differences in the application of maker and taker fees to the base currency while buying the quote currency. If you wish to continue testing the plugin, I would suggest that you first wipe all trades and orders from the database, withdelete from wp_wallets_txs where category='trade';delete from wp_wallets_orders;
I will keep the extension in beta for a short while longer and if no more bugs are detected, it will be bumped to
1.0.0
(i.e. production-ready). -
AuthorPosts
- You must be logged in to reply to this topic.