2
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?
So if this were to have happened on a blockchain, is there an issue in the codebase? – Pixxl – 2017-10-25T02:59:46.983
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. – Andrew Chow – 2017-10-25T03:32:11.677
Coming back to this later, it seems this is because this is related to a Proof of Stake blockchain! – Pixxl – 2018-08-28T16:08:30.920