delvingbitcoin

Liquidity provider utxo management

Liquidity provider utxo management

Original Postby remyers

Posted on: September 11, 2024 15:14 UTC

In a recent simulation testing PR 30080, significant findings were observed in the context of funding liquidity ads.

The primary outcome demonstrated that by adding excess to the funding output utilizing the add_excess_to_recipient_position parameter, in transactions without change, an increase in transaction fees of about 14% was noted, compared to a 26% increase in the baseline scenario where no changes to coin selection were made. The baseline considered for comparison was the cost associated with a one input, one output transaction. It was highlighted that if all 24,809 simulated funding transactions followed the one input and output model, the extra fees would be nullified. Although the use of the max_excess parameter did not substantially alter the additional fees incurred, it did contribute to an increase in changeless transactions from 86% to 92%, along with a rise in UTXOs within the targeted buckets.

The simulations were based on a series of funding requests derived from a specified probability distribution alongside historical fee rates from April 2023 to April 2024, with data sourced from txstats.com. This period included two distinct phases of high fee rates. In comparing three different simulation scenarios, results showcased variations in the UTXO set size, average bucket capacity, extra fees, and the percentage of changeless transactions. Notably, the scenario where excess was added (with max excess equated to the cost of adding a change output) resulted in reduced UTXO set sizes and slightly lower excess fees compared to disabling the addition of excess, which aligns with current bitcoind behavior.

The detailed structure of the simulation involved tracking UTXO buckets across different fee rates and funding amounts, aiming at maintaining a healthy ecosystem of available UTXOs for creating new funding transactions. By initiating the simulation with 255 UTXOs of 0.05 BTC each and periodic refills every 10,000 blocks, the model aimed to accurately reflect real-world operational dynamics. The probability distribution for fee rates over the simulation period was meticulously crafted to mirror anticipated market conditions, thus providing a robust foundation for the simulated funding requests.

For those interested in exploring further, the simulation code and comprehensive results are accessible here, offering an in-depth view into the technical methodologies and outcomes observed throughout this experimental phase.