Liquidity provider utxo management

Liquidity provider utxo management

Original Postby remyers

Posted on: May 10, 2024 14:29 UTC

The recent submission of a new draft pull request, PR 30080, to the Bitcoin repository marks a significant shift from its predecessor, PR 29442, by introducing simplified coin selection parameters focused on enhancing transaction efficiency.

One key feature of this proposal is the add_excess_to_recipient_position parameter, which addresses a common inefficiency in transactions where excess input value—over what is necessary for meeting the desired fee rate and output targets—is traditionally lost as fees. This feature allows users to redirect any surplus value to an output under their control, thereby reducing unnecessary fee expenditure.

This change is particularly relevant in scenarios where transaction fees are high, making the addition of change outputs costly and increasing the significance of conserving excess value. For example, integrating on-chain funds into a Lightning channel would benefit from crediting any excess off-chain, improving the efficiency of such transactions. Similarly, Lightning Service Providers (LSPs) utilizing liquidity ads find it advantageous to allocate surplus funds as additional inbound liquidity rather than spending them on fees. LSPs aiming to sell inbound liquidity could optimize their operations by maintaining a collection of UTXOs sized precisely for funding transactions at various fee rates without necessitating extra inputs or change outputs. The ideal scenario for an LSP involves having a confirmed UTXO that matches the funding amount plus the fee at the current fee rate, maximizing the use of funds.

By avoiding the creation of a change output, which can make a transaction approximately 37% more costly, LSPs can retain excess value as extra inbound liquidity, thereby covering a wider range of likely fee rates with fewer UTXOs. This strategy enables a more efficient management of UTXO sets, allowing for transactions to be conducted at specific fee rates and retaining excess value up until it surpasses the cost of adding a change output. Such a methodical approach to "tiling" UTXO spaces ensures that intervals are non-overlapping and smaller than the threshold for necessitating a change output, thereby optimizing the liquidity provision process to closely align with the ideal scenario of always possessing a perfectly sized UTXO for changeless transactions. Moreover, this innovative proposal also recognizes potential benefits for users beyond LSPs, including instances where individuals might receive credit for the extra value from custodians or retailers, underscoring the versatility and user-centric focus of the new coin selection parameters.