-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
security: taker can lock maker funds without getting his funds locked #1049
Comments
Unless I'm mistaken I believe the funds are only locked until the HTLC expires. I don't think force-closing the channel is necessary unless the other side of the channel is uncooperative, but if they're uncooperative then all funds on the channel are locked until force-close no matter what since that's how LN is designed. |
That was my initial response/understanding of the issue as well. |
Closing a channel with a pending HTLC cooperatively doesn't seems to work, although both parties remain connected and responsive. Let me know if i'm missing something. |
Todo: documentation on how to resolve via force close |
Update: test case was already fixed so that maker channel will get closed after HTLC expiration. It just required more waiting steps before the funds could return to wallet balance (see We should keep this issue open only if we want to disable the maker cancelling the taker invoice, and so allowing his funds to get easily released, instead of punishing him. |
I'm thinking we should leave this issue alone for now (not modifying our cancel logic for now) on the grounds that we will ban a peer eventually whose swaps timeout repeatedly. I believe it's also possible that the maker's HTLC can get held up due to an unresponsive intermediary, so we may be punishing an "innocent" taker. We can revisit this topic if it becomes an issue later on. |
Scenario:
Outcome: maker gets swap timeout, and is cancelling the taker invoice (1st leg) and so releasing the taker funds, while the taker invoice (2nd leg) is not cancelled and so the maker funds are locked until he will force-close the channel on-chain.
The text was updated successfully, but these errors were encountered: