Skip to content

Commit e435847

Browse files
bLIP-0025: Allow forwarding HTLCs that underpay the onion encoded value
1 parent de30d99 commit e435847

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

blip-0025.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
```
2+
bLIP: 25
3+
Title: Allow forwarding HTLCs with less value than the onion claims to pay
4+
Status: Draft
5+
Author: Valentine Wallace <[email protected]>
6+
Created: 2023-05-22
7+
License: CC0
8+
```
9+
10+
## Abstract
11+
12+
Penultimate hops in lightning payment paths may want to take an extra fee from the payee's final
13+
received value. To do so, they can simply forward less than the amount encoded in the onion by the
14+
sender, and specify the exact fee they took in a new `update_add_htlc` TLV for the receiver to
15+
verify.
16+
17+
## Copyright
18+
19+
This bLIP is licensed under the CC0 license.
20+
21+
## Specification
22+
23+
Penultimate hop on the path:
24+
* In their outbound `update_add_htlc` message, MUST include a TLV record keyed by type XXX with a
25+
TLV value containing the amount of extra fee they took from the receiver's final received value,
26+
in millisatoshis
27+
28+
Receiver:
29+
* MUST check TLV XXX from the inbound `update_add_htlc` to ensure the fee taken by the previous hop
30+
makes sense
31+
* MUST fail back the HTLC if TLV XXX is missing or its value is unexpected
32+
33+
## Motivation
34+
35+
For context, it is expected that many lightning users will be connected to the lightning network via
36+
LSPs (Lightning Service Providers), who will be responsible for managing channel liquidity on end
37+
users' behalf.
38+
39+
Often, users are onboarded to these services via a just-in-time inbound channel when they first
40+
receive a payment. However, this channel open costs money, and so liquidity providers may want to
41+
take an extra fee so that users can help bear the cost of this initial on-chain fee.
42+
43+
## Rationale
44+
45+
While it would be possible to avoid the extra TLV record if receivers could be trusted to calculate
46+
that the fee taken by the penultimate hop is as-expected, in practice this may be tricky to get
47+
right. If there were a bug in this logic, a sender could exploit it by forwarding less than than the
48+
invoice's expected value, and receive proof-of-payment that they paid the full value.
49+
50+
## Reference Implementations

0 commit comments

Comments
 (0)