Hey guys - I have a question for you all and for the dev team. Our MMC wallet did something REALLY weird yesterday.
I run AllCrypt.com, an exchange where MMC is traded. Users make addresses and each address in the wallet is attached to a user ID (via the account system in the wallet).
We received a deposit of 880 MMC yesterday to an address that we never made, that was not attached to a user. I assumed someone out there typo'ed an address and mis-sent us the MMC by mistake. I'd look into it later.
This morning I start getting errors that a user is trying to withdraw 100 MMC but it's failing because he does not have enough in his wallet. This sometimes happens with some odd orders where a rounding issue makes a wallet insolvent by 1 satoshi. I fix it, find the code error, and patch it up.
But this user's balance was at -780 MMC. Something that should not be possible.
So I looked at his transactions - and at the very same time he did a 120 MMC withdrawal yesterday, he ALSO did a 880.018 withdrawal to that weird address we saw the deposit enter yesterday.
NOTHING in our logs show that happening. NOTHING in our logs show that address. It's not a change address - those are not seen as deposits. A .07 MMC fee was paid for the transfer. Fees are not paid for change. There was no withdrawal initiated on our side for that amount.
Why did the MMC wallet randomly send 880 MMC from an account that did not even have 880 MMC, to an address in the same wallet?
Seriously concerning me. That should NOT happen.
But actually... after I wrote all that it looks like that MIGHT have been change...? But why was the change recorded as a send? With a paid fee?
The user withdrew 120 MMC, and the source seems to be from an address that had a 1000 MMC deposit - so the 880 change makes sense, but why was the change "sent" with a fee that entered the blockchain? For bitcoin, you can see the change transactions when looking at blockchain.info but NORMAL 'listtransactions' in the bitcoind RPC do not show change.
This is showing as an ACTUAL send - like an intentional send from an address.
Unfortunately, both block explorers are down so I cant even show the transactions.
This is a known issue. To make voting easier FreeTrade decided to use a one address per wallet approach, which unfortunately breaks the account management as explained in
https://en.bitcoin.it/wiki/Accounts_explainedTo fix this, start your memorycoind with command line option -multiaddress
The following outlines your problem:
memorycoind getaccountaddress abc
### send 5 MMC to that address
memorycoind listaccounts
{
"" : 0.00000000,
"abc" : 5.00000000
}
memorycoind move abc def 2.15
memorycoind listaccounts
{
"" : 0.00000000,
"abc" : 2.85000000,
"def" : 2.15000000
}
memorycoind sendfrom abc 2
memorycoind listaccounts
{
"" : 2.95999007,
"abc" : -2.15000000,
"def" : 2.15000000
}
This is how it should work:
----------------------------------------------------------------------------------
primecoind getaccountaddress abc
### send 2.4 XPM to that address
primecoind listaccounts
{
"" : 0.00000000,
"abc" : 2.40000000
}
primecoind move abc def 1.1
primecoind listaccounts
{
"" : 0.00000000,
"abc" : 1.30000000,
"def" : 1.10000000
}
primecoind sendfrom abc 1
primecoind listaccounts
{
"" : 0.00000000,
"abc" : 0.29000000,
"def" : 1.10000000
}