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

circuit transfer add atomic swaps #7

Open
barryWhiteHat opened this issue Mar 28, 2019 · 1 comment
Open

circuit transfer add atomic swaps #7

barryWhiteHat opened this issue Mar 28, 2019 · 1 comment
Assignees
Labels
circuit zksnark circuit issues

Comments

@barryWhiteHat
Copy link
Collaborator

Add conditional payments to the circuit so we can do atomic swaps.

  1. Create a extra fields in the signature dep_prev_to , dep_prev_from, dep_prev_amount, dep_next_to, dep_next_from, dep_next_amount for both the payment beore and after.
  2. If these vaules are zero do nothing
  3. If they are nonzero then the transaction is only valid if the following
tx[i -1].from == dep_prev_from
tx[i -1].to == dep_prev_to
tx[i -1].amount == dep_prev_amount

tx[i _1].from == dep_next_from
tx[i +1].to == dep_next_to
tx[i +1].amount == dep_next_amount
@barryWhiteHat barryWhiteHat added the circuit zksnark circuit issues label Mar 28, 2019
@vaibhavchellani vaibhavchellani self-assigned this Mar 29, 2019
@GuthL
Copy link

GuthL commented Mar 31, 2019

@vaibhavchellani Are you on it? Or would you want me to do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
circuit zksnark circuit issues
Projects
None yet
Development

No branches or pull requests

3 participants