The wallet is used for send out XMR to our customers, it had been working well for quite some time, all of a sudden, its unlocked-balance became zero, also with its num_unspent_outputs, but its balance is more than 1000. it had been like this for several hours, I don't think it was because pending incomming or outgoing transactions.can someone help me out here, thanks. btw the node monerod the wallet connects to is synced to the latest block.
1 Answer
Consider this:
- The wallet receives one single transaction A of 1000 XMR.
- You send out 0.2 XMR to a customer, creating transaction B.
What is the unlocked balance of the wallet now?
The answer is: 0 XMR. Why?
Transaction A had one output, which became the only input of transaction B. Inputs are spent entirely, which means that transaction B takes the only input with all of your balance and creates 2 outputs (a simplification disregarding fees):
- 0.2 XMR that goes to your customer,
- 999.8 XMR that goes back to your wallet as change output
Before B receives 10 confirmations, all the outputs, including change, are locked.
So, if you received your funds in a low number of incoming transactions, it's easy to get locked out. Basically, you may send as many instant transactions as many incoming ones have filled your wallet (another simplification). Then you'll have to wait.
Frequently used wallets with multiple small payments are more liquid due to fragmentation and high number of unspent outputs.
-
thank you very much, yes it was because the low number of outputs, also we killed the wallet serveral times, its status was out of sync, we also run rescan-blockchain and rescan-spent. Commented Nov 30, 2017 at 2:42