Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

pay to public key instead of pay to merkle tree index #25

Open
barryWhiteHat opened this issue Sep 18, 2019 · 2 comments
Open

pay to public key instead of pay to merkle tree index #25

barryWhiteHat opened this issue Sep 18, 2019 · 2 comments

Comments

@barryWhiteHat
Copy link
Contributor

There are two types of transaction that we could support

  1. Where we create an transactions that will send funds to merkle tree index where we define the index in the merkle tree and send the funds there.
  2. Where we create a transaction that will send funds to a public key.

I would prefer to do 2 as it makes for nice UX when we create accounts.

For example If i don't have an account in rollup I can ask someone to send me some funds to a public key that is not in the tree.

This tx can have a high fee that would incentivize the operator to create an account for me so that they can claim the high fee. This fee can be high enough to reimburse them for the gas fee to create the account.

@barryWhiteHat
Copy link
Contributor Author

Another example of where this is painful is when I want to trade token A for token B.

If I don't hold token B i will need to create a new account for B by going on chain.

If we enable pay to public key I will be pay a marginally higher fee and have the account created for me without having to go on chain.

I think having normal users never needing to pay for gas or worry about it is very nice UX.

@jbaylina
Copy link
Member

I think it's a good idea that what you are signing is the destination public key instead of the index.
In the data availability you continue to put the index.
In the circuit it must much the index and the bublic key.....

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants