-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
circuitzksnark circuit issueszksnark circuit issues
Description
Allow fees to be taken based upon the transfer. The operator create teh fee tree and passes it as a public input from the smart contract
-
Add a fee value to the signtuare
-
Subtract
sig.amountfrom the sender leaf -
Add
sig.amount - sig.feeto the recipient leaf (be careful about overflows) -
For each transaction the operator maintins a fee tree. With 8 layer.
-
Orginally each leaf is zero.
-
The oeprator can either add a leaf to that tree that represents a single fee in a token.
or -
add fee to the balance of a leaf in that tree as long as it has the same token type.
-
This is passed as a public input to the snark.
-
Confirm that the final fee tree == the public input fee tree
-
Add smart contract functionality to allow the operator to withdraw these funds.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
circuitzksnark circuit issueszksnark circuit issues