Predictive UTXO Management
Dmitry Petukhov presents a different approach to the UTXO consolidation problem called Organic Consolidation.
For UTXO-based cryptocurrencies, it is important to have the set of managed Unspent Transaction Outputs in optimal shape, because if you have too much small UTXO, you will have to create bigger transactions to send the same amount of funds, and hence pay bigger network fee, or even need to send several transactions to transfer the needed amount.
Typical approach to handle this is to do periodical sweep of UTXO, bundling them all together, at the time when network fee is low.
We implemented another approach, that does not require manual UTXO consolidation, and at the same time, conserves network fee - when fee in the network is high, the algorithm tries to use less UTXO per transaction, and when network fee is low, it will create bigger transaction, effectively performing UTXO consolidation along with regular payments. This organic UTXO consolidation allows to maintain healthy UTXO set automatically, without manual consolidation runs.
We implemented it this way:
Define a rate that you are OK to pay in terms of monetary percentage: we call it “fee per full coin”. Basically, you say, “to send 1 btc, I am willing to pay 0.001 btc” When building a transaction, we calculate optimal tx size like this:
optimal_tx_vsize = utxo_sum * fee_per_full_coin / fee_per_kb
Support us and the authors of this article by donating to the following address:3GpvRMpun9kGyHCqBVDyP1hchFox1ZY1cz