I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

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

Block explorer and User Balance Mismatch

dashed-slug.net Forums General discussion Block explorer and User Balance Mismatch

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #2626
    Anonymous
    Inactive

    Hi Alex,

    I was pointed out by one of my users. Balances at CLAM blockchain khashier.com and at justclam.com site does not match. Any idea why is that?

    However when i checked daemon, balances do tally.

    Thanks

    #2630
    alexg
    Keymaster

    Hello,

    I’m a bit confused, why did you expect the balances on two different sites to match?

    Every site should have its own set of transactions, and therefore user balances.

    (I assume that you have connected both sites to the same wallet, something that I would advise against because it introduces a single point of failure for both sites in case of a hack. But in any case, just because the wallet balances match does not mean that the user balances should also match.)

    Let me know. Thanks.

    #2635
    Anonymous
    Inactive

    Hey Alex,

    No i have not connected two sites with same wallet.

    I meant, wallet balance and site balance does not match.

    Balance on website is not matching with the balance in wallet.

    #2636
    Anonymous
    Inactive

    Alex,

    http://khashier.com is a CLAM block explorer.

    Thanks

    #2639
    alexg
    Keymaster

    The wallet balance and the users balances are not the same thing. The difference is explained in the glossary section of the documentation.

    Reasons why the two amounts would diverge:

    1. As users pay fees for transactions, their total balances decrease but the wallet balance stays the same.
    2. If you have used the cold storage feature, or alternatively if you have deposited/withdrawn directly from the wallet and not via the plugin, then the balances will not match. See the Cold Storage section in the documentation for more.

    As for the block explorer, I assume you have created a coin adapter for CLAM. This is where the hook would go to add the block explorer URIs. See the Block Explorers section of the documentation for example code and instructions.

    Please let me know if any of this is not clear

    kind regards

    #2640
    Anonymous
    Inactive

    yes i have used cold wallet .. is it because of that usr balance does not match with client balance?

    As far no withdrawals has happened, so in that case balances in client and site should match, amI correct?

    #2642
    Anonymous
    Inactive

    Alex,

    Is user balance stored anywhere? I could not find any entry in database. Where is user balance stored? If need to rectify manually how do i do?

    #2650
    alexg
    Keymaster

    User balances are not stored anywhere – they are derived as the sum of all user transactions. This is safer than storing a single number that could be easily manipulated.

    If you have deposited or withdrawn via cold storage then that would, by design, affect the wallet balance but not the user balances. So the difference would be expected.

    #2667
    Anonymous
    Inactive

    Hey Alex,

    Thanks for your valuable and impeccable support all the time. I have messed with wallet manually as well as cold storage.

    So redoing everything, hope this keeps everything straight.

    Well! I guess i messed, but, still are sortable.

    Thanks

    #2670
    alexg
    Keymaster

    Keep in mind that the user balances should be OK, no harm was done.

    If you have withdrawn funds so that the wallet balances are less than the user balances, then simply deposit funds again to an address that does not correspond to a user. No need to start from scratch.

    #2672
    Anonymous
    Inactive

    Yes all seems to be good.

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