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

Specify Currency/Chain on ResolveRequest #831

Open
sangaman opened this Issue Mar 14, 2019 · 0 comments

Comments

Projects
None yet
3 participants
@sangaman
Copy link
Collaborator

sangaman commented Mar 14, 2019

When validating the resolve request for swaps we check that the amount matches the expected deal amount, we check cltvdelta, but we don't actually check whether it's the right currency. Theoretically a dishonest peer could attempt to pay us litecoin using the same rHash as for a deal where we expect to receive bitcoin, and xud wouldn't notice the difference because all it sees is the resolve request.

We should add a field to specify the chain or currency to the resolve request and check that this matches the agreed deal when validating a resolve request.

Code reference: https://github.com/ExchangeUnion/xud/blob/master/lib/swaps/Swaps.ts#L557

@kilrau kilrau added this to the 1.0.0-sprint.12 milestone Mar 14, 2019

@kilrau kilrau added the swaps label Mar 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.