Skip to content
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: maker can lock taker funds #1048

Closed
moshababo opened this issue Jun 20, 2019 · 5 comments
Closed

security: maker can lock taker funds #1048

moshababo opened this issue Jun 20, 2019 · 5 comments
Assignees
Labels
question/tbd Further information or discussion needed swaps

Comments

@moshababo
Copy link
Collaborator

Scenario:

  • taker is paying the maker the 1st leg of the swap.
  • maker receives the HTLC, but is shutting down and stops responding.

Outcome: taker funds are locked due to the pending HTLC (unless the maker will cancel the invoice), until the taker will force-close the channel on-chain.

@moshababo moshababo mentioned this issue Jun 20, 2019
29 tasks
@sangaman
Copy link
Collaborator

Is there anything we can do to prevent this? Also per #1049 (comment) I don't think unlocking the funds requires a force-close.

@moshababo
Copy link
Collaborator Author

Is there anything we can do to prevent this?

No AFAIK. @offerm?

@offerm
Copy link
Contributor

offerm commented Jun 29, 2019

For this case the taker should force close the channel and not use this peer again. Note that this can be done by any node along tge route and not just by the maker.

This should not be considered as a big problem since there is no risk of losing money and you can prevent that peer for the next payment

@kilrau kilrau self-assigned this Jul 23, 2019
@kilrau
Copy link
Contributor

kilrau commented Jul 23, 2019

Todo: documentation on how to resolve via force close

@kilrau kilrau assigned ghost Aug 6, 2019
@kilrau kilrau assigned sangaman and unassigned kilrau and ghost Sep 19, 2019
@sangaman sangaman added question/tbd Further information or discussion needed and removed P1 top priority critical bug labels Sep 23, 2019
@sangaman
Copy link
Collaborator

I removed the critical bug label since there is nothing to be fixed (or to be done at all) in the xud codebase to prevent this - whoever sends payment first (in our case the taker) can have the recipient (maker) delay up to the HTLC expiration and that's just the way the network is designed. And this is not a risk of losing funds.

What we need to be sure we are doing is penalizing peers for this, this ties into the greater scheme of how we detect and deal with misbehaving peers.

As for force closing the channel, I believe that if that is necessary it is handled by lnd automatically - it does not require us to intervene to prevent loss of funds.

@kilrau kilrau closed this as completed Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question/tbd Further information or discussion needed swaps
Projects
None yet
Development

No branches or pull requests

4 participants