semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Project Idea: Semaphore + Account Abstraction

Open aguzmant103 opened this issue 1 year ago • 28 comments

aguzmant103 avatar Aug 15 '23 16:08 aguzmant103

Hi @aguzmant103, is there any detail about this project? I would love to build something with this.

FoodChain1028 avatar Sep 18 '23 12:09 FoodChain1028

Hi @FoodChain1028, I've got some ideas about applying Semaphore on AA's wallet recovery. Since a contract-based wallet owner can assign multiple addresses as wallet guardians. We can use Semaphore to register the guardians instead of directly listing them on the smart contract. This alternation can provide privacy if the guardian's address needs to be hidden under some scenarios.

moven0831 avatar Sep 19 '23 08:09 moven0831

Hi @FoodChain1028, I've got some ideas about applying Semaphore on AA's wallet recovery. Since a contract-based wallet owner can assign multiple addresses as wallet guardians. We can use Semaphore to register the guardians instead of directly listing them on the smart contract. This alternation can provide privacy if the guardian's address needs to be hidden under some scenarios.

Hi, @moven0831. This idea looks good, yet for now we have to interact the contract-based wallet with another Externally Owned Address; thus the relationship between this address and proof in revealed as a result. A method from me to fix this is using a relayer address for everyone wants to use this service, the user would send their fee (like a transferring fee and everyone need to send the same amount of money here) and proof to the relayer and relayer would do this for the users. To be more specifically, the relayer is more like a mixer box to:

  1. verify the identity in the Merkle Tree (As the owner of this AA contract).
  2. mix the address to make any proof - user EOA - AA contract unrelated, and thus would preserve the privacy.

FoodChain1028 avatar Sep 19 '23 13:09 FoodChain1028

Hey guys, this could also be useful -> https://github.com/saleel/aa-zk-test

Author: @saleel

cedoor avatar Sep 19 '23 15:09 cedoor

Thanks for the tag @cedoor. It was an experiment I did a while back, and need to make some changes in that code to make it work correctly. I am also in the process of doing a write-up on explaining the whole stuff. Planning to do both in the coming weekend.

saleel avatar Sep 19 '23 15:09 saleel

Hi, @saleel, is there any chance or anything I can help you with?

FoodChain1028 avatar Sep 19 '23 16:09 FoodChain1028

I wrote about it here - https://saleel.xyz/blog/zk-account-abstraction/ Here is the repo with sample code - https://github.com/saleel/semaphore-wallet

@FoodChain1028 Above is a reference implementation. There are some minor changes needed in semaphore (mentioned in the blog towards the end) before we can implement a production level semaphore wallet. But feel free to use the code as you wish, and I would be happy to help if you have any questions.

saleel avatar Oct 09 '23 06:10 saleel