Can an address have negative balance?

7

This address:n1JagbRWBDi6VMvG7HfZmXX74dB9eiHJzU (on testnet) has a negative balance of -0.27388239 according to: https://www.biteasy.com/testnet/addresses/n1JagbRWBDi6VMvG7HfZmXX74dB9eiHJzU, namely, it has sent more coins than it has received. Is that possible? Is it an error on the block explorer?

ematiu

Posted 2014-01-13T01:21:13.113

Reputation: 203

Answers

5

Short answer: Yes, this is probably a bug in the block explorer. blockexplorer.com shows a positive balance.

Some of the transactions shown there are "strange" (they presumably have non-standard scripts which someone was experimenting with), and this probably is tripping up the biteasy explorer.

Note that the notion of "balance" of an address only really makes sense when using "standard" transactions, where the output script says: to spend these coins, provide a public key whose hash is the address X, and a signature made by the corresponding private key. For fancier transactions, "balance" gets more fuzzy. For instance, I could make a transaction that requires signatures by two private keys, corresponding to addresses X and Y. Should those coins be "credited" to both addresses, or neither? Either way the books will not balance.

Nate Eldredge

Posted 2014-01-13T01:21:13.113

Reputation: 21 420

thanks! I was suspecting that strange transactions were tripping block explorer.ematiu 2014-01-13T02:59:08.737

1

The negative balance was a bug which we have already fixed. You can now see that it's correct and agrees with the one from blockexplorer.com: https://www.biteasy.com/testnet/addresses/n1JagbRWBDi6VMvG7HfZmXX74dB9eiHJzU

Biteasy.com

Posted 2014-01-13T01:21:13.113

Reputation: 171

0

Each wallet or wallet.dat file consists of many separate accounts and each account can have many separate addresses. My understanding is that it is possible for a given account or a specific address to have a negative balance but not the wallet itself.

So for instance I could have a wallet with two accounts foo and bar and with balances of -4 btc and 5 btc respectively but if I query the balance of the wallet itself then it will show 1 btc. I could not however have an accont with 4 btc and the only other with -5 btc because this would leave the wallet with a negative balance.

Loourr

Posted 2014-01-13T01:21:13.113

Reputation: 3 022

Can you explain specifically a sequence of transactions that would give an address a negative balance? As I understand it, with standard transactions this should not be possible, and with nonstandard transactions the very idea of "balance" may not be meaningful.Nate Eldredge 2014-01-13T02:33:12.253