Issues with too many UTXOs (the infamous insufficient balance message)

I found some time to debug this and it appears that the problem lies in the fact that some bitcoin addresses end up controlling many (as in dozens) of unspent outputs, which makes it expensive to make a transaction using the 0.0002 BTC fee, so the Counterwallet message is technically correct, but (for example) if you ask Bitcoin Core, it may tell you that 0.00017538 is “enough”.

This may also be the reason for other wallet problems related to “insufficient balance”, such as Issuances and so on.

This would have been identified much earlier if bug reports were useful and contained client-side logs or at least address details, but that seems too much to ask for.

Once this is fixed or there’s a workaround, I’ll update this topic.

How to work around this issue (wrong “insufficient balance” message due to too many unspent transaction outputs) until it’s fixed:

###Theory

  • You need to set a higher transaction fee because you need to (inefficiently) gather many outputs in order to compose a transaction
  • Folks who do a lot of (Counterparty) transactions from the same address may end up having many UTXO’s. For example somebody registers 50 assets from the address.

###Practice

  • There are different ways to do this, but everyone should use (or not) the way they feel comfortable with
  • I used Joe’s RarePepeWallet (the same pass phrase as for Counterwallet works with it)
    • In Chrome, use Developer Tools to see the error (about insufficient transaction fee)
  • Then in RarePepeWallet Settings, set BTC Tx Fee to that amount
  • Now you can make that send; deduct the custom fee from the balance, and you can send BTC out
  • In my particular case the minimum transaction fee required was 8000 satoshi (0,0008 BTC) instead of the default 0,0002 BTC, so I set BTC Tx Fee to that amount (0,0008). The exact amount varies depending on the situation with UTXO’s but I highlighted it because it’s 400% of the default fee which many think is already high.

###Gotchas

This fixes just one aspect of this problem, which is that you can’t send BTC from the address.
But if you tried to do something else - like make a DEx order or issue a Counterparty asset or something else, this wouldn’t necessarily work for you.

Another potential way to fix those other issues - using my example above - would be to send 0.00081 to your address and then maybe Counterwallet would find that unspent output to pay with it (or maybe not, it’s not guaranteed - this should be tried on testnet).