Block 69530 has negative mint

I discovered a strange thing. The block 69530 has negative mint, -0.07. How is this possible? Does this indicate some problem with the wallet?

ppcoind getblock d301ac0d35d6deeee73d1f4e270cb38d2e2424bb7ad35a3b36914f14b109dc38 { "hash" : "d301ac0d35d6deeee73d1f4e270cb38d2e2424bb7ad35a3b36914f14b109dc38", "size" : 15091, "height" : 69530, "version" : 1, "merkleroot" : "1e35c2c0ea4b17b57cc82a821b6d48e987962b8edf4cac27054153ec7788fdcf", "time" : "2013-09-16 00:46:06 UTC", "nonce" : 0, "bits" : "1c49932a", "difficulty" : 3.47939629, "mint" : -0.07000000, "previousblockhash" : "000000000000072a9bdc35a66e89a0715e58973c77dde9779ce062878f892d3c", "nextblockhash" : "bf6f3d33edb9d06a744222db92babad4ca7dc08485295830b8890ac9af11de0e", "flags" : "proof-of-stake", "proofhash" : "00000000d45b2d60abbcecf5af2018289d181c10662fa9b94e0d26c50bf55dc3", "entropybit" : 1, "modifier" : "0c43a639473bdf2a", "modifierchecksum" : "069aded9", "tx" : [ "a6f4ce17deee8cc3f7e2a76c34cff4acbaeffa86b169f574352f2ea103bfa004", "1f08a44d9a7dea031f23659a81eb5581874898dc22378e741483d9c0167860cb" ] }

This POS block has a weird minting transaction (the second transaction in the block: 1f08a44d9a7dea031f23659a81eb5581874898dc22378e741483d9c0167860cb).

Instead on having just one, the minting transaction has 100 inputs (???).

Given the coinage destroyed in this transaction, the minting reward would be 0.07 PPC.
However, because of these 100 inputs, the transactions takes 14kB, which means 0.14 PPC as fee (given the 0.01 PPC fee per kB).

Maybe that’s why the getblock RPC function gives -0.07 as mint value (0.07 - 0.14 = 0.07)…

Think of this scenario, a PoW miner who gets frequent tiny payouts doesn’t want to wait until each tiny transaction he received earns stake and successfully mints a 1% reward. It will take a very long time due to the dozens and dozens of tiny fragmented transactions.

So he sends his entire wallet contents to himself, to amalgamate all of the coins into one large transaction. He destroys his coinage, pays a fee for the kb, and now can use the large sum as stake as a result.

This is probably what has happened here. That is why there are 100 inputs.

There is a feature in Bitcoin and Peercoin that allows some one to send coins to “yourself”.

In the case of block 69530, the transaction appears in second position in the block, and the second transaction of a POS block is supposed to indicate which coins were used to mint this block (and the reward).
When you send coins to yourself, it is a regular transaction, so it should not appear before the third position.

If you make a transaction “abc123” sending 100 inputs to yourself and then mint with these coins, the minting transaction will have as only input the output of the transaction “abc123”, not its 100 inputs.

If I understand the minting process correctly, each output to one of your addresses in the unspent transactions you received tries to mint a block for itself, therefore a minting transaction should always have a single input.

Of course someone could create a block like 69530 by hand and send it to the network, but why would the nodes accept it in the blockchain ?

Try it yourself, even on testnet, you’ll get the same effect.

The only way to prove this to you, is for you to witness it yourself.

Get a wallet address, and send it fragments of coins:

June 1, send it 0.15 PPC (pool minted reward with block erupters)
June 3, send it 0.21 PPC (pool minted reward with block erupters)
June 7 send it 0.08 PPC (pool minted reward with block erupters)
June 9 send it 500 PPC (bought a huge amount of PPC with U.S. Dollars on an exchange)

Keep this up, until you have 100 transactions with fragmented coins.

Then wait 45 days

When you don’t mint anything for the first 0.15 PPC transaction, and you realize that it will be a VERY long time before you mint a block based on the coin-age accrued…

Send all the coins back to yourself in one lump sum. This destroys all coin-age, makes a huge transaction to amalgamate all the coins into one lump sum. You’ll pay a hefty kb block fee (like 0.07 to do it)

Now, you wait 31 days now, and your coin-age is now based on 1 single large transaction of 500+ coins.

What I’m telling you is accurate. You can speculate on the block as much as you like, the only way to prove it, is for you to do this your self on testnet and see it.

With this transaction you get one big output by spending all the small inputs.

And the minting transaction of a block minted with these coins will have the single large transaction as input (not the many small transactions that have already been spent).

You can compare the second transaction (minting transaction) of block 69530 and of another POS block (for example 114199) on a block explorer, they really don’t look the same.
Block 69530
Block 114199

It seems to me that it is combining of the stakes:

For some reason, I thought there are only two stakes combined, but apparently they are being combined until POW reward / 3:

This is also why is this never observed on testnet… Strange thing is, however, that the fees are being charged. But maybe the kB-size fees are charged for mints, while the 0.01 transaction fee is not.

Indeed, after trying to combine several small inputs in the coinstake transaction when the total amount of these inputs in under nCombineThreshold (with 100 inputs as maximum), the CreateCoinStake function checks if enough fee is paid.

And as the maximum size of a coinstake transaction is 100kB, the fee can get pretty high.

So when combining a lot of tiny inputs in a coinstake transaction, there’s a chance that the fee will be bigger than the reward, like in block 69530.

What is the purpose of the mint variable?

I guess it is some kind of bloating attack. However, facts are 1.tiny amount of transactions could be merged into PoS minting. 2. malicious attacker trying to bloat the blockchain will find he would run out of coins eventually and therefore the attack is not sustainable.
Another genius design. My next coin would be why SK is so tight on the size of blockchain.

This is normal, coinstake currently also serves to somewhat reduce dust (likely caused by mining pools) by collecting small coins into larger coins. In this case it also needs to pay transaction fee of 0.01PPC per KB, even for stake. Users are not discouraged from minting in this case, as users would have to pay those fees at spending time anyway.