I have a transaction. This transaction was taking a value from AddrX and sending it to itself in a "split" of sorts. In the transaction there is one VIN of 98000000. This transaction split the stack and has two VOUT. They are both 49000000.5. There is a transaction fee of 1.00.

In this case, the total VOUT is 98000001 which exceeds the total VIN of 98000000. However, that difference is found in the transaction fee.

From what I have understood about the blockchain and transactions, the transaction fee is: Fee: sum(vin) - sum(vout) so it results in a -1 transaction fee.

My issue here is that if I were building a database to track this address I would end up subtracting 98000000 from their balance, and then would add the two incoming values of 49000000.5 which would end up placing their total balance after this transaction to 98000001 which would be incorrect. Now, I could add logic to remove the transaction fee incurred from this manually; however I would have assumed that this transaction would be invalid because the total VOUT was greater than the total VIN.

Could this situation be possible? So far from transactions I've seen, the transaction fee has already been applied to one of the VOUT and thus would not cause this error. If it is possible, how can I detect this and remedy it?

2 Answers 2


Such transactions would be invalid. While you could create them, all nodes would reject them as invalid and such transactions would never confirm. If this were possible, then it would be possible to create money out of nothing (except in Coinbase transactions) and that should be impossible.

You have either constructed your transaction incorrectly, or are interpreting it incorrectly.

  • So if this were to have happened on a blockchain, is there an issue in the codebase?
    – Pixxl
    Commented Oct 25, 2017 at 2:59
  • It means that there is possibly a problem in a given client's validation code, not necessarily a problem with the consensus rules themselves or with the coin. That a client would accept such an invalid transaction means that the client has a problem.
    – Ava Chow
    Commented Oct 25, 2017 at 3:32
  • Coming back to this later, it seems this is because this is related to a Proof of Stake blockchain!
    – Pixxl
    Commented Aug 28, 2018 at 16:08

The bitcoin protocol rules https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages (rule 14) prevent this. It is a reject criteria for nodes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.