Miner funds consolidation

Currently the miners of Kaspa create a single UTXO every block they mine.

This causes UTXO-set bloat, and creates difficulty for miners to spend their mined coins.

This is also a blocker for an increased block rate, 10x block rate will create 10x UTXOs.

I suggest implementing a special kind of transaction, a compounding one, where source and destination addresses are the same, input UTXOs are strictly coinbase ones, and the output value is slightly greater than the sum of the inputs; this excess is calculated as a certain small coefficient multiplied by a polynomial or exponential function of the number of used coinbase UTXOs and their values in order to encourage the user to combine as many outputs as possible in one transaction, instead of making many small unions that do not give a significant gain to a system.

Such transactions are to be launched only from the wallet manually, thus eliminating the need for the mining software to access the user’s password, but it will be rational for the user to automate this process by periodically starting the wallet with the appropriate command, especially for users who will mine for sale and who therefore need the maximum profit at any given time. The command to the wallet can be supplied with parameters, so that it either terminates without executing if the number of unspent outputs is not enough to get the maximum possible benefit (the wallet itself must determine what the limit is, based on the maximum allowed transaction mass), or so that it is executed unconditionally, with the key like ‘–force’.

and the output value is slightly greater than the sum of the inputs

But this effects the total emission of coins, and also gives more value to larger miners, which is undesired from decentralization standpoint

In general, one can think of allowing coinbase transactions to have a UTXO input (thus constantly aggregating), however this introduces the following tradeoff/dillema:

  • Spending a UTXO usually requires a signature, thus complicating miner logic and requiring interaction with miner’s wallet

  • Allowing the usage of a UTXO which belongs to the same mining address without a signature, might have many side-effects which are usually avoided in the UTXO model, such as replay attacks and double-spending on behalf of someone by mining to his address

| But this effects the total emission of coins
Yes it does but in a predictable way and with a calculable upper limit.

If true, this is already sufficient incentive for miners to consolidate their UTXOs.

If indeed true, what’s preventing miners from consolidating their UTXOs today? Is it purely the lack of automatic mechanism to consolidate?

If so, I propose a flag in the miner app, that when set, remembers the one consolidated or n consolidated UTXOs, and then adds to the mining template a transaction in the same block that consolidates it with the coinbase or even a special transaction that consolidates it into the coinbase.

If always set to run this way, this mechanism would ensure there would be just one large UTXO the miner rolls on like a snowball (good name for the flag).

A parameter n can be used to define how many snowball UTXOs to keep (instead of one), and it can round robin between them.

A “migration” would need to happen before, where miners consolidate all their UTXOs into n snowball UTXOs.

The con is that the miner would have to call the wallet to sign a transaction when it finds a block.

To circumvent this, we could have new blocks invalidate the consolidated coinbase txs and validate the consolidating coinbase tx whenever there is a new block that asks to be paid to the same address as an existing block.

thanks for the awesome information.