-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Currently the LSPS2ServiceConfig takes a static min_channel_opening_fee_msat. The main cost an LSP faces is the on-chain fees when opening and closing channels. It seems like they would use the min_fee as a way to make sure they receive at least enough fees to cover their chain fees should the initial payment be too small to do so via the ppm fee.
Given the dynamic nature of the on-chain fees it makes sense to allow this min_channel_opening_fee_msat to also be dynamic. One option would be to instead allow them to configure a multiplier on the current fee rate instead of a fixed min fee. ldk-node is already managing the fee estimations and could use the provided multiplier (e.g. 2.0 x current fee rates) to calculate the min_channel_opening_fee_msat for the user.
Alternatively, could allow min_channel_opening_fee_msat be a callback/Fn the user provides an implementation for. This is pretty similar to #559, so perhaps there's a combined path forward where user can just provide some kind of GetInfo callback where they get the token/pubkey and can perform both the token check and min fee calculation.