-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0cd3f84
commit 50f6213
Showing
2 changed files
with
69 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
``` | ||
bLIP: 14 | ||
Title: Inbound routing fee discount | ||
Status: Draft | ||
Author: Joost Jager <[email protected]> | ||
Created: 2022-08-29 | ||
License: CC0 | ||
``` | ||
|
||
## Abstract | ||
|
||
The Lightning BOLTs define a routing fee that is based on the policy of the | ||
_outgoing_ channel. This makes it impossible for routing node operators to | ||
differentiate in fees between incoming channels. | ||
|
||
Incoming traffic from some peers may be more desired than from others, for | ||
example because it balances out traffic in the opposite direction. | ||
|
||
This bLIP defines an optional `channel_update` message field to express an | ||
inbound fee discount. Senders who are able to read this field can benefit from | ||
lower routing fees using those channels. | ||
|
||
## Copyright | ||
|
||
This bLIP is licensed under the CC0 license. | ||
|
||
## Specification | ||
|
||
Origin node: | ||
|
||
* MAY include a `channel_update` optional TLV record keyed by type `32769` with | ||
the following value: | ||
|
||
* [i32:inbound_fee_base_msat] | ||
* [i32:inbound_fee_proportional_millionths] | ||
|
||
These fields SHOULD be negative numbers that define the inbound discount for | ||
that channel. | ||
|
||
Receiving node: | ||
|
||
* MAY pay each routing node the sum of its advertised inbound and outbound fee | ||
for the incoming and outgoing channel that is used. This should amount to a | ||
lower value than just the outbound fee. | ||
|
||
`outbound_fee(amt_to_fwd) + inbound_fee(amt_to_fwd + outbound_fee(amt_to_fwd))` | ||
|
||
Note that the inbound fee is calculated over the total balance shift of the | ||
incoming channel. This includes the outbound fee. | ||
|
||
* For the final node, the inbound discount does not apply. | ||
|
||
## Universality | ||
|
||
This feature is defined as a BLIP because it's optional. | ||
|
||
## Backwards Compatibility | ||
|
||
By defining the inbound fee as a negative number, senders who don't understand | ||
the new field will still be able to make payments. Routing nodes will accept | ||
overpayment on fees. |