<p>First of all: it is in fact not possible at this time to sort a stuck payment. The htlcs are a contract in which you agree to fulfill a payment if the routing node provides a preimage within a time window (the timelock). Assume you would be allowed to remove an htlc before the timelock, not only would this be a breach to the contract but it could easily result in a behavior in which you could initiate a payment, the merchant would claim the money, and while the preimage is propagated back to you, you would cancel your htlc causing the routing node to lose money.</p>

<p>Obviously as a protocol extension we could think about making a different onion request "abort routing" which would inform all nodes on the path to abort. This would have to be executed from the recipient back to the sender and would mitigate the above mentioned way of abusive behavior. </p>

<p>However such a new onion request would mean that everyone on the path is responsive to it. If that was the case in the first place the payment would not have been stuck. </p>

<p>It is always hard for mathematicians (like me) to claim something is impossible. But I think in this case we have it by design impossible / undesirable to cancel htlcs from the sender side. (I am happy to be proven wrong and would enjoy a discussion on the lightning dev ml as I think from a UI / UX perspective your request is totally reasonable) </p>

<p>Also keep in mind what removing an htlc currently means. The state of the channel is changed. </p>

CC BY-SA 4.0
2019-04-23T14:07:54.400Z
Thank you for the quick answer. I think in this case, there wasn't even an HTLC agreed upon yet (the first channel partner was "sleeping", whatever that means). So I guess there are many possible answers and subtleties depending on the precise timing. But I think we should have a better UX story here, and think closely about the possible cases.
stefanwouldgo
CC BY-SA 4.0
2019-04-23T13:51:21.477Z
2019-04-29T03:27:03.137Z
2019-04-29T03:27:03.137Z
Rene Pickhardt
<p>I recently had this problem IRL: tried to pay in a coffee shop with LN, but my channel partner was "sleeping", so after a while I paid in cash. Then, 5 min later, the server comes back online, the LN payment went through and I had to go get my cash back. </p>

<p>lightning-wallet.com doesn't seem to have a stop button, but I think this (IMHO important) usage scenario is just not possible in the protocol right now, is it? The BOLTs say: "For simplicity, a node can only remove HTLCs added by the other node. There are four reasons for removing an HTLC: the payment preimage is supplied, it has timed out, it has failed to route, or it is malformed.". </p>

<p>So I guess the question is, why is this not possible today? Just a UI problem, a protocol shortcoming that will be fixed, or is there a deeper reason why it CAN'T be possible? </p>

<lightning-network><lightning-rfc><ln-node-reliability>
Is there a way to abort a stuck lightning network payment?
stefanwouldgo
# Is there a way to abort a stuck lightning network payment?

(Asked by: username_0 on 2019-04-23)

I recently had this problem IRL: tried to pay in a coffee shop with LN, but my channel partner was "sleeping", so after a while I paid in cash. Then, 5 min later, the server comes back online, the LN payment went through and I had to go get my cash back.

lightning-wallet.com doesn't seem to have a stop button, but I think this (IMHO important) usage scenario is just not possible in the protocol right now, is it? The BOLTs say: "For simplicity, a node can only remove HTLCs added by the other node. There are four reasons for removing an HTLC: the payment preimage is supplied, it has timed out, it has failed to route, or it is malformed.".

So I guess the question is, why is this not possible today? Just a UI problem, a protocol shortcoming that will be fixed, or is there a deeper reason why it CAN'T be possible?

**Tags:** lightning-network, lightning-rfc, ln-node-reliability


---

## 1 answers

### Answer by username_1 on 2019-04-23. Score: 4

First of all: it is in fact not possible at this time to sort a stuck payment. The htlcs are a contract in which you agree to fulfill a payment if the routing node provides a preimage within a time window (the timelock). Assume you would be allowed to remove an htlc before the timelock, not only would this be a breach to the contract but it could easily result in a behavior in which you could initiate a payment, the merchant would claim the money, and while the preimage is propagated back to you, you would cancel your htlc causing the routing node to lose money.

Obviously as a protocol extension we could think about making a different onion request "abort routing" which would inform all nodes on the path to abort. This would have to be executed from the recipient back to the sender and would mitigate the above mentioned way of abusive behavior.

However such a new onion request would mean that everyone on the path is responsive to it. If that was the case in the first place the payment would not have been stuck.

It is always hard for mathematicians (like me) to claim something is impossible. But I think in this case we have it by design impossible / undesirable to cancel htlcs from the sender side. (I am happy to be proven wrong and would enjoy a discussion on the lightning dev ml as I think from a UI / UX perspective your request is totally reasonable)

Also keep in mind what removing an htlc currently means. The state of the channel is changed.

> **Comments:**
> **username_0**: Thank you for the quick answer. I think in this case, there wasn't even an HTLC agreed upon yet (the first channel partner was "sleeping", whatever that means). So I guess there are many possible answers and subtleties depending on the precise timing. But I think we should have a better UX story here, and think closely about the possible cases.  

---

