forked from BitcoinAndLightningLayerSpecs/lsp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LSPS1: Explicitly support LSPS1 payment options
This PR aims to address a few problems in LSPS1. I'll provide a few motivating examples of why I believe the changes proposed in this MR are desirable. # 1. Use seprate fee for onchain vs lightning payment Onchain payments are more expensive for the LSP than lightning payments because they create their own utxo. The LSP will have to carry the cost of spending that new utxo at a later point in time. This PR provides LSP's the option to set a different fee depending on the payment method. On a related note @2Fast2BCn [noted](BitcoinAndLightningLayerSpecs#95 (comment)) that a similar argument could be made for the `expiry_date` of an order. The LSP might want to set a different `expiry_date` depending on the chosen payment option. See issue: BitcoinAndLightningLayerSpecs#92 See comment: BitcoinAndLightningLayerSpecs#95 (comment) # 2. Extensibility for additional payment methods This PR allows to add additional payment options later. In this section I'll provide a few motivating example. ## 2.1. Dual funding Recently, dual-funding got merged to the spec. The spec describes a new channel open protocol in which both the client and server can contribute funds. This approach provides a superior trust model. The client doesn't have to trust the LSP to open the channel. The benefit is especially clear if `client_balance_sat` is high. In the current version of LSPS1 the LSP could take the money and run. ## 2.2. BOLT-12 support Today, BOLT-11 invoices are commonly used to make payments over lightning. Personally, I'd describe myself as a BOLT-12 maxi. This PR makes it easier to add BOLT-12 as a payment option later. ### 2.3 Withhold from first payment We see a demand for JIT-channels where the client specifies the channel-size. This is currently not possible on LSPS2 or LSPS4. See issue: BitcoinAndLightningLayerSpecs#65 # Breaking changes: Why (not) to merge this MR? We are in a bit of tension here. The spec is marked as `FOR IMPLEMENTATION` but we are seeing some usage on mainnet. This PR is breaking in the sense that clients will not be able to purchase channel if either the client or server uses this new revision. However, there will be some hassle for users but merging this MR should not put any funds at risk.
- Loading branch information
1 parent
170dba0
commit 33a5410
Showing
1 changed file
with
117 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters