The negative amount is the transaction fees earned by the miner for generating the block.

A Bitcoin transaction is made of input amounts and output amounts. To pay a transaction fee to get your transaction included in a block in a timely fashion, your Bitcoin client crafts a transaction with a larger input than output. the extra money that doesn't come out of transactions is the fee. The miner gets to keep the transaction fees of all transactions they include in a block.

The previous posters are misinterpreting the information shown about the transaction where the miner gets paid 50BTC reward + fees earned. The input is 50BTC, but the output is 50BTC plus the fees earned, so the block explorers show a negative amount when calculating the "fee" for that transaction.

The negative amount is the transaction fees earned by the miner for generating the block.

A Bitcoin transaction is made of input amounts and output amounts. To pay a transaction fee to get your transaction included in a block in a timely fashion, your Bitcoin client crafts a transaction with a larger input than output. the extra money that doesn't come out of transactions is the fee. The miner gets to keep the transaction fees of all transactions they include in a block.

The previous posters are misinterpreting the information shown about the transaction where the miner gets paid 50BTC reward + fees earned. The input is 50BTC, but the output is 50BTC plus the fees earned, so the block explorers show a negative amount when calculating the "fee" for that transaction.

No, this isn't what this is, there really are serious display errors in blockchain.info. Neither blockexplorer nor blockchain.info have a habit of displaying tx fees paid to the miner as "negative tx fees". http://blockchain.info/block/0000000000000765555944646925edf0449cb6d33c7d8ecf335b01aec1d94ace is a summary of block 168425 which claims that the total transaction fees paid is negative, which is impossible. And if you look at the transactions in the block, many are displayed as having no input.

There was a problem with mysqld crashing when I reimported the blockchain last week. In my attempt to debug it I ran a query which shouldn't have been run which messed up some inputs. Rather than start again I decided to leave it and instead write a blockchain verifying program to check and repair the consistency of all inputs and outputs.

However there was all a problem with the verifying program as it would only commit changes for the first error it found. Me being lazy i was only checking the first error, looking up the tx and then assuming the rest would be repaired also. This issue has been fixed now and the verifying program should have repaired everything properly.