@@ -199,13 +199,24 @@ fn get_reserve_per_channel_with_input(
199
199
200
200
/// Returns the amount that needs to be maintained as a reserve per anchor channel.
201
201
///
202
- /// This reserve currently needs to be allocated as a disjoint set of UTXOs per channel,
202
+ /// This reserve currently needs to be allocated as a disjoint set of at least 1 UTXO per channel,
203
203
/// as claims are not yet aggregated across channels.
204
204
///
205
- /// Note that the returned amount assumes that the reserve will be provided by a single UTXO of the
206
- /// type indicated by [AnchorChannelReserveContext::taproot_wallet]. Larger sets of UTXOs with more
207
- /// complex witnesses will require a correspondingly larger reserve due to the weight required to
208
- /// spend them.
205
+ /// To only require 1 UTXO per channel, it is assumed that, on average, transactions are able to
206
+ /// get confirmed within 1 block with [ConfirmationTarget::UrgentOnChainSweep], or that only a
207
+ /// portion of channels will go through unilateral closure at the same time, allowing UTXOs to be
208
+ /// shared. Otherwise, multiple UTXOs would be needed per channel:
209
+ /// - HTLC time-out transactions with different expiries cannot be aggregated. This could result in
210
+ /// many individual transactions that need to be confirmed starting from different, but potentially
211
+ /// sequential block heights.
212
+ /// - If each transaction takes N blocks to confirm, at least N UTXOs are needed to provide the
213
+ /// necessary concurrency.
214
+ ///
215
+ /// The returned amount includes the fee to spend a single UTXO of the type indicated by
216
+ /// [AnchorChannelReserveContext::taproot_wallet]. Larger sets of UTXOs with more complex witnesses
217
+ /// will need to include the corresponding fee required to spend them.
218
+ ///
219
+ /// [ConfirmationTarget::UrgentOnChainSweep]: crate::chain::chaininterface::ConfirmationTarget::UrgentOnChainSweep
209
220
pub fn get_reserve_per_channel (
210
221
context : & AnchorChannelReserveContext ,
211
222
) -> Result < Amount , AnchorChannelReserveError > {
0 commit comments