Jimmy Chu
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # PSE Acceleration Program: Semaphore ERC7579 Validator Module ## Project Overview ### Overview [Semaphore](https://semaphore.pse.dev/) is a zero knowledge component that allows users to prove their group membership and send signals without revealing their original identity. With the recent development of Account Abstraction [ERC-4337](https://www.erc4337.io/) and Minimal Modular Smart Account [ERC-7579](https://erc7579.com/), these advancements allow a smart account to install modules to gain extra functionalities. The objective of this accelerator program proposal is to develop a Semaphore ERC-7579 validator module so when this module installed, the smart account allows Semaphore group members (of that particular account) to sign transactions on behalf of the account. I will also integrate [MultiFactor validator](https://github.com/rhinestonewtf/core-modules/blob/main/src/MultiFactor/MultiFactor.sol) so a transaction requires a M (1<=M<=N) of N member signatures, behaving like a multisig wallet. M is configurable by the Semaphore group admin. One advantage of this setup compared to a normal multisig wallet is that signers' privacy is preserved. Because of the [smart account interaction model](https://www.erc4337.io/docs/understanding-ERC-4337/architecture), the original transaction initiator sends http/RPC requests to a bundler, and the bundler in turn sends the transaction on-chain with paymaster configured to pay for the tx fee. So we won't be able to trace who the original transaction initiator is. ### Project Details The idea of this project has been explored by Saleel, and is documented in [his blogpost](https://saleel.xyz/blog/zk-account-abstraction/). It was built at a time when the tool stack was still primitive. In this proposal, I aim to formalize this and solve [semaphore-protocol/semaphore#345](https://github.com/semaphore-protocol/semaphore/issues/345). When a smart account owner install this Semaphore ERC-7579 module to a smart account, a new Semaphore group is created. The user becomes the admin of the group and can manage the members inside. Any members in the Semaphore group will be able to send a zk proof of transaction on behalf the smart account. This is like a 1/N mult-sig wallet, with N being the number of members in the Semaphore group. Next, [MultiFactor validator](https://github.com/rhinestonewtf/core-modules/blob/main/src/MultiFactor/MultiFactor.sol) will be integrated to work with Semaphore validator to make it behave as a M of N multisig wallet. This module will be integrated via [ModuleSDK](https://docs.rhinestone.wtf/module-sdk) to demonstrate the composibility of ERC-7579 modules. At the end of the proposal, the following will be delivered: 1. Semaphore ERC7579 validator module, making it a 1-of-N wallet. 2. Integration with MultiFactor validator, making it a M-of-N wallet. 3. End-to-end test code for testing the following behaviors: - installing the module to a smart account - admin adding/removing members, switching admins - sending transactions with M of N member signatures - uninstalling the module from the smart account 4. Inline code documentation. 5. A front-end demo allowing users to install this module to their smart accounts, add members (identity commitments) to the semaphore group, and sending zk proofs, all happening on a chosen testnet. 6. A writeup to introduce what has been done and give a technical overview of the module. #### Overview of the technology stack to be used - Solidity, and related contract libraries - Rhinestone [ModuleKit](https://docs.rhinestone.wtf/modulekit) and [ModuleSDK](https://docs.rhinestone.wtf/module-sdk) - Hardhat - Foundry - Docker for setting up local and testing environment with a [bundler](https://docs.pimlico.io/infra/bundler). - Next.js, and related front-end libraries for the front-end demo #### PoC/MVP or other relevant prior work or research on the topic - Saleel's [semaphore-wallet](https://github.com/saleel/semaphore-wallet) and [blogpost](https://saleel.xyz/blog/zk-account-abstraction/). - Github discussion among Saleel, Cedoor, John, and myself on exploring this subject: [semaphore-protocol/semaphore#345](https://github.com/semaphore-protocol/semaphore/issues/345) - My other PRs on Semaphore: [PR#875](https://github.com/semaphore-protocol/semaphore/pull/875), [PR#883](https://github.com/semaphore-protocol/semaphore/pull/883) ## Team 👥 ### Team Members - Jimmy Chu Email: jimmychu0807@gmail.com Telegram: [@jimmychu0807](https://t.me/jimmychu0807) Discord: [@jimmychu0807](https://discord.com/users/jimmychu0807) ### Team Website website: https://jimmychu0807.hk/ ### Team's experience I participated in the [PSE Core Program 2024 - Taiwan](https://pse.dev/en/programs), and delivered a capstone project of a zero-knowledge [Number Guessing Game](https://jimmychu0807.hk/pse-core-capstone-project), built upon [Semaphore boilerplate](https://github.com/jimmychu0807/PSE-core-capstone). I previously worked in [Parity](https://www.parity.io/) as Polkadot developer advocate and [CESS](https://cess.network/) as developer advocate advisor. Other prior experience can be seen in [my github profile](https://github.com/jimmychu0807#overview). Other prior experience can be seen in [my github profile](https://github.com/jimmychu0807#overview). ### Team Code Repos <https://github.com/jimmychu0807> ## Development Roadmap 🔩 ### Overview - **Total Estimated Duration:** 4 weeks - **Full-time equivalent (FTE):** 1 - **Total Cost:**: $10,000 - Expected Start Date: - Expected End Date: ### Milestone 1: M-of-N Semaphore validator module - **Estimated Duration:** 2 weeks - **FTE:** 1 - **Cost:** $5,000 - Estimated delivery date: #### Deliverables and Specifications ##### 1. Semaphore ERC7579 validator module It will be a module in ModuleKit validator. Semaphore and related contracts will be deployed to be used in the validator module. With this module, the smart account behave like an 1-of-N multisig wallet. ##### 2. Integration with MultiFactor validator Using ModuleSDK to integrate MultiFactor validator with Semaphore validator developed above. With this integration, the smart account will behave like an M-of-N multisig wallet. ##### 3. End-to-end testing code Both hardhat and foundry test will be written to cover 85% of the Solidity code for unit tests. Local development environment can also be spin up by Docker-compose to run end-to-end test of the module. ##### 4. Inline code documentation All public functions of the module contract will be documented according to [NatSpec format](https://docs.soliditylang.org/en/latest/natspec-format.html). ### Milestone 2: Front-end demo, deployment scripts, and writeup - **Estimated Duration:** 2 weeks - **FTE:** 1 - **Cost:** $5000 - Estimated delivery date: #### Deliverables and Specifications ##### 5. Front-end demo & deployment scripts A front-end demo will be able to spin up locally with a single `yarn` command. Because it relies on existing EntryPoint singleton and Paymaster contract to work, the locally running front end will need to connect to a testnet in order to execute all the functionality of the module. Deployment scripts will be developed for front end being deployed to [Vercel hosting](https://vercel.com/) and smart contracts deployed on a chosen testnet. ##### 6. Writeup A writeup will be submitted for review giving a technical overview of the project. ## Notes - Thanks John Guilding for [the proposal feedback](https://github.com/semaphore-protocol/semaphore/issues/345).

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully