Open extra topbar

Negative Coin Balance

If you are new here, please see some information on how to ask for support. Thank you!

Negative Coin Balance

dashed-slug.net Forums Exchange extension support Negative Coin Balance

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #3628
    megeanwasson
    Participant

    Hi 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
    Megan

    #3629
    alexg
    Keymaster

    Hello 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

    #3633
    megeanwasson
    Participant

    Hi 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.
    #3636
    alexg
    Keymaster

    Thanks I will look at this.

    #3649
    EOTCoin
    Participant

    Hi Alex,

    Great job on the exchange plugin!!
    I have also been able to get a negative balance while testing.

    #3654
    alexg
    Keymaster

    Yes, I am still investigating. In the meantime I have released a patch that fixes other bugs.

    Plugin is still in beta, thanks for testing!

    #3674
    alexg
    Keymaster

    In 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

    #3676
    megeanwasson
    Participant

    Great work Alex,
    I have done the same tests as before, this time I did not get negative balance.
    Will continue testing 🙂

    #4985
    alexg
    Keymaster

    After 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, with delete 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).

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.