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

Maker should only send their Private Key after receiving the Private Key of incoming swap #347

Open
rishkwal opened this issue Dec 26, 2024 · 0 comments
Milestone

Comments

@rishkwal
Copy link
Collaborator

In our current implementation the maker sends the private key for their outgoing funding transaction to the taker before getting the private key of the incoming funding transaction. This creates an attack vector where the taker would always benefit from not handing over her private key to the maker.
image
So, in this scenario Alice could just send the Hash Preimage to Charlie and get the private keys for the multisig of the last hop(without sending anything to Bob). If she does that she can perform a coinswap without having to pay the mining fees to the makers and all the intermediate makers would lose on mining fee. And this could be done without affecting privacy of the taker.
This can be mitigated by changing the order of which privkey goes first. here in the diagram if Charlie demands to see ResPrivkeyHandover(1) then only release RespPrivkeyHandover(2) then Alice cannot withold the key or else his incoming swap will not settle.

@rishkwal rishkwal added this to the v0.1.1 milestone Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant