Skip to content

circuit transfer add atomic swaps #7

@barryWhiteHat

Description

@barryWhiteHat

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

Metadata

Metadata

Labels

circuitzksnark circuit issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions