delvingbitcoin

Liquidity provider utxo management

Liquidity provider utxo management

Original Postby remyers

Posted on: March 20, 2024 14:39 UTC

In exploring the optimization of coin selection algorithms for specific transaction scenarios, the focus shifts towards the potential benefits of utilizing CoinGrinder (CG) and Branch and Bound (BnB) over traditional methods such as Knapsack and SRD.

The suggestion to modify the sendmany RPC to enable the selection from a subset of algorithms or to exclude Knapsack and SRD entirely is aimed at refining the process to better suit the unique requirements of managing liquidity transactions and bucket refills. This approach acknowledges the limitations of current input set candidate post-processing, which relies solely on the waste metric, suggesting a more nuanced strategy might yield improved results.

The proposed methodology involves initially attempting to create a changeless transaction using only the liquidity transaction output. If this proves unsuccessful, subsequent attempts would incorporate additional targets derived from the amounts missing in various buckets, specifically excluding UTXOs already allocated to buckets. This dual-phase strategy underscores the importance of distinguishing between bucketed and non-bucketed Unspent Transaction Outputs (UTXOs), raising questions about the most effective means of segregation—whether through separate wallets, amount ranges, or distinctive marking.

A practical implementation of these concepts is demonstrated through the creation of a dedicated branch enabling selective algorithm activation and the execution of simulations comparing the performance of BnB and CG against the full suite of available algorithms. Surprisingly, initial results indicate that the unrestricted algorithm selection may lead to marginally lower total fees and fewer median inputs, contrary to expectations. These findings prompt further investigation into the factors influencing coin selection efficiency and highlight the challenge of effectively identifying and separating bucketed and non-bucketed UTXOs for optimal algorithm application. The practice of pre-selecting the highest-value UTXO not assigned to a bucket for inclusion in the refill process, informed by predefined bucket ranges, exemplifies a targeted strategy aiming to balance the need for efficient transaction processing with the complexities of bucket management.