<p>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:
<a href="https://www.biteasy.com/testnet/addresses/n1JagbRWBDi6VMvG7HfZmXX74dB9eiHJzU" rel="nofollow">https://www.biteasy.com/testnet/addresses/n1JagbRWBDi6VMvG7HfZmXX74dB9eiHJzU</a></p>

CC BY-SA 3.0
2014-01-21T20:12:01.627Z
2014-01-21T20:12:01.627Z
Biteasy.com
<p>Each wallet or <code>wallet.dat</code> 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. </p>

<p>So for instance I could have a wallet with two accounts <code>foo</code> and <code>bar</code> 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.  </p>

CC BY-SA 3.0
2014-01-13T02:33:12.253Z
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
CC BY-SA 3.0
2014-01-13T01:45:38.943Z
2014-01-13T01:45:38.943Z
Loourr
<p>Short answer: Yes, this is probably a bug in the block explorer.  <a href="http://blockexplorer.com/testnet/address/n1JagbRWBDi6VMvG7HfZmXX74dB9eiHJzU" rel="noreferrer">blockexplorer.com shows a positive balance.</a></p>

<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2014-01-13T02:59:08.737Z
thanks! I was suspecting that strange transactions were tripping block explorer.
ematiu
CC BY-SA 3.0
2014-01-13T02:31:27.827Z
2014-01-13T02:31:27.827Z
Nate Eldredge
<p>This address:n1JagbRWBDi6VMvG7HfZmXX74dB9eiHJzU (on testnet) has a negative balance of -0.27388239 according to: <a href="https://www.biteasy.com/testnet/addresses/n1JagbRWBDi6VMvG7HfZmXX74dB9eiHJzU">https://www.biteasy.com/testnet/addresses/n1JagbRWBDi6VMvG7HfZmXX74dB9eiHJzU</a>, namely, it has sent more coins than it has received. Is that possible? Is it an error on the block explorer?</p>

<address><testnet><blockexplorer>
Can an address have negative balance?
ematiu
# Can an address have negative balance?

(Asked by: username_0 on 2014-01-13)

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

**Tags:** address, testnet, blockexplorer


---

## 3 answers

### Answer by username_3 on 2014-01-13. Score: 5 | Accepted answer

Short answer: Yes, this is probably a bug in the block explorer. [blockexplorer.com shows a positive balance.](http://blockexplorer.com/testnet/address/n1JagbRWBDi6VMvG7HfZmXX74dB9eiHJzU)

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.

> **Comments:**
> **username_0**: thanks! I was suspecting that strange transactions were tripping block explorer.  

---

### Answer by username_1 on 2014-01-21. Score: 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.username_1/testnet/addresses/n1JagbRWBDi6VMvG7HfZmXX74dB9eiHJzU>


---

### Answer by username_2 on 2014-01-13. Score: 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.

> **Comments:**
> **username_3**: 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.  

---

